Преглед на файлове

Merge branch 'upmaster' into gogs-merged

* upmaster: (53 commits)
  repo: fix stale webhook documentation link (#5883)
  locale: sync from Crowdin
  .github: add refine feature_request and add security templates
  .github: add config.yml and update bug_report template
  Dockefile: format and use tagged version
  README: add phonetic symbol
  README: add Syncloud to Product Support
  mirror: use Git command to update origin remote address (#5767) (#5865)
  go.mod: update github.com/go-macaron/binding@v1.0.1
  public: makes CodeMirror mode by filename lookups case-insensitive (#5857)
  templates: fix line wrap for very long commit message
  public: update highlights.js to 9.16.2 (#5856)
  go.mod: update github.com/gogs/go-libravatar (#5851)
  tls: update default CurvePreferences and CipherSuites (#5850)
  templates: update version info
  db/repo: print more error info
  repo: delete local copies on owner name change (#5843)
  README: remove unstable badge
  README: use modern style of badges
  locale: sync from Crowdin
  ...
Achilleas Koutsou преди 5 години
родител
ревизия
aa846ca9c4
променени са 100 файла, в които са добавени 1262 реда и са изтрити 477 реда
  1. 35 23
      .github/ISSUE_TEMPLATE/bug_report.md
  2. 5 0
      .github/ISSUE_TEMPLATE/config.yml
  3. 15 9
      .github/ISSUE_TEMPLATE/feature_request.md
  4. 12 0
      .github/ISSUE_TEMPLATE/security.md
  5. 0 0
      .packager/.godir
  6. 0 0
      .packager/Procfile
  7. 2 2
      .packager/hooks/postinst
  8. 7 10
      .pkgr.yml
  9. 5 3
      .travis.yml
  10. 21 18
      Dockerfile
  11. 6 8
      Makefile
  12. 2 2
      README.md
  13. 3 4
      README_ZH.md
  14. 5 3
      appveyor.yml
  15. 4 2
      conf/locale/locale_bg-BG.ini
  16. 2 0
      conf/locale/locale_cs-CZ.ini
  17. 3 1
      conf/locale/locale_de-DE.ini
  18. 2 0
      conf/locale/locale_en-GB.ini
  19. 16 15
      conf/locale/locale_en-US.ini
  20. 7 5
      conf/locale/locale_es-ES.ini
  21. 2 0
      conf/locale/locale_fa-IR.ini
  22. 3 1
      conf/locale/locale_fi-FI.ini
  23. 7 5
      conf/locale/locale_fr-FR.ini
  24. 2 0
      conf/locale/locale_gl-ES.ini
  25. 4 2
      conf/locale/locale_hu-HU.ini
  26. 55 53
      conf/locale/locale_id-ID.ini
  27. 2 0
      conf/locale/locale_it-IT.ini
  28. 4 2
      conf/locale/locale_ja-JP.ini
  29. 2 0
      conf/locale/locale_ko-KR.ini
  30. 2 0
      conf/locale/locale_lv-LV.ini
  31. 8 6
      conf/locale/locale_nl-NL.ini
  32. 2 0
      conf/locale/locale_pl-PL.ini
  33. 2 0
      conf/locale/locale_pt-BR.ini
  34. 2 0
      conf/locale/locale_pt-PT.ini
  35. 7 5
      conf/locale/locale_ru-RU.ini
  36. 2 0
      conf/locale/locale_sk-SK.ini
  37. 2 0
      conf/locale/locale_sr-SP.ini
  38. 2 0
      conf/locale/locale_sv-SE.ini
  39. 8 6
      conf/locale/locale_tr-TR.ini
  40. 2 0
      conf/locale/locale_uk-UA.ini
  41. 2 0
      conf/locale/locale_vi-VN.ini
  42. 3 1
      conf/locale/locale_zh-CN.ini
  43. 10 8
      conf/locale/locale_zh-HK.ini
  44. 13 11
      conf/locale/locale_zh-TW.ini
  45. 3 1
      docker/README.md
  46. 71 0
      go.mod
  47. 283 0
      go.sum
  48. 8 5
      gogs.go
  49. 16 16
      internal/auth/auth.go
  50. 0 0
      internal/auth/github/github.go
  51. 0 0
      internal/auth/ldap/README.md
  52. 2 2
      internal/auth/ldap/ldap.go
  53. 0 0
      internal/auth/pam/pam.go
  54. 0 0
      internal/auth/pam/pam_stub.go
  55. 0 0
      internal/avatar/avatar.go
  56. 0 0
      internal/avatar/avatar_test.go
  57. 313 0
      internal/bindata/bindata.go
  58. 14 14
      internal/cmd/admin.go
  59. 0 0
      internal/cmd/admin_gin.go
  60. 7 7
      internal/cmd/backup.go
  61. 0 0
      internal/cmd/cert.go
  62. 0 0
      internal/cmd/cert_stub.go
  63. 0 0
      internal/cmd/cmd.go
  64. 28 28
      internal/cmd/hook.go
  65. 7 6
      internal/cmd/import.go
  66. 7 7
      internal/cmd/restore.go
  67. 34 34
      internal/cmd/serv.go
  68. 37 36
      internal/cmd/web.go
  69. 2 2
      internal/context/api.go
  70. 3 3
      internal/context/api_org.go
  71. 3 3
      internal/context/auth.go
  72. 19 19
      internal/context/context.go
  73. 3 3
      internal/context/context_gin.go
  74. 4 4
      internal/context/notice.go
  75. 8 8
      internal/context/org.go
  76. 24 24
      internal/context/repo.go
  77. 4 4
      internal/context/user.go
  78. 10 10
      internal/cron/cron.go
  79. 0 0
      internal/dav/dav.go
  80. 0 0
      internal/dav/middle.go
  81. 2 2
      internal/db/access.go
  82. 7 7
      internal/db/action.go
  83. 4 4
      internal/db/admin.go
  84. 3 3
      internal/db/attachment.go
  85. 5 5
      internal/db/comment.go
  86. 1 1
      internal/db/error.go
  87. 0 0
      internal/db/errors/errors.go
  88. 0 0
      internal/db/errors/issue.go
  89. 0 0
      internal/db/errors/login_source.go
  90. 0 0
      internal/db/errors/org.go
  91. 0 0
      internal/db/errors/repo.go
  92. 16 0
      internal/db/errors/token.go
  93. 0 0
      internal/db/errors/two_factor.go
  94. 0 0
      internal/db/errors/user.go
  95. 0 0
      internal/db/errors/user_mail.go
  96. 0 0
      internal/db/errors/webhook.go
  97. 4 4
      internal/db/git_diff.go
  98. 1 1
      internal/db/git_diff_test.go
  99. 6 6
      internal/db/issue.go
  100. 3 3
      internal/db/issue_label.go

+ 35 - 23
.github/ISSUE_TEMPLATE/bug_report.md

@@ -1,25 +1,43 @@
 ---
 name: Bug report
-about: Create a report to help us improve
+about: Report problems and unexpected behavior
 
 ---
 
-First of all, read https://www.chiark.greenend.org.uk/~sgtatham/bugs.html.
+<!--
+
+First of all, please 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.
+1. Please speak English, we have forum in 中文: https://discuss.gogs.io/c/getting-help/getting-help-chinese.
+2. Please post any questions, configuration or deploy problems on our forum: https://discuss.gogs.io.
 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.
+4. Please take a moment to search and make sure the issue doesn't already exist.
+5. Please give all relevant information below for bug reports; incomplete details are 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.
+<!-- A clear and concise description of what the bug is -->
+
+**Gogs version or commit**
+<!-- The version number or the commit SHA of the Gogs instance you use -->
+
+**Git version**
+
+```
+$ git version
+
+```
+
+**Operating system**
+<!-- The name and version of your operating system -->
+
+**Database**
+<!-- The database and version you use -->
 
 **To Reproduce**
 Steps to reproduce the behavior:
@@ -28,23 +46,17 @@ Steps to reproduce the behavior:
 3. Scroll down to '....'
 4. See error
 
+**Can you reproduce the bug at https://try.gogs.io?**
+<!-- If yes, please provide the example URL; if no, please explain why -->
+
 **Expected behavior**
-A clear and concise description of what you expected to happen.
+<!-- A clear and concise description of what you expected to happen -->
+
+**Actual behavior**
+<!-- A clear and concise description of what you see instead -->
 
 **Screenshots**
-If applicable, add screenshots to help explain your problem.
+<!-- 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: explain why
-- Log gist (usually found in `log/gogs.log`):
+<!-- Please include any error logs found in `log/gogs.log` -->

+ 5 - 0
.github/ISSUE_TEMPLATE/config.yml

@@ -0,0 +1,5 @@
+blank_issues_enabled: false
+contact_links:
+  - name: Gogs Community Forum
+    url: https://discuss.gogs.io/
+    about: Please ask and answer questions here.

+ 15 - 9
.github/ISSUE_TEMPLATE/feature_request.md

@@ -4,23 +4,29 @@ about: Suggest an idea for this project
 
 ---
 
+<!--
+
+First of all, please 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.
+1. Please speak English, we have forum in 中文: https://discuss.gogs.io/c/getting-help/getting-help-chinese.
+2. Please post any questions, configuration or deploy problems on our forum: https://discuss.gogs.io.
 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.
+4. Please take a moment to search and make sure the 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 feature**
+<!-- A description of what feature you would like -->
 
 **Describe the solution you'd like**
-A clear and concise description of what you want to happen.
+<!-- 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.
+<!-- 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.
+<!-- Add any other context or screenshots about the feature request here -->

+ 12 - 0
.github/ISSUE_TEMPLATE/security.md

@@ -0,0 +1,12 @@
+---
+name: Security vulnerability
+about: Report security vulnerability for this project
+
+---
+
+<!--
+
+Please create a dummy issue with high-level description of the security vulnerability,
+then report details to u@gogs.io privately, thank you!
+
+-->

+ 0 - 0
packager/.godir → .packager/.godir


+ 0 - 0
packager/Procfile → .packager/Procfile


+ 2 - 2
packager/hooks/postinst → .packager/hooks/postinst

@@ -9,9 +9,9 @@ APP_GROUP=$(${CLI} config:get APP_GROUP)
 APP_CONFIG="/etc/${APP_NAME}/conf/app.ini"
 
 mkdir -p $(dirname ${APP_CONFIG})
-chown ${APP_USER}.${APP_GROUP} $(dirname ${APP_CONFIG})
+chown "${APP_USER}"."${APP_GROUP}" $(dirname ${APP_CONFIG})
 [ -f ${APP_CONFIG} ] || ${CLI} run cp conf/app.ini ${APP_CONFIG}
-${CLI} config:set USER=${APP_USER}
+${CLI} config:set USER="${APP_USER}"
 sed -i "s|RUN_USER = git|RUN_USER = ${APP_USER}|" ${APP_CONFIG}
 sed -i "s|RUN_MODE = dev|RUN_MODE = prod|" ${APP_CONFIG}
 

+ 7 - 10
.pkgr.yml

@@ -9,6 +9,8 @@ targets:
     <<: *debian
   debian-10:
     <<: *debian
+  debian-11:
+    <<: *debian
   ubuntu-14.04:
     <<: *debian
   ubuntu-16.04:
@@ -18,22 +20,17 @@ targets:
       - mercurial
   ubuntu-18.04:
     <<: *debian
-  centos-6: &el
+  centos-7:
     build_dependencies:
       - pam-devel
-      # required for go buildpack
+      # required for Go buildpack
       - perl-Digest-SHA
     dependencies:
       - pam
       - git
-  centos-7:
-    <<: *el
 before:
-  - mv packager/Procfile .
+  - mv .packager/Procfile .
 after:
   - mv bin/gogs gogs
-after_install: ./packager/hooks/postinst
-# Can be updated after CentOS 6 support is dropped, otherwise fails with
-# `fatal: bad config file line 2 in /home/pkgr/.gitconfig` because of
-# https://github.com/heroku/heroku-buildpack-go/blob/f96ebebfa7605fd3916521e42ab050c81c9b947a/lib/common.sh#L238
-buildpack: https://github.com/heroku/heroku-buildpack-go.git#v76
+after_install: ./.packager/hooks/postinst
+buildpack: https://github.com/heroku/heroku-buildpack-go.git#v126

+ 5 - 3
.travis.yml

@@ -1,10 +1,12 @@
 language: go
 go:
-  - 1.8.x
-  - 1.9.x
-  - 1.10.x
   - 1.11.x
   - 1.12.x
+  - 1.13.x
+go_import_path: gogs.io/gogs
+
+env:
+  - GO111MODULE=on
 
 before_install:
   - sudo apt-get update -qq

+ 21 - 18
Dockerfile

@@ -1,29 +1,32 @@
-FROM golang:alpine AS binarybuilder
-# Install build deps
-RUN apk --no-cache --no-progress add --virtual build-deps build-base git linux-pam-dev python py-pip
+FROM golang:alpine3.10 AS binarybuilder
+RUN apk --no-cache --no-progress add --virtual \
+  build-deps \
+  build-base \
+  git \
+  linux-pam-dev
+
 WORKDIR /go/src/github.com/G-Node/gogs
 COPY . .
 RUN make build TAGS="sqlite cert pam"
 
-FROM alpine:latest
-# Install system utils & Gogs runtime dependencies
+FROM alpine:3.10
 ADD https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64 /usr/sbin/gosu
 RUN chmod +x /usr/sbin/gosu \
   && echo http://dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories \
   && apk --no-cache --no-progress add \
-    bash \
-    ca-certificates \
-    curl \
-    git \
-    linux-pam \
-    openssh \
-    s6 \
-    shadow \
-    socat \
-    tzdata \
-    python \
-    py-pip \
-    rsync
+  bash \
+  ca-certificates \
+  curl \
+  git \
+  linux-pam \
+  openssh \
+  s6 \
+  shadow \
+  socat \
+  tzdata \
+  rsync \
+  python \
+  py-pip
 
 RUN pip install supervisor pyyaml
 RUN mkdir /git-annex

+ 6 - 8
Makefile

@@ -3,7 +3,7 @@ LDFLAGS += -X "github.com/G-Node/gogs/pkg/setting.BuildGitHash=$(shell git rev-p
 
 DATA_FILES := $(shell find conf | sed 's/ /\\ /g')
 LESS_FILES := $(wildcard public/less/gogs.less public/less/_*.less)
-GENERATED  := pkg/bindata/bindata.go public/css/gogs.css
+GENERATED  := internal/bindata/bindata.go public/css/gogs.css
 
 OS := $(shell uname)
 
@@ -33,16 +33,14 @@ govet:
 	$(GOVET) models pkg routes
 
 build: $(GENERATED)
-	go install $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(TAGS)'
-	cp '$(GOPATH)/bin/gogs' .
+	go build $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(TAGS)' -trimpath -o gogs
 
 build-dev: $(GENERATED) govet
-	go install $(BUILD_FLAGS) -tags '$(TAGS)'
+	go build $(BUILD_FLAGS) -tags '$(TAGS)' -trimpath -o gogs
 	cp '$(GOPATH)/bin/gogs' .
 
 build-dev-race: $(GENERATED) govet
-	go install $(BUILD_FLAGS) -race -tags '$(TAGS)'
-	cp '$(GOPATH)/bin/gogs' .
+	go build $(BUILD_FLAGS) -race -tags '$(TAGS)' -trimpath -o gogs
 
 pack:
 	rm -rf $(RELEASE_GOGS)
@@ -53,9 +51,9 @@ pack:
 
 release: build pack
 
-bindata: pkg/bindata/bindata.go
+bindata: internal/bindata/bindata.go
 
-pkg/bindata/bindata.go: $(DATA_FILES)
+internal/bindata/bindata.go: $(DATA_FILES)
 	go-bindata -o=$@ -ignore="\\.DS_Store|README.md|TRANSLATORS|auth.d" -pkg=bindata conf/...
 
 less: public/css/gogs.css

+ 2 - 2
README.md

@@ -11,7 +11,7 @@ Management of scientific data, including consistent organization, annotation and
 
 To minimize the time and effort scientists have to spend on these tasks, we develop the GIN (G-Node Infrastructure) services, a free data management system designed for comprehensive and reproducible management of scientific data.
 
-## Why should I use gin?
+## Why should I use GIN?
 ### Manage your data from anywhere
 * Upload your data on a repository based structure: you can create as many repositories as you like.
 * Access your data from anywhere: once the data is at the main repository service you can securely access your data from anywhere you like.
@@ -35,7 +35,7 @@ To minimize the time and effort scientists have to spend on these tasks, we deve
 By indexing the repository contents it's easy to find the files you are looking for. When using the [NIX](http://www.g-node.org/nix) data format for scientific data and metadata, even the contents of these files will be indexed and searchable, making it easy for you to identify the data you are looking for.
 
 ## Acknowledgments
-Gin Gogs is largly based on [Gogs](https://github.com/gogits/gogs)
+GIN is based on [Gogs](https://github.com/gogits/gogs)
 
 ## License
 

+ 3 - 4
README_ZH.md

@@ -1,11 +1,10 @@
-Gogs [![Build Status](https://travis-ci.org/gogs/gogs.svg?branch=master)](https://travis-ci.org/gogs/gogs) [![Build status](https://ci.appveyor.com/api/projects/status/b9uu5ejl933e2wlt/branch/master?svg=true)](https://ci.appveyor.com/project/Unknwon/gogs/branch/master)
-=====================
+# Gogs
 
 Gogs 是一款极易搭建的自助 Git 服务。
 
 ## 项目愿景
 
-项目旨在打造一个以最简便的方式搭建简单、稳定和可扩展的自助 Git 服务。使用 Go 语言开发使得 Gogs 能够通过独立的二进制分发,并且支持 Go 语言支持的 **所有平台**,包括 Linux、macOS、Windows 以及 ARM 平台。
+Gogs(`/gɔgs/`)项目旨在打造一个以最简便的方式搭建简单、稳定和可扩展的自助 Git 服务。使用 Go 语言开发使得 Gogs 能够通过独立的二进制分发,并且支持 Go 语言支持的 **所有平台**,包括 Linux、macOS、Windows 以及 ARM 平台。
 
 ## 项目概览
 
@@ -90,7 +89,7 @@ Gogs 是一款极易搭建的自助 Git 服务。
 ### 产品支持
 
 - [Synology](https://www.synology.com)(Docker)
-- [One Space](http://www.onespace.cc)(应用商店)
+- [Syncloud](https://syncloud.org/)(应用商店)
 
 ## 特别鸣谢
 

+ 5 - 3
appveyor.yml

@@ -1,16 +1,18 @@
 version: "{build}"
 skip_tags: true
-clone_folder: c:\gopath\src\github.com\gnode\gogs
+clone_folder: c:\gopath\src\github.com\g-node\gogs
 clone_depth: 1
 
 environment:
-  GOPATH: c:\gopath
-  GOVERSION: 1.11
+  GO111MODULE: on
+  GOPROXY: https://proxy.golang.org
 
 build: false
 deploy: false
 
 install:
+  - go version
+  - go env
   - go build -v
 
 notifications:

+ 4 - 2
conf/locale/locale_bg-BG.ini

@@ -107,7 +107,7 @@ enable_captcha=Включи Captcha
 enable_captcha_popup=Изисква валидиране с captcha при саморегистрация на потребители.
 require_sign_in_view=Включи задължително вписване за преглед на страници
 require_sign_in_view_popup=Само вписани потребители могат да виждат страниците, анонимните посетители виждат само страниците за регистрация и вход.
-admin_setting_desc=Няма нужда от създаване на администраторски профил в момента, защото потребителят с първо ID в базата автоматично получава администраторски достъп.
+admin_setting_desc=Няма нужда да създавате администраторски профил в момента, защото потребителят с първо ID в базата автоматично получава администраторски достъп.
 admin_title=Настройки на профил на администратора
 admin_name=Потребителско име
 admin_password=Парола
@@ -214,7 +214,7 @@ Content=Съдържание
 require_error=` не може да бъде празен.`
 alpha_dash_error=` трябва да e валидна буква, число или тире(-_).`
 alpha_dash_dot_error=` трябва да e валидна буква, число, тире(-_) или точка.`
-alpha_dash_dot_slash_error=` must be valid alpha or numeric or dash(-_) or dot characters or slashes.`
+alpha_dash_dot_slash_error=` must be alphanumeric, dash (-_), dot or slash characters.`
 size_error=` трябва да е с размер %s.`
 min_size_error=` трябва да съдържа поне %s знака.`
 max_size_error=` трябва да съдържа най-много %s знака.`
@@ -374,6 +374,7 @@ delete_token=Изтрий
 access_token_deletion=Изтрий индивидуален API ключ за достъп
 access_token_deletion_desc=При изтриване на този индивидуален API ключ за достъп ще се премахнат всички свързани права на приложението. Желаете ли да продължите?
 delete_token_success=Индивидуалният API ключ за достъп е изтрит успешно! Не забравяйте да преконфигурирате приложението също.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Не сте член на никоя организация.
 orgs.leave_title=Напусни организация
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Това удостоверяване ще бъде из
 auths.still_in_used=Това удостоверяване все още се използва от някои потребители. Моля изтрийте ги или ги конвертирайте до друг тип на влизане първо.
 auths.deletion_success=Удостоверяването е изтрито успешно!
 auths.login_source_exist=Източник за валидация на потребители "%s" вече съществува.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(not set)
 config.server_config=Сървърни настройки

+ 2 - 0
conf/locale/locale_cs-CZ.ini

@@ -374,6 +374,7 @@ delete_token=Smazat
 access_token_deletion=Smazání osobní přístupové poukázky
 access_token_deletion_desc=Smazáním této osobní přístupové poukázky odstraní všechen související přístup aplikace. Chcete pokračovat?
 delete_token_success=Osobní přístupová poukázka byla odstraněna! Nezapomeňte také změnit nastavení vaší aplikace.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Nejste členem žádné organizace.
 orgs.leave_title=Opustit organizaci
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Tento způsob ověřování bude smazán, chcete pokračo
 auths.still_in_used=Tento způsob ověřování je stále používán některými uživateli. Prosím, nejdříve změňte u těchto uživatelů typ ověřování na jiný.
 auths.deletion_success=Způsob ověřování byl smazán!
 auths.login_source_exist=Zdroj přihlášení '%s' již existuje.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(není nastaveno)
 config.server_config=Nastavení serveru

+ 3 - 1
conf/locale/locale_de-DE.ini

@@ -154,7 +154,7 @@ social_register_hepler_msg=Haben Sie bereits ein Konto? Jetzt verknüpfen!
 disable_register_prompt=Es tut uns leid, die Registrierung wurde deaktiviert. Bitte wenden Sie sich an den Administrator.
 disable_register_mail=Es tut uns leid, die Bestätigung der Registrierungs-E-Mail wurde deaktiviert.
 auth_source=Authentifizierungsquelle
-local=Lokalisierung
+local=Lokal
 remember_me=Angemeldet bleiben
 forgot_password=Passwort vergessen
 forget_password=Passwort vergessen?
@@ -376,6 +376,7 @@ delete_token=Löschen
 access_token_deletion=Persönlichen Token entfernen
 access_token_deletion_desc=Das Löschen dieses persönlichen Zugangs-Tokens wird alle zugehörigen Zugriffe der Anwendung entfernen. Möchten Sie fortfahren?
 delete_token_success=Persönlicher Zugriffs-Token wurde erfolgreich entfernt! Vergessen Sie nicht Ihre Anwendung zu aktualisieren.
+token_name_exists=Token mit dem gleichen Namen existiert bereits.
 
 orgs.none=Sie sind kein Mitglied einer Organisation.
 orgs.leave_title=Organisation verlassen
@@ -1155,6 +1156,7 @@ auths.delete_auth_desc=Diese Authentifizierung wird gelöscht. Möchten Sie fort
 auths.still_in_used=Diese Authentifizierung wird noch von einigen Benutzern verwendet. Bitte löschen Sie diese Benutzer oder ändern Sie deren Anmeldetyp.
 auths.deletion_success=Authentifizierung wurde erfolgreich gelöscht!
 auths.login_source_exist=Login-Quelle '%s' ist bereits vorhanden.
+auths.github_api_endpoint=API Endpunkt
 
 config.not_set=(nicht festgelegt)
 config.server_config=Serverkonfiguration

+ 2 - 0
conf/locale/locale_en-GB.ini

@@ -380,6 +380,7 @@ delete_token=Delete
 access_token_deletion=Personal Access Token Deletion
 access_token_deletion_desc=Delete this personal access token will remove all related accesses of application. Do you want to continue?
 delete_token_success=Personal access token has been removed successfully! Don't forget to update your application as well.
+token_name_exists=Token with same name already exists.
 
 orgs.none=You are not a member of any organisations.
 orgs.leave_title=Leave organisation
@@ -1159,6 +1160,7 @@ auths.delete_auth_desc=This authentication is going to be deleted, do you want t
 auths.still_in_used=This authentication is still used by some users, please delete or convert these users to another login type first.
 auths.deletion_success=Authentication has been deleted successfully!
 auths.login_source_exist=Login source '%s' already exists.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(not set)
 config.server_config=Server Configuration

+ 16 - 15
conf/locale/locale_en-US.ini

@@ -109,7 +109,7 @@ enable_captcha = Enable Captcha
 enable_captcha_popup = Require validate captcha for user self-registration.
 require_sign_in_view = Enable Require Sign In to View Pages
 require_sign_in_view_popup = Only signed in users can view pages, visitors will only be able to see sign in/up pages.
-admin_setting_desc = You do not have to create an admin account right now, user whoever ID=1 will gain admin access automatically.
+admin_setting_desc = You don't need to create an admin account right now. The first user in the users table will be automatically granted admin access.
 admin_title = Admin Account Settings
 admin_name = Username
 admin_password = Password
@@ -121,8 +121,8 @@ sqlite3_not_available = Your release version does not support SQLite3, please do
 invalid_db_setting = Database setting is not correct: %v
 invalid_repo_path = Repository root path is invalid: %v
 run_user_not_match = Run user isn't the current user: %s -> %s
-smtp_host_missing_port = SMTP Host is missing port in address.
-invalid_smtp_from = SMTP From field is not valid: %v
+smtp_host_missing_port = SMTP Host port missing from address.
+invalid_smtp_from = SMTP From field is invalid: %v
 save_config_failed = Fail to save configuration: %v
 invalid_admin_setting = Admin account setting is invalid: %v
 install_success = Welcome! We're glad that you chose GIN, have fun and take care.
@@ -164,15 +164,15 @@ sign_up_now = Need an account? Sign up now.
 confirmation_mail_sent_prompt = A new confirmation email has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete the registration process.
 active_your_account = Activate Your Account
 prohibit_login = Login Prohibited
-prohibit_login_desc = Your account is prohibited to login, please contact site admin.
+prohibit_login_desc = Your account is prohibited from logging in. Please contact the site admin.
 resent_limit_prompt = Sorry, you already requested an activation email recently. Please wait 3 minutes then try again.
-has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (<b>%s</b>). If you haven't received a confirmation email or need to resend a new one, please click on the button below.
+has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (<b>%s</b>). If you haven't received a confirmation email or need to receive a new one, please click the button below.
 resend_mail = Click here to resend your activation email
 send_reset_mail = Click here to (re)send your password reset email
 reset_password = Reset Your Password
 invalid_code = Sorry, your confirmation code has expired or not valid.
 reset_password_helper = Click here to reset your password
-password_too_short = Password length cannot be less then 6.
+password_too_short = Password length must be at least 6 characters.
 non_local_account = Non-local accounts cannot change passwords through GIN.
 
 login_two_factor = Two-factor Authentication
@@ -181,7 +181,7 @@ 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_invalid_recovery_code = Recovery code has been used or does not valid.
+login_two_factor_invalid_recovery_code = Recovery code already used or invalid.
 
 [mail]
 activate_account = Please activate your account
@@ -216,10 +216,10 @@ TreeName = File path
 Content = Content
 
 require_error = ` cannot be empty.`
-alpha_dash_error = ` must be valid alpha or numeric or dash(-_) characters.`
-alpha_dash_dot_error = ` must be valid alpha or numeric or dash(-_) or dot characters.`
-alpha_dash_dot_slash_error = ` must be valid alpha or numeric or dash(-_) or dot characters or slashes.`
-size_error  = ` must be size %s.`
+alpha_dash_error = ` must be alphanumeric or dash(-_) characters.`
+alpha_dash_dot_error = ` must be alphanumeric or dash(-_) or dot characters.`
+alpha_dash_dot_slash_error = ` must be alphanumeric, dash (-_), dot or slash characters.`
+size_error  = ` size must be %s.`
 min_size_error = ` must contain at least %s characters.`
 max_size_error = ` must contain at most %s characters.`
 email_error = ` is not a valid email address.`
@@ -242,10 +242,10 @@ enterred_invalid_owner_name = Please make sure that the owner name you entered i
 enterred_invalid_password = Please make sure the that password you entered is correct.
 user_not_exist = Given user does not exist.
 invite_email_blocked=User invitation failed. Please contact the site administrators.
-last_org_owner = Removing the last user from a owner team isn't allowed, as there must always be at least one owner in any given organization.
+last_org_owner = Removing the last remaining user from an owner team is not allowed, as an organization must always have at least one owner.
 
-invalid_ssh_key = Sorry, we're not able to verify your SSH key: %s
-unable_verify_ssh_key = GIN cannot verify your SSH key, but we assume that it is valid, please double-check it.
+invalid_ssh_key = Sorry, verification of your SSH key failed: %s
+unable_verify_ssh_key = GIN cannot verify your SSH key, but it's assumed to be valid. Please double-check it.
 auth_failed = Authentication failed: %v
 
 still_own_repo = Your account still has ownership over at least one repository, you have to delete or transfer them first.
@@ -306,7 +306,7 @@ old_password = Current Password
 new_password = New Password
 retype_new_password = Retype New Password
 password_incorrect = Current password is not correct.
-change_password_success = Your password was successfully changed. You can now sign using this new password.
+change_password_success = Your password was successfully changed and can now be used for logging in.
 password_change_disabled = Non-local type users are not allowed to change their password.
 
 emails = Email Addresses
@@ -380,6 +380,7 @@ delete_token = Delete
 access_token_deletion = Personal Access Token Deletion
 access_token_deletion_desc = Delete this personal access token will remove all related accesses of application. Do you want to continue?
 delete_token_success = Personal access token has been removed successfully! Don't forget to update your application as well.
+token_name_exists = Token with same name already exists.
 
 orgs.none = You are not a member of any organizations.
 orgs.leave_title = Leave organization

+ 7 - 5
conf/locale/locale_es-ES.ini

@@ -162,13 +162,13 @@ active_your_account=Activa tu cuenta
 prohibit_login=Ingreso prohibido
 prohibit_login_desc=Su cuenta tiene prohibido ingresar al sistema, fovor contactar al administrador del sistema.
 resent_limit_prompt=Lo sentimos, estás solicitando el reenvío del mail de activación con demasiada frecuencia. Por favor, espera 3 minutos.
-has_unconfirmed_mail=Hola %s, tu correo electrónico (<b>%s</b>) no está confirmado. Si no has recibido un correo de confirmación o necesitas que lo enviemos de nuevo, por favor, haz click en el siguiente botón.
+has_unconfirmed_mail=Hola %s, tu correo electrónico (<b>%s</b>) no está confirmado. Si no has recibido un correo de confirmación o necesitas que te lo enviemos de nuevo, por favor haz click en el siguiente botón.
 resend_mail=Haz click aquí para reenviar tu correo electrónico de activación
 send_reset_mail=Haga clic aquí para (re)enviar el correo para el restablecimiento de la contraseña
 reset_password=Restablecer su contraseña
 invalid_code=Lo sentimos, su código de confirmación ha expirado o no es valido.
 reset_password_helper=Haga Clic aquí para restablecer su contraseña
-password_too_short=La longitud de la contraseña no puede ser menor a 6.
+password_too_short=La longitud de la contraseña no puede ser menor de 6 caracteres.
 non_local_account=Cuentas que no son locales no pueden cambiar las contraseñas a través de GIN.
 
 login_two_factor=Autenticación en dos pasos
@@ -212,8 +212,8 @@ TreeName=Ruta del archivo
 Content=Contenido
 
 require_error=` no puede estar vacío.`
-alpha_dash_error=` los caracteres deben ser Alfanumericos o dash(-_).`
-alpha_dash_dot_error=` debe ser un caracter alfanumérivo válido, un guión alto o bajo (-_) o un signo de puntuación.`
+alpha_dash_error=` los caracteres deben ser alfanuméricos o un guión (-_).`
+alpha_dash_dot_error=` debe ser un carácter alfanumérico válido, un guión (-_) o un signo de puntuación.`
 alpha_dash_dot_slash_error=` deben ser caracteres alfanuméricos, guiones(-_), puntos o barras.`
 size_error=` debe ser de tamaño %s.`
 min_size_error=` debe contener al menos %s caracteres.`
@@ -374,6 +374,7 @@ delete_token=Eliminar
 access_token_deletion=Borrado de Token de Acceso Personal
 access_token_deletion_desc=Si elimina este token de acceso personal la aplicación asociada perderá el permiso de acceso. ¿Desea continuar?
 delete_token_success=¡El token de acceso personal ha sido eliminado con éxito! No se olvide de actualizar también las aplicaciones asociadas.
+token_name_exists=Token with same name already exists.
 
 orgs.none=No eres un miembro de ninguna organización.
 orgs.leave_title=Salir de una organización
@@ -842,7 +843,7 @@ settings.delete_webhook=Borrar Webhook
 settings.recent_deliveries=Envíos Recientes
 settings.hook_type=Tipo de Hook
 settings.add_slack_hook_desc=Añade integración con <a href="%s">Slack</a> a tu repositorio.
-settings.add_discord_hook_desc=Añade integración con <a href="%s">Slack</a> a tu repositorio.
+settings.add_discord_hook_desc=Añade integración con <a href="%s">Discord</a> a tu repositorio.
 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
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Esta autenticación será eliminada. ¿Deseas continuar?
 auths.still_in_used=Este método de autentificación aún es utilizado por algunos usuarios, por favor elimine o convierta estos usuarios a otro tipo de autentificación.
 auths.deletion_success=¡La autenticación ha sido eliminada con éxito!
 auths.login_source_exist=El origen de autenticación '%s' ya existe.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(sin definir)
 config.server_config=Configuración del servidor

+ 2 - 0
conf/locale/locale_fa-IR.ini

@@ -376,6 +376,7 @@ delete_token=حذف
 access_token_deletion=حذف توکن دسترسی شخصی
 access_token_deletion_desc=حذف این توکن دسترسی شخصی ، تمام دسترسی های مرتبط به برنامه را حذف خواهد کرد. آیا ادامه می دهید؟
 delete_token_success=رمز دسترسی شخصی با موفقیت حذف شد! به روز رسانی نرم افزار خود را نیز فراموش نکنید.
+token_name_exists=Token with same name already exists.
 
 orgs.none=شما عضو هیچ سازمانی نیستید.
 orgs.leave_title=ترک یک سازمان
@@ -1153,6 +1154,7 @@ auths.delete_auth_desc=این سیستم احراز هویت حذف خواهد 
 auths.still_in_used=این متد اعتبار احرازهویت هنوز توسط برخی از کاربران در حال استفاده است، لطفا ابتدا این کاربران را حذف کنید یا متد احرازهویت آنان را تغییر دهید.
 auths.deletion_success=متد احرازهویت با موفقیت حذف شد!
 auths.login_source_exist=مدخل لاگین %s قبلا موجود بوده است.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(تنظیم نشده)
 config.server_config=پیکربندی سرور

+ 3 - 1
conf/locale/locale_fi-FI.ini

@@ -374,6 +374,7 @@ delete_token=Poista
 access_token_deletion=Henkilökohtaisen pääsymerkin poisto
 access_token_deletion_desc=Tämän henkilökohtaisen pääsymerkin poistaminen poistaa kaikki siihen liittyvät pääsyt sovellukseen. Haluatko jatkaa?
 delete_token_success=Henkilökohtainen pääsymerkki on poistettu onnistuneesti! Älä unohda päivittää sovellustasi myös.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Et ole yhdenkään organisaation jäsen.
 orgs.leave_title=Poistu organisaatiosta
@@ -1102,7 +1103,7 @@ auths.new=Lisää uusi lähde
 auths.name=Nimi
 auths.type=Tyyppi
 auths.enabled=Käytössä
-auths.default=Default
+auths.default=Oletus
 auths.updated=Päivitetty
 auths.auth_type=Todennustyyppi
 auths.auth_name=Todennusnimi
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Tämä todennus poistetaan, haluatko jatkaa?
 auths.still_in_used=Tämä todennus on yhä joidenkin käyttäjien käytössä, ole hyvä ja poista tai muunna nämä käyttäjät toiselle kirjaututumistyypille ensin.
 auths.deletion_success=Todennus on poistettu onnistuneesti!
 auths.login_source_exist=Kirjautumislähde '%s' on jo olemassa
+auths.github_api_endpoint=API päätepiste
 
 config.not_set=(ei ole asetettu)
 config.server_config=Palvelin asetukset

+ 7 - 5
conf/locale/locale_fr-FR.ini

@@ -374,6 +374,7 @@ delete_token=Supprimer
 access_token_deletion=Suppression du jeton d'accès
 access_token_deletion_desc=Supprimer ce jeton d'accès supprimera tous les accès de l'application. Voulez-vous continuer ?
 delete_token_success=Le jeton d'accèsa été supprimé avec succès ! N'oubliez pas de mettre à jour vos applications.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Vous n'êtes membre d'aucune organisation.
 orgs.leave_title=Quitter une organisation
@@ -475,7 +476,7 @@ file_raw=Raw
 file_history=Historique
 file_view_raw=Voir le Raw
 file_permalink=Lien permanent
-file_too_large=Ce fichier est trop gros pour être afficher
+file_too_large=Ce fichier est trop gros pour être affiché
 video_not_supported_in_browser=Votre navigateur ne supporte pas la balise video HTML5.
 
 branches.overview=Résumé
@@ -501,10 +502,10 @@ editor.filename_help=Pour ajouter un répertoire, il suffit de le taper puis d'a
 editor.or=ou
 editor.cancel_lower=annuler
 editor.commit_changes=Commit les modifications
-editor.add_tmpl=Ajouter '%s/<filename>'
-editor.add=Ajouter '%s'
-editor.update=Mettre à jour '%s'
-editor.delete=Supprimer '%s'
+editor.add_tmpl=Ajout de '%s/<filename>'
+editor.add=Ajout de '%s'
+editor.update=Mise à jour de '%s'
+editor.delete=Suppression de '%s'
 editor.commit_message_desc=Ajouter une optionnelle description détaillée...
 editor.commit_directly_to_this_branch=Soumettre directement à la branche <strong class="branch-name">%s</strong>.
 editor.create_new_branch=Créer une <strong>nouvelle branche</strong> pour cette validation et envoyer une nouvelle pull request.
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Cette authentification va être supprimée. voulez-vous c
 auths.still_in_used=Cette authentification est encore utilisée par d'autres utilisateurs, supprimez-les ou convertir ces utilisateurs vers un autre type de session, avant.
 auths.deletion_success=L'authentification a été supprimée avec succès !
 auths.login_source_exist=La source de connexion « %s » existe déjà.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(non défini)
 config.server_config=Configuration du Serveur

+ 2 - 0
conf/locale/locale_gl-ES.ini

@@ -375,6 +375,7 @@ delete_token=Eliminar
 access_token_deletion=Borrado de Token de Acceso Persoal
 access_token_deletion_desc=Se elimina este token de acceso persoal a aplicación asociada perderá o permiso de acceso. Desexa continuar?
 delete_token_success=O token de acceso persoal foi eliminado con éxito! Non esqueza actualizar tamén as aplicacións asociadas.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Non es membro de nengunha organización.
 orgs.leave_title=Deixar unha organización
@@ -1152,6 +1153,7 @@ auths.delete_auth_desc=Esta autenticación será eliminada. Desexas continuar?
 auths.still_in_used=Este método de autentificación aínda é utilizado por algúns usuarios, por favor elimine ou converta estes usuarios a outro tipo de autentificación.
 auths.deletion_success=A autenticación foi eliminada con éxito!
 auths.login_source_exist=Login source '%s' xa existe.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(not set)
 config.server_config=Configuración do servidor

+ 4 - 2
conf/locale/locale_hu-HU.ini

@@ -101,7 +101,7 @@ disable_gravatar=Gravatar kikapcsolása
 disable_gravatar_popup=Gravatar és egyedi források kikapcsolása, minden avatárt a felhasználók töltenek fel.
 federated_avatar_lookup=Engedélyezi a független avatarokat
 federated_avatar_lookup_popup=Eggyesített profilkép keresés a nyílt forráskódú libravatar szolgáltatás segítségével.
-disable_registration=Ön-regisztráció kikapcsolása
+disable_registration=Önregisztráció kikapcsolása
 disable_registration_popup=Ön-regisztráció kikapcsolása, csak a rendszergazda hozhat létre fiókot.
 enable_captcha=Ellenőrző kód engedélyezése
 enable_captcha_popup=Ellenőrző kódot kér a felhasználói regisztrációnál.
@@ -374,6 +374,7 @@ delete_token=Törlés
 access_token_deletion=Személyes hozzáférési jegy törlése
 access_token_deletion_desc=Az SSH kulcs törlése minden kapcsolódó hozzáférést töröl a fiókodból. Biztosan folytatod?
 delete_token_success=A személyes hozzáférési tokened eltávolítása megtörtént! Ne felejtsd el frissíteni az alkalmazásod is.
+token_name_exists=Már létezik ilyen nevű szerepkör.
 
 orgs.none=Nem vagy tagja egy szervezeti elemnek sem.
 orgs.leave_title=Szervezet elhagyása
@@ -1141,7 +1142,7 @@ auths.pam_service_name=PAM szolgáltatás neve
 auths.enable_auto_register=Automatikus regisztráció engedélyezése
 auths.edit=Hitelesítési beállítások szerkesztése
 auths.activated=Ez a hitelesítés mód aktiválva van
-auths.default_auth=Ez az alapértelmezett hitelesítési mód a bejelentkezéshez
+auths.default_auth=This authentication is default login source
 auths.new_success=Az új hitelesítési mód '%s' sikeresen hozzáadva.
 auths.update_success=A hitelesítési beállítások sikeresen firssítve lettek.
 auths.update=Hitelesítési forrás frissítése
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=A hitelesítési mód törlésre kerül, biztosan folytat
 auths.still_in_used=A hitelesítési mód még használatban van, mielőtt törölné válasszon más hitelesítési módot az érintett fiókokhoz.
 auths.deletion_success=Hitelesítési forrás sikeresen törölve!
 auths.login_source_exist=Bejelentkezési forrás "%s" már létezik.
+auths.github_api_endpoint=API végpont
 
 config.not_set=(nincs beállítva)
 config.server_config=Kiszolgáló konfiguráció

+ 55 - 53
conf/locale/locale_id-ID.ini

@@ -71,7 +71,7 @@ repo_path_helper=Semua repositori Git akan disimpan ke direktori ini.
 run_user=Menjalankan pengguna
 run_user_helper=Pengguna harus memiliki akses ke path akar repositori dan menjalankan Gogs.
 domain=Domain
-domain_helper=Ini mempengaruhi URL klon SSH.
+domain_helper=Ini memengaruhi URL kloning SSH.
 ssh_port=Port SSH
 ssh_port_helper=Nomor port yang menggunakan SSH server, biarkan kosong untuk menonaktifkan fitur SSH.
 use_builtin_ssh_server=Menggunakan Builtin SSH Server
@@ -82,7 +82,7 @@ app_url=URL Aplikasi
 app_url_helper=Ini mempengaruhi URL klon HTTP/HTTPS dan di suatu tempat dalam email.
 log_root_path=Path log
 log_root_path_helper=Direktori untuk menulis berkas log.
-enable_console_mode=Mengaktifkan Mode konsol
+enable_console_mode=Mengaktifkan Mode Konsol
 enable_console_mode_popup=Selain mode file, juga mencetak log ke konsol.
 
 optional_title=Pengaturan opsional
@@ -374,6 +374,7 @@ delete_token=Hapus
 access_token_deletion=Penghapusan Akses Token Pribadi
 access_token_deletion_desc=Hapus token akses pribadi ini akan menghapus semua akses aplikasi yang terkait. Apakah Anda ingin melanjutkan?
 delete_token_success=Token akses pribadi telah berhasil dihapus! Jangan lupa untuk mengupdate aplikasi anda juga.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Anda bukan anggota organisasi manapun.
 orgs.leave_title=Meninggalkan organisasi
@@ -421,7 +422,7 @@ mirror_last_synced=Terakhir disinkronkan
 watchers=Watchers
 stargazers=Stargazers
 forks=Forks
-repo_description_helper=Description of repository. Maximum 512 characters length.
+repo_description_helper=Deskripsi repositori maksimal 512 karakter.
 repo_description_length=Karakter tersedia
 
 form.reach_limit_of_creation=Pemiliknya telah mencapai batas pembuatan maksimum %d repositori.
@@ -453,7 +454,7 @@ fork=Fork
 
 no_desc=Tidak Ada Deskripsi
 quick_guide=Petunjuk Cepat
-clone_this_repo=Klon repositori ini
+clone_this_repo=Kloning repositori ini
 create_new_repo_command=Buat repositori baru di command line
 push_exist_repo=Dorong repositori yang ada dari baris perintah
 bare_message=Ini repositori tidak memiliki konten apa pun.
@@ -465,7 +466,7 @@ filter_branch_and_tag=Filter cabang atau tag
 branches=Ranting
 tags=Tag
 issues=Masalah
-pulls=Tarik Permintaan
+pulls=Permintaan Tarik
 labels=Label
 milestones=Tonggak sejarah
 commits=Komitmen
@@ -861,7 +862,7 @@ settings.deploy_key_deletion=Hapus Kunci Deploy
 settings.deploy_key_deletion_desc=Menghapus kunci penggelaran ini akan menghapus semua akses yang terkait untuk repositori ini. Apakah Anda ingin melanjutkan?
 settings.deploy_key_deletion_success=Kunci penempatan telah berhasil dihapus!
 settings.description_desc=Description of repository. Maximum 512 characters length.
-settings.description_length=Available characters
+settings.description_length=Karakter tersedia
 
 diff.browse_source=Jelajahi Sumber
 diff.parent=induk
@@ -951,7 +952,7 @@ members.membership_visibility=Keanggotaan Visibilitas:
 members.public=Umum
 members.public_helper=jadilah pribadi
 members.private=Pribadi
-members.private_helper=make public
+members.private_helper=jadikan publik
 members.member_role=Anggota Peran:
 members.owner=Pemilik
 members.member=Anggota
@@ -963,10 +964,10 @@ members.invite_now=Undang Sekarang
 teams.join=Bergabung
 teams.leave=Tinggalkan
 teams.read_access=Baca Akses
-teams.read_access_helper=This team will be able to view and clone its repositories.
+teams.read_access_helper=Tim ini dapat melihat dan mencabangkan repositori.
 teams.write_access=Akses menulis
 teams.write_access_helper=This team will be able to read its repositories, as well as push to them.
-teams.admin_access=Admin Access
+teams.admin_access=Akses Admin
 teams.admin_access_helper=Tim ini akan dapat mendorong / menarik ke repositorinya, dan juga menambahkan kolaborator lainnya kepada mereka.
 teams.no_desc=Tim ini tidak memiliki deskripsi
 teams.settings=Pengaturan
@@ -1102,7 +1103,7 @@ auths.new=Tambahkan Sumber Baru
 auths.name=Nama
 auths.type=Mengetik
 auths.enabled=Diaktifkan
-auths.default=Default
+auths.default=Standar
 auths.updated=Diperbarui
 auths.auth_type=Jenis Autentikasi
 auths.auth_name=Nama Autentikasi
@@ -1128,15 +1129,15 @@ auths.group_attribute_contain_user_list=Atribut Grup yang Mengandung Daftar Peng
 auths.user_attribute_listed_in_group=Atribut Pengguna Terdaftar di Grup
 auths.attributes_in_bind=Ambil atribut dalam konteks Bind DN
 auths.filter=Pengguna saringan
-auths.admin_filter=Admin Filter
+auths.admin_filter=Filter Admin
 auths.ms_ad_sa=Ms Ad SA
 auths.smtp_auth=Autentikasi tipe SMTP
 auths.smtphost=Host SMTP
 auths.smtpport=Port SMTP
 auths.allowed_domains=Domains di izinkan
 auths.allowed_domains_helper=Biarkan kosong untuk tidak membatasi setiap domain, beberapa Domain harus dipisahkan oleh koma ',',.
-auths.enable_tls=Enable TLS Encryption
-auths.skip_tls_verify=Skip TLS Verify
+auths.enable_tls=Aktifkan Enkripsi TLS
+auths.skip_tls_verify=Lewati Verifikasi TLS
 auths.pam_service_name=Nama layanan PAM
 auths.enable_auto_register=Mengaktifkan pendaftaran otomatis
 auths.edit=Ubah Pengaturan Autentikasi
@@ -1151,37 +1152,38 @@ auths.delete_auth_desc=Autentikasi ini akan dihapus, apakah Anda ingin melanjutk
 auths.still_in_used=Autentikasi ini masih digunakan oleh pengguna lain, silakan hapus atau ubah pengguna tersebut ke tipe masuk lainnya.
 auths.deletion_success=Autentikasi berhasil dihapus!
 auths.login_source_exist=Sumber masuk %s sudah tersedia.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(tidak diterapkan)
-config.server_config=Server Configuration
+config.server_config=Konfigurasi Server
 config.app_name=Nama aplikasi
 config.app_ver=Versi aplikasi
 config.app_url=Aplikasi URL
 config.domain=Domain
-config.offline_mode=Offline Mode
-config.disable_router_log=Disable Router Log
+config.offline_mode=Mode Luring
+config.disable_router_log=Nonaktifkan Log Perute
 config.run_user=Menjalankan penggunaa
 config.run_mode=Run Mode
-config.git_version=Git Version
+config.git_version=Versi Git
 config.static_file_root_path=Static File Root Path
 config.log_file_root_path=Log File Root Path
 config.reverse_auth_user=Mengembalikan Pengguna Autentikasi
 
-config.ssh_config=SSH Configuration
+config.ssh_config=Konfigurasi SSH
 config.ssh_enabled=Diaktifkan
 config.ssh_start_builtin_server=Start Builtin Server
 config.ssh_domain=Domain
 config.ssh_port=Pelabuhan
 config.ssh_listen_port=Listen Port
 config.ssh_root_path=Path akar
-config.ssh_rewrite_authorized_keys_at_start=Rewrite authorized_keys At Start
+config.ssh_rewrite_authorized_keys_at_start=Tulis ulang authorized_keys Saat Memulai
 config.ssh_key_test_path=Key Test Path
-config.ssh_keygen_path=Keygen ('ssh-keygen') Path
-config.ssh_minimum_key_size_check=Minimum Key Size Check
-config.ssh_minimum_key_sizes=Minimum Key Sizes
+config.ssh_keygen_path=Jalur ('ssh-keygen') Generator Kunci
+config.ssh_minimum_key_size_check=Periksa Ukuran Kunci Minimum
+config.ssh_minimum_key_sizes=Ukuran Kunci Minimum
 
-config.repo_config=Repository Configuration
-config.repo_root_path=Repository Root Path
+config.repo_config=Konfigurasi Repositori
+config.repo_root_path=Jalur Akar Repositori
 config.script_type=Jenis Skrip
 config.repo_force_private=Paksa Pribadi
 config.max_creation_limit=Max Creation Limit
@@ -1222,7 +1224,7 @@ config.skip_tls_verify=Lewati TLS Verifikasi
 config.mailer_config=Mailer Konfigurasi
 config.mailer_enabled=Diaktifkan
 config.mailer_disable_helo=Nonaktifkan HALO
-config.mailer_subject_prefix=Subject Prefix
+config.mailer_subject_prefix=Subyek Awalan
 config.mailer_host=Rumah
 config.mailer_user=Pengguna
 config.send_test_mail=Kirim Email Uji
@@ -1240,27 +1242,27 @@ config.cache_conn=Koneksi Cache
 config.session_config=Konfigurasi Sesi
 config.session_provider=Penyedia Sesi
 config.provider_config=Konfigurasi Penyedia
-config.cookie_name=Cookie Name
-config.enable_set_cookie=Pengatur cookle diaktifkan
-config.gc_interval_time=GC Interval Time
+config.cookie_name=Nama Kuki
+config.enable_set_cookie=Aktifkan Pengatur Kuki
+config.gc_interval_time=Waktu Interval GC
 config.session_life_time=Sesi jangka Waktu
-config.https_only=HTTPS Only
-config.cookie_life_time=Cookie Life Time
+config.https_only=Hanya HTTPS
+config.cookie_life_time=Jangka Waktu Kuki
 
-config.picture_config=Picture Configuration
+config.picture_config=Konfigurasi Gambar
 config.picture_service=Gambar layanan
-config.disable_gravatar=Disable Gravatar
-config.enable_federated_avatar=Enable Federated Avatars
-
-config.git_config=Git Configuration
-config.git_disable_diff_highlight=Disable Diff Syntax Highlight
-config.git_max_diff_lines=Max Diff Lines (for a single file)
-config.git_max_diff_line_characters=Max Diff Characters (for a single line)
-config.git_max_diff_files=Max Diff Files (to be shown)
-config.git_gc_args=GC Arguments
+config.disable_gravatar=Nonaktifkan Gravatar
+config.enable_federated_avatar=Aktifkan Avatar Gabungan
+
+config.git_config=Konfigurasi Git
+config.git_disable_diff_highlight=Nonaktifkan Diff Syntax Highlight
+config.git_max_diff_lines=Garis Maksimal Diff (untuk berkas tunggal)
+config.git_max_diff_line_characters=Karakter Maksimal Diff (untuk garis tunggal)
+config.git_max_diff_files=Berkas Maksimal Diff (untuk ditampilkan)
+config.git_gc_args=Argumen GC
 config.git_migrate_timeout=Jenis migrasi
 config.git_mirror_timeout=Mirror Update Timeout
-config.git_clone_timeout=Clone Operation Timeout
+config.git_clone_timeout=Waktu Kloning Habis
 config.git_pull_timeout=Pull Operation Timeout
 config.git_gc_timeout=GC Operation Timeout
 
@@ -1284,7 +1286,7 @@ notices.view_detail_header=Lihat Pemberitahuan Detail
 notices.actions=Tindakan
 notices.select_all=Pilih Semua
 notices.deselect_all=Batalkan semua pilihan
-notices.inverse_selection=Inverse Selection
+notices.inverse_selection=Pilih Terbalaik
 notices.delete_selected=Hapus yang dipilih
 notices.delete_all=Menghapus semua pemberitahuan
 notices.type=Jenis
@@ -1297,21 +1299,21 @@ notices.delete_success=Sistem pemberitahuan telah berhasil dihapus.
 create_repo=repositori dibuat <a href="%s">%s</a>
 rename_repo=repositori berganti nama dari <code>%[1]s</code> ke <a href="%[2]s">%[3]s</a>
 commit_repo=didorong ke <a href="%[1]s/src/%[2]s">%[3]s</a> di <a href="%[1]s">%[4]s</a>
-compare_commits=View comparison for these %d commits
-transfer_repo=transfered repository <code>%s</code> to <a href="%s">%s</a>
-create_issue=`opened issue <a href="%s/issues/%s">%s#%[2]s</a>`
-close_issue=`closed issue <a href="%s/issues/%s">%s#%[2]s</a>`
-reopen_issue=`reopened issue <a href="%s/issues/%s">%s#%[2]s</a>`
-comment_issue=`commented on issue <a href="%s/issues/%s">%s#%[2]s</a>`
-create_pull_request=`created pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
-close_pull_request=`closed pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
-reopen_pull_request=`reopened pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
-merge_pull_request=`merged pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
+compare_commits=Lihat perbandingan dari komit ini %d
+transfer_repo=repositori <code>%s</code> ditransfer ke <a href="%s">%s</a>
+create_issue=`masalah yang dibuka <a href="%s/issues/%s">%s#%[2]s</a>`
+close_issue=`masalah yang ditutup <a href="%s/issues/%s">%s#%[2]s</a>`
+reopen_issue=`masalah yang dibuka kembali <a href="%s/issues/%s">%s#%[2]s</a>`
+comment_issue=`mengomentari masalah <a href="%s/issues/%s">%s#%[2]s</a>`
+create_pull_request=`membuat permintaan tarik <a href="%s/pulls/%s">%s#%[2]s</a>`
+close_pull_request=`permintaan tarik yang ditutup <a href="%s/pulls/%s">%s#%[2]s</a>`
+reopen_pull_request=`permintaan tarik dibuka kembali <a href="%s/pulls/%s">%s#%[2]s</a>`
+merge_pull_request=`menggabungkan permintaan tarik <a href="%s/pulls/%s">%s#%[2]s</a>`
 create_branch=created new branch <a href="%[1]s/src/%[2]s">%[3]s</a> at <a href="%[1]s">%[4]s</a>
 delete_branch=deleted branch <code>%[2]s</code> at <a href="%[1]s">%[3]s</a>
 push_tag=pushed tag <a href="%s/src/%s">%[2]s</a> to <a href="%[1]s">%[3]s</a>
 delete_tag=deleted tag <code>%[2]s</code> at <a href="%[1]s">%[3]s</a>
-fork_repo=forked a repository to <a href="%s">%s</a>
+fork_repo=cabangkan repositori ke <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

+ 2 - 0
conf/locale/locale_it-IT.ini

@@ -374,6 +374,7 @@ delete_token=Elimina
 access_token_deletion=Eliminazione Token di accesso personale
 access_token_deletion_desc=Eliminare questo token di accesso personale rimuoverà tutti i relativi accessi di applicazione. Si desidera continuare?
 delete_token_success=Il token di accesso personale è stato eliminato! Non dimenticare di aggiornare anche l'applicazione.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Non sei membro di alcuna organizzazione.
 orgs.leave_title=Abbandona una organizzazione
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Eliminazione del meccanismo di autenticazione. Continuare
 auths.still_in_used=Questo meccanismo di autenticazione è ancora attivo per alcuni utenti. Eliminare gli utenti o cambiare il loro meccanismo di autenticazione prima di ritentare.
 auths.deletion_success=Il meccanismo di autenticazione è stato eliminato!
 auths.login_source_exist=La fonte di autenticazione '%s' esiste già.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(non impostata)
 config.server_config=Configurazione Server

+ 4 - 2
conf/locale/locale_ja-JP.ini

@@ -213,7 +213,7 @@ Content=コンテンツ
 
 require_error=空にできません
 alpha_dash_error=アルファベット、数字、ハイフン"-"、アンダースコア"_"のいずれかの必要があります
-alpha_dash_dot_error=' アルファベット、数値、ダッシュ(-)、アンダースコア(_) 、ドット(.)のいずれかを入力する必要があります。 '
+alpha_dash_dot_error=' アルファベット、数値、ハイフン(-)、アンダースコア(_) 、ドット(.) のいずれかを入力する必要があります。 '
 alpha_dash_dot_slash_error=` アルファベット、数字、ハイフン(-)、アンダースコア(_)、ドット(.)、スラッシュ(/) のみ利用できます。`
 size_error=`サイズは %s である必要があります`
 min_size_error=' 少なくとも %s 文字の必要があります '
@@ -374,6 +374,7 @@ delete_token=削除
 access_token_deletion=パーソナルアクセストークンの削除
 access_token_deletion_desc=パーソナルアクセストークンを削除すると、関連するアプリケーションのすべてのアクセスが削除されます。続行しますか?
 delete_token_success=パーソナルアクセストークンは正常に削除されました!同時にあなたのアプリケーションを更新することを忘れないでください。
+token_name_exists=同じ名前のトークンがあります。
 
 orgs.none=あなたはどの組織のメンバーでもありません。
 orgs.leave_title=組織からの脱退
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=認証を削除します、継続しますか?
 auths.still_in_used=この認証を使用しているユーザーがいます。ユーザーを削除するか、別のログイン方法に割り当ててください。
 auths.deletion_success=認証が正常に削除されました。
 auths.login_source_exist=ログイン ソース '%s' は既に存在します。
+auths.github_api_endpoint=APIエンドポイント
 
 config.not_set=(未設定)
 config.server_config=サーバーの構成
@@ -1312,7 +1314,7 @@ delete_branch=<a href="%[1]s">%[3]s</a> のブランチ <code>%[2]s</code> を
 push_tag=が <a href="%[1]s">%[3]s</a> にタグ <a href="%[1]s/src/%[2]s">%[2]s</a> をプッシュしました
 delete_tag=<a href="%[1]s">%[3]s</a> のタグ <code>%[2]s</code> を削除しました
 fork_repo=リポジトリを <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_push=<a href="%[1]s">%[4]s</a> の <a href="%[1]s/src/%[2]s">%[3]s</a> へのコミットをミラーから反映しました
 mirror_sync_create=新しい参照<a href="%s/src/%s">%[2]s</a>を<a href="%[1]s">%[3]s</a>にミラーから反映しました
 mirror_sync_delete=synced and deleted reference <code>%[2]s</code> at <a href="%[1]s">%[3]s</a> from mirror
 

+ 2 - 0
conf/locale/locale_ko-KR.ini

@@ -374,6 +374,7 @@ delete_token=삭제
 access_token_deletion=개인 액세스 토큰 삭제
 access_token_deletion_desc=이 토큰을 사용하는 애플리케이션의 접근권한 또한 삭제됩니다. 계속 하시겠습니까?
 delete_token_success=액세스 토큰이 삭제되었습니다. 애플리케이션의 업데이트도 잊지 마세요.
+token_name_exists=Token with same name already exists.
 
 orgs.none=당신은 어떤 조직의 구성원도 아닙니다.
 orgs.leave_title=조직 떠나기
@@ -1152,6 +1153,7 @@ auths.delete_auth_desc=이 인증이 삭제됩니다. 정말로 진행하시겠
 auths.still_in_used=이 인증은 아직 몇몇 사용자들이 사용하고 있습니다, 먼저 사용자들의 로그인 유형을 삭제하거나 변경해주십시오.
 auths.deletion_success=인증이 성공적으로 삭제 되었습니다!
 auths.login_source_exist=로그인 소스 '%s'는 이미 존재합니다.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(not set)
 config.server_config=서버 설정

+ 2 - 0
conf/locale/locale_lv-LV.ini

@@ -374,6 +374,7 @@ delete_token=Dzēst
 access_token_deletion=Personīgā piekļuves talona dzēšana
 access_token_deletion_desc=Dzēšot personīgo piekļuves talonu, tiks liegta piekļuve aplikācijām, kas to izmanto. Vai vēlaties turpināt?
 delete_token_success=Personīgās piekļuves talons veiksmīgi izdzēsts! Neaizmirstiet nomainīt uz citu aplikācijās, kas to izmantoja.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Jūs neesat nevienas organizācijas dalībnieks.
 orgs.leave_title=Pamest organizāciju
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Šī autentifikācija tiks dzēsta, vai vēlaties turpin
 auths.still_in_used=Daži lietotāji joprojām izmanto šo autentifikācijas veidu. Nepieciešams veikt šo lietotāju konvertāciju vai dzēšanu.
 auths.deletion_success=Autentifikācija tika veiksmīgi izdzēsta!
 auths.login_source_exist=Pieteikšanās avots '%s' jau eksistē.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(nav noteikts)
 config.server_config=Servera konfigurācija

+ 8 - 6
conf/locale/locale_nl-NL.ini

@@ -151,7 +151,7 @@ register_hepler_msg=Heeft u al een account? Meld u nu aan!
 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
+auth_source=Authenticatiebron
 local=Lokaal
 remember_me=Onthoud mij
 forgot_password=Wachtwoord vergeten
@@ -177,7 +177,7 @@ 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.
+login_two_factor_invalid_recovery_code=Recovery code already used or invalid.
 
 [mail]
 activate_account=Activeer uw account
@@ -214,7 +214,7 @@ Content=Inhoud
 require_error=kan niet leeg zijn.
 alpha_dash_error=moet een valide alfanumeriek of dash(-_) karakter zijn.
 alpha_dash_dot_error=moet een valide alfanumeriek, dash(-_) of (.) punt karakter zijn.
-alpha_dash_dot_slash_error=` must be valid alpha or numeric or dash(-_) or dot characters or slashes.`
+alpha_dash_dot_slash_error=` must be alphanumeric, dash (-_), dot or slash characters.`
 size_error=moet groter zijn dan %s
 min_size_error=moet minimaal %s karakters bevatten.
 max_size_error=mag maximaal %s karakters bevatten.
@@ -374,6 +374,7 @@ delete_token=Verwijderen
 access_token_deletion=Persoonlijke toegang token verwijderen
 access_token_deletion_desc=Verwijderen van deze persoonlijke toegang token zal alle verwante toegang verwijderen. Wilt u doorgaan?
 delete_token_success=Persoonlijke toegangstoken is met succes verwijderd! Vergeet niet uw toepassingen ook bij te werken.
+token_name_exists=Token with same name already exists.
 
 orgs.none=U bent geen lid van een organisatie.
 orgs.leave_title=Een organisatie verlaten
@@ -1080,7 +1081,7 @@ users.allow_import_local=Dit account mag lokale repositories importeren
 users.update_profile=Account profiel bijwerken
 users.delete_account=Dit account verwijderen
 users.still_own_repo=Dit account is nog steeds eigendom van een repositorie. U moet deze repositorie eerst verwijderen of overdragen.
-users.still_has_org=Deze account nog steeds lidmaatschap van organisatie, u hebt naar links of hen eerst verwijderen.
+users.still_has_org=Dit account is nog lid van ten minste één organisatie. Zeg dit lidmaatschap voor dit account op of verwijder de organisatie eerst.
 users.deletion_success=Het account is verwijderd!
 
 orgs.org_manage_panel=Organisaties beheren
@@ -1097,7 +1098,7 @@ repos.stars=Sterren
 repos.issues=Issues
 repos.size=Size
 
-auths.auth_sources=Authentication Sources
+auths.auth_sources=Authenticatiebronnen
 auths.new=Nieuwe bron toevoegen
 auths.name=Naam
 auths.type=Type
@@ -1141,7 +1142,7 @@ auths.pam_service_name=PAM servicenaam
 auths.enable_auto_register=Activeer automatische registratie
 auths.edit=Verificatie-instelling bewerken
 auths.activated=Deze autorisatiemethode is geactiveerd
-auths.default_auth=This authentication is default login source
+auths.default_auth=Deze authenticatie bron is de standaard bron
 auths.new_success=Nieuwe authenticatie '%s' werd toegevoegd.
 auths.update_success=Authenticatie instellingen zijn succesvol gewijzigd.
 auths.update=Authenticatie-instellingen bijwerken
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Deze authenticatie zal verwijderd worden, wil je verderga
 auths.still_in_used=This authentication is still used by some users, please delete or convert these users to another login type first.
 auths.deletion_success=Authenticatie is met succes verwijderd!
 auths.login_source_exist=Login source '%s' already exists.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(not set)
 config.server_config=Serverconfiguratie

+ 2 - 0
conf/locale/locale_pl-PL.ini

@@ -374,6 +374,7 @@ delete_token=Usuń
 access_token_deletion=Usuwanie osobistego tokena dostępu
 access_token_deletion_desc=Usunięcie tego tokena osobistego dostęp spowoduje usunięcie wszystkich powiązanych dostępów do aplikacji. Czy chcesz kontynuować?
 delete_token_success=Osobisty token dostępu został usunięty pomyślnie! Nie zapomnij również zaktualizować swoich aplikacji.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Nie jesteś członkiem żadnej organizacji.
 orgs.leave_title=Opuść organizację
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=To uwierzytelnienie zostanie usunięte, czy chcesz kontyn
 auths.still_in_used=Ten rodzaj autentykacji jest wciąż wykorzystywany przez niektórych użytkowników. Usuń lub przekonwertuj użytkowników, aby wykorzystywali inny typ logowania.
 auths.deletion_success=Uwierzytelnienie zostało usunięte pomyślnie!
 auths.login_source_exist=Login '%s' już istnieje.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(nie ustawiono)
 config.server_config=Konfiguracja serwera

+ 2 - 0
conf/locale/locale_pt-BR.ini

@@ -374,6 +374,7 @@ delete_token=Excluir
 access_token_deletion=Exclusão do token de acesso pessoal
 access_token_deletion_desc=Ao Excluir este token de acesso pessoal será removido todos os acessos do aplicativo. Você deseja continuar?
 delete_token_success=O Token de acesso pessoal foi removido com sucesso! Não se esqueça de atualizar seus aplicativos também.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Você não é participante de nenhuma organização.
 orgs.leave_title=Deixar uma organização
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Esta autenticação esta prestes a ser excluída, deseja
 auths.still_in_used=Esta autenticação ainda é usada por alguns usuários. Por favor remova ou converta esses usuários para outro tipo de login primeiro.
 auths.deletion_success=Autenticação excluída com sucesso!
 auths.login_source_exist=A fonte de login '%s" já existe.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(não definido)
 config.server_config=Configuração do servidor

+ 2 - 0
conf/locale/locale_pt-PT.ini

@@ -374,6 +374,7 @@ delete_token=Eliminar
 access_token_deletion=Exclusão de Token de acesso pessoal
 access_token_deletion_desc=Ao excluir este token de acesso pessoal serão removidos todos os acessos da aplicação. Deseja continuar?
 delete_token_success=O Token de acesso pessoal foi removido com sucesso! Não se esqueça de atualizar as suas aplicações também.
+token_name_exists=Já existe um símbolo com o mesmo nome.
 
 orgs.none=Não é membro de nenhuma organização.
 orgs.leave_title=Sair da Organização
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Esta autenticação esta prestes a ser excluída, deseja
 auths.still_in_used=Esta autenticação ainda é utilizada por alguns utilizadores. Por favor remova ou converta esses utilizadores para outro tipo de login primeiro.
 auths.deletion_success=Autenticação foi excluída com sucesso!
 auths.login_source_exist=A fonte de login '%s" já existe.
+auths.github_api_endpoint=Endpoint da API
 
 config.not_set=(não definido)
 config.server_config=Configuração do Servidor

+ 7 - 5
conf/locale/locale_ru-RU.ini

@@ -107,7 +107,7 @@ enable_captcha=Включить капчу
 enable_captcha_popup=Запрашивать капчу при регистрации пользователя.
 require_sign_in_view=Разрешить требовать авторизацию для просмотра страниц
 require_sign_in_view_popup=Только авторизированные пользователи могут просматривать страницы, посетители смогут увидеть только  ссылку на авторизацию вверху страницы.
-admin_setting_desc=Вы не должны создать учетную запись администратора прямо сейчас, пользователь с ID = 1 получит доступ с правами администратора автоматически.
+admin_setting_desc=Вам не обязательно создавать учетную запись администратора прямо сейчас, пользователь с ID = 1 получит доступ с правами администратора автоматически.
 admin_title=Настройки учётной записи администратора
 admin_name=Имя пользователя
 admin_password=Пароль
@@ -162,13 +162,13 @@ active_your_account=Активируйте свой аккаунт
 prohibit_login=Вход запрещен
 prohibit_login_desc=Вход для вашей учетной записи был запрещен, пожалуйста, свяжитесь с администратором сайта.
 resent_limit_prompt=Вы уже запрашивали активацию по электронной почте. Пожалуйста, подождите 3 минуты, а затем повторите попытку.
-has_unconfirmed_mail=Здравствуйте, %s! У вас есть неподтвержденный адрес электронной почты (<b>%s</b>). Если вам не приходило письмо с подтверждением или нужно выслать новое письмо, нажмите на кнопку ниже.
+has_unconfirmed_mail=Здравствуйте, %s! У вас есть неподтвержденный адрес электронной почты (<b>%s</b>). Если вы не получили письмо с подтверждением или нужно выслать новое письмо, нажмите на кнопку ниже.
 resend_mail=Нажмите здесь, чтобы переотправить активационное письмо
 send_reset_mail=Нажмите сюда, чтобы отправить письмо для сброса пароля
 reset_password=Сброс пароля
 invalid_code=Извините, ваш код подтверждения истек или не является допустимым.
 reset_password_helper=Нажмите здесь, чтобы сбросить свой пароль
-password_too_short=Длина пароля не менее 6 символов.
+password_too_short=Длина пароля не может быть менее 6 символов.
 non_local_account=Нелокальные аккаунты не могут изменить пароль через GIN.
 
 login_two_factor=Двухфакторная аутентификация
@@ -212,8 +212,8 @@ TreeName=Путь к файлу
 Content=Содержимое
 
 require_error=` не может быть пустым.`
-alpha_dash_error=«должен быть допустимым символьным, числовым или dash(-_) значением.»
-alpha_dash_dot_error=«должен быть допустимым символьным, числовым или dash(-_) символами, включая точку.»
+alpha_dash_error=` должен быть допустимым символьным, числовым или dash(-_) значением.`
+alpha_dash_dot_error=` должен быть допустимым символьным, числовым или dash(-_) символами, включая точку.`
 alpha_dash_dot_slash_error=«должен быть допустимым символьным, числовым или dash(-_) символами, включая точку или слэш.»
 size_error=` должен быть размер %s.`
 min_size_error=«должен содержать по крайней мере %s символов.»
@@ -374,6 +374,7 @@ delete_token=Удалить
 access_token_deletion=Удаление личного токена доступа
 access_token_deletion_desc=Удаление этого персонального токена доступа приведет к удалению всех связанных прав доступа к приложению. Вы хотите продолжить?
 delete_token_success=Персональный токен доступа успешно удален! Не забудьте изменить настройки вашего приложения.
+token_name_exists=Токен с таким именем уже существует.
 
 orgs.none=Вы не состоите ни в одной организации.
 orgs.leave_title=Покинуть организацию
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Этот канал аутентификации буде
 auths.still_in_used=Эта проверка подлинности до сих пор используется некоторыми пользователями, удалите или преобразуйте этих пользователей в другой тип входа в систему.
 auths.deletion_success=Канал аутентификации успешно удален!
 auths.login_source_exist=Источник входа '%s' уже существует.
+auths.github_api_endpoint=Конечная точка API
 
 config.not_set=(не задано)
 config.server_config=Конфигурация сервера

+ 2 - 0
conf/locale/locale_sk-SK.ini

@@ -374,6 +374,7 @@ delete_token=Odstrániť
 access_token_deletion=Odstránenie osobného prístupového tokenu
 access_token_deletion_desc=Zmazaním tohto osobného prístupového tokenu sa zmaže všetok prístup súvisiacej aplikácie. Chcete pokračovať?
 delete_token_success=Osobný prístupový token bol úspešne odstránený! Nezabudnite tiež zmeniť nastavenie vašej aplikácie.
+token_name_exists=Rola s rovnakým monom už existuje
 
 orgs.none=Nieste členom žiadnej organizácie.
 orgs.leave_title=Opustiť organizáciu
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Tento spôsob overovania bude odstránený, chcete pokra
 auths.still_in_used=Tento spôsob overovania je stále používaný niektorými užívateľmi. Prosím, najskôr zmeňte u týchto užívateľov typ overenia na iný.
 auths.deletion_success=Spôsob overovania bol odstránený!
 auths.login_source_exist=Zdroj prihlásenia '%s' už existuje.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(nezadané)
 config.server_config=Konfigurácia servera

+ 2 - 0
conf/locale/locale_sr-SP.ini

@@ -374,6 +374,7 @@ delete_token=Уклони
 access_token_deletion=Уклоњење токена личног приступа
 access_token_deletion_desc=Уклоњење овог токена ће онемогућити сав приступ. Да ли желите да наставите?
 delete_token_success=Лични токен је успешно избришен! Не заборавите да ажурирате апликацију.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Нисте члан било које организације.
 orgs.leave_title=Напусти организацију
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Овај канал аутентикације ће би
 auths.still_in_used=Овај канал аутентикације још увек се користи од стране неких корисника, уклоните или пребаци ове кориснике у друг врсту аутентикације.
 auths.deletion_success=Канал аутентикације успешно избрисан!
 auths.login_source_exist=Улазни извор '%s' већ постоји.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(није подешено)
 config.server_config=Конфигурација сервера

+ 2 - 0
conf/locale/locale_sv-SE.ini

@@ -374,6 +374,7 @@ delete_token=Radera
 access_token_deletion=Borttagning Av Personlig Åtkomsttoken
 access_token_deletion_desc=Borttagning av denna personliga åtkomsttoken kommer att ta bort all relaterad åtkomst för applikationer. Vill du fortsätta?
 delete_token_success=Personlig åtkomsttoken har tagits bort! Glöm inte bort att uppdatera din applikation också.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Du är inte en medlem i någon organisation.
 orgs.leave_title=Lämna en organisation
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=This authentication is going to be deleted, do you want t
 auths.still_in_used=This authentication is still used by some users, please delete or convert these users to another login type first.
 auths.deletion_success=Authentication has been deleted successfully!
 auths.login_source_exist=Login source '%s' already exists.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(not set)
 config.server_config=Server-konfiguration

+ 8 - 6
conf/locale/locale_tr-TR.ini

@@ -58,7 +58,7 @@ db_name=Veritabanı Adı
 db_helper=Lütfen MySQL için INNODB motorunu utf8_general_ci karakter setiyle kullanın.
 ssl_mode=SSL Biçimi
 path=Yol
-sqlite_helper=SQLite3 veritabanının dosya yolu.<br> Lütfen cihaz başladığında kesin yolu kullan.
+sqlite_helper=SQLite3 veritabanının dosya yolu. <br>Lütfen hizmete başladığınızda kesin yolu kullanın.
 err_empty_db_path=SQLite3 veritabanının yolu boş olamaz.
 no_admin_and_disable_registration=Bir yönetici hesabı oluşturmadan kullanıcı kaydını devre dışı bırakamazsınız.
 err_empty_admin_password=Yönetici parolası boş olamaz.
@@ -212,8 +212,8 @@ TreeName=Dosya yolu
 Content=İçerik
 
 require_error=` boş olamaz.`
-alpha_dash_error=` sadece karakter, rakam veya çizgi(-_) içermelidir.`
-alpha_dash_dot_error=` sadece karakter, rakam, çizgi(-_) veya nokta içermelidir.`
+alpha_dash_error=` geçerli karakter, sayısal veya tire(-_) olmalı.`
+alpha_dash_dot_error=` geçerli karakter, sayısal, tire(-_) veya nokta olmalı.`
 alpha_dash_dot_slash_error=` geçerli alfa veya sayısal veya uzunçizgi(-_) veya nokta karakterler veya eğiz çizgi olmalıdır.`
 size_error=` uzunluk en fazla %s olmalıdır.`
 min_size_error=` en az %s karakter içermelidir.`
@@ -374,6 +374,7 @@ delete_token=Sil
 access_token_deletion=Kişisel Erişim Anahtarını Silme
 access_token_deletion_desc=Bu kişisel erişim anahtarını silerseniz uygulamanıza ilişkin tüm erişimler de kaldırılacaktır. Devam etmek istiyor musunuz?
 delete_token_success=Kişisel erişim anahtarı başarıyla kaldırıldı! Uygulamanızı güncellemeyi de unutmayın!
+token_name_exists=Token with same name already exists.
 
 orgs.none=Hiçbir organizasyonların üyesi değilsiniz.
 orgs.leave_title=Organizasyondan ayrıl
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Bu yetkilendirme silinecek. Devam etmek istiyor musunuz?
 auths.still_in_used=Bu yetkilendirme hala bazı kullanıcılar tarafından kullanılıyor. Lütfen öncelikle bunları silin ya da başka oturum açma türlerine çevirin.
 auths.deletion_success=Yetkilendirme başarıyla silindi!
 auths.login_source_exist='%s' giriş kaynağı zaten mevcut.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(ayarlı değil)
 config.server_config=Sunucu Yapılandırması
@@ -1312,9 +1314,9 @@ delete_branch=<code>%[2]s</code> 'ın <a href="%[1]s">%[3]s</a> şubesi silindi
 push_tag=etiket <a href="%s/src/%s">%[2]s</a> <a href="%[1]s">%[3]s</a>'a itelendi
 delete_tag=<code>%[2]s</code> 'ın <a href="%[1]s">%[3]s</a> etiketi silindi
 fork_repo=<a href="%s">%s</a> için bir depo çatalladı
-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=işlemeler yansıdan <a href="%[1]s">%[4]s</a> deposundaki <a href="%[1]s/src/%[2]s"> dalına eşitlendi
+mirror_sync_create=yansıdan yeni <a href="%s/src/%s">%[2]s</a> referansı <a href="%[1]s">%[3]s</a> konumuna eşitlendi
+mirror_sync_delete=yansıdan <a href="%[1]s">%[3]s</a> konumundaki <code>%[2]s</code> referansı eşitlendi ve silindi
 
 [tool]
 ago=önce

+ 2 - 0
conf/locale/locale_uk-UA.ini

@@ -374,6 +374,7 @@ delete_token=Видалити
 access_token_deletion=Видалення токену персонального доступу
 access_token_deletion_desc=Видалення цього токену призведе до неможливості доступу усіх пов’язаних додатків. Продовжити?
 delete_token_success=Персональний токен було видалено. Не забудьте перевірити ваш додаток.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Ви не є членом будь-якої організації.
 orgs.leave_title=Залишити організацію
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Цю автентифікацію буде видален
 auths.still_in_used=Цю автентифікацію ще використовують деякі користувачі. Будь ласка видаліть цих користувачів, або сконвертуйте їх на інший тип входу до системи.
 auths.deletion_success=Автентивікацію було успішно видалено!
 auths.login_source_exist=Джерело входу '%s' вже існує.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(не встановлено)
 config.server_config=Конфігурація сервера

+ 2 - 0
conf/locale/locale_vi-VN.ini

@@ -374,6 +374,7 @@ delete_token=Xóa
 access_token_deletion=Xóa mã truy cập cá nhân
 access_token_deletion_desc=Xóa mã quyền truy cập cá nhân sẽ loại bỏ tất cả liên quan đến truy cập của ứng dụng. Bạn có muốn tiếp tục?
 delete_token_success=Mã truy cập cá nhân đã được loại bỏ thành công! Đừng quên để cập nhật ứng dụng của bạn.
+token_name_exists=Token with same name already exists.
 
 orgs.none=Bạn không là thành viên của bất kỳ tổ chức nào.
 orgs.leave_title=Rời khỏi tổ chức
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=Xác thực này sẽ bị xóa, bạn có muốn tiếp
 auths.still_in_used=Xác thực này vẫn còn được sử dụng bởi một số người dùng, vui lòng xoá hoặc chuyển đổi những người dùng đến một loại đăng nhập trước tiên.
 auths.deletion_success=Xác thực đã được xóa thành công!
 auths.login_source_exist=Đăng nhập nguồn '%s' đã tồn tại.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(chưa đặt)
 config.server_config=Cấu hình server

+ 3 - 1
conf/locale/locale_zh-CN.ini

@@ -107,7 +107,7 @@ enable_captcha=启用验证码服务
 enable_captcha_popup=要求在用户注册时输入预验证码
 require_sign_in_view=启用登录访问限制
 require_sign_in_view_popup=只有已登录的用户才能够访问页面,否则将只能看到登录或注册页面。
-admin_setting_desc=创建管理员帐号并不是必须的,因为 ID=1 的用户将自动获得管理员权限。
+admin_setting_desc=创建管理员帐号并不是必须的,因为用户表中的第一个用户将自动获得管理员权限。
 admin_title=管理员帐号设置
 admin_name=管理员用户名
 admin_password=管理员密码
@@ -374,6 +374,7 @@ delete_token=删除令牌
 access_token_deletion=删除个人操作令牌操作
 access_token_deletion_desc=删除该个人操作令牌将删除所有相关的应用程序的访问权限。是否继续?
 delete_token_success=个人操作令牌删除成功!请更新与该令牌有关的所有应用。
+token_name_exists=Token with same name already exists.
 
 orgs.none=您现在还不是任何组织的成员。
 orgs.leave_title=离开组织
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=该认证将被删除。是否继续?
 auths.still_in_used=此认证仍旧与一些用户有关联,请先删除或者将这些用户转换为其它登录类型。
 auths.deletion_success=授权源删除成功!
 auths.login_source_exist=登录源 '%s' 已存在。
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(未设置)
 config.server_config=服务器配置

+ 10 - 8
conf/locale/locale_zh-HK.ini

@@ -119,8 +119,8 @@ sqlite3_not_available=您所使用的發行版本不支持 SQLite3,請從 %s 
 invalid_db_setting=數據庫設置不正確:%v
 invalid_repo_path=倉庫根目錄設置不正確:%v
 run_user_not_match=執行系統用戶非當前用戶:%s -> %s
-smtp_host_missing_port=SMTP Host is missing port in address.
-invalid_smtp_from=SMTP From field is not valid: %v
+smtp_host_missing_port=SMTP Host port missing from address.
+invalid_smtp_from=SMTP From field is invalid: %v
 save_config_failed=應用配置保存失敗:%v
 invalid_admin_setting=管理員帳戶設置不正確:%v
 install_success=您好!我們很高興您選擇使用 Gogs,祝您使用愉快,代碼從此無 BUG!
@@ -160,7 +160,7 @@ sign_up_now=還沒帳戶?馬上註冊。
 confirmation_mail_sent_prompt=一封新的確認郵件已經被發送至 <b>%s</b>,請檢查您的收件箱並在 %d 小時內完成確認註冊操作。
 active_your_account=激活您的帳戶
 prohibit_login=Login Prohibited
-prohibit_login_desc=Your account is prohibited to login, please contact site admin.
+prohibit_login_desc=Your account is prohibited from logging in. Please contact the site admin.
 resent_limit_prompt=對不起,您請求發送激活郵件過於頻繁,請等待 3 分鐘後再試!
 has_unconfirmed_mail=%s 您好,您有一封發送至( <b>%s</b>) 但未被確認的郵件。如果您未收到激活郵件,或需要重新發送,請單擊下方的按鈕。
 resend_mail=單擊此處重新發送確認郵件
@@ -177,7 +177,7 @@ 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_invalid_recovery_code=Recovery code has been used or does not valid.
+login_two_factor_invalid_recovery_code=Recovery code already used or invalid.
 
 [mail]
 activate_account=請激活您的帳戶
@@ -214,7 +214,7 @@ Content=內容
 require_error=不能為空。
 alpha_dash_error=必須為英文字母、阿拉伯數字或橫線(-_)。
 alpha_dash_dot_error=必須為英文字母、阿拉伯數字、橫線(-_)或點。
-alpha_dash_dot_slash_error=` must be valid alpha or numeric or dash(-_) or dot characters or slashes.`
+alpha_dash_dot_slash_error=` must be alphanumeric, dash (-_), dot or slash characters.`
 size_error=長度必須為 %s。
 min_size_error=長度最小為 %s 個字符。
 max_size_error=長度最大為 %s 個字符。
@@ -253,9 +253,9 @@ change_avatar=Change your avatar
 join_on=加入於
 repositories=倉庫列表
 activity=公開活動
-followers=關
+followers=關
 starred=已讚好
-following=關
+following=關
 follow=關注
 unfollow=取消關注
 
@@ -374,6 +374,7 @@ delete_token=删除令牌
 access_token_deletion=刪除個人的連接token
 access_token_deletion_desc=刪除此連接token將會刪除與相關應用程式的連結。您想要繼續嗎?
 delete_token_success=您的連接token已成功刪除。請記得更新您的應用程式。
+token_name_exists=Token with same name already exists.
 
 orgs.none=You are not a member of any organizations.
 orgs.leave_title=Leave organization
@@ -1003,7 +1004,7 @@ total=總計:%d
 dashboard.statistic=應用統計數據
 dashboard.operations=管理員操作
 dashboard.system_status=系統監視狀態
-dashboard.statistic_info=Gogs 數據庫統計:<b>%d</b> 位用戶,<b>%d</b> 個組織,<b>%d</b> 個公鑰,<b>%d</b> 個倉庫,<b>%d</b> 個倉庫關,<b>%d</b> 個贊,<b>%d</b> 次行為,<b>%d</b> 條權限記錄,<b>%d</b> 個問題,<b>%d</b> 次評論,<b>%d</b> 個社交帳號,<b>%d</b> 個用戶關,<b>%d</b> 個鏡像,<b>%d</b> 個版本發佈,<b>%d</b> 個登錄源,<b>%d</b> 個 Web 鉤子,<b>%d</b> 個里程碑,<b>%d</b> 個標籤,<b>%d</b> 個鉤子任務,<b>%d</b> 個團隊,<b>%d</b> 個更新任務,<b>%d</b> 個附件。
+dashboard.statistic_info=Gogs 數據庫統計:<b>%d</b> 位用戶,<b>%d</b> 個組織,<b>%d</b> 個公鑰,<b>%d</b> 個倉庫,<b>%d</b> 個倉庫關,<b>%d</b> 個贊,<b>%d</b> 次行為,<b>%d</b> 條權限記錄,<b>%d</b> 個問題,<b>%d</b> 次評論,<b>%d</b> 個社交帳號,<b>%d</b> 個用戶關,<b>%d</b> 個鏡像,<b>%d</b> 個版本發佈,<b>%d</b> 個登錄源,<b>%d</b> 個 Web 鉤子,<b>%d</b> 個里程碑,<b>%d</b> 個標籤,<b>%d</b> 個鉤子任務,<b>%d</b> 個團隊,<b>%d</b> 個更新任務,<b>%d</b> 個附件。
 dashboard.operation_name=操作名稱
 dashboard.operation_switch=開關
 dashboard.operation_run=執行
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=該認證將被刪除。是否繼續?
 auths.still_in_used=This authentication is still used by some users, please delete or convert these users to another login type first.
 auths.deletion_success=認證源刪除成功!
 auths.login_source_exist=Login source '%s' already exists.
+auths.github_api_endpoint=API Endpoint
 
 config.not_set=(not set)
 config.server_config=服務器配置

+ 13 - 11
conf/locale/locale_zh-TW.ini

@@ -107,7 +107,7 @@ enable_captcha=啟用驗證碼服務
 enable_captcha_popup=要求在用戶註冊時輸入驗證碼
 require_sign_in_view=啓用登錄訪問限制
 require_sign_in_view_popup=只有已登錄的用戶才能夠訪問頁面,否則將只能看到登錄或註冊頁面。
-admin_setting_desc=建管理員帳號並不是必須的,因為 ID=1 的用戶將自動獲得管理員權限。
+admin_setting_desc=建管理員帳號並不是必須的,因為 ID=1 的使用者將自動獲得管理員權限。
 admin_title=管理員帳號設置
 admin_name=管理員用戶名
 admin_password=管理員密碼
@@ -253,9 +253,9 @@ change_avatar=更改頭像
 join_on=加入於
 repositories=倉庫列表
 activity=公開活動
-followers=關
+followers=關
 starred=已讚好
-following=關
+following=關
 follow=關注
 unfollow=取消關注
 
@@ -335,7 +335,7 @@ add_on=增加於
 last_used=上次使用在
 no_activity=沒有最近活動
 key_state_desc=該密鑰在 7 天內被使用過
-token_state_desc=此token在過去七天內曾經被使用過
+token_state_desc=此令牌在過去七天內曾經被使用過
 
 two_factor=兩步驗證
 two_factor_status=狀態:
@@ -344,7 +344,7 @@ two_factor_off=關閉
 two_factor_enable=啟用
 two_factor_disable=禁用
 two_factor_view_recovery_codes=在安全的地方查看並保存 <a href="%s%s"> 您的恢復代碼 </a>。如果您失去對身份驗證應用程式的存取權限, 則可以將它們用作密碼。
-two_factor_http=對於HTTP/HTTPS操作,您不能使用用戶名稱和密碼作為憑據。請創建和使用<a href=“%[1]s%[2]s”>個人操作令牌</a>作為您的憑據,如<code>%[3]s</code>。
+two_factor_http=在 HTTP/HTTPS 動作中,您不能使用純文字使用者名稱及密碼。請建立並使用<a href="%[1]s%[2]s">個人存取令牌</a>作為您的認證方式,範例:<code>%[3]s</code>。
 two_factor_enable_title=啟用兩步驗證
 two_factor_scan_qr=請使用您的身份驗證應用程式掃描圖像:
 two_factor_or_enter_secret=或輸入密碼: %s
@@ -365,15 +365,16 @@ two_factor_disable_success=您帳戶的兩步驗證已成功停用!
 
 manage_access_token=管理個人操作令牌
 generate_new_token=生成新的令牌
-tokens_desc=您所產生的token將被用來存取Gogs APIs
+tokens_desc=您產生的令牌可以用來存取 Gogs API。
 new_token_desc=目前為止,任何令牌都對您的帳戶擁有完整的操作權限。
 token_name=令牌名稱
 generate_token=生成令牌
 generate_token_succees=新的操作令牌生成成功!您必須立即複製到一個安全的地方,因為該令牌只會顯示一次!
-delete_token=除令牌
-access_token_deletion=刪除個人的連接token
+delete_token=除令牌
+access_token_deletion=刪除個人存取令牌
 access_token_deletion_desc=刪除此連接token將會刪除與相關應用程式的連結。您想要繼續嗎?
 delete_token_success=您的連接token已成功刪除。請記得更新您的應用程式。
+token_name_exists=有同樣名稱的令牌已經存在。
 
 orgs.none=您現在還不是任何組織的成員。
 orgs.leave_title=離開組織
@@ -446,7 +447,7 @@ copy_link_success=複製成功!
 copy_link_error=請按下 ⌘-C 或 Ctrl-C 複製
 copied=複製成功
 unwatch=取消關注
-watch=關
+watch=關
 unstar=取消讚好
 star=讚好
 fork=複刻
@@ -1003,7 +1004,7 @@ total=總計:%d
 dashboard.statistic=應用統計數據
 dashboard.operations=管理員操作
 dashboard.system_status=系統監視狀態
-dashboard.statistic_info=GIN 資料庫統計:<b>%d</b> 位用戶,<b>%d</b> 個組織,<b>%d</b> 個公鑰,<b>%d</b> 個倉庫,<b>%d</b> 個倉庫關註,<b>%d</b> 個贊,<b>%d</b> 次行為,<b>%d</b> 條權限記錄,<b>%d</b> 個問題,<b>%d</b> 次評論,<b>%d</b> 個社交帳號,<b>%d</b> 個用戶關,<b>%d</b> 個鏡像,<b>%d</b> 個版本發佈,<b>%d</b> 個登錄來源,<b>%d</b> 個 Web 鉤子,<b>%d</b> 個里程碑,<b>%d</b> 個標籤,<b>%d</b> 個鉤子任務,<b>%d</b> 個團隊,<b>%d</b> 個更新任務,<b>%d</b> 個附件。
+dashboard.statistic_info=GIN 資料庫統計:<b>%d</b> 位用戶,<b>%d</b> 個組織,<b>%d</b> 個公鑰,<b>%d</b> 個倉庫,<b>%d</b> 個倉庫關注,<b>%d</b> 個讚,<b>%d</b> 次行為,<b>%d</b> 條權限記錄,<b>%d</b> 個問題,<b>%d</b> 次評論,<b>%d</b> 個社交帳號,<b>%d</b> 個用戶關,<b>%d</b> 個鏡像,<b>%d</b> 個版本發佈,<b>%d</b> 個登錄來源,<b>%d</b> 個 Web 鉤子,<b>%d</b> 個里程碑,<b>%d</b> 個標籤,<b>%d</b> 個鉤子任務,<b>%d</b> 個團隊,<b>%d</b> 個更新任務,<b>%d</b> 個附件。
 dashboard.operation_name=操作名稱
 dashboard.operation_switch=開關
 dashboard.operation_run=執行
@@ -1092,7 +1093,7 @@ repos.repo_manage_panel=倉庫管理界面
 repos.owner=所有者
 repos.name=倉庫名稱
 repos.private=私有庫
-repos.watches=關
+repos.watches=關
 repos.stars=讚好數
 repos.issues=問題數
 repos.size=大小
@@ -1151,6 +1152,7 @@ auths.delete_auth_desc=該認證將被刪除。是否繼續?
 auths.still_in_used=一些使用者仍然使用此驗證方式,請先刪除或轉換這些使用者到其它登入類型。
 auths.deletion_success=認證源刪除成功!
 auths.login_source_exist=登錄源 '%s' 已存在。
+auths.github_api_endpoint=API 端點
 
 config.not_set=(未設定)
 config.server_config=服務器配置

+ 3 - 1
docker/README.md

@@ -1,6 +1,8 @@
 # Docker for Gogs
 
-Visit [Docker Cloud](https://cloud.docker.com/swarm/gogs/repository/docker/gogs/gogs) / [Docker Store](https://store.docker.com/community/images/gogs/gogs) see all available images and tags.
+![Docker pulls](https://img.shields.io/docker/pulls/gogs/gogs?logo=docker&style=for-the-badge) ![Docker image size](https://img.shields.io/microbadger/image-size/gogs/gogs?logo=docker&style=for-the-badge)
+
+Visit [Docker Cloud](https://cloud.docker.com/u/gogs/repository/docker/gogs/gogs) see all available images and tags.
 
 ## Usage
 

+ 71 - 0
go.mod

@@ -0,0 +1,71 @@
+module gogs.io/gogs
+
+go 1.13
+
+require (
+	github.com/bgentry/speakeasy v0.1.0 // indirect
+	github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0
+	github.com/fatih/color v1.7.0 // indirect
+	github.com/go-macaron/binding v1.0.1
+	github.com/go-macaron/cache v0.0.0-20190810181446-10f7c57e2196
+	github.com/go-macaron/captcha v0.0.0-20190813234938-24f40749f36d
+	github.com/go-macaron/csrf v0.0.0-20190812063352-946f6d303a4c
+	github.com/go-macaron/gzip v0.0.0-20160222043647-cad1c6580a07
+	github.com/go-macaron/i18n v0.0.0-20190805070610-6d779f6a12cf
+	github.com/go-macaron/session v0.0.0-20190805070824-1a3cdc6f5659
+	github.com/go-macaron/toolbox v0.0.0-20190813233741-94defb8383c6
+	github.com/go-sql-driver/mysql v1.4.1
+	github.com/go-xorm/builder v0.3.4
+	github.com/gogs/chardet v0.0.0-20150115103509-2404f7772561
+	github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
+	github.com/gogs/git-module v0.8.3
+	github.com/gogs/go-gogs-client v0.0.0-20190710002546-4c3c18947c15
+	github.com/gogs/go-libravatar v0.0.0-20191106065024-33a75213d0a0
+	github.com/gogs/minwinsvc v0.0.0-20170301035411-95be6356811a
+	github.com/google/go-github v17.0.0+incompatible
+	github.com/google/go-querystring v1.0.0 // indirect
+	github.com/issue9/identicon v1.0.1
+	github.com/jaytaylor/html2text v0.0.0-20190408195923-01ec452cbe43
+	github.com/json-iterator/go v1.1.7
+	github.com/klauspost/compress v1.8.6 // indirect
+	github.com/klauspost/cpuid v1.2.1 // indirect
+	github.com/lib/pq v1.2.0
+	github.com/mattn/go-colorable v0.1.4 // indirect
+	github.com/mattn/go-isatty v0.0.10 // indirect
+	github.com/mattn/go-runewidth v0.0.4 // indirect
+	github.com/mattn/go-sqlite3 v1.11.0
+	github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2
+	github.com/microcosm-cc/bluemonday v1.0.2
+	github.com/msteinert/pam v0.0.0-20190215180659-f29b9f28d6f9
+	github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
+	github.com/niklasfasching/go-org v0.1.6
+	github.com/olekukonko/tablewriter v0.0.1 // indirect
+	github.com/pquerna/otp v1.2.0
+	github.com/prometheus/client_golang v1.2.1
+	github.com/russross/blackfriday v1.5.2
+	github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca // indirect
+	github.com/satori/go.uuid v1.2.0
+	github.com/sergi/go-diff v1.0.0
+	github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337
+	github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
+	github.com/unknwon/cae v1.0.0
+	github.com/unknwon/com v1.0.1
+	github.com/unknwon/i18n v0.0.0-20190805065654-5c6446a380b6
+	github.com/unknwon/paginater v0.0.0-20170405233947-45e5d631308e
+	github.com/urfave/cli v1.22.1
+	golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
+	golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582
+	golang.org/x/text v0.3.2
+	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
+	gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
+	gopkg.in/clog.v1 v1.2.0
+	gopkg.in/editorconfig/editorconfig-core-go.v1 v1.3.1
+	gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
+	gopkg.in/ini.v1 v1.49.0
+	gopkg.in/ldap.v2 v2.5.1
+	gopkg.in/macaron.v1 v1.3.4
+	xorm.io/core v0.7.2
+	xorm.io/xorm v0.8.0
+)
+
+// +heroku goVersion go1.13beta1

+ 283 - 0
go.sum

@@ -0,0 +1,283 @@
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
+github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
+github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
+github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/couchbase/gomemcached v0.0.0-20190515232915-c4b4ca0eb21d/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c=
+github.com/couchbase/goutils v0.0.0-20190315194238-f9d42b11473b/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs=
+github.com/couchbaselabs/go-couchbase v0.0.0-20190708161019-23e7ca2ce2b7/go.mod h1:mby/05p8HE5yHEAKiIH/555NoblMs7PtW6NrYshDruc=
+github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
+github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
+github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
+github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
+github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
+github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
+github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
+github.com/go-macaron/binding v1.0.1 h1:4LASxd4EKsESZ6ZMyzNVX+TM4Yuex4bTHYyz/PQjsRA=
+github.com/go-macaron/binding v1.0.1/go.mod h1:AG8Z6qkQM8s47aUDJOco/SNwJ8Czif2hMm7rc0abDog=
+github.com/go-macaron/cache v0.0.0-20190810181446-10f7c57e2196/go.mod h1:O6fSdaYZbGh4clVMGMGO5k2KbMO0Cz8YdBnPrD0I8dM=
+github.com/go-macaron/captcha v0.0.0-20190813234938-24f40749f36d/go.mod h1:lmhlZnu9cTRGNQEkSh1qZi2IK3HJH4Z1MXkg6ARQKZA=
+github.com/go-macaron/csrf v0.0.0-20190812063352-946f6d303a4c/go.mod h1:FX53Xq0NNlUj0E5in5J8Dq5nrbdK3ZyDIy6y5VWOiUo=
+github.com/go-macaron/gzip v0.0.0-20160222043647-cad1c6580a07/go.mod h1://cJFfDp/70L0oTNAMB+M8Jd0rpuIx/55iARuJ6StwE=
+github.com/go-macaron/i18n v0.0.0-20190805070610-6d779f6a12cf/go.mod h1:upCFUd+F+dOZqUygJeilNcg85TINeNcdRzKNL5+TYqE=
+github.com/go-macaron/inject v0.0.0-20160627170012-d8a0b8677191/go.mod h1:VFI2o2q9kYsC4o7VP1HrEVosiZZTd+MVT3YZx4gqvJw=
+github.com/go-macaron/session v0.0.0-20190805070824-1a3cdc6f5659/go.mod h1:tLd0QEudXocQckwcpCq5pCuTCuYc24I0bRJDuRe9OuQ=
+github.com/go-macaron/toolbox v0.0.0-20190813233741-94defb8383c6/go.mod h1:YFNJ/JT4yLnpuIXTFef30SZkxGHUczjGZGFaZpPcdn0=
+github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/go-xorm/builder v0.3.4/go.mod h1:KxkQkNN1DpPKTedxXyTQcmH+rXfvk4LZ9SOOBoZBAxw=
+github.com/go-xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:56xuuqnHyryaerycW3BfssRdxQstACi0Epw/yC5E2xM=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogs/chardet v0.0.0-20150115103509-2404f7772561/go.mod h1:Pcatq5tYkCW2Q6yrR2VRHlbHpZ/R4/7qyL1TCF7vl14=
+github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14/go.mod h1:jPoNZLWDAqA5N3G5amEoiNbhVrmM+ZQEcnQvNQ2KaZk=
+github.com/gogs/git-module v0.8.3 h1:9f8oxSs9OACWrGBYMVnnQNzyTcVN+zzcBM7CXnbmezw=
+github.com/gogs/git-module v0.8.3/go.mod h1:aj4tcm7DxaszJWpZLZIRL6gfPXyguAHiE1PDfAAPrCw=
+github.com/gogs/go-gogs-client v0.0.0-20190710002546-4c3c18947c15/go.mod h1:fR6z1Ie6rtF7kl/vBYMfgD5/G5B1blui7z426/sj2DU=
+github.com/gogs/go-gogs-client v0.0.0-20191116173748-7ec4fd4f4907 h1:we8QFDJAC+K7NQ293BXmype3f6aMhucjEL3sTkNZ0nk=
+github.com/gogs/go-gogs-client v0.0.0-20191116173748-7ec4fd4f4907/go.mod h1:fR6z1Ie6rtF7kl/vBYMfgD5/G5B1blui7z426/sj2DU=
+github.com/gogs/go-libravatar v0.0.0-20191106065024-33a75213d0a0 h1:K02vod+sn3M1OOkdqi2tPxN2+xESK4qyITVQ3JkGEv4=
+github.com/gogs/go-libravatar v0.0.0-20191106065024-33a75213d0a0/go.mod h1:Zas3BtO88pk1cwUfEYlvnl/CRwh0ybDxRWSwRjG8I3w=
+github.com/gogs/minwinsvc v0.0.0-20170301035411-95be6356811a/go.mod h1:TUIZ+29jodWQ8Gk6Pvtg4E09aMsc3C/VLZiVYfUhWQU=
+github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
+github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
+github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
+github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
+github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/issue9/assert v1.3.1/go.mod h1:9Ger+iz8X7r1zMYYwEhh++2wMGWcNN2oVI+zIQXxcio=
+github.com/issue9/identicon v1.0.1/go.mod h1:UKNVkUFI68RPz/RlLhsAr1aX6bBSaYEWRHVfdjrMUmk=
+github.com/jaytaylor/html2text v0.0.0-20190408195923-01ec452cbe43/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
+github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/klauspost/compress v1.8.6/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
+github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lunny/log v0.0.0-20160921050905-7887c61bf0de/go.mod h1:3q8WtuPQsoRbatJuy3nvq/hRSvuBJrHHr+ybPPiNvHQ=
+github.com/lunny/nodb v0.0.0-20160621015157-fc1ef06ad4af/go.mod h1:Cqz6pqow14VObJ7peltM+2n3PWOz7yTrfUuGbVFkzN0=
+github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
+github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
+github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/mcuadros/go-version v0.0.0-20190308113854-92cdf37c5b75/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo=
+github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo=
+github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/msteinert/pam v0.0.0-20190215180659-f29b9f28d6f9/go.mod h1:np1wUFZ6tyoke22qDJZY40URn9Ae51gX7ljIWXN5TJs=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
+github.com/niklasfasching/go-org v0.1.6/go.mod h1:AsLD6X7djzRIz4/RFZu8vwRL0VGjUvGZCCH1Nz0VdrU=
+github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
+github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo=
+github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
+github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
+github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
+github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U=
+github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
+github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
+github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
+github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
+github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
+github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=
+github.com/siddontang/go-snappy v0.0.0-20140704025258-d8f7bb82a96d/go.mod h1:vq0tzqLRu6TS7Id0wMo2N5QzJoKedVeovOpHjnykSzY=
+github.com/siddontang/ledisdb v0.0.0-20190202134119-8ceb77e66a92/go.mod h1:mF1DpOSOUiJRMR+FDqaqu3EBqrybQtrDDszLUZ6oxPg=
+github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA=
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=
+github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
+github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
+github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02nZ62WenDCkgHFerpIOmW0iT7GKmXM=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
+github.com/unknwon/cae v1.0.0/go.mod h1:QaSeRctcea9fK6piJpAMCCPKxzJ01+xFcr2k1m3WRPU=
+github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM=
+github.com/unknwon/com v1.0.1/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM=
+github.com/unknwon/i18n v0.0.0-20190805065654-5c6446a380b6/go.mod h1:+5rDk6sDGpl3azws3O+f+GpFSyN9GVr0K8cvQLQM2ZQ=
+github.com/unknwon/paginater v0.0.0-20170405233947-45e5d631308e/go.mod h1:TBwoao3Q4Eb/cp+dHbXDfRTrZSsj/k7kLr2j1oWRWC0=
+github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
+go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
+golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190802220118-1d1727260058/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
+golang.org/x/tools v0.0.0-20190805222050-c5a2fd39b72a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
+google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
+gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
+gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
+gopkg.in/bufio.v1 v1.0.0-20140618132640-567b2bfa514e/go.mod h1:xsQCaysVCudhrYTfzYWe577fCe7Ceci+6qjO2Rdc0Z4=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/clog.v1 v1.2.0 h1:BHfwHRNQy497iBNsRBassPixSAxRbn2z5KVkdBFbwxc=
+gopkg.in/clog.v1 v1.2.0/go.mod h1:L6fgdpdhFgKX4eGuDvt+N6X2GwZE160NRrIHzvaF8ZM=
+gopkg.in/editorconfig/editorconfig-core-go.v1 v1.3.1/go.mod h1:HLRfHXFEZeZqN40N3uOdJUIOzzKl5xk9kc0AX12GhdY=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
+gopkg.in/ini.v1 v1.46.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/ini.v1 v1.48.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/ini.v1 v1.49.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk=
+gopkg.in/macaron.v1 v1.3.4/go.mod h1:/RoHTdC8ALpyJ3+QR36mKjwnT1F1dyYtsGM9Ate6ZFI=
+gopkg.in/redis.v2 v2.3.2/go.mod h1:4wl9PJ/CqzeHk3LVq1hNLHH8krm3+AXEgut4jVc++LU=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+xorm.io/builder v0.3.6/go.mod h1:LEFAPISnRzG+zxaxj2vPicRwz67BdhFreKg8yv8/TgU=
+xorm.io/core v0.7.2/go.mod h1:jJfd0UAEzZ4t87nbQYtVjmqpIODugN6PD2D9E+dJvdM=
+xorm.io/xorm v0.8.0/go.mod h1:ZkJLEYLoVyg7amJK/5r779bHyzs2AU8f8VMiP6BM7uY=

+ 8 - 5
gogs.go

@@ -1,4 +1,4 @@
-// +build go1.8
+// +build go1.11
 
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
@@ -11,12 +11,13 @@ import (
 	"os"
 
 	"github.com/urfave/cli"
+	log "gopkg.in/clog.v1"
 
-	"github.com/G-Node/gogs/cmd"
-	"github.com/G-Node/gogs/pkg/setting"
+	"github.com/G-Node/gogs/internal/cmd"
+	"github.com/G-Node/gogs/internal/setting"
 )
 
-const Version = "0.11.91.0811"
+const Version = "0.11.97.1209"
 
 func init() {
 	setting.AppVer = Version
@@ -37,5 +38,7 @@ func main() {
 		cmd.Backup,
 		cmd.Restore,
 	}
-	app.Run(os.Args)
+	if err := app.Run(os.Args); err != nil {
+		log.Fatal(2, "Failed to run: %v", err)
+	}
 }

+ 16 - 16
pkg/auth/auth.go → internal/auth/auth.go

@@ -13,10 +13,10 @@ import (
 	log "gopkg.in/clog.v1"
 	"gopkg.in/macaron.v1"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/models/errors"
-	"github.com/G-Node/gogs/pkg/setting"
-	"github.com/G-Node/gogs/pkg/tool"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/db/errors"
+	"github.com/G-Node/gogs/internal/setting"
+	"github.com/G-Node/gogs/internal/tool"
 )
 
 func IsAPIPath(url string) bool {
@@ -26,7 +26,7 @@ func IsAPIPath(url string) bool {
 // 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 {
+	if !db.HasEngine {
 		return 0, false
 	}
 
@@ -49,15 +49,15 @@ func SignedInID(c *macaron.Context, sess session.Store) (_ int64, isTokenAuth bo
 
 		// Let's see if token is valid.
 		if len(tokenSHA) > 0 {
-			t, err := models.GetAccessTokenBySHA(tokenSHA)
+			t, err := db.GetAccessTokenBySHA(tokenSHA)
 			if err != nil {
-				if !models.IsErrAccessTokenNotExist(err) && !models.IsErrAccessTokenEmpty(err) {
+				if !db.IsErrAccessTokenNotExist(err) && !db.IsErrAccessTokenEmpty(err) {
 					log.Error(2, "GetAccessTokenBySHA: %v", err)
 				}
 				return 0, false
 			}
 			t.Updated = time.Now()
-			if err = models.UpdateAccessToken(t); err != nil {
+			if err = db.UpdateAccessToken(t); err != nil {
 				log.Error(2, "UpdateAccessToken: %v", err)
 			}
 			return t.UID, true
@@ -69,7 +69,7 @@ func SignedInID(c *macaron.Context, sess session.Store) (_ int64, isTokenAuth bo
 		return 0, false
 	}
 	if id, ok := uid.(int64); ok {
-		if _, err := models.GetUserByID(id); err != nil {
+		if _, err := db.GetUserByID(id); err != nil {
 			if !errors.IsUserNotExist(err) {
 				log.Error(2, "GetUserByID: %v", err)
 			}
@@ -82,8 +82,8 @@ func SignedInID(c *macaron.Context, sess session.Store) (_ int64, isTokenAuth bo
 
 // 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 {
+func SignedInUser(ctx *macaron.Context, sess session.Store) (_ *db.User, isBasicAuth bool, isTokenAuth bool) {
+	if !db.HasEngine {
 		return nil, false, false
 	}
 
@@ -93,7 +93,7 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (_ *models.User, isB
 		if setting.Service.EnableReverseProxyAuth {
 			webAuthUser := ctx.Req.Header.Get(setting.ReverseProxyAuthUser)
 			if len(webAuthUser) > 0 {
-				u, err := models.GetUserByName(webAuthUser)
+				u, err := db.GetUserByName(webAuthUser)
 				if err != nil {
 					if !errors.IsUserNotExist(err) {
 						log.Error(2, "GetUserByName: %v", err)
@@ -102,13 +102,13 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (_ *models.User, isB
 
 					// Check if enabled auto-registration.
 					if setting.Service.EnableReverseProxyAutoRegister {
-						u := &models.User{
+						u := &db.User{
 							Name:     webAuthUser,
 							Email:    gouuid.NewV4().String() + "@localhost",
 							Passwd:   webAuthUser,
 							IsActive: true,
 						}
-						if err = models.CreateUser(u); err != nil {
+						if err = db.CreateUser(u); err != nil {
 							// FIXME: should I create a system notice?
 							log.Error(2, "CreateUser: %v", err)
 							return nil, false, false
@@ -128,7 +128,7 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (_ *models.User, isB
 			if len(auths) == 2 && auths[0] == "Basic" {
 				uname, passwd, _ := tool.BasicAuthDecode(auths[1])
 
-				u, err := models.UserLogin(uname, passwd, -1)
+				u, err := db.UserLogin(uname, passwd, -1)
 				if err != nil {
 					if !errors.IsUserNotExist(err) {
 						log.Error(2, "UserLogin: %v", err)
@@ -142,7 +142,7 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (_ *models.User, isB
 		return nil, false, false
 	}
 
-	u, err := models.GetUserByID(uid)
+	u, err := db.GetUserByID(uid)
 	if err != nil {
 		log.Error(2, "GetUserByID: %v", err)
 		return nil, false, false

+ 0 - 0
pkg/auth/github/github.go → internal/auth/github/github.go


+ 0 - 0
pkg/auth/ldap/README.md → internal/auth/ldap/README.md


+ 2 - 2
pkg/auth/ldap/ldap.go → internal/auth/ldap/ldap.go

@@ -269,7 +269,7 @@ func (ls *Source) SearchEntry(name, passwd string, directBind bool) (string, str
 			log.Error(2, "LDAP: Group search failed: %v", err)
 			return "", "", "", "", false, false
 		} else if len(srg.Entries) < 1 {
-			log.Error(2, "LDAP: Group search failed: 0 entries")
+			log.Trace("LDAP: Group search returned no entries")
 			return "", "", "", "", false, false
 		}
 
@@ -310,7 +310,7 @@ func (ls *Source) SearchEntry(name, passwd string, directBind bool) (string, str
 		if err != nil {
 			log.Error(2, "LDAP: Admin search failed: %v", err)
 		} else if len(sr.Entries) < 1 {
-			log.Error(2, "LDAP: Admin search failed: 0 entries")
+			log.Trace("LDAP: Admin search returned no entries")
 		} else {
 			isAdmin = true
 		}

+ 0 - 0
pkg/auth/pam/pam.go → internal/auth/pam/pam.go


+ 0 - 0
pkg/auth/pam/pam_stub.go → internal/auth/pam/pam_stub.go


+ 0 - 0
pkg/avatar/avatar.go → internal/avatar/avatar.go


+ 0 - 0
pkg/avatar/avatar_test.go → internal/avatar/avatar_test.go


Файловите разлики са ограничени, защото са твърде много
+ 313 - 0
internal/bindata/bindata.go


+ 14 - 14
cmd/admin.go → internal/cmd/admin.go

@@ -11,8 +11,8 @@ import (
 
 	"github.com/urfave/cli"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/pkg/setting"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/setting"
 )
 
 var (
@@ -51,7 +51,7 @@ to make automatic initialization process more smoothly`,
 		Name:  "delete-inactive-users",
 		Usage: "Delete all inactive accounts",
 		Action: adminDashboardOperation(
-			models.DeleteInactivateUsers,
+			db.DeleteInactivateUsers,
 			"All inactivate accounts have been deleted successfully",
 		),
 		Flags: []cli.Flag{
@@ -63,7 +63,7 @@ to make automatic initialization process more smoothly`,
 		Name:  "delete-repository-archives",
 		Usage: "Delete all repositories archives",
 		Action: adminDashboardOperation(
-			models.DeleteRepositoryArchives,
+			db.DeleteRepositoryArchives,
 			"All repositories archives have been deleted successfully",
 		),
 		Flags: []cli.Flag{
@@ -75,7 +75,7 @@ to make automatic initialization process more smoothly`,
 		Name:  "delete-missing-repositories",
 		Usage: "Delete all repository records that lost Git files",
 		Action: adminDashboardOperation(
-			models.DeleteMissingRepositories,
+			db.DeleteMissingRepositories,
 			"All repositories archives have been deleted successfully",
 		),
 		Flags: []cli.Flag{
@@ -87,7 +87,7 @@ to make automatic initialization process more smoothly`,
 		Name:  "collect-garbage",
 		Usage: "Do garbage collection on repositories",
 		Action: adminDashboardOperation(
-			models.GitGcRepos,
+			db.GitGcRepos,
 			"All repositories have done garbage collection successfully",
 		),
 		Flags: []cli.Flag{
@@ -99,7 +99,7 @@ to make automatic initialization process more smoothly`,
 		Name:  "rewrite-authorized-keys",
 		Usage: "Rewrite '.ssh/authorized_keys' file (caution: non-Gogs keys will be lost)",
 		Action: adminDashboardOperation(
-			models.RewriteAuthorizedKeys,
+			db.RewriteAuthorizedKeys,
 			"All public keys have been rewritten successfully",
 		),
 		Flags: []cli.Flag{
@@ -111,7 +111,7 @@ to make automatic initialization process more smoothly`,
 		Name:  "resync-hooks",
 		Usage: "Resync pre-receive, update and post-receive hooks",
 		Action: adminDashboardOperation(
-			models.SyncRepositoryHooks,
+			db.SyncRepositoryHooks,
 			"All repositories' pre-receive, update and post-receive hooks have been resynced successfully",
 		),
 		Flags: []cli.Flag{
@@ -123,7 +123,7 @@ to make automatic initialization process more smoothly`,
 		Name:  "reinit-missing-repositories",
 		Usage: "Reinitialize all repository records that lost Git files",
 		Action: adminDashboardOperation(
-			models.ReinitMissingRepositories,
+			db.ReinitMissingRepositories,
 			"All repository records that lost Git files have been reinitialized successfully",
 		),
 		Flags: []cli.Flag{
@@ -146,10 +146,10 @@ func runCreateUser(c *cli.Context) error {
 	}
 
 	setting.NewContext()
-	models.LoadConfigs()
-	models.SetEngine()
+	db.LoadConfigs()
+	db.SetEngine()
 
-	if err := models.CreateUser(&models.User{
+	if err := db.CreateUser(&db.User{
 		Name:     c.String("name"),
 		Email:    c.String("email"),
 		Passwd:   c.String("password"),
@@ -170,8 +170,8 @@ func adminDashboardOperation(operation func() error, successMessage string) func
 		}
 
 		setting.NewContext()
-		models.LoadConfigs()
-		models.SetEngine()
+		db.LoadConfigs()
+		db.SetEngine()
 
 		if err := operation(); err != nil {
 			functionName := runtime.FuncForPC(reflect.ValueOf(operation).Pointer()).Name()

+ 0 - 0
cmd/admin_gin.go → internal/cmd/admin_gin.go


+ 7 - 7
cmd/backup.go → internal/cmd/backup.go

@@ -11,14 +11,14 @@ import (
 	"path"
 	"time"
 
-	"github.com/Unknwon/cae/zip"
-	"github.com/Unknwon/com"
+	"github.com/unknwon/cae/zip"
+	"github.com/unknwon/com"
 	"github.com/urfave/cli"
 	log "gopkg.in/clog.v1"
 	"gopkg.in/ini.v1"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/pkg/setting"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/setting"
 )
 
 var Backup = cli.Command{
@@ -48,8 +48,8 @@ func runBackup(c *cli.Context) error {
 		setting.CustomConf = c.String("config")
 	}
 	setting.NewContext()
-	models.LoadConfigs()
-	models.SetEngine()
+	db.LoadConfigs()
+	db.SetEngine()
 
 	tmpDir := c.String("tempdir")
 	if !com.IsExist(tmpDir) {
@@ -84,7 +84,7 @@ func runBackup(c *cli.Context) error {
 
 	// Database
 	dbDir := path.Join(rootDir, "db")
-	if err = models.DumpDatabase(dbDir); err != nil {
+	if err = db.DumpDatabase(dbDir); err != nil {
 		log.Fatal(0, "Fail to dump database: %v", err)
 	}
 	if err = z.AddDir(_ARCHIVE_ROOT_DIR+"/db", dbDir); err != nil {

+ 0 - 0
cmd/cert.go → internal/cmd/cert.go


+ 0 - 0
cmd/cert_stub.go → internal/cmd/cert_stub.go


+ 0 - 0
cmd/cmd.go → internal/cmd/cmd.go


+ 28 - 28
cmd/hook.go → internal/cmd/hook.go

@@ -15,18 +15,18 @@ import (
 	"path/filepath"
 	"strings"
 
-	"github.com/Unknwon/com"
+	"github.com/unknwon/com"
 	"github.com/urfave/cli"
 	log "gopkg.in/clog.v1"
 
 	"github.com/G-Node/git-module"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/models/errors"
-	"github.com/G-Node/gogs/pkg/httplib"
-	"github.com/G-Node/gogs/pkg/mailer"
-	"github.com/G-Node/gogs/pkg/setting"
-	"github.com/G-Node/gogs/pkg/template"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/db/errors"
+	"github.com/G-Node/gogs/internal/httplib"
+	"github.com/G-Node/gogs/internal/mailer"
+	"github.com/G-Node/gogs/internal/setting"
+	"github.com/G-Node/gogs/internal/template"
 )
 
 var (
@@ -70,7 +70,7 @@ func runHookPreReceive(c *cli.Context) error {
 	}
 	setup(c, "hooks/pre-receive.log", true)
 
-	isWiki := strings.Contains(os.Getenv(models.ENV_REPO_CUSTOM_HOOKS_PATH), ".wiki.git/")
+	isWiki := strings.Contains(os.Getenv(db.ENV_REPO_CUSTOM_HOOKS_PATH), ".wiki.git/")
 
 	buf := bytes.NewBuffer(nil)
 	scanner := bufio.NewScanner(os.Stdin)
@@ -91,8 +91,8 @@ func runHookPreReceive(c *cli.Context) error {
 		branchName := strings.TrimPrefix(string(fields[2]), git.BRANCH_PREFIX)
 
 		// Branch protection
-		repoID := com.StrTo(os.Getenv(models.ENV_REPO_ID)).MustInt64()
-		protectBranch, err := models.GetProtectBranchOfRepoByName(repoID, branchName)
+		repoID := com.StrTo(os.Getenv(db.ENV_REPO_ID)).MustInt64()
+		protectBranch, err := db.GetProtectBranchOfRepoByName(repoID, branchName)
 		if err != nil {
 			if errors.IsErrBranchNotExist(err) {
 				continue
@@ -107,9 +107,9 @@ func runHookPreReceive(c *cli.Context) error {
 		bypassRequirePullRequest := false
 
 		// Check if user is in whitelist when enabled
-		userID := com.StrTo(os.Getenv(models.ENV_AUTH_USER_ID)).MustInt64()
+		userID := com.StrTo(os.Getenv(db.ENV_AUTH_USER_ID)).MustInt64()
 		if protectBranch.EnableWhitelist {
-			if !models.IsUserInProtectBranchWhitelist(repoID, userID, branchName) {
+			if !db.IsUserInProtectBranchWhitelist(repoID, userID, branchName) {
 				fail(fmt.Sprintf("Branch '%s' is protected and you are not in the push whitelist", branchName), "")
 			}
 
@@ -128,7 +128,7 @@ func runHookPreReceive(c *cli.Context) error {
 
 		// Check force push
 		output, err := git.NewCommand("rev-list", "--max-count=1", oldCommitID, "^"+newCommitID).
-			RunInDir(models.RepoPath(os.Getenv(models.ENV_REPO_OWNER_NAME), os.Getenv(models.ENV_REPO_NAME)))
+			RunInDir(db.RepoPath(os.Getenv(db.ENV_REPO_OWNER_NAME), os.Getenv(db.ENV_REPO_NAME)))
 		if err != nil {
 			fail("Internal error", "Fail to detect force push: %v", err)
 		} else if len(output) > 0 {
@@ -136,7 +136,7 @@ func runHookPreReceive(c *cli.Context) error {
 		}
 	}
 
-	customHooksPath := filepath.Join(os.Getenv(models.ENV_REPO_CUSTOM_HOOKS_PATH), "pre-receive")
+	customHooksPath := filepath.Join(os.Getenv(db.ENV_REPO_CUSTOM_HOOKS_PATH), "pre-receive")
 	if !com.IsFile(customHooksPath) {
 		return nil
 	}
@@ -147,7 +147,7 @@ func runHookPreReceive(c *cli.Context) error {
 	} else {
 		hookCmd = exec.Command(customHooksPath)
 	}
-	hookCmd.Dir = models.RepoPath(os.Getenv(models.ENV_REPO_OWNER_NAME), os.Getenv(models.ENV_REPO_NAME))
+	hookCmd.Dir = db.RepoPath(os.Getenv(db.ENV_REPO_OWNER_NAME), os.Getenv(db.ENV_REPO_NAME))
 	hookCmd.Stdout = os.Stdout
 	hookCmd.Stdin = buf
 	hookCmd.Stderr = os.Stderr
@@ -170,7 +170,7 @@ func runHookUpdate(c *cli.Context) error {
 		fail("First argument 'refName' is empty", "First argument 'refName' is empty")
 	}
 
-	customHooksPath := filepath.Join(os.Getenv(models.ENV_REPO_CUSTOM_HOOKS_PATH), "update")
+	customHooksPath := filepath.Join(os.Getenv(db.ENV_REPO_CUSTOM_HOOKS_PATH), "update")
 	if !com.IsFile(customHooksPath) {
 		return nil
 	}
@@ -181,7 +181,7 @@ func runHookUpdate(c *cli.Context) error {
 	} else {
 		hookCmd = exec.Command(customHooksPath, args...)
 	}
-	hookCmd.Dir = models.RepoPath(os.Getenv(models.ENV_REPO_OWNER_NAME), os.Getenv(models.ENV_REPO_NAME))
+	hookCmd.Dir = db.RepoPath(os.Getenv(db.ENV_REPO_OWNER_NAME), os.Getenv(db.ENV_REPO_NAME))
 	hookCmd.Stdout = os.Stdout
 	hookCmd.Stdin = os.Stdin
 	hookCmd.Stderr = os.Stderr
@@ -204,7 +204,7 @@ func runHookPostReceive(c *cli.Context) error {
 	mailer.InitMailRender(path.Join(setting.StaticRootPath, "templates/mail"),
 		path.Join(setting.CustomPath, "templates/mail"), template.NewFuncMap())
 
-	isWiki := strings.Contains(os.Getenv(models.ENV_REPO_CUSTOM_HOOKS_PATH), ".wiki.git/")
+	isWiki := strings.Contains(os.Getenv(db.ENV_REPO_CUSTOM_HOOKS_PATH), ".wiki.git/")
 
 	buf := bytes.NewBuffer(nil)
 	scanner := bufio.NewScanner(os.Stdin)
@@ -222,24 +222,24 @@ func runHookPostReceive(c *cli.Context) error {
 			continue
 		}
 
-		options := models.PushUpdateOptions{
+		options := db.PushUpdateOptions{
 			OldCommitID:  string(fields[0]),
 			NewCommitID:  string(fields[1]),
 			RefFullName:  string(fields[2]),
-			PusherID:     com.StrTo(os.Getenv(models.ENV_AUTH_USER_ID)).MustInt64(),
-			PusherName:   os.Getenv(models.ENV_AUTH_USER_NAME),
-			RepoUserName: os.Getenv(models.ENV_REPO_OWNER_NAME),
-			RepoName:     os.Getenv(models.ENV_REPO_NAME),
+			PusherID:     com.StrTo(os.Getenv(db.ENV_AUTH_USER_ID)).MustInt64(),
+			PusherName:   os.Getenv(db.ENV_AUTH_USER_NAME),
+			RepoUserName: os.Getenv(db.ENV_REPO_OWNER_NAME),
+			RepoName:     os.Getenv(db.ENV_REPO_NAME),
 		}
-		if err := models.PushUpdate(options); err != nil {
+		if err := db.PushUpdate(options); err != nil {
 			log.Error(2, "PushUpdate: %v", err)
 		}
 
 		// Ask for running deliver hook and test pull request tasks
 		reqURL := setting.LocalURL + options.RepoUserName + "/" + options.RepoName + "/tasks/trigger?branch=" +
 			template.EscapePound(strings.TrimPrefix(options.RefFullName, git.BRANCH_PREFIX)) +
-			"&secret=" + os.Getenv(models.ENV_REPO_OWNER_SALT_MD5) +
-			"&pusher=" + os.Getenv(models.ENV_AUTH_USER_ID)
+			"&secret=" + os.Getenv(db.ENV_REPO_OWNER_SALT_MD5) +
+			"&pusher=" + os.Getenv(db.ENV_AUTH_USER_ID)
 		log.Trace("Trigger task: %s", reqURL)
 
 		resp, err := httplib.Head(reqURL).SetTLSClientConfig(&tls.Config{
@@ -255,7 +255,7 @@ func runHookPostReceive(c *cli.Context) error {
 		}
 	}
 
-	customHooksPath := filepath.Join(os.Getenv(models.ENV_REPO_CUSTOM_HOOKS_PATH), "post-receive")
+	customHooksPath := filepath.Join(os.Getenv(db.ENV_REPO_CUSTOM_HOOKS_PATH), "post-receive")
 	if !com.IsFile(customHooksPath) {
 		return nil
 	}
@@ -266,7 +266,7 @@ func runHookPostReceive(c *cli.Context) error {
 	} else {
 		hookCmd = exec.Command(customHooksPath)
 	}
-	hookCmd.Dir = models.RepoPath(os.Getenv(models.ENV_REPO_OWNER_NAME), os.Getenv(models.ENV_REPO_NAME))
+	hookCmd.Dir = db.RepoPath(os.Getenv(db.ENV_REPO_OWNER_NAME), os.Getenv(db.ENV_REPO_NAME))
 	hookCmd.Stdout = os.Stdout
 	hookCmd.Stdin = buf
 	hookCmd.Stderr = os.Stderr

+ 7 - 6
cmd/import.go → internal/cmd/import.go

@@ -7,15 +7,16 @@ package cmd
 import (
 	"bufio"
 	"bytes"
+	"errors"
 	"fmt"
 	"os"
 	"path/filepath"
 	"time"
 
-	"github.com/Unknwon/com"
+	"github.com/unknwon/com"
 	"github.com/urfave/cli"
 
-	"github.com/G-Node/gogs/pkg/setting"
+	"github.com/G-Node/gogs/internal/setting"
 )
 
 var (
@@ -43,14 +44,14 @@ without manually hacking the data files`,
 
 func runImportLocale(c *cli.Context) error {
 	if !c.IsSet("source") {
-		return fmt.Errorf("Source directory is not specified")
+		return errors.New("source directory is not specified")
 	} else if !c.IsSet("target") {
-		return fmt.Errorf("Target directory is not specified")
+		return errors.New("target directory is not specified")
 	}
 	if !com.IsDir(c.String("source")) {
-		return fmt.Errorf("Source directory does not exist or is not a directory")
+		return fmt.Errorf("source directory %q does not exist or is not a directory", c.String("source"))
 	} else if !com.IsDir(c.String("target")) {
-		return fmt.Errorf("Target directory does not exist or is not a directory")
+		return fmt.Errorf("target directory %q does not exist or is not a directory", c.String("target"))
 	}
 
 	if c.IsSet("config") {

+ 7 - 7
cmd/restore.go → internal/cmd/restore.go

@@ -8,15 +8,15 @@ import (
 	"os"
 	"path"
 
-	"github.com/Unknwon/cae/zip"
-	"github.com/Unknwon/com"
 	"github.com/mcuadros/go-version"
+	"github.com/unknwon/cae/zip"
+	"github.com/unknwon/com"
 	"github.com/urfave/cli"
 	log "gopkg.in/clog.v1"
 	"gopkg.in/ini.v1"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/pkg/setting"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/setting"
 )
 
 var Restore = cli.Command{
@@ -91,12 +91,12 @@ func runRestore(c *cli.Context) error {
 		setting.CustomConf = configFile
 	}
 	setting.NewContext()
-	models.LoadConfigs()
-	models.SetEngine()
+	db.LoadConfigs()
+	db.SetEngine()
 
 	// Database
 	dbDir := path.Join(archivePath, "db")
-	if err = models.ImportDatabase(dbDir, c.Bool("verbose")); err != nil {
+	if err = db.ImportDatabase(dbDir, c.Bool("verbose")); err != nil {
 		log.Fatal(0, "Failed to import database: %v", err)
 	}
 

+ 34 - 34
cmd/serv.go → internal/cmd/serv.go

@@ -12,15 +12,15 @@ import (
 	"strings"
 	"time"
 
-	"github.com/Unknwon/com"
+	"github.com/unknwon/com"
 	"github.com/urfave/cli"
 	log "gopkg.in/clog.v1"
 
 	"syscall"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/models/errors"
-	"github.com/G-Node/gogs/pkg/setting"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/db/errors"
+	"github.com/G-Node/gogs/internal/setting"
 )
 
 const (
@@ -75,14 +75,14 @@ func setup(c *cli.Context, logPath string, connectDB bool) {
 		return
 	}
 
-	models.LoadConfigs()
+	db.LoadConfigs()
 
 	if setting.UseSQLite3 {
 		workDir, _ := setting.WorkDir()
 		os.Chdir(workDir)
 	}
 
-	if err := models.SetEngine(); err != nil {
+	if err := db.SetEngine(); err != nil {
 		fail("Internal error", "SetEngine: %v", err)
 	}
 }
@@ -103,30 +103,30 @@ func parseSSHCmd(cmd string) (string, string, []string) {
 	}
 }
 
-func checkDeployKey(key *models.PublicKey, repo *models.Repository) {
+func checkDeployKey(key *db.PublicKey, repo *db.Repository) {
 	// Check if this deploy key belongs to current repository.
-	if !models.HasDeployKey(key.ID, repo.ID) {
+	if !db.HasDeployKey(key.ID, repo.ID) {
 		fail("Key access denied", "Deploy key access denied: [key_id: %d, repo_id: %d]", key.ID, repo.ID)
 	}
 
 	// Update deploy key activity.
-	deployKey, err := models.GetDeployKeyByRepo(key.ID, repo.ID)
+	deployKey, err := db.GetDeployKeyByRepo(key.ID, repo.ID)
 	if err != nil {
 		fail("Internal error", "GetDeployKey: %v", err)
 	}
 
 	deployKey.Updated = time.Now()
-	if err = models.UpdateDeployKey(deployKey); err != nil {
+	if err = db.UpdateDeployKey(deployKey); err != nil {
 		fail("Internal error", "UpdateDeployKey: %v", err)
 	}
 }
 
 var (
-	allowedCommands = map[string]models.AccessMode{
-		"git-upload-pack":    models.ACCESS_MODE_READ,
-		"git-upload-archive": models.ACCESS_MODE_READ,
-		"git-receive-pack":   models.ACCESS_MODE_WRITE,
-		"git-annex-shell":    models.ACCESS_MODE_READ,
+	allowedCommands = map[string]db.AccessMode{
+		"git-upload-pack":    db.ACCESS_MODE_READ,
+		"git-upload-archive": db.ACCESS_MODE_READ,
+		"git-receive-pack":   db.ACCESS_MODE_WRITE,
+		"git-annex-shell":    db.ACCESS_MODE_READ,
 	}
 )
 
@@ -159,7 +159,7 @@ func runServ(c *cli.Context) error {
 	repoName := strings.TrimSuffix(strings.ToLower(repoFields[1]), ".git")
 	repoName = strings.TrimSuffix(repoName, ".wiki")
 
-	owner, err := models.GetUserByName(ownerName)
+	owner, err := db.GetUserByName(ownerName)
 	if err != nil {
 		if errors.IsUserNotExist(err) {
 			fail("Repository owner does not exist", "Unregistered owner: %s", ownerName)
@@ -167,7 +167,7 @@ func runServ(c *cli.Context) error {
 		fail("Internal error", "Fail to get repository owner '%s': %v", ownerName, err)
 	}
 
-	repo, err := models.GetRepositoryByName(owner.ID, repoName)
+	repo, err := db.GetRepositoryByName(owner.ID, repoName)
 	if err != nil {
 		if errors.IsRepoNotExist(err) {
 			fail(_ACCESS_DENIED_MESSAGE, "Repository does not exist: %s/%s", owner.Name, repoName)
@@ -182,25 +182,25 @@ func runServ(c *cli.Context) error {
 	}
 
 	// Prohibit push to mirror repositories.
-	if requestMode > models.ACCESS_MODE_READ && repo.IsMirror {
+	if requestMode > db.ACCESS_MODE_READ && repo.IsMirror {
 		fail("Mirror repository is read-only", "")
 	}
 
 	// Allow anonymous (user is nil) clone for public repositories.
-	var user *models.User
+	var user *db.User
 
-	key, err := models.GetPublicKeyByID(com.StrTo(strings.TrimPrefix(c.Args()[0], "key-")).MustInt64())
+	key, err := db.GetPublicKeyByID(com.StrTo(strings.TrimPrefix(c.Args()[0], "key-")).MustInt64())
 	if err != nil {
 		fail("Invalid key ID", "Invalid key ID '%s': %v", c.Args()[0], err)
 	}
 
-	if us, err := models.GetUserByKeyID(key.ID); err == nil {
+	if us, err := db.GetUserByKeyID(key.ID); err == nil {
 		user = us
 	} else {
 		fail("Key Error", "Cannot find key %v", err)
 	}
 
-	if requestMode == models.ACCESS_MODE_WRITE || repo.IsPrivate {
+	if requestMode == db.ACCESS_MODE_WRITE || repo.IsPrivate {
 		// Check deploy key or user key.
 		if key.IsDeployKey() {
 			if key.Mode < requestMode {
@@ -208,19 +208,19 @@ func runServ(c *cli.Context) error {
 			}
 			checkDeployKey(key, repo)
 		} else {
-			user, err = models.GetUserByKeyID(key.ID)
+			user, err = db.GetUserByKeyID(key.ID)
 			if err != nil {
 				fail("Internal error", "Fail to get user by key ID '%d': %v", key.ID, err)
 			}
 
-			mode, err := models.UserAccessMode(user.ID, repo)
+			mode, err := db.UserAccessMode(user.ID, repo)
 			if err != nil {
 				fail("Internal error", "Fail to check access: %v", err)
 			}
 
 			if mode < requestMode {
 				clientMessage := _ACCESS_DENIED_MESSAGE
-				if mode >= models.ACCESS_MODE_READ {
+				if mode >= db.ACCESS_MODE_READ {
 					clientMessage = "You do not have sufficient authorization for this action"
 				}
 				fail(clientMessage,
@@ -241,13 +241,13 @@ func runServ(c *cli.Context) error {
 
 	// Update user key activity.
 	if key.ID > 0 {
-		key, err := models.GetPublicKeyByID(key.ID)
+		key, err := db.GetPublicKeyByID(key.ID)
 		if err != nil {
 			fail("Internal error", "GetPublicKeyByID: %v", err)
 		}
 
 		key.Updated = time.Now()
-		if err = models.UpdatePublicKey(key); err != nil {
+		if err = db.UpdatePublicKey(key); err != nil {
 			fail("Internal error", "UpdatePublicKey: %v", err)
 		}
 	}
@@ -273,19 +273,19 @@ func runServ(c *cli.Context) error {
 		cmd = []string{verb, repoFullName}
 	}
 	runGit(cmd, requestMode, user, owner, repo)
-	if requestMode == models.ACCESS_MODE_WRITE {
-		models.StartIndexing(*repo)
+	if requestMode == db.ACCESS_MODE_WRITE {
+		db.StartIndexing(*repo)
 	}
 	return nil
 
 }
 
-func runGit(cmd []string, requestMode models.AccessMode, user *models.User, owner *models.User,
-	repo *models.Repository) error {
-	log.Info("will exectute:%s", cmd)
+func runGit(cmd []string, requestMode db.AccessMode, user *db.User, owner *db.User,
+	repo *db.Repository) error {
+	log.Info("Running %q", cmd)
 	gitCmd := exec.Command(cmd[0], cmd[1:]...)
-	if requestMode == models.ACCESS_MODE_WRITE {
-		gitCmd.Env = append(os.Environ(), models.ComposeHookEnvs(models.ComposeHookEnvsOptions{
+	if requestMode == db.ACCESS_MODE_WRITE {
+		gitCmd.Env = append(os.Environ(), db.ComposeHookEnvs(db.ComposeHookEnvsOptions{
 			AuthUser:  user,
 			OwnerName: owner.Name,
 			OwnerSalt: owner.Salt,

+ 37 - 36
cmd/web.go → internal/cmd/web.go

@@ -7,6 +7,7 @@ package cmd
 import (
 	"crypto/tls"
 	"fmt"
+	"io"
 	"io/ioutil"
 	"net"
 	"net/http"
@@ -15,7 +16,6 @@ import (
 	"path"
 	"strings"
 
-	"github.com/Unknwon/com"
 	"github.com/go-macaron/binding"
 	"github.com/go-macaron/cache"
 	"github.com/go-macaron/captcha"
@@ -26,25 +26,25 @@ import (
 	"github.com/go-macaron/toolbox"
 	"github.com/mcuadros/go-version"
 	"github.com/prometheus/client_golang/prometheus/promhttp"
+	"github.com/unknwon/com"
 	"github.com/urfave/cli"
 	log "gopkg.in/clog.v1"
 	"gopkg.in/macaron.v1"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/pkg/bindata"
-	"github.com/G-Node/gogs/pkg/context"
-	"github.com/G-Node/gogs/pkg/dav"
-	"github.com/G-Node/gogs/pkg/form"
-	"github.com/G-Node/gogs/pkg/mailer"
-	"github.com/G-Node/gogs/pkg/setting"
-	"github.com/G-Node/gogs/pkg/template"
-	"github.com/G-Node/gogs/routes"
-	"github.com/G-Node/gogs/routes/admin"
-	apiv1 "github.com/G-Node/gogs/routes/api/v1"
-	"github.com/G-Node/gogs/routes/dev"
-	"github.com/G-Node/gogs/routes/org"
-	"github.com/G-Node/gogs/routes/repo"
-	"github.com/G-Node/gogs/routes/user"
+	"github.com/G-Node/gogs/internal/bindata"
+	"github.com/G-Node/gogs/internal/context"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/form"
+	"github.com/G-Node/gogs/internal/mailer"
+	"github.com/G-Node/gogs/internal/route"
+	"github.com/G-Node/gogs/internal/route/admin"
+	apiv1 "github.com/G-Node/gogs/internal/route/api/v1"
+	"github.com/G-Node/gogs/internal/route/dev"
+	"github.com/G-Node/gogs/internal/route/org"
+	"github.com/G-Node/gogs/internal/route/repo"
+	"github.com/G-Node/gogs/internal/route/user"
+	"github.com/G-Node/gogs/internal/setting"
+	"github.com/G-Node/gogs/internal/template"
 	"golang.org/x/net/webdav"
 )
 
@@ -99,14 +99,14 @@ func newMacaron() *macaron.Macaron {
 	m.Use(macaron.Static(
 		setting.AvatarUploadPath,
 		macaron.StaticOptions{
-			Prefix:      models.USER_AVATAR_URL_PREFIX,
+			Prefix:      db.USER_AVATAR_URL_PREFIX,
 			SkipLogging: setting.DisableRouterLog,
 		},
 	))
 	m.Use(macaron.Static(
 		setting.RepositoryAvatarUploadPath,
 		macaron.StaticOptions{
-			Prefix:      models.REPO_AVATAR_URL_PREFIX,
+			Prefix:      db.REPO_AVATAR_URL_PREFIX,
 			SkipLogging: setting.DisableRouterLog,
 		},
 	))
@@ -158,7 +158,7 @@ func newMacaron() *macaron.Macaron {
 		HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{
 			{
 				Desc: "Database connection",
-				Func: models.Ping,
+				Func: db.Ping,
 			},
 		},
 	}))
@@ -174,7 +174,7 @@ func runWeb(c *cli.Context) error {
 	if c.IsSet("config") {
 		setting.CustomConf = c.String("config")
 	}
-	routes.GlobalInit()
+	route.GlobalInit()
 	checkVersion()
 
 	m := newMacaron()
@@ -188,10 +188,10 @@ func runWeb(c *cli.Context) error {
 
 	m.SetAutoHead(true)
 
-	// FIXME: not all routes need go through same middlewares.
+	// FIXME: not all route need go through same middlewares.
 	// Especially some AJAX requests, we can reduce middleware number to improve performance.
 	// Routers.
-	m.Get("/", ignSignIn, routes.Home)
+	m.Get("/", ignSignIn, route.Home)
 	m.Group("/explore", func() {
 		m.Get("", func(c *context.Context) {
 			c.Redirect(setting.AppSubURL + "/explore/repos")
@@ -203,8 +203,8 @@ func runWeb(c *cli.Context) error {
 		m.Get("/organizations", routes.ExploreOrganizations)
 		m.Get("/_suggest/:keywords", routes.ExploreSuggest)
 	}, ignSignIn)
-	m.Combo("/install", routes.InstallInit).Get(routes.Install).
-		Post(bindIgnErr(form.Install{}), routes.InstallPost)
+	m.Combo("/install", route.InstallInit).Get(route.Install).
+		Post(bindIgnErr(form.Install{}), route.InstallPost)
 	m.Get("/^:type(issues|pulls)$", reqSignIn, user.Issues)
 
 	// ***** START: User *****
@@ -320,9 +320,9 @@ func runWeb(c *cli.Context) error {
 		}, context.InjectParamsUser())
 
 		m.Get("/attachments/:uuid", func(c *context.Context) {
-			attach, err := models.GetAttachmentByUUID(c.Params(":uuid"))
+			attach, err := db.GetAttachmentByUUID(c.Params(":uuid"))
 			if err != nil {
-				c.NotFoundOrServerError("GetAttachmentByUUID", models.IsErrAttachmentNotExist, err)
+				c.NotFoundOrServerError("GetAttachmentByUUID", db.IsErrAttachmentNotExist, err)
 				return
 			} else if !com.IsFile(attach.LocalPath()) {
 				c.NotFound()
@@ -331,16 +331,15 @@ func runWeb(c *cli.Context) error {
 
 			fr, err := os.Open(attach.LocalPath())
 			if err != nil {
-				c.Handle(500, "Open", err)
+				c.ServerError("open attachment file", err)
 				return
 			}
 			defer fr.Close()
 
 			c.Header().Set("Cache-Control", "public,max-age=86400")
-			fmt.Println("attach.Name:", attach.Name)
 			c.Header().Set("Content-Disposition", fmt.Sprintf(`inline; filename="%s"`, attach.Name))
-			if err = repo.ServeData(c, attach.Name, fr, nil); err != nil {
-				c.Handle(500, "ServeData", err)
+			if _, err = io.Copy(c.Resp, fr); err != nil {
+				c.ServerError("copy from file to response", err)
 				return
 			}
 		})
@@ -661,7 +660,7 @@ func runWeb(c *cli.Context) error {
 			m.Head("/tasks/trigger", repo.TriggerTask)
 		})
 		// Use the regexp to match the repository name
-		// Duplicated routes to enable different ways of accessing same set of URLs,
+		// Duplicated route to enable different ways of accessing same set of URLs,
 		// e.g. with or without ".git" suffix.
 		m.Group("/:reponame([\\d\\w-_\\.]+\\.git$)", func() {
 			m.Get("", ignSignIn, context.RepoAssignment(), context.RepoRef(), repo.Home)
@@ -699,7 +698,7 @@ func runWeb(c *cli.Context) error {
 	})
 
 	// Not found handler.
-	m.NotFound(routes.NotFound)
+	m.NotFound(route.NotFound)
 
 	// Flag for port number in case first time run conflict.
 	if c.IsSet("port") {
@@ -735,13 +734,15 @@ func runWeb(c *cli.Context) error {
 		}
 		server := &http.Server{Addr: listenAddr, TLSConfig: &tls.Config{
 			MinVersion:               tlsMinVersion,
-			CurvePreferences:         []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256},
+			CurvePreferences:         []tls.CurveID{tls.X25519, tls.CurveP256, tls.CurveP384, tls.CurveP521},
 			PreferServerCipherSuites: true,
 			CipherSuites: []uint16{
+				tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
 				tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
-				tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, // Required for HTTP/2 support.
-				tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
-				tls.TLS_RSA_WITH_AES_256_CBC_SHA,
+				tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
+				tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
+				tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
+				tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
 			},
 		}, Handler: m}
 		err = server.ListenAndServeTLS(setting.CertFile, setting.KeyFile)

+ 2 - 2
pkg/context/api.go → internal/context/api.go

@@ -9,11 +9,11 @@ import (
 	"net/http"
 	"strings"
 
-	"github.com/Unknwon/paginater"
+	"github.com/unknwon/paginater"
 	log "gopkg.in/clog.v1"
 	"gopkg.in/macaron.v1"
 
-	"github.com/G-Node/gogs/pkg/setting"
+	"github.com/G-Node/gogs/internal/setting"
 )
 
 type APIContext struct {

+ 3 - 3
pkg/context/api_org.go → internal/context/api_org.go

@@ -5,10 +5,10 @@
 package context
 
 import (
-	"github.com/G-Node/gogs/models"
+	"github.com/G-Node/gogs/internal/db"
 )
 
 type APIOrganization struct {
-	Organization *models.User
-	Team         *models.Team
+	Organization *db.User
+	Team         *db.Team
 }

+ 3 - 3
pkg/context/auth.go → internal/context/auth.go

@@ -12,9 +12,9 @@ import (
 	"github.com/go-macaron/csrf"
 	"gopkg.in/macaron.v1"
 
-	"github.com/G-Node/gogs/pkg/auth"
-	"github.com/G-Node/gogs/pkg/setting"
-	"github.com/G-Node/gogs/pkg/tool"
+	"github.com/G-Node/gogs/internal/auth"
+	"github.com/G-Node/gogs/internal/setting"
+	"github.com/G-Node/gogs/internal/tool"
 )
 
 type ToggleOptions struct {

+ 19 - 19
pkg/context/context.go → internal/context/context.go

@@ -12,20 +12,20 @@ import (
 	"strings"
 	"time"
 
-	"github.com/Unknwon/com"
 	"github.com/go-macaron/cache"
 	"github.com/go-macaron/csrf"
 	"github.com/go-macaron/i18n"
 	"github.com/go-macaron/session"
+	"github.com/unknwon/com"
 	log "gopkg.in/clog.v1"
 	"gopkg.in/macaron.v1"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/models/errors"
-	"github.com/G-Node/gogs/pkg/auth"
-	"github.com/G-Node/gogs/pkg/form"
-	"github.com/G-Node/gogs/pkg/setting"
-	"github.com/G-Node/gogs/pkg/template"
+	"github.com/G-Node/gogs/internal/auth"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/db/errors"
+	"github.com/G-Node/gogs/internal/form"
+	"github.com/G-Node/gogs/internal/setting"
+	"github.com/G-Node/gogs/internal/template"
 )
 
 // Context represents context of a request.
@@ -37,7 +37,7 @@ type Context struct {
 	Session session.Store
 
 	Link        string // Current request URL
-	User        *models.User
+	User        *db.User
 	IsLogged    bool
 	IsBasicAuth bool
 	IsTokenAuth bool
@@ -167,13 +167,13 @@ func (c *Context) RenderWithErr(msg, tpl string, f interface{}) {
 }
 
 // Handle handles and logs error by given status.
-func (c *Context) Handle(status int, title string, err error) {
+func (c *Context) Handle(status int, msg string, err error) {
 	switch status {
 	case http.StatusNotFound:
 		c.Data["Title"] = "Page Not Found"
 	case http.StatusInternalServerError:
 		c.Data["Title"] = "Internal Server Error"
-		log.Error(3, "%s: %v", title, err)
+		log.Error(3, "%s: %v", msg, err)
 		if !setting.ProdMode || (c.IsLogged && c.User.IsAdmin) {
 			c.Data["ErrorMsg"] = err
 		}
@@ -187,23 +187,23 @@ func (c *Context) NotFound() {
 }
 
 // ServerError renders the 500 page.
-func (c *Context) ServerError(title string, err error) {
-	c.Handle(http.StatusInternalServerError, title, err)
+func (c *Context) ServerError(msg string, err error) {
+	c.Handle(http.StatusInternalServerError, msg, 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 *Context) NotFoundOrServerError(title string, errck func(error) bool, err error) {
+func (c *Context) NotFoundOrServerError(msg string, errck func(error) bool, err error) {
 	if errck(err) {
 		c.NotFound()
 		return
 	}
-	c.ServerError(title, err)
+	c.ServerError(msg, err)
 }
 
-func (c *Context) HandleText(status int, title string) {
-	c.PlainText(status, []byte(title))
+func (c *Context) HandleText(status int, msg string) {
+	c.PlainText(status, []byte(msg))
 }
 
 func (c *Context) ServeContent(name string, r io.ReadSeeker, params ...interface{}) {
@@ -252,13 +252,13 @@ func Contexter() macaron.Handler {
 			repoName := c.Params(":reponame")
 			branchName := "master"
 
-			owner, err := models.GetUserByName(ownerName)
+			owner, err := db.GetUserByName(ownerName)
 			if err != nil {
 				c.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err)
 				return
 			}
 
-			repo, err := models.GetRepositoryByName(owner.ID, repoName)
+			repo, err := db.GetRepositoryByName(owner.ID, repoName)
 			if err == nil && len(repo.DefaultBranch) > 0 {
 				branchName = repo.DefaultBranch
 			}
@@ -280,7 +280,7 @@ func Contexter() macaron.Handler {
 </html>
 `, map[string]string{
 				"GoGetImport":    path.Join(setting.HostAddress, setting.AppSubURL, repo.FullName()),
-				"CloneLink":      models.ComposeHTTPSCloneURL(ownerName, repoName),
+				"CloneLink":      db.ComposeHTTPSCloneURL(ownerName, repoName),
 				"GoDocDirectory": prefix + "{/dir}",
 				"GoDocFile":      prefix + "{/dir}/{file}#L{line}",
 				"InsecureFlag":   insecureFlag,

+ 3 - 3
pkg/context/context_gin.go → internal/context/context_gin.go

@@ -5,9 +5,9 @@ import (
 	"path"
 	"strings"
 
-	"github.com/G-Node/gogs/pkg/setting"
-	"github.com/G-Node/gogs/pkg/tool"
-	"github.com/Unknwon/com"
+	"github.com/G-Node/gogs/internal/setting"
+	"github.com/G-Node/gogs/internal/tool"
+	"github.com/unknwon/com"
 	log "gopkg.in/clog.v1"
 )
 

+ 4 - 4
pkg/context/notice.go → internal/context/notice.go

@@ -8,12 +8,12 @@ import (
 	"os"
 	"path"
 
-	"github.com/Unknwon/com"
+	"github.com/unknwon/com"
 	log "gopkg.in/clog.v1"
 
-	"github.com/G-Node/gogs/pkg/markup"
-	"github.com/G-Node/gogs/pkg/setting"
-	"github.com/G-Node/gogs/pkg/tool"
+	"github.com/G-Node/gogs/internal/markup"
+	"github.com/G-Node/gogs/internal/setting"
+	"github.com/G-Node/gogs/internal/tool"
 )
 
 // renderNoticeBanner checks if a notice banner file exists and loads the message to display

+ 8 - 8
pkg/context/org.go → internal/context/org.go

@@ -9,9 +9,9 @@ import (
 
 	"gopkg.in/macaron.v1"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/models/errors"
-	"github.com/G-Node/gogs/pkg/setting"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/db/errors"
+	"github.com/G-Node/gogs/internal/setting"
 )
 
 type Organization struct {
@@ -19,10 +19,10 @@ type Organization struct {
 	IsMember     bool
 	IsTeamMember bool // Is member of team.
 	IsTeamAdmin  bool // In owner team or team that has admin permission level.
-	Organization *models.User
+	Organization *db.User
 	OrgLink      string
 
-	Team *models.Team
+	Team *db.Team
 }
 
 func HandleOrgAssignment(c *Context, args ...bool) {
@@ -48,7 +48,7 @@ func HandleOrgAssignment(c *Context, args ...bool) {
 	orgName := c.Params(":org")
 
 	var err error
-	c.Org.Organization, err = models.GetUserByName(orgName)
+	c.Org.Organization, err = db.GetUserByName(orgName)
 	if err != nil {
 		c.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err)
 		return
@@ -81,7 +81,7 @@ func HandleOrgAssignment(c *Context, args ...bool) {
 		}
 	} else {
 		// Fake data.
-		c.Data["SignedUser"] = &models.User{}
+		c.Data["SignedUser"] = &db.User{}
 	}
 	if (requireMember && !c.Org.IsMember) ||
 		(requireOwner && !c.Org.IsOwner) {
@@ -134,7 +134,7 @@ func HandleOrgAssignment(c *Context, args ...bool) {
 			return
 		}
 
-		c.Org.IsTeamAdmin = c.Org.Team.IsOwnerTeam() || c.Org.Team.Authorize >= models.ACCESS_MODE_ADMIN
+		c.Org.IsTeamAdmin = c.Org.Team.IsOwnerTeam() || c.Org.Team.Authorize >= db.ACCESS_MODE_ADMIN
 		c.Data["IsTeamAdmin"] = c.Org.IsTeamAdmin
 		if requireTeamAdmin && !c.Org.IsTeamAdmin {
 			c.Handle(404, "OrgAssignment", err)

+ 24 - 24
pkg/context/repo.go → internal/context/repo.go

@@ -14,26 +14,26 @@ import (
 
 	"github.com/G-Node/git-module"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/models/errors"
-	"github.com/G-Node/gogs/pkg/setting"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/db/errors"
+	"github.com/G-Node/gogs/internal/setting"
 )
 
 type PullRequest struct {
-	BaseRepo *models.Repository
+	BaseRepo *db.Repository
 	Allowed  bool
 	SameRepo bool
 	HeadInfo string // [<user>:]<branch>
 }
 
 type Repository struct {
-	AccessMode   models.AccessMode
+	AccessMode   db.AccessMode
 	IsWatching   bool
 	IsViewBranch bool
 	IsViewTag    bool
 	IsViewCommit bool
-	Repository   *models.Repository
-	Owner        *models.User
+	Repository   *db.Repository
+	Owner        *db.User
 	Commit       *git.Commit
 	Tag          *git.Tag
 	GitRepo      *git.Repository
@@ -42,31 +42,31 @@ type Repository struct {
 	TreePath     string
 	CommitID     string
 	RepoLink     string
-	CloneLink    models.CloneLink
+	CloneLink    db.CloneLink
 	CommitsCount int64
-	Mirror       *models.Mirror
+	Mirror       *db.Mirror
 
 	PullRequest *PullRequest
 }
 
 // IsOwner returns true if current user is the owner of repository.
 func (r *Repository) IsOwner() bool {
-	return r.AccessMode >= models.ACCESS_MODE_OWNER
+	return r.AccessMode >= db.ACCESS_MODE_OWNER
 }
 
 // IsAdmin returns true if current user has admin or higher access of repository.
 func (r *Repository) IsAdmin() bool {
-	return r.AccessMode >= models.ACCESS_MODE_ADMIN
+	return r.AccessMode >= db.ACCESS_MODE_ADMIN
 }
 
 // IsWriter returns true if current user has write or higher access of repository.
 func (r *Repository) IsWriter() bool {
-	return r.AccessMode >= models.ACCESS_MODE_WRITE
+	return r.AccessMode >= db.ACCESS_MODE_WRITE
 }
 
 // HasAccess returns true if the current user has at least read access for this repository
 func (r *Repository) HasAccess() bool {
-	return r.AccessMode >= models.ACCESS_MODE_READ
+	return r.AccessMode >= db.ACCESS_MODE_READ
 }
 
 // CanEnableEditor returns true if repository is editable and user has proper access level.
@@ -110,7 +110,7 @@ func (r *Repository) PullRequestURL(baseBranch, headBranch string) string {
 func RepoAssignment(pages ...bool) macaron.Handler {
 	return func(c *Context) {
 		var (
-			owner        *models.User
+			owner        *db.User
 			err          error
 			isIssuesPage bool
 			isWikiPage   bool
@@ -134,7 +134,7 @@ func RepoAssignment(pages ...bool) macaron.Handler {
 		if c.IsLogged && c.User.LowerName == strings.ToLower(ownerName) {
 			owner = c.User
 		} else {
-			owner, err = models.GetUserByName(ownerName)
+			owner, err = db.GetUserByName(ownerName)
 			if err != nil {
 				c.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err)
 				return
@@ -143,7 +143,7 @@ func RepoAssignment(pages ...bool) macaron.Handler {
 		c.Repo.Owner = owner
 		c.Data["Username"] = c.Repo.Owner.Name
 
-		repo, err := models.GetRepositoryByName(owner.ID, repoName)
+		repo, err := db.GetRepositoryByName(owner.ID, repoName)
 		if err != nil {
 			c.NotFoundOrServerError("GetRepositoryByName", errors.IsRepoNotExist, err)
 			return
@@ -158,9 +158,9 @@ func RepoAssignment(pages ...bool) macaron.Handler {
 
 		// Admin has super access.
 		if c.IsLogged && c.User.IsAdmin {
-			c.Repo.AccessMode = models.ACCESS_MODE_OWNER
+			c.Repo.AccessMode = db.ACCESS_MODE_OWNER
 		} else {
-			mode, err := models.UserAccessMode(c.UserID(), repo)
+			mode, err := db.UserAccessMode(c.UserID(), repo)
 			if err != nil {
 				c.ServerError("UserAccessMode", err)
 				return
@@ -169,7 +169,7 @@ func RepoAssignment(pages ...bool) macaron.Handler {
 		}
 
 		// Check access
-		if c.Repo.AccessMode == models.ACCESS_MODE_NONE {
+		if c.Repo.AccessMode == db.ACCESS_MODE_NONE {
 			// Redirect to any accessible page if not yet on it
 			if repo.IsPartialPublic() &&
 				(!(isIssuesPage || isWikiPage) ||
@@ -199,7 +199,7 @@ func RepoAssignment(pages ...bool) macaron.Handler {
 		}
 
 		if repo.IsMirror {
-			c.Repo.Mirror, err = models.GetMirrorByRepoID(repo.ID)
+			c.Repo.Mirror, err = db.GetMirrorByRepoID(repo.ID)
 			if err != nil {
 				c.ServerError("GetMirror", err)
 				return
@@ -209,7 +209,7 @@ func RepoAssignment(pages ...bool) macaron.Handler {
 			c.Data["Mirror"] = c.Repo.Mirror
 		}
 
-		gitRepo, err := git.OpenRepository(models.RepoPath(ownerName, repoName))
+		gitRepo, err := git.OpenRepository(db.RepoPath(ownerName, repoName))
 		if err != nil {
 			c.ServerError(fmt.Sprintf("RepoAssignment Invalid repo '%s'", c.Repo.Repository.RepoPath()), err)
 			return
@@ -238,8 +238,8 @@ func RepoAssignment(pages ...bool) macaron.Handler {
 		c.Data["WikiCloneLink"] = repo.WikiCloneLink()
 
 		if c.IsLogged {
-			c.Data["IsWatchingRepo"] = models.IsWatching(c.User.ID, repo.ID)
-			c.Data["IsStaringRepo"] = models.IsStaring(c.User.ID, repo.ID)
+			c.Data["IsWatchingRepo"] = db.IsWatching(c.User.ID, repo.ID)
+			c.Data["IsStaringRepo"] = db.IsStaring(c.User.ID, repo.ID)
 			c.Data["HasForked"] = c.User.HasForkedRepo(c.Repo.Repository.ID)
 		}
 
@@ -288,7 +288,7 @@ func RepoRef() macaron.Handler {
 
 		// For API calls.
 		if c.Repo.GitRepo == nil {
-			repoPath := models.RepoPath(c.Repo.Owner.Name, c.Repo.Repository.Name)
+			repoPath := db.RepoPath(c.Repo.Owner.Name, c.Repo.Repository.Name)
 			c.Repo.GitRepo, err = git.OpenRepository(repoPath)
 			if err != nil {
 				c.Handle(500, "RepoRef Invalid repo "+repoPath, err)

+ 4 - 4
pkg/context/user.go → internal/context/user.go

@@ -7,20 +7,20 @@ package context
 import (
 	"gopkg.in/macaron.v1"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/models/errors"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/db/errors"
 )
 
 // ParamsUser is the wrapper type of the target user defined by URL parameter, namely ':username'.
 type ParamsUser struct {
-	*models.User
+	*db.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"))
+		user, err := db.GetUserByName(c.Params(":username"))
 		if err != nil {
 			c.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err)
 			return

+ 10 - 10
pkg/cron/cron.go → internal/cron/cron.go

@@ -11,8 +11,8 @@ import (
 
 	"github.com/gogs/cron"
 
-	"github.com/G-Node/gogs/models"
-	"github.com/G-Node/gogs/pkg/setting"
+	"github.com/G-Node/gogs/internal/db"
+	"github.com/G-Node/gogs/internal/setting"
 )
 
 var c = cron.New()
@@ -23,47 +23,47 @@ func NewContext() {
 		err   error
 	)
 	if setting.Cron.UpdateMirror.Enabled {
-		entry, err = c.AddFunc("Update mirrors", setting.Cron.UpdateMirror.Schedule, models.MirrorUpdate)
+		entry, err = c.AddFunc("Update mirrors", setting.Cron.UpdateMirror.Schedule, db.MirrorUpdate)
 		if err != nil {
 			log.Fatal(2, "Cron.(update mirrors): %v", err)
 		}
 		if setting.Cron.UpdateMirror.RunAtStart {
 			entry.Prev = time.Now()
 			entry.ExecTimes++
-			go models.MirrorUpdate()
+			go db.MirrorUpdate()
 		}
 	}
 	if setting.Cron.RepoHealthCheck.Enabled {
-		entry, err = c.AddFunc("Repository health check", setting.Cron.RepoHealthCheck.Schedule, models.GitFsck)
+		entry, err = c.AddFunc("Repository health check", setting.Cron.RepoHealthCheck.Schedule, db.GitFsck)
 		if err != nil {
 			log.Fatal(2, "Cron.(repository health check): %v", err)
 		}
 		if setting.Cron.RepoHealthCheck.RunAtStart {
 			entry.Prev = time.Now()
 			entry.ExecTimes++
-			go models.GitFsck()
+			go db.GitFsck()
 		}
 	}
 	if setting.Cron.CheckRepoStats.Enabled {
-		entry, err = c.AddFunc("Check repository statistics", setting.Cron.CheckRepoStats.Schedule, models.CheckRepoStats)
+		entry, err = c.AddFunc("Check repository statistics", setting.Cron.CheckRepoStats.Schedule, db.CheckRepoStats)
 		if err != nil {
 			log.Fatal(2, "Cron.(check repository statistics): %v", err)
 		}
 		if setting.Cron.CheckRepoStats.RunAtStart {
 			entry.Prev = time.Now()
 			entry.ExecTimes++
-			go models.CheckRepoStats()
+			go db.CheckRepoStats()
 		}
 	}
 	if setting.Cron.RepoArchiveCleanup.Enabled {
-		entry, err = c.AddFunc("Repository archive cleanup", setting.Cron.RepoArchiveCleanup.Schedule, models.DeleteOldRepositoryArchives)
+		entry, err = c.AddFunc("Repository archive cleanup", setting.Cron.RepoArchiveCleanup.Schedule, db.DeleteOldRepositoryArchives)
 		if err != nil {
 			log.Fatal(2, "Cron.(repository archive cleanup): %v", err)
 		}
 		if setting.Cron.RepoArchiveCleanup.RunAtStart {
 			entry.Prev = time.Now()
 			entry.ExecTimes++
-			go models.DeleteOldRepositoryArchives()
+			go db.DeleteOldRepositoryArchives()
 		}
 	}
 	c.Start()

+ 0 - 0
pkg/dav/dav.go → internal/dav/dav.go


+ 0 - 0
pkg/dav/middle.go → internal/dav/middle.go


+ 2 - 2
models/access.go → internal/db/access.go

@@ -2,14 +2,14 @@
 // Use of this source code is governed by a MIT-style
 // license that can be found in the LICENSE file.
 
-package models
+package db
 
 import (
 	"fmt"
 
 	log "gopkg.in/clog.v1"
 
-	"github.com/G-Node/gogs/models/errors"
+	"github.com/G-Node/gogs/internal/db/errors"
 )
 
 type AccessMode int

+ 7 - 7
models/action.go → internal/db/action.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a MIT-style
 // license that can be found in the LICENSE file.
 
-package models
+package db
 
 import (
 	"fmt"
@@ -12,17 +12,17 @@ import (
 	"time"
 	"unicode"
 
-	"github.com/Unknwon/com"
-	"github.com/go-xorm/xorm"
-	jsoniter "github.com/json-iterator/go"
+	"github.com/json-iterator/go"
+	"github.com/unknwon/com"
 	log "gopkg.in/clog.v1"
+	"xorm.io/xorm"
 
 	"github.com/G-Node/git-module"
 	api "github.com/gogs/go-gogs-client"
 
-	"github.com/G-Node/gogs/models/errors"
-	"github.com/G-Node/gogs/pkg/setting"
-	"github.com/G-Node/gogs/pkg/tool"
+	"github.com/G-Node/gogs/internal/db/errors"
+	"github.com/G-Node/gogs/internal/setting"
+	"github.com/G-Node/gogs/internal/tool"
 )
 
 type ActionType int

+ 4 - 4
models/admin.go → internal/db/admin.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a MIT-style
 // license that can be found in the LICENSE file.
 
-package models
+package db
 
 import (
 	"fmt"
@@ -10,11 +10,11 @@ import (
 	"strings"
 	"time"
 
-	"github.com/Unknwon/com"
-	"github.com/go-xorm/xorm"
+	"github.com/unknwon/com"
 	log "gopkg.in/clog.v1"
+	"xorm.io/xorm"
 
-	"github.com/G-Node/gogs/pkg/tool"
+	"github.com/G-Node/gogs/internal/tool"
 )
 
 type NoticeType int

+ 3 - 3
models/attachment.go → internal/db/attachment.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a MIT-style
 // license that can be found in the LICENSE file.
 
-package models
+package db
 
 import (
 	"fmt"
@@ -12,10 +12,10 @@ import (
 	"path"
 	"time"
 
-	"github.com/go-xorm/xorm"
 	gouuid "github.com/satori/go.uuid"
+	"xorm.io/xorm"
 
-	"github.com/G-Node/gogs/pkg/setting"
+	"github.com/G-Node/gogs/internal/setting"
 )
 
 // Attachment represent a attachment of issue/comment/release.

+ 5 - 5
models/comment.go → internal/db/comment.go

@@ -2,21 +2,21 @@
 // Use of this source code is governed by a MIT-style
 // license that can be found in the LICENSE file.
 
-package models
+package db
 
 import (
 	"fmt"
 	"strings"
 	"time"
 
-	"github.com/Unknwon/com"
-	"github.com/go-xorm/xorm"
+	"github.com/unknwon/com"
 	log "gopkg.in/clog.v1"
+	"xorm.io/xorm"
 
 	api "github.com/gogs/go-gogs-client"
 
-	"github.com/G-Node/gogs/models/errors"
-	"github.com/G-Node/gogs/pkg/markup"
+	"github.com/G-Node/gogs/internal/db/errors"
+	"github.com/G-Node/gogs/internal/markup"
 )
 
 // CommentType defines whether a comment is just a simple comment, an action (like close) or a reference.

+ 1 - 1
models/error.go → internal/db/error.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a MIT-style
 // license that can be found in the LICENSE file.
 
-package models
+package db
 
 import (
 	"fmt"

+ 0 - 0
models/errors/errors.go → internal/db/errors/errors.go


+ 0 - 0
models/errors/issue.go → internal/db/errors/issue.go


+ 0 - 0
models/errors/login_source.go → internal/db/errors/login_source.go


+ 0 - 0
models/errors/org.go → internal/db/errors/org.go


+ 0 - 0
models/errors/repo.go → internal/db/errors/repo.go


+ 16 - 0
internal/db/errors/token.go

@@ -0,0 +1,16 @@
+package errors
+
+import "fmt"
+
+type AccessTokenNameAlreadyExist struct {
+	Name string
+}
+
+func IsAccessTokenNameAlreadyExist(err error) bool {
+	_, ok := err.(AccessTokenNameAlreadyExist)
+	return ok
+}
+
+func (err AccessTokenNameAlreadyExist) Error() string {
+	return fmt.Sprintf("access token already exist [name: %s]", err.Name)
+}

+ 0 - 0
models/errors/two_factor.go → internal/db/errors/two_factor.go


+ 0 - 0
models/errors/user.go → internal/db/errors/user.go


+ 0 - 0
models/errors/user_mail.go → internal/db/errors/user_mail.go


+ 0 - 0
models/errors/webhook.go → internal/db/errors/webhook.go


+ 4 - 4
models/git_diff.go → internal/db/git_diff.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a MIT-style
 // license that can be found in the LICENSE file.
 
-package models
+package db
 
 import (
 	"bytes"
@@ -17,9 +17,9 @@ import (
 
 	"github.com/G-Node/git-module"
 
-	"github.com/G-Node/gogs/pkg/setting"
-	"github.com/G-Node/gogs/pkg/template/highlight"
-	"github.com/G-Node/gogs/pkg/tool"
+	"github.com/G-Node/gogs/internal/setting"
+	"github.com/G-Node/gogs/internal/template/highlight"
+	"github.com/G-Node/gogs/internal/tool"
 )
 
 type DiffSection struct {

+ 1 - 1
models/git_diff_test.go → internal/db/git_diff_test.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a MIT-style
 // license that can be found in the LICENSE file.
 
-package models
+package db
 
 import (
 	"html/template"

+ 6 - 6
models/issue.go → internal/db/issue.go

@@ -2,22 +2,22 @@
 // Use of this source code is governed by a MIT-style
 // license that can be found in the LICENSE file.
 
-package models
+package db
 
 import (
 	"fmt"
 	"strings"
 	"time"
 
-	"github.com/Unknwon/com"
-	"github.com/go-xorm/xorm"
+	"github.com/unknwon/com"
 	log "gopkg.in/clog.v1"
+	"xorm.io/xorm"
 
 	api "github.com/gogs/go-gogs-client"
 
-	"github.com/G-Node/gogs/models/errors"
-	"github.com/G-Node/gogs/pkg/setting"
-	"github.com/G-Node/gogs/pkg/tool"
+	"github.com/G-Node/gogs/internal/db/errors"
+	"github.com/G-Node/gogs/internal/setting"
+	"github.com/G-Node/gogs/internal/tool"
 )
 
 var (

+ 3 - 3
models/issue_label.go → internal/db/issue_label.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a MIT-style
 // license that can be found in the LICENSE file.
 
-package models
+package db
 
 import (
 	"fmt"
@@ -11,11 +11,11 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/go-xorm/xorm"
+	"xorm.io/xorm"
 
 	api "github.com/gogs/go-gogs-client"
 
-	"github.com/G-Node/gogs/pkg/tool"
+	"github.com/G-Node/gogs/internal/tool"
 )
 
 var labelColorPattern = regexp.MustCompile("#([a-fA-F0-9]{6})")

Някои файлове не бяха показани, защото твърде много файлове са промени