mirror of
https://github.com/gogs/gogs.git
synced 2026-03-02 02:00:57 +01:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0a787b5ee | ||
|
|
63598688e4 | ||
|
|
497cdc9250 | ||
|
|
edaf14f2b6 | ||
|
|
6fbb984ebf | ||
|
|
ba151eda0a | ||
|
|
c05717a5f0 | ||
|
|
5a488b6517 | ||
|
|
ae1d50d19a | ||
|
|
fe25effe7c | ||
|
|
d05395fe90 | ||
|
|
37b10666de | ||
|
|
41c8e87be8 | ||
|
|
55afc1ad21 | ||
|
|
16c6ca72cd | ||
|
|
b873ec2bce | ||
|
|
1bc805bb4b |
@@ -7,7 +7,7 @@ watch_all = true
|
||||
watch_dirs = [
|
||||
"$WORKDIR/cmd",
|
||||
"$WORKDIR/models",
|
||||
"$WORKDIR/modules",
|
||||
"$WORKDIR/pkg",
|
||||
"$WORKDIR/routers"
|
||||
]
|
||||
watch_exts = [".go"]
|
||||
|
||||
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -4,7 +4,7 @@ public/assets/* linguist-vendored
|
||||
public/plugins/* linguist-vendored
|
||||
public/css/themes/* linguist-vendored
|
||||
public/css/github.min.css linguist-vendored
|
||||
public/css/semantic-2.2.7.min.css linguist-vendored
|
||||
public/css/semantic-2.2.10.min.css linguist-vendored
|
||||
public/js/libs/* linguist-vendored
|
||||
public/js/jquery-1.11.3.min.js linguist-vendored
|
||||
public/js/semantic-2.2.7.min.js linguist-vendored
|
||||
public/js/semantic-2.2.10.min.js linguist-vendored
|
||||
18
Makefile
18
Makefile
@@ -1,9 +1,9 @@
|
||||
LDFLAGS += -X "github.com/gogits/gogs/modules/setting.BuildTime=$(shell date -u '+%Y-%m-%d %I:%M:%S %Z')"
|
||||
LDFLAGS += -X "github.com/gogits/gogs/modules/setting.BuildGitHash=$(shell git rev-parse HEAD)"
|
||||
LDFLAGS += -X "github.com/gogits/gogs/pkg/setting.BuildTime=$(shell date -u '+%Y-%m-%d %I:%M:%S %Z')"
|
||||
LDFLAGS += -X "github.com/gogits/gogs/pkg/setting.BuildGitHash=$(shell git rev-parse HEAD)"
|
||||
|
||||
DATA_FILES := $(shell find conf | sed 's/ /\\ /g')
|
||||
LESS_FILES := $(wildcard public/less/gogs.less public/less/_*.less)
|
||||
GENERATED := modules/bindata/bindata.go public/css/gogs.css
|
||||
GENERATED := pkg/bindata/bindata.go public/css/gogs.css
|
||||
|
||||
OS := $(shell uname)
|
||||
|
||||
@@ -27,7 +27,7 @@ dist: release
|
||||
|
||||
govet:
|
||||
$(GOVET) gogs.go
|
||||
$(GOVET) models modules routers
|
||||
$(GOVET) models pkg routers
|
||||
|
||||
build: $(GENERATED)
|
||||
go install $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(TAGS)'
|
||||
@@ -50,9 +50,9 @@ pack:
|
||||
|
||||
release: build pack
|
||||
|
||||
bindata: modules/bindata/bindata.go
|
||||
bindata: pkg/bindata/bindata.go
|
||||
|
||||
modules/bindata/bindata.go: $(DATA_FILES)
|
||||
pkg/bindata/bindata.go: $(DATA_FILES)
|
||||
go-bindata -o=$@ -ignore="\\.DS_Store|README.md|TRANSLATORS" -pkg=bindata conf/...
|
||||
|
||||
less: public/css/gogs.css
|
||||
@@ -70,11 +70,11 @@ test:
|
||||
go test -cover -race ./...
|
||||
|
||||
fixme:
|
||||
grep -rnw "FIXME" cmd routers models modules
|
||||
grep -rnw "FIXME" cmd routers models pkg
|
||||
|
||||
todo:
|
||||
grep -rnw "TODO" cmd routers models modules
|
||||
grep -rnw "TODO" cmd routers models pkg
|
||||
|
||||
# Legacy code should be remove by the time of release
|
||||
legacy:
|
||||
grep -rnw "LEGACY" cmd routers models modules
|
||||
grep -rnw "LEGACY" cmd routers models pkg
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/urfave/cli"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"gopkg.in/ini.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var Backup = cli.Command{
|
||||
|
||||
@@ -21,8 +21,8 @@ import (
|
||||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/httplib"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/httplib"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
http "github.com/gogits/gogs/routers/repo"
|
||||
)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/Unknwon/com"
|
||||
"github.com/urfave/cli"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"gopkg.in/ini.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var Restore = cli.Command{
|
||||
@@ -24,9 +24,9 @@ var Restore = cli.Command{
|
||||
Usage: "Restore files and database from backup",
|
||||
Description: `Restore imports all related files and database from a backup archive.
|
||||
The backup version must lower or equal to current Gogs version. You can also import
|
||||
backup from other database engines, which is useful for database migrating.
|
||||
backup from other database engines, which is useful for database migrating.
|
||||
|
||||
If corresponding files or database tables are not presented in the archive, they will
|
||||
If corresponding files or database tables are not presented in the archive, they will
|
||||
be skipped and remian unchanged.`,
|
||||
Action: runRestore,
|
||||
Flags: []cli.Flag{
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
http "github.com/gogits/gogs/routers/repo"
|
||||
)
|
||||
|
||||
|
||||
27
cmd/web.go
27
cmd/web.go
@@ -30,12 +30,12 @@ import (
|
||||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/bindata"
|
||||
"github.com/gogits/gogs/modules/context"
|
||||
"github.com/gogits/gogs/modules/form"
|
||||
"github.com/gogits/gogs/modules/mailer"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/template"
|
||||
"github.com/gogits/gogs/pkg/bindata"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/form"
|
||||
"github.com/gogits/gogs/pkg/mailer"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/template"
|
||||
"github.com/gogits/gogs/routers"
|
||||
"github.com/gogits/gogs/routers/admin"
|
||||
apiv1 "github.com/gogits/gogs/routers/api/v1"
|
||||
@@ -212,18 +212,17 @@ func runWeb(ctx *cli.Context) error {
|
||||
m.Combo("/ssh").Get(user.SettingsSSHKeys).
|
||||
Post(bindIgnErr(form.AddSSHKey{}), user.SettingsSSHKeysPost)
|
||||
m.Post("/ssh/delete", user.DeleteSSHKey)
|
||||
m.Combo("/applications").Get(user.SettingsApplications).
|
||||
Post(bindIgnErr(form.NewAccessToken{}), user.SettingsApplicationsPost)
|
||||
m.Post("/applications/delete", user.SettingsDeleteApplication)
|
||||
|
||||
m.Group("/organizations", func() {
|
||||
m.Get("", user.SettingsOrganizations)
|
||||
m.Post("/leave", user.SettingsLeaveOrganization)
|
||||
})
|
||||
m.Group("/repositories", func() {
|
||||
m.Get("", user.SettingsRepos)
|
||||
m.Post("/leave", user.SettingsLeaveRepo)
|
||||
})
|
||||
m.Group("/organizations", func() {
|
||||
m.Get("", user.SettingsOrganizations)
|
||||
m.Post("/leave", user.SettingsLeaveOrganization)
|
||||
})
|
||||
m.Combo("/applications").Get(user.SettingsApplications).
|
||||
Post(bindIgnErr(form.NewAccessToken{}), user.SettingsApplicationsPost)
|
||||
m.Post("/applications/delete", user.SettingsDeleteApplication)
|
||||
m.Route("/delete", "GET,POST", user.SettingsDelete)
|
||||
}, reqSignIn, func(ctx *context.Context) {
|
||||
ctx.Data["PageIsUserSettings"] = true
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Профил
|
||||
password=Парола
|
||||
avatar=Аватар
|
||||
ssh_keys=SSH ключове
|
||||
social=Социални профили
|
||||
applications=Приложения
|
||||
orgs=Организации
|
||||
repos=Repositories
|
||||
orgs=Организации
|
||||
applications=Приложения
|
||||
delete=Изтрий профил
|
||||
uid=UID
|
||||
|
||||
public_profile=Публичен профил
|
||||
profile_desc=Вашият адрес на ел. поща е публичен и ще бъде използван за всички свързани с профила Ви уведомления и всички уеб базирани операции, направени чрез сайта.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -18,15 +18,15 @@ user_profile_and_more=Uživatelský profil a další
|
||||
signed_in_as=Přihlášen jako
|
||||
|
||||
username=Uživatelské jméno
|
||||
email=E-Mail
|
||||
email=E-mail
|
||||
password=Heslo
|
||||
re_type=Znovu zadat
|
||||
captcha=CAPTCHA
|
||||
|
||||
repository=Repozitář
|
||||
repository=Repositář
|
||||
organization=Organizace
|
||||
mirror=Zrcadlo
|
||||
new_repo=Nový repozitář
|
||||
new_repo=Nový repositář
|
||||
new_migrate=Nové přenesení
|
||||
new_mirror=Nové zrcadlo
|
||||
new_fork=Nový repositář rozštěpení
|
||||
@@ -55,7 +55,7 @@ host=Server
|
||||
user=Uživatel
|
||||
password=Heslo
|
||||
db_name=Název databáze
|
||||
db_helper=Prosíme, pro MySQL použijte INNODB engine se znakovou sadou utf8_general_ci.
|
||||
db_helper=Prosím, pro MySQL použijte INNODB engine se znakovou sadou utf8_general_ci.
|
||||
ssl_mode=SSL Mód
|
||||
path=Cesta
|
||||
sqlite_helper=Cesta k SQLite3 databázi. <br>Prosím, použijte absolutní cestu, pokud startujete Gogs jako službu.
|
||||
@@ -82,8 +82,8 @@ app_url=URL aplikace
|
||||
app_url_helper=Toto ovlivňuje URL klonů skrze HTTP/HTTPS a odkazů v e-mailech.
|
||||
log_root_path=Adresář systémových záznamů
|
||||
log_root_path_helper=Adresář, kam se budou zapisovat systémové záznamy.
|
||||
enable_console_mode=Povolit režim konzoly
|
||||
enable_console_mode_popup=In addition to file mode, also print logs to console.
|
||||
enable_console_mode=Povolit režim konzole
|
||||
enable_console_mode_popup=Mimo zápisu do souboru vytisknout systémové záznamy i do konzole.
|
||||
|
||||
optional_title=Dodatečná nastavení
|
||||
email_title=Nastavení e-mailové služby
|
||||
@@ -101,8 +101,8 @@ disable_gravatar=Vypnout službu Gravatar
|
||||
disable_gravatar_popup=Vypnout službu Gravatar a ostatní zdroje. Všechny ikony uživatelů budou nahrány uživateli nebo výchozí.
|
||||
federated_avatar_lookup=Povolit vyhledání ikon uživatelů z veřejných zdrojů
|
||||
federated_avatar_lookup_popup=Povolit vyhledání ikon uživatelů z veřejných zdrojů pro využití služeb založených na libravatar.
|
||||
disable_registration=Vypnout možnost se zaregistrovat
|
||||
disable_registration_popup=Vypnout možnost registrace, pouze správce může vytvořit účty.
|
||||
disable_registration=Vypnout možnost uživatelské registrace
|
||||
disable_registration_popup=Vypnout možnost uživatelské zaregistrovat, pouze správce může vytvořit účty.
|
||||
enable_captcha=Povolit službu CAPTCHA
|
||||
enable_captcha_popup=Vyžadovat správně zadaný text CAPTCHA při registraci.
|
||||
require_sign_in_view=Povolit nutnost přihlášení pro zobrazení stránek
|
||||
@@ -115,11 +115,11 @@ confirm_password=Potvrdit heslo
|
||||
admin_email=E-mailová adresa správce
|
||||
install_gogs=Nainstalovat Gogs
|
||||
test_git_failed=Chyba při testu příkazu 'git': %v
|
||||
sqlite3_not_available=Vaše verze vydání Gogs nepodporuje SQLite3, prosíme stáhněte si oficiální binární balíček z %s, ne gobuild verzi.
|
||||
sqlite3_not_available=Vaše verze vydání Gogs nepodporuje SQLite3, prosím stáhněte si oficiální binární balíček z %s, ne gobuild verzi.
|
||||
invalid_db_setting=Nastavení databáze není správné: %v
|
||||
invalid_repo_path=Kořenový adresář repositáře není správný: %v
|
||||
run_user_not_match=Uživatel pro spuštění není aktuální uživatel: %s -> %s
|
||||
invalid_smtp_from=Hodnota položky SMTP server není zadána správně: %v
|
||||
invalid_smtp_from=Hodnota položky SMTP Od: není zadána správně: %v
|
||||
save_config_failed=Uložení konfigurace se nezdařilo: %v
|
||||
invalid_admin_setting=Nastavení účtu správce není správné: %v
|
||||
install_success=Vítejte! Jsme rádi, že jste si vybrali Gogs. Bavte se a opatrujte se.
|
||||
@@ -148,31 +148,31 @@ search=Vyhledat
|
||||
create_new_account=Vytvořit nový účet
|
||||
register_hepler_msg=Již máte účet? Přihlašte se!
|
||||
social_register_hepler_msg=Již máte účet? Připojte se!
|
||||
disable_register_prompt=Omlouváme se, ale registrace jsou vypnuty. Prosíme, spojte se správcem systému.
|
||||
disable_register_mail=Omlouváme se, potvrzovací registrační e-maily byly vypnuty.
|
||||
disable_register_prompt=Omlouvám se, ale registrace jsou vypnuty. Prosím, spojte se správcem systému.
|
||||
disable_register_mail=Omlouvám se, e-mailové služby byly vypnuty. Prosím, spojte se správce serveru.
|
||||
remember_me=Zapamatovat si mne
|
||||
forgot_password=Zapomenuté heslo
|
||||
forget_password=Zapomněli jste heslo?
|
||||
sign_up_now=Potřebujete účet? Zaregistrujte se.
|
||||
confirmation_mail_sent_prompt=Nový potvrzovací e-mail byl zaslán na <b>%s</b>, prosíme, zkontrolujte si vaši doručenou poštu během následující %d hodin pro dokončení registračního procesu.
|
||||
confirmation_mail_sent_prompt=Nový potvrzovací e-mail byl zaslán na <b>%s</b>, prosím, zkontrolujte si vaši doručenou poštu během následující %d hodin pro dokončení registračního procesu.
|
||||
active_your_account=Aktivujte si váš účet
|
||||
prohibit_login=Přihlášení zakázáno
|
||||
prohibit_login_desc=Vašemu účtu je zakázáno se přihlásit, kontaktujte prosím správce webu.
|
||||
resent_limit_prompt=Omlouváme se, ale před chvílí jste požádal o aktivační e-mail. Prosíme, počkejte 3 minuty a pak to zkuste znovu.
|
||||
has_unconfirmed_mail=Zdravím, %s, máte nepotvrzenou e-mailovou adresu (<b>%s</b>). Pokud jste nedostali e-mail pro potvrzení nebo potřebujete zaslat nový, klikněte prosím na tlačítku níže.
|
||||
prohibit_login_desc=Vašemu účtu je zakázáno se přihlásit, kontaktujte prosím správce serveru.
|
||||
resent_limit_prompt=Omlouvám se, ale před chvílí jste požádal o aktivační e-mail. Prosím, počkejte 3 minuty a pak to zkuste znovu.
|
||||
has_unconfirmed_mail=Zdravím, %s, máte nepotvrzenou e-mailovou adresu (<b>%s</b>). Pokud jste nedostali potvrzovací e-mail nebo potřebujete zaslat nový, klikněte prosím na tlačítko níže.
|
||||
resend_mail=Klikněte zde pro odeslání aktivačního e-mailu
|
||||
send_reset_mail=Klikněte zde pro znovuposlání e-mailu pro změnu vašeho hesla
|
||||
send_reset_mail=Klikněte zde pro (znovu)poslání e-mailu pro změnu vašeho hesla
|
||||
reset_password=Obnova vašeho hesla
|
||||
invalid_code=Omlouváme se, ale kód potvrzení vašeho účtu vypršel nebo není správný.
|
||||
invalid_code=Omlouvám se, ale kód potvrzení vašeho e-mailu vypršel nebo není správný.
|
||||
reset_password_helper=Klikněte zde pro obnovu vašeho hesla
|
||||
password_too_short=Délka hesla musí být minimálně 6 znaků.
|
||||
non_local_account=Externí účty nemohou měnit hesla přes Gogs.
|
||||
|
||||
[mail]
|
||||
activate_account=Prosíme, aktivujte si váš účet
|
||||
activate_account=Prosím, aktivujte si váš účet
|
||||
activate_email=Ověřte vaši e-mailovou adresu
|
||||
reset_password=Obnova vašeho hesla
|
||||
register_success=Vítejte, registrace vašeho účtu se zdařila
|
||||
register_success=Vítejte, váš účet byl zaregistrován
|
||||
register_notify=Vítejte
|
||||
|
||||
[modal]
|
||||
@@ -202,7 +202,7 @@ Content=Obsah
|
||||
|
||||
require_error=` nemůže být prázdný.`
|
||||
alpha_dash_error=` musí být pouze písmena, číslice či znaky - a _ .`
|
||||
alpha_dash_dot_error=` musí být pouze písmena, číslice, tečka či znaky - a _ .`
|
||||
alpha_dash_dot_error=` musí být pouze písmena, číslice, tečka, čárka či znaky - a _ .`
|
||||
alpha_dash_dot_slash_error=` musí být validní písmena, čísla nebo pomlčka, podtržítko či tečka, čárka a nebo lomítka.`
|
||||
size_error=` musí být minimálně velikosti %s.`
|
||||
min_size_error=` musí obsahovat nejméně %s znaků.`
|
||||
@@ -212,7 +212,7 @@ url_error=` není správná URL.`
|
||||
include_error=` musí obsahovat řetězec '%s'.`
|
||||
unknown_error=Neznámá chyba:
|
||||
captcha_incorrect=Zadaná CAPTCHA se neshoduje.
|
||||
password_not_match=Heslo a znovu zadané heslo nejsou shodné.
|
||||
password_not_match=Heslo a heslo pro potvrzení nejsou shodné.
|
||||
|
||||
username_been_taken=Uživatelské jméno je již obsazeno.
|
||||
repo_name_been_taken=Název repositáře je již obsazen.
|
||||
@@ -226,7 +226,7 @@ enterred_invalid_password=Ujistěte se, prosím, že zadané heslo je správné.
|
||||
user_not_exist=Zadaný uživatel neexistuje.
|
||||
last_org_owner=Odstranění posledního uživatele z týmu vlastníka není dovoleno, neboť vždy musí v každé organizaci existovat jeden vlastník.
|
||||
|
||||
invalid_ssh_key=Omlouváme se, ale není možné ověřit váš klíč SSH: %s
|
||||
invalid_ssh_key=Omlouvám se, ale není možné ověřit váš klíč SSH: %s
|
||||
unable_verify_ssh_key=Gogs nemohl ověřit váš klíč SSH, ale předpokládáme, že je platný, nicméně zkontrolujte jej prosím.
|
||||
auth_failed=Ověření selhalo: %v
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Profil
|
||||
password=Heslo
|
||||
avatar=Uživatelská ikona
|
||||
ssh_keys=Klíče SSH
|
||||
social=Sociální účty
|
||||
applications=Aplikace
|
||||
orgs=Organizace
|
||||
repos=Repositáře
|
||||
orgs=Organizace
|
||||
applications=Aplikace
|
||||
delete=Smazat účet
|
||||
uid=UID
|
||||
|
||||
public_profile=Veřejný profil
|
||||
profile_desc=Vaše e-mailová adresa je veřejná a bude použita pro upozornění vztahující se k vašemu účtu a jakékoliv operaci, která se provede pomocí systému.
|
||||
@@ -269,7 +267,7 @@ full_name=Celé jméno
|
||||
website=Web
|
||||
location=Místo
|
||||
update_profile=Změnit profil
|
||||
update_profile_success=Váš profil byl úspěšně změněn.
|
||||
update_profile_success=Váš profil byl změněn.
|
||||
change_username=Uživatelské jméno změněno
|
||||
change_username_prompt=Tato změna ovlivní vztah odkazů k vašemu účtu.
|
||||
continue=Pokračovat
|
||||
@@ -287,9 +285,9 @@ update_avatar_success=Nastavení vaší ikony uživatele bylo změněno.
|
||||
change_password=Změna hesla
|
||||
old_password=Stávající heslo
|
||||
new_password=Nové heslo
|
||||
retype_new_password=Zadat znovu heslo
|
||||
retype_new_password=Zadat znovu nové heslo
|
||||
password_incorrect=Zadané heslo není správné.
|
||||
change_password_success=Vaše heslo bylo úspěšně změněno. Nyní se můžete přihlásit pomocí tohoto nového hesla.
|
||||
change_password_success=Vaše heslo bylo změněno. Nyní se můžete přihlásit pomocí tohoto nového hesla.
|
||||
password_change_disabled=Uživatelé, kteří jsou ověřováni jinak než lokálně, si nemohou změnit heslo.
|
||||
|
||||
emails=E-mailová adresa
|
||||
@@ -300,11 +298,11 @@ primary_email=Nastavit jako hlavní
|
||||
delete_email=Smazat
|
||||
email_deletion=Smazání e-mailové adresy
|
||||
email_deletion_desc=Smazání této e-mailové adresy odstraní návazné informace z vašeho účtu. Chcete pokračovat?
|
||||
email_deletion_success=E-mailová adresa byla úspěšně smazána!
|
||||
email_deletion_success=E-mailová adresa byla smazána!
|
||||
add_new_email=Přidat novou e-mailovou adresu
|
||||
add_email=Přidat e-mailovou adresu
|
||||
add_email_confirmation_sent=Nový e-mail pro potvrzení byl odeslán na adresu '%s', prosíme zkontrolujte si vaši doručenou poštu během následujících %d hodin pro dokončení procesu potvrzení.
|
||||
add_email_success=Vaše nová e-mailová adresa byla úspěšně přidána.
|
||||
add_email_confirmation_sent=Nový potvrzovací e-mail byl odeslán na adresu '%s', prosím zkontrolujte si vaši doručenou poštu během následujících %d hodin pro dokončení procesu potvrzení.
|
||||
add_email_success=Vaše nová e-mailová adresa byla přidána.
|
||||
|
||||
manage_ssh_keys=Správa klíčů SSH
|
||||
add_key=Přidat klíč
|
||||
@@ -315,13 +313,13 @@ ssh_key_been_used=Obsah veřejného klíče byl použit.
|
||||
ssh_key_name_used=Veřejný klíč se stejným jménem již existuje.
|
||||
key_name=Název klíče
|
||||
key_content=Obsah
|
||||
add_key_success=Nový klíč SSH '%s' byl úspěšně přidán!
|
||||
add_key_success=Nový klíč SSH '%s' byl přidán!
|
||||
delete_key=Smazat
|
||||
ssh_key_deletion=Smazání klíče SSH
|
||||
ssh_key_deletion_desc=Smazání tohoto klíče SSH odstraní přístup k vašemu účtu. Chcete pokračovat?
|
||||
ssh_key_deletion_success=Klíč SSH byl úspěšně smazán!
|
||||
add_on=Přidáno dne
|
||||
last_used=Naposledy použito dne
|
||||
ssh_key_deletion_desc=Smazání tohoto klíče SSH odstraní všechny související přístupy k vašemu účtu. Chcete pokračovat?
|
||||
ssh_key_deletion_success=Klíč SSH byl smazán!
|
||||
add_on=Přidán dne
|
||||
last_used=Naposledy použit dne
|
||||
no_activity=Žádná aktuální aktivita
|
||||
key_state_desc=Tento klíč je používán posledních 7 dní
|
||||
token_state_desc=Tato poukázka je používána posledních 7 dní
|
||||
@@ -337,20 +335,20 @@ tokens_desc=Poukázky, které jste vygeneroval, mohou být použity pro přístu
|
||||
new_token_desc=Každá poukázka má úplný přístup k vašemu účtu.
|
||||
token_name=Název poukázky
|
||||
generate_token=Vygenerovat poukázku
|
||||
generate_token_succees=Vaše přístupová poukázka byl úspěšně vygenerován. Nyní si ji zkopírujte, neboť později to již nebude možné!
|
||||
generate_token_succees=Vaše přístupová poukázka byl vygenerována. Nyní si ji zkopírujte, neboť později to již nebude možné!
|
||||
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 návazný přístup aplikace. Chcete pokračovat?
|
||||
delete_token_success=Osobní přístupová poukázka byla úspěšně odstraněna! Nezapomeňte také změnit nastavení vaší aplikace.
|
||||
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.
|
||||
|
||||
orgs.none=Nejste členem žádné organizace.
|
||||
orgs.leave_title=Opustit organizaci
|
||||
orgs.leave_desc=Opuštěním organizace ztratíte přístup do všech repositářů a k týmům. Chcete pokračovat?
|
||||
orgs.leave_desc=Opuštěním organizace ztratíte přístup do všech jejích repositářů a k jejích týmům. Chcete pokračovat?
|
||||
|
||||
repos.leave=Opustit
|
||||
repos.leave_title=Opustit repositář
|
||||
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
|
||||
repos.leave_success=You have left repository '%s' successfully!
|
||||
repos.leave_desc=Potom, co opustíte repositář, ztratíte k němu přístup. Chcete pokračovat?
|
||||
repos.leave_success=Opustil jste repositář '%s'!
|
||||
|
||||
delete_account=Smazat váš účet
|
||||
delete_prompt=Tato operace permanentně smaže váš účet a tato změna <strong>nemůže</strong> být vrácena!
|
||||
@@ -377,11 +375,11 @@ license=Licence
|
||||
license_helper=Vyberte licenční soubor
|
||||
readme=Soubor README
|
||||
readme_helper=Vyberte šablonu souboru README
|
||||
auto_init=Inicializovat tento repositář s vybranými soubory a šablonou
|
||||
auto_init=Založit tento repositář s vybranými soubory a šablonou
|
||||
create_repo=Vytvořit repositář
|
||||
default_branch=Výchozí větev
|
||||
mirror_prune=Vyčistit
|
||||
mirror_prune_desc=Odstranit vzdálené odkazy, které již ve vzdáleném repozitáři neexistují
|
||||
mirror_prune_desc=Odstranit odkazy sledování vzdálených větví, které již ve vzdáleném repositáři neexistují
|
||||
mirror_interval=Odstup zrcadlení (hodina)
|
||||
mirror_address=Adresa zrcadla
|
||||
mirror_address_desc=Prosím, přidejte do adresy potřebné přihlašovací údaje.
|
||||
@@ -400,7 +398,7 @@ migrate_type_helper=Tento repositář bude <span class="text blue">zrcadlem</spa
|
||||
migrate_repo=Přenést repositář
|
||||
migrate.clone_address=Naklonovat adresu
|
||||
migrate.clone_address_desc=Toto může být HTTP/HTTPS/GIT URL.
|
||||
migrate.clone_address_desc_import_local=Máte povoleno přenést repositář z lokální cesty serveru.
|
||||
migrate.clone_address_desc_import_local=Máte povoleno přenést repositář pomocí lokální cesty na serveru.
|
||||
migrate.permission_denied=Není vám dovoleno importovat místní repositáře.
|
||||
migrate.invalid_local_path=Neplatná místní cesta, buď neexistuje nebo není adresářem.
|
||||
migrate.failed=Přenesení selhalo: %v
|
||||
@@ -422,7 +420,7 @@ quick_guide=Krátká příručka
|
||||
clone_this_repo=Naklonovat tento repositář
|
||||
create_new_repo_command=Vytvořit nový repositář v příkazové řádce
|
||||
push_exist_repo=Odeslat existující repositář z příkazové řádky
|
||||
bare_message=This repository does not have any content yet.
|
||||
bare_message=Tento repositář ještě nemá obsah.
|
||||
|
||||
files=Soubory
|
||||
branch=Větev
|
||||
@@ -433,7 +431,7 @@ tags=Značky
|
||||
issues=Úkoly
|
||||
pulls=Požadavky na natažení
|
||||
labels=Štítky
|
||||
milestones=Milník
|
||||
milestones=Milníky
|
||||
commits=Revize
|
||||
git_branches=Větve
|
||||
releases=Vydání
|
||||
@@ -459,35 +457,35 @@ editor.cannot_edit_non_text_files=Netextové soubory není možné upravovat
|
||||
editor.edit_this_file=Upravit tento soubor
|
||||
editor.must_be_on_a_branch=Musíte mít zvolenu větev pro úpravu či návrh změn tohoto souboru
|
||||
editor.fork_before_edit=Musíte provést rozštěpení repositáře před úpravou souboru
|
||||
editor.delete_this_file=Odstranit tento soubor
|
||||
editor.delete_this_file=Smazat tento soubor
|
||||
editor.must_have_write_access=Musíte mít přístup pro zápis pro dělání či navrhování změn tohoto souboru
|
||||
editor.file_delete_success=Soubor '%s' byl úspěšně odstraněn!
|
||||
editor.file_delete_success=Soubor '%s' byl smazán!
|
||||
editor.name_your_file=Pojmenujte váš soubor...
|
||||
editor.filename_help=Pro vložení adresáře prostě napište jméno a přidejte /. K odstranění adresáře běžte na začátek pole a stiskněte backspace.
|
||||
editor.or=nebo
|
||||
editor.cancel_lower=zrušit
|
||||
editor.commit_changes=Uložit změny revize
|
||||
editor.commit_changes=Zapsat změny revize
|
||||
editor.add_tmpl=Přidat '%s/<nazev_souboru>'
|
||||
editor.add=Přidat '%s'
|
||||
editor.update=Změnit "%s"
|
||||
editor.delete=Smazat '%s'
|
||||
editor.commit_message_desc=Přidat dobrovolný rozšířený popis...
|
||||
editor.commit_directly_to_this_branch=Uložte změny revize přímo do větve <strong class="branch-name">%s</strong>.
|
||||
editor.commit_directly_to_this_branch=Zapište změny revize přímo do větve <strong class="branch-name">%s</strong>.
|
||||
editor.create_new_branch=Vytvořit <strong>novou větev</strong> pro tuto revizi a vytvořit požadavek na natažení.
|
||||
editor.new_branch_name_desc=Nový název větve...
|
||||
editor.cancel=Zrušit
|
||||
editor.filename_cannot_be_empty=Název souboru nemůže být prázdný.
|
||||
editor.branch_already_exists=Repositář větev '%s' již obsahuje.
|
||||
editor.directory_is_a_file=Položka '%s' v nadřazené cestě je v tomto repozitáři soubor, ne adresář.
|
||||
editor.directory_is_a_file=Položka '%s' v nadřazené cestě je v tomto repositáři soubor, ne adresář.
|
||||
editor.file_is_a_symlink=Soubor '%s' je symbolický odkaz a nemůže být změněn pomocí webového editoru.
|
||||
editor.filename_is_a_directory=Jméno souboru '%s' koliduje v tomto repozitáři se jménem adresáře.
|
||||
editor.file_editing_no_longer_exists=Soubor '%s', který upravujete, již neexistuje v tomto repozitáři.
|
||||
editor.file_changed_while_editing=Obsah souboru se změnil od začátku úprav. <a target="_blank" href="%s"> Klepnutím sem</a> zobrazíte, co se změnilo, nebo <strong>stiskněte potvrdit znovu</strong> pro přepsání změn.
|
||||
editor.file_already_exists=Soubor '%s' již existuje v tomto repozitáři.
|
||||
editor.filename_is_a_directory=Jméno souboru '%s' v tomto repositáři koliduje se jménem adresáře.
|
||||
editor.file_editing_no_longer_exists=Soubor '%s', který upravujete, již v tomto repositáři neexistuje.
|
||||
editor.file_changed_while_editing=Obsah souboru se změnil od začátku úprav. <a target="_blank" href="%s">Klepnutím sem</a> zobrazíte, co se změnilo, nebo <strong>stiskněte Znovu zapsat změny</strong> pro přepsání změn.
|
||||
editor.file_already_exists=Soubor '%s' již v tomto repositáři existuje.
|
||||
editor.no_changes_to_show=Žádné změny k zobrazení.
|
||||
editor.fail_to_update_file=Vytvoření nebo změna souboru '%s' skončilo chybou: %v
|
||||
editor.fail_to_update_file=Vytvoření nebo změna souboru '%s' skončila chybou: %v
|
||||
editor.add_subdir=Přidat podadresář...
|
||||
editor.unable_to_upload_files=Nepodařilo se nahrát soubor '%s'. Chyba: %v
|
||||
editor.unable_to_upload_files=Nepodařilo se nahrát soubor do '%s'. Chyba: %v
|
||||
editor.upload_files_to_dir=Nahrát soubory do '%s'
|
||||
|
||||
commits.commit_history=Historie revizí
|
||||
@@ -517,7 +515,7 @@ issues.new_label=Nový štítek
|
||||
issues.new_label_placeholder=Název štítku...
|
||||
issues.create_label=Vytvořit štítek
|
||||
issues.label_templates.title=Nahrát předdefinovanou sadu značek
|
||||
issues.label_templates.info=Nejsou zadány žádné značky. Pro vytvoření nové klikněte na tlačítko Nová značka nebo použijte předdefinovanou sadu.
|
||||
issues.label_templates.info=Nejsou zadány žádné značky. Pro vytvoření nové klikněte na tlačítko "Nová značka" nebo použijte předdefinovanou sadu.
|
||||
issues.label_templates.helper=Vyberte sadu značek
|
||||
issues.label_templates.use=Použít tuto sadu značek
|
||||
issues.label_templates.fail_to_load_file=Nepodařilo se nahrát soubor šablony značek '%s': %v
|
||||
@@ -545,8 +543,8 @@ issues.opened_by=otevřeno %[1]s uživatelem <a href="%[2]s">%[3]s</a>
|
||||
issues.opened_by_fake=otevřeno %[1]s uživatelem %[2]s
|
||||
issues.previous=Předchozí
|
||||
issues.next=Další
|
||||
issues.open_title=otevřený
|
||||
issues.closed_title=zavřený
|
||||
issues.open_title=Otevřený
|
||||
issues.closed_title=Zavřený
|
||||
issues.num_comments=%d komentářů
|
||||
issues.commented_at=`okomentoval <a href="#%s">%s</a>`
|
||||
issues.delete_comment_confirm=Jste si jist, že chcete smazat tento komentář?
|
||||
@@ -562,7 +560,7 @@ issues.commit_ref_at=`odkázal na tento úkol z revize <a id="%[1]s" href="#%[1]
|
||||
issues.poster=Autor
|
||||
issues.collaborator=Spolupracovník
|
||||
issues.owner=Vlastník
|
||||
issues.sign_in_require_desc=<a href="%s">Přihlašte se</a> pro zapojení do konverzace.
|
||||
issues.sign_in_require_desc=<a href="%s">Přihlaste se</a> pro zapojení do konverzace.
|
||||
issues.edit=Upravit
|
||||
issues.cancel=Zrušit
|
||||
issues.save=Uložit
|
||||
@@ -575,7 +573,7 @@ issues.label_delete=Smazat
|
||||
issues.label_modify=Změna štítku
|
||||
issues.label_deletion=Smazání štítku
|
||||
issues.label_deletion_desc=Smazání tohoto štítku jej smaže také ze všech návazných úkolech. Chcete pokračovat?
|
||||
issues.label_deletion_success=Štítek byl úspěšně smazán!
|
||||
issues.label_deletion_success=Štítek byl smazán!
|
||||
issues.num_participants=%d účastníků
|
||||
issues.attachment.open_tab=`Klikněte pro zobrazení "%s" v nové záložce`
|
||||
issues.attachment.download=`Klikněte pro stažení "%s"`
|
||||
@@ -583,11 +581,11 @@ issues.attachment.download=`Klikněte pro stažení "%s"`
|
||||
pulls.new=Nový požadavek na natažení
|
||||
pulls.compare_changes=Porovnat změny
|
||||
pulls.compare_changes_desc=Porovnat dvě větve a vytvořit pro změny požadavek na natažení.
|
||||
pulls.compare_base=základní
|
||||
pulls.compare_base=základ
|
||||
pulls.compare_compare=porovnat
|
||||
pulls.filter_branch=Filtrovat větev
|
||||
pulls.no_results=Nebyly nalezeny žádné výsledky.
|
||||
pulls.nothing_to_compare=Není co porovnávat, protože základní a hlavní větve jsou shodné.
|
||||
pulls.nothing_to_compare=Není co porovnávat, protože základ a hlavní větve jsou shodné.
|
||||
pulls.has_pull_request=`Požadavek na natažení mezi těmito větvemi již existuje: <a href="%[1]s/pulls/%[3]d">%[2]s#%[3]d</a>`
|
||||
pulls.create=Vytvořit požadavek na natažení
|
||||
pulls.title_desc=chce sloučit %[1]d revizí z větve <code>%[2]s</code> do větve <code>%[3]s</code>
|
||||
@@ -595,14 +593,14 @@ pulls.merged_title_desc=sloučil %[1]d revizí z větve <code>%[2]s</code> do v
|
||||
pulls.tab_conversation=Konverzace
|
||||
pulls.tab_commits=Revize
|
||||
pulls.tab_files=Změněné soubory
|
||||
pulls.reopen_to_merge=Prosíme, otevřete znovu tento požadavek na natažení, aby se provedla operace sloučení.
|
||||
pulls.reopen_to_merge=Prosím, znovuotevřete tento požadavek na natažení, aby se provedla operace sloučení.
|
||||
pulls.merged=Sloučený
|
||||
pulls.has_merged=Tento požadavek na natažení byl úspěšně sloučen!
|
||||
pulls.has_merged=Tento požadavek na natažení byl sloučen!
|
||||
pulls.data_broken=Data tohoto požadavku na natažení byla narušena z důvodu smazání informace o rozštěpení.
|
||||
pulls.is_checking=Kontrola rozporů stále pokračuje, prosíme obnovte za několik okamžiků stránku.
|
||||
pulls.is_checking=Kontrola rozporů stále pokračuje, prosím obnovte za několik okamžiků stránku.
|
||||
pulls.can_auto_merge_desc=Tento požadavek na natažení může být automaticky sloučen.
|
||||
pulls.cannot_auto_merge_desc=Tento požadavek na natažení nemůže být automaticky sloučen, neboť se v něm nachází rozpory.
|
||||
pulls.cannot_auto_merge_helper=Prosíme proveďte sloučení ručně, aby byly vyřešeny rozpory.
|
||||
pulls.cannot_auto_merge_helper=Prosím proveďte sloučení ručně, aby byly vyřešeny rozpory.
|
||||
pulls.merge_pull_request=Sloučit požadavek na natažení
|
||||
pulls.open_unmerged_pull_exists=`Nemůžete znovuotevřít požadavek na natažení, neboť požadavek na natažení ze stejného repositáře se stejnými informacemi pro sloučení již existuje (#%d) a čeká na sloučení.`
|
||||
pulls.delete_branch=Smazat větev
|
||||
@@ -611,7 +609,7 @@ pulls.delete_branch_has_new_commits=Větev nemůže být smazána, neboť po slo
|
||||
milestones.new=Nový milník
|
||||
milestones.open_tab=%d otevřených
|
||||
milestones.close_tab=%d zavřených
|
||||
milestones.closed=Zavřen dne %s
|
||||
milestones.closed=Zavřen %s
|
||||
milestones.no_due_date=Bez lhůty dokončení
|
||||
milestones.open=Otevřít
|
||||
milestones.close=Zavřít
|
||||
@@ -621,16 +619,16 @@ milestones.title=Název
|
||||
milestones.desc=Popis
|
||||
milestones.due_date=Termín (volitelný)
|
||||
milestones.clear=Zrušit
|
||||
milestones.invalid_due_date_format=Formát data termínu je neplatný, musí být 'yyyy-mm-dd'.
|
||||
milestones.create_success=Milník '%s' byl úspěšně vytvořen!
|
||||
milestones.invalid_due_date_format=Formát data termínu je neplatný, musí být 'rrrr-mm-dd'.
|
||||
milestones.create_success=Milník '%s' byl vytvořen!
|
||||
milestones.edit=Upravit milník
|
||||
milestones.edit_subheader=Zadejte lepší popis milníků, aby lidé nebyli zmateni.
|
||||
milestones.cancel=Zrušit
|
||||
milestones.modify=Změnit milník
|
||||
milestones.edit_success=Změny milníku '%s' byly úspěšně uloženy!
|
||||
milestones.edit_success=Změny milníku '%s' byly uloženy!
|
||||
milestones.deletion=Smazání milníku
|
||||
milestones.deletion_desc=Smazání tohoto milníku jej smaže také ze všech návazných úkolech. Chcete pokračovat?
|
||||
milestones.deletion_success=Milník byl úspěšně smazán!
|
||||
milestones.deletion_success=Milník byl smazán!
|
||||
|
||||
wiki=Wiki
|
||||
wiki.welcome=Vítejte ve Wiki!
|
||||
@@ -642,7 +640,7 @@ wiki.new_page=Vytvořit novou stránku
|
||||
wiki.default_commit_message=Napište (volitelnou) poznámku k této změně.
|
||||
wiki.save_page=Uložit stránku
|
||||
wiki.last_commit_info=%s upravil tuto stránku %s
|
||||
wiki.edit_page_button=Změnit stránku
|
||||
wiki.edit_page_button=Upravit
|
||||
wiki.new_page_button=Nová stránka
|
||||
wiki.delete_page_button=Smazat stránku
|
||||
wiki.delete_page_notice_1=Toto smaže stránku <code>"%s"</code>. Buďte si prosím jisti.
|
||||
@@ -658,11 +656,12 @@ settings.collaboration.write=Zápis
|
||||
settings.collaboration.read=Čtení
|
||||
settings.collaboration.undefined=Neurčeno
|
||||
settings.branches=Větve
|
||||
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
|
||||
settings.branches_bare=Nemůžete spravovat větve pro holý repositář. Prosím, odešlete nejdříve nějaký obsah.
|
||||
settings.default_branch=Výchozí větev
|
||||
settings.default_branch_desc=Výchozí větev je považována za "základní" větev pro zápisy změn revizí, požadavky na natažení a on-line úpravy.
|
||||
settings.update=Změnit
|
||||
settings.update_default_branch_success=Výchozí větev tohoto repositáře byla úspěšně změněna!
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Výchozí větev tohoto repositáře byla změněna!
|
||||
settings.protected_branches=Chráněné větve
|
||||
settings.protected_branches_desc=Ochrana větví před vynuceným odesláním a náhodným smazáním. Schválený seznam uživatelů ukládající zápisy revizí.
|
||||
settings.choose_a_branch=Vyberte větev...
|
||||
@@ -678,7 +677,7 @@ settings.protect_whitelist_users=Uživatelé, kteří mohou odesílat do této v
|
||||
settings.protect_whitelist_search_users=Vyhledat uživatele
|
||||
settings.protect_whitelist_teams=Týmy, jejichž členové mohou odesílat do této větve
|
||||
settings.protect_whitelist_search_teams=Vyhledat týmy
|
||||
settings.update_protect_branch_success=Možnosti ochrany této větve byly úspěšně změněny!
|
||||
settings.update_protect_branch_success=Možnosti ochrany této větve byly změněny!
|
||||
settings.hooks=Webové háčky
|
||||
settings.githooks=Háčky Gitu
|
||||
settings.basic_settings=Základní nastavení
|
||||
@@ -691,13 +690,13 @@ settings.change_reponame_prompt=Tato změna ovlivní vztah odkazů k repositář
|
||||
settings.advanced_settings=Pokročilá nastavení
|
||||
settings.wiki_desc=Povolit systém Wiki
|
||||
settings.use_internal_wiki=Použít vestavěný systém Wiki
|
||||
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
|
||||
settings.allow_public_wiki_desc=Povolit veřejný přístup k wiki, přestože se jedná o soukromý repositář
|
||||
settings.use_external_wiki=Používat externí Wiki
|
||||
settings.external_wiki_url=URL externí Wiki
|
||||
settings.external_wiki_url_desc=Návštěvníci budou při kliknutí na záložku přesměrování na tuto URL.
|
||||
settings.issues_desc=Povolit systém úkolů
|
||||
settings.use_internal_issue_tracker=Povolit věstavěný odlehčený systém úkolů
|
||||
settings.allow_public_issues_desc=Allow public access to issues when repository is private
|
||||
settings.allow_public_issues_desc=Povolit veřejný přístup k úkolům, přestože se jedná o soukromý repositář
|
||||
settings.use_external_issue_tracker=Použít externí systém úkolů
|
||||
settings.external_tracker_url=URL externí evidence úkolů
|
||||
settings.external_tracker_url_desc=Návštěvníci budou po kliknutí na danou záložku přesměrováni na danou adresu.
|
||||
@@ -709,12 +708,12 @@ settings.tracker_url_format_desc=Můžete použít zástupné výrazy <code>{use
|
||||
settings.pulls_desc=Povolit požadavky na natažení, aby mohly být příspěvky veřejnosti akceptovány
|
||||
settings.danger_zone=Nebezpečná zóna
|
||||
settings.cannot_fork_to_same_owner=Nemůžete rozštěpit repositář jejímu vlastníkovi.
|
||||
settings.new_owner_has_same_repo=Nový vlastník již repositář se stejným názvem má. Vyberte, prosíme, jiné jméno.
|
||||
settings.new_owner_has_same_repo=Nový vlastník již repositář se stejným názvem má. Vyberte, prosím, jiné jméno.
|
||||
settings.convert=Převést na běžný repositář
|
||||
settings.convert_desc=Můžete převést toto zrcadlo na běžný repositář. Tato změna nemůže být vrácena.
|
||||
settings.convert_notices_1=- Tato operace převede tento zrcadlový repositář na běžný repositář a tato změna nemůže být vrácena.
|
||||
settings.convert_confirm=Potvrdit převod
|
||||
settings.convert_succeed=Repositář byl úspěšně převeden na běžný typ.
|
||||
settings.convert_succeed=Repositář byl převeden na běžný typ.
|
||||
settings.transfer=Předat vlastnictví
|
||||
settings.transfer_desc=Předat tento repositář jinému uživateli nebo organizaci, ve které jste správce.
|
||||
settings.transfer_notices_1=- Ztratíte přístup, pokud nový vlastník je samostatný uživatel.
|
||||
@@ -723,17 +722,17 @@ settings.transfer_form_title=Zadejte prosím následující informace pro potvrz
|
||||
settings.wiki_delete=Smazat data Wiki
|
||||
settings.wiki_delete_desc=Pokud smažete data Wiki, nebude možné se vrátit. Buďte si, prosím, jist.
|
||||
settings.wiki_delete_notices_1=- Toto smaže a vypne Wiki pro %s
|
||||
settings.wiki_deletion_success=Data Wiki tohoto repositáře byla úspěšně smazána.
|
||||
settings.wiki_deletion_success=Data Wiki tohoto repositáře byla smazána.
|
||||
settings.delete=Smazat tento repositář
|
||||
settings.delete_desc=Jakmile smažete repositář, není možné se vrátit. Buďte si, prosím, jist.
|
||||
settings.delete_notices_1=- Tuto operaci <strong>nelze</strong> zvrátit.
|
||||
settings.delete_notices_2=Tato operace permanentně smaže vše v tomto repositáři, včetně dat Gitu, úkolů, komentářů a přístupu spolupracovníků.
|
||||
settings.delete_notices_fork_1=- Po smazání se všechny forky se stanou nezávislé.
|
||||
settings.deletion_success=Repositář byl úspěšně smazán!
|
||||
settings.update_settings_success=Možnosti repositáře byly úspěšně změněny.
|
||||
settings.deletion_success=Repositář byl smazán!
|
||||
settings.update_settings_success=Možnosti repositáře byly změněny.
|
||||
settings.transfer_owner=Nový vlastník
|
||||
settings.make_transfer=Předat
|
||||
settings.transfer_succeed=Repositář byl úspěšně předán.
|
||||
settings.transfer_succeed=Repositář byl předán.
|
||||
settings.confirm_delete=Potvrdit smazání
|
||||
settings.add_collaborator=Přidat nového spolupracovníka
|
||||
settings.add_collaborator_success=Nový spolupracovník byl přidán.
|
||||
@@ -747,12 +746,12 @@ settings.add_webhook=Přidat webový háček
|
||||
settings.hooks_desc=Webové háčky jsou podobné základním spouštím HTTP POST událostí. Kdykoliv se něco stane v Gogs, bude postaráno o oznámení specifikovanému cílovému serveru. Více se o daném dozvíte v <a target="_blank" href="%s">příručce webových háčků</a>.
|
||||
settings.webhook_deletion=Smazat webový háček
|
||||
settings.webhook_deletion_desc=Smazáním tohoto webového háčku dojte také ke smazání veškerých informací o něm a také historie volání. Chcete pokračovat?
|
||||
settings.webhook_deletion_success=Webový háček byl úspěšně smazán!
|
||||
settings.webhook_deletion_success=Webový háček byl smazán!
|
||||
settings.webhook.test_delivery=Test doručitelnosti
|
||||
settings.webhook.test_delivery_desc=Odeslat falešnou událost doručení odeslání pro test vašeho nastavení webových háčků
|
||||
settings.webhook.test_delivery_success=Testovací webový háček byl přidán do fronty doručení. Bude to trvat několik sekund, než se ukáže v historii doručení.
|
||||
settings.webhook.redelivery=Opětovné doručení
|
||||
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
|
||||
settings.webhook.redelivery_success=Úloha háčku '%s' byla znova přidána do doručovací fronty. Zabere to přibližně pár sekund, než bude změněn stav doručení v historii.
|
||||
settings.webhook.request=Požadavek
|
||||
settings.webhook.response=Odpověď
|
||||
settings.webhook.headers=Hlavičky
|
||||
@@ -784,7 +783,7 @@ settings.event_fork_desc=Repositář rozštěpen
|
||||
settings.event_push=Odeslat
|
||||
settings.event_push_desc=Odeslání pomocí Gitu do repositáře
|
||||
settings.event_issues=Úkoly
|
||||
settings.event_issues_desc=Úkol, který je otevřen, uzavřen, změněn, přiřazen, nepřiřazen, mající změněn štítek, smazán štítek, mající přiřazen milník, nemající přiřazen milník.
|
||||
settings.event_issues_desc=Úkol, který je otevřen, uzavřen, znovuotevřen, změněn, přiřazen, nepřiřazen, mající změněn štítek, smazán štítek, mající přiřazen milník, nemající přiřazen milník.
|
||||
settings.event_issue_comment=Komentář k úkolu
|
||||
settings.event_issue_comment_desc=Komentář k úkolu vytvořen, upraven nebo smazán.
|
||||
settings.event_pull_request=Požadavek na natažení
|
||||
@@ -813,10 +812,10 @@ settings.title=Název
|
||||
settings.deploy_key_content=Obsah
|
||||
settings.key_been_used=Obsah klíče pro nasazení byl použit.
|
||||
settings.key_name_used=Klíč pro nasazení se stejným jménem již existuje.
|
||||
settings.add_key_success=Nový klíč pro nasazení '%s' byl úspěšně přidán!
|
||||
settings.add_key_success=Nový klíč pro nasazení '%s' byl přidán!
|
||||
settings.deploy_key_deletion=Smazat klíč pro nasazení
|
||||
settings.deploy_key_deletion_desc=Smazání toho klíče pro nasazení smaže také veškerý k němu svázaný přístup do tohoto repositáře. Chcete pokračovat?
|
||||
settings.deploy_key_deletion_success=Klíč pro nasazení byl úspěšně smazán!
|
||||
settings.deploy_key_deletion_success=Klíč pro nasazení byl smazán!
|
||||
|
||||
diff.browse_source=Procházet zdrojové kódy
|
||||
diff.parent=rodič
|
||||
@@ -857,7 +856,7 @@ release.edit_release=Upravit vydání
|
||||
release.delete_release=Smazat toto vydání
|
||||
release.deletion=Smazání vydání
|
||||
release.deletion_desc=Smazáním tohoto vydání se také smaže odpovídající značka. Chcete pokračovat?
|
||||
release.deletion_success=Vydání bylo úspěšně smazáno!
|
||||
release.deletion_success=Vydání bylo smazáno!
|
||||
release.tag_name_already_exist=Vydání s touto značkou již existuje.
|
||||
release.tag_name_invalid=Název značky není platný.
|
||||
release.downloads=Soubory ke stažení
|
||||
@@ -891,9 +890,9 @@ settings.full_name=Celé jméno
|
||||
settings.website=Webové stránky
|
||||
settings.location=Umístění
|
||||
settings.update_settings=Změnit nastavení
|
||||
settings.update_setting_success=Nastavení organizace bylo úspěšně změněno.
|
||||
settings.update_setting_success=Nastavení organizace bylo změněno.
|
||||
settings.change_orgname_prompt=Tato změna ovlivní vztah odkazů k organizaci.
|
||||
settings.update_avatar_success=Nastavení ikony organizace bylo úspěšně změněno.
|
||||
settings.update_avatar_success=Nastavení ikony organizace bylo změněno.
|
||||
settings.delete=Smazat organizaci
|
||||
settings.delete_account=Smazat tuto organizaci
|
||||
settings.delete_prompt=Organizace bude trvale smazána a tato změna <strong>nemůže</strong> být vrácena!
|
||||
@@ -932,7 +931,7 @@ teams.delete_team=Smazat tento tým
|
||||
teams.add_team_member=Přidat člena týmu
|
||||
teams.delete_team_title=Smazání týmu
|
||||
teams.delete_team_desc=Jelikož bude tento tým smazán, jeho členové mohou ztratit přístup do některých repositářů. Chcete pokračovat?
|
||||
teams.delete_team_success=Daný tým byl úspěšně smazán.
|
||||
teams.delete_team_success=Daný tým byl smazán.
|
||||
teams.read_permission_desc=Členství v tom týmu poskytuje právo <strong>čtení</strong>: členové mohou číst z a vytvářet klony repositářů týmu.
|
||||
teams.write_permission_desc=Členství v tom týmu poskytuje právo <strong>zápisu</strong>: členové mohou číst z a odesílat do repositářů týmu.
|
||||
teams.admin_permission_desc=Členství v tom týmu poskytuje právo <strong>správce</strong>: členové mohou číst z, odesílat do a přidávat spolupracovníky do repositářů týmu.
|
||||
@@ -940,7 +939,7 @@ teams.repositories=Repositáře týmu
|
||||
teams.search_repo_placeholder=Hledat repositář...
|
||||
teams.add_team_repository=Přidat repositář týmu
|
||||
teams.remove_repo=Odstranit
|
||||
teams.add_nonexistent_repo=Repositář, který se snažíte přidat, neexistuje. Prosím, nejdříve jej vytvořte.
|
||||
teams.add_nonexistent_repo=Repositář, který se snažíte přidat, neexistuje. Nejdříve jej vytvořte, prosím.
|
||||
|
||||
[admin]
|
||||
dashboard=Přehled
|
||||
@@ -962,22 +961,22 @@ dashboard.statistic_info=Databáze Gogs obsahuje <b>%d</b> uživatelů, <b>%d</b
|
||||
dashboard.operation_name=Název operace
|
||||
dashboard.operation_switch=Přepnout
|
||||
dashboard.operation_run=Spustit
|
||||
dashboard.clean_unbind_oauth=Smazat nepřipojené asociace OAuth2
|
||||
dashboard.clean_unbind_oauth_success=Všechny nepřipojené asociace OAuth2 byly úspěšně smazány.
|
||||
dashboard.clean_unbind_oauth=Smazat odpojené asociace OAuth2
|
||||
dashboard.clean_unbind_oauth_success=Všechny odpojené asociace OAuth2 byly smazány.
|
||||
dashboard.delete_inactivate_accounts=Smazat všechny neaktivní účty
|
||||
dashboard.delete_inactivate_accounts_success=Všechny neaktivní účty byly úspěšně smazány.
|
||||
dashboard.delete_inactivate_accounts_success=Všechny neaktivní účty byly smazány.
|
||||
dashboard.delete_repo_archives=Smazat všechny archívy repositářů
|
||||
dashboard.delete_repo_archives_success=Všechny archívy repositářů byly úspěšně smazány.
|
||||
dashboard.delete_repo_archives_success=Všechny archívy repositářů byly smazány.
|
||||
dashboard.delete_missing_repos=Smazat všechny záznamy repositářů, které ztratily soubory Gitu
|
||||
dashboard.delete_missing_repos_success=Všechny repositáře, které ztratily soubory Gity, byly úspěšně smazány.
|
||||
dashboard.delete_missing_repos_success=Všechny repositáře, které ztratily soubory Gitu, byly smazány.
|
||||
dashboard.git_gc_repos=Provést úklid GC nad repositáři
|
||||
dashboard.git_gc_repos_success=Úklid GC nad všemi repositáři byl úspěšně proveden.
|
||||
dashboard.git_gc_repos_success=Úklid GC nad všemi repositáři byl proveden.
|
||||
dashboard.resync_all_sshkeys=Přepsat soubor '.ssh/authorized_keys' (upozornění: klíče nevzniklé v Gogs budou ztraceny)
|
||||
dashboard.resync_all_sshkeys_success=Všechny veřejné klíče byly úspěšně přepsány.
|
||||
dashboard.resync_all_sshkeys_success=Všechny veřejné klíče byly přepsány.
|
||||
dashboard.resync_all_hooks=Sesynchronizovat háčky před-získání, změny a po-získání pro všechny repositáře
|
||||
dashboard.resync_all_hooks_success=Všechny háčky repositáře pro před-získání, změnu a po-získání byly úspěšně sesynchronizovány.
|
||||
dashboard.resync_all_hooks_success=Všechny háčky repositáře pro před-získání, změnu a po-získání byly sesynchronizovány.
|
||||
dashboard.reinit_missing_repos=Znovu inicializovat záznamy všech repositářů, které ztratily soubory Gitu
|
||||
dashboard.reinit_missing_repos_success=Záznamy všech repositářů, které ztratily soubory Gitu, byly znovu úspěšně inicializovány.
|
||||
dashboard.reinit_missing_repos_success=Záznamy všech repositářů, které ztratily soubory Gitu, byly znovu inicializovány.
|
||||
|
||||
dashboard.server_uptime=Doba provozu serveru
|
||||
dashboard.current_goroutine=Aktuální Goroutines
|
||||
@@ -1017,13 +1016,13 @@ users.admin=Správce
|
||||
users.repos=Repositáře
|
||||
users.created=Vytvořen
|
||||
users.send_register_notify=Poslat upozornění na registraci uživateli
|
||||
users.new_success=Nový účet '%s' byl úspěšně vytvořen.
|
||||
users.new_success=Nový účet '%s' byl vytvořen.
|
||||
users.edit=Upravit
|
||||
users.auth_source=Zdroj způsobu ověření
|
||||
users.local=Místní
|
||||
users.auth_login_name=Přihlašovací jméno způsobu ověření
|
||||
users.password_helper=Nechte prázdné, pokud se nemá změnit.
|
||||
users.update_profile_success=Profil účtu byl úspěšně změněn.
|
||||
users.update_profile_success=Profil účtu byl změněn.
|
||||
users.edit_account=Upravit účet
|
||||
users.max_repo_creation=Limit počtu vytvořených repositářů
|
||||
users.max_repo_creation_desc=(Nastavte na -1 pro použití výchozího systémového limitu)
|
||||
@@ -1036,7 +1035,7 @@ users.update_profile=Změnit profil účtu
|
||||
users.delete_account=Smazat tento účet
|
||||
users.still_own_repo=Tento účet je stále vlastníkem nejméně jednoho repositáře, je potřeba repositář nejdříve smazat nebo předat.
|
||||
users.still_has_org=Tento účet je členem minimálně jedné organizace, musíte nejdříve dané organizace opustit nebo je smazat.
|
||||
users.deletion_success=Účet byl úspěšně smazán!
|
||||
users.deletion_success=Účet byl smazán!
|
||||
|
||||
orgs.org_manage_panel=Panel správy organizací
|
||||
orgs.name=Název
|
||||
@@ -1090,14 +1089,14 @@ auths.enable_auto_register=Povolit zaregistrování se
|
||||
auths.tips=Tipy
|
||||
auths.edit=Upravit nastavení ověřování
|
||||
auths.activated=Tento způsob ověřování je aktivní
|
||||
auths.new_success=Nový způsob ověřování '%s' byl úspěšně přidán.
|
||||
auths.update_success=Nastavení ověřování bylo úspěšně změněno.
|
||||
auths.new_success=Nový způsob ověřování '%s' byl přidán.
|
||||
auths.update_success=Nastavení ověřování bylo změněno.
|
||||
auths.update=Změnit nastavení ověřování
|
||||
auths.delete=Smazat tento způsob ověřování
|
||||
auths.delete_auth_title=Smazání způsobu ověřování
|
||||
auths.delete_auth_desc=Tento způsob ověřování bude smazán, chcete pokračovat?
|
||||
auths.still_in_used=Tento způsob ověřování je stále používán některými uživateli. Prosím, nejdříve změňte u těchto uživatelů typ ověřování na jiný.
|
||||
auths.deletion_success=Způsob ověřování byl úspěšně smazán!
|
||||
auths.deletion_success=Způsob ověřování byl smazán!
|
||||
auths.login_source_exist=Zdroj přihlášení '%s' již existuje.
|
||||
|
||||
config.server_config=Nastavení serveru
|
||||
@@ -1147,7 +1146,7 @@ config.db_path=Cesta
|
||||
config.db_path_helper=(pro "sqlite3" a "tidb")
|
||||
|
||||
config.service_config=Nastavení služby
|
||||
config.register_email_confirm=Vyžadovat potvrzení e-mailem
|
||||
config.register_email_confirm=Vyžadovat potvrzení e-mailu
|
||||
config.disable_register=Vypnout registraci
|
||||
config.show_registration_button=Ukázat tlačítko registrace
|
||||
config.require_sign_in_view=Vyžadovat zobrazení přihlášení
|
||||
@@ -1234,7 +1233,7 @@ notices.type=Typ
|
||||
notices.type_1=Repositář
|
||||
notices.desc=Popis
|
||||
notices.op=Op.
|
||||
notices.delete_success=Systémová upozornění byla úspěšně smazána.
|
||||
notices.delete_success=Systémová upozornění byla smazána.
|
||||
|
||||
[action]
|
||||
create_repo=vytvořil repositář <a href="%s">%s</a>
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Profil
|
||||
password=Passwort
|
||||
avatar=Profilbild
|
||||
ssh_keys=SSH-Schlüssel
|
||||
social=Soziale Konten
|
||||
applications=Anwendungen
|
||||
orgs=Organisationen
|
||||
repos=Repositories
|
||||
orgs=Organisationen
|
||||
applications=Anwendungen
|
||||
delete=Konto löschen
|
||||
uid=Uid
|
||||
|
||||
public_profile=Öffentliches Profil
|
||||
profile_desc=Ihre E-Mail-Adresse ist öffentlich einsehbar und dient dazu, Ihnen Benachrichtigungen bezüglich Ihres Kontos und Aktivitäten auf der Webseite zu schicken.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=Branches leerer Repositories können nicht verwaltet werd
|
||||
settings.default_branch=Standard-Branch
|
||||
settings.default_branch_desc=Der Standard-Branch gilt als Basis für Commits, Pull-Requests und Online-Bearbeitung.
|
||||
settings.update=Aktualisieren
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Standard-Branch dieses Repositories wurde erfolgreich aktualisiert!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Schützt Branches vor forcierten Pushes und versehentlichem Löschen. Comitter können freigeschaltet werden.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile = Profile
|
||||
password = Password
|
||||
avatar = Avatar
|
||||
ssh_keys = SSH Keys
|
||||
social = Social Accounts
|
||||
applications = Applications
|
||||
orgs = Organizations
|
||||
repos = Repositories
|
||||
orgs = Organizations
|
||||
applications = Applications
|
||||
delete = Delete Account
|
||||
uid = Uid
|
||||
|
||||
public_profile = Public Profile
|
||||
profile_desc = Your email address is public and will be used for any account related notifications, and any web based operations made via the site.
|
||||
|
||||
@@ -75,15 +75,15 @@ domain_helper=Esto afecta a las URLs para clonar por SSH.
|
||||
ssh_port=Puerto SSH
|
||||
ssh_port_helper=Número de puerto de su servidor SSH, déjelo en blanco para desactivar SSH.
|
||||
use_builtin_ssh_server=Usar Builtin SSH Server
|
||||
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
|
||||
use_builtin_ssh_server_popup=Iniciar servidor SSH integrado para operaciones con Git para distinguirlo del demonio SSH del sistema.
|
||||
http_port=Puerto HTTP
|
||||
http_port_helper=Puerto en el que escuchará la aplicación.
|
||||
app_url=URL de la aplicación
|
||||
app_url_helper=Esto afecta a las URLs para clonar por HTTP/HTTPS y a algunos correos electrónicos.
|
||||
log_root_path=Ruta del registro
|
||||
log_root_path_helper=Directorio donde almacenar los registros.
|
||||
enable_console_mode=Enable Console Mode
|
||||
enable_console_mode_popup=In addition to file mode, also print logs to console.
|
||||
enable_console_mode=Activar Modo Consola
|
||||
enable_console_mode_popup=Además del modo archivo, también imprime los registros en consola.
|
||||
|
||||
optional_title=Configuración opcional
|
||||
email_title=Configuración del servicio de correo
|
||||
@@ -203,7 +203,7 @@ 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_dot_slash_error=` must be valid alpha or numeric or dash(-_) or dot characters or slashes.`
|
||||
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.`
|
||||
max_size_error=` debe contener como máximo %s caracteres.`
|
||||
@@ -255,12 +255,10 @@ profile=Perfil
|
||||
password=Contraseña
|
||||
avatar=Avatar
|
||||
ssh_keys=Claves SSH
|
||||
social=Redes Sociales
|
||||
applications=Aplicaciones
|
||||
repos=Repositorios
|
||||
orgs=Organizaciones
|
||||
repos=Repositories
|
||||
applications=Aplicaciones
|
||||
delete=Eliminar cuenta
|
||||
uid=UUID
|
||||
|
||||
public_profile=Perfil público
|
||||
profile_desc=Tu correo electrónico es público y será usado para todas las notificaciones relacionadas con cualquier cuenta y cualquier operación hecha a través de la web.
|
||||
@@ -347,10 +345,10 @@ orgs.none=No eres un miembro de ninguna organización.
|
||||
orgs.leave_title=Salir de una organización
|
||||
orgs.leave_desc=Perderá el acceso a todos los repositorios y equipos después dejar la organización. ¿Desea continuar?
|
||||
|
||||
repos.leave=Leave
|
||||
repos.leave_title=Leave repository
|
||||
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
|
||||
repos.leave_success=You have left repository '%s' successfully!
|
||||
repos.leave=Salir
|
||||
repos.leave_title=Dejar repositorio
|
||||
repos.leave_desc=Perderás acceso al repositorio cuando salgas. ¿Quieres continuar?
|
||||
repos.leave_success=¡Has dejado el repositorio '%s' con éxito!
|
||||
|
||||
delete_account=Elimina tu cuenta
|
||||
delete_prompt=La operación eliminará tu cuenta de forma permanente y ¡<strong>NO</strong> se puede deshacer!
|
||||
@@ -422,7 +420,7 @@ quick_guide=Guía Rápida
|
||||
clone_this_repo=Clonar este repositorio
|
||||
create_new_repo_command=Crear un nuevo repositorio desde línea de comandos
|
||||
push_exist_repo=Hacer Push de un repositorio existente desde línea de comandos
|
||||
bare_message=This repository does not have any content yet.
|
||||
bare_message=Este repositorio aun no tiene contenido alguno.
|
||||
|
||||
files=Archivos
|
||||
branch=Rama
|
||||
@@ -435,7 +433,7 @@ pulls=Pull Requests
|
||||
labels=Etiquetas
|
||||
milestones=Milestones
|
||||
commits=Commits
|
||||
git_branches=Branches
|
||||
git_branches=Ramas
|
||||
releases=Releases
|
||||
file_raw=Raw
|
||||
file_history=Histórico
|
||||
@@ -444,12 +442,12 @@ file_permalink=Permalink
|
||||
file_too_large=Este archivo es demasiado grande para ser mostrado
|
||||
video_not_supported_in_browser=Su navegador no soporta el tag video de HTML5.
|
||||
|
||||
branches.overview=Overview
|
||||
branches.active_branches=Active Branches
|
||||
branches.stale_branches=Stale Branches
|
||||
branches.all=All Branches
|
||||
branches.updated_by=Updated %[1]s by %[2]s
|
||||
branches.change_default_branch=Change Default Branch
|
||||
branches.overview=Resumen
|
||||
branches.active_branches=Ramas activas
|
||||
branches.stale_branches=Ramas Viejas
|
||||
branches.all=Todas las Ramas
|
||||
branches.updated_by=%[1]s actualizado por %[2]s
|
||||
branches.change_default_branch=Cambiar la Rama por Defecto
|
||||
|
||||
editor.new_file=Nuevo archivo
|
||||
editor.upload_file=Subir archivo
|
||||
@@ -490,7 +488,7 @@ editor.add_subdir=Añadir subdirectorio...
|
||||
editor.unable_to_upload_files=Error al subir archivos a '%s', error: %v
|
||||
editor.upload_files_to_dir=Subir archivos a '%s'
|
||||
|
||||
commits.commit_history=Commit History
|
||||
commits.commit_history=Historial de Commits
|
||||
commits.commits=Commits
|
||||
commits.search=Buscar commits
|
||||
commits.find=Buscar
|
||||
@@ -658,10 +656,11 @@ settings.collaboration.write=Escritura
|
||||
settings.collaboration.read=Lectura
|
||||
settings.collaboration.undefined=Indefinido
|
||||
settings.branches=Ramas
|
||||
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
|
||||
settings.branches_bare=No puedes gestionar ramas en un repositorio vacío. Por favor sube algún contenido primero.
|
||||
settings.default_branch=Rama predeterminada
|
||||
settings.default_branch_desc=Se considera la rama «base» como la rama por defecto para commits de código, las solicitudes pull y edición en línea.
|
||||
settings.update=Actualizar
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=¡La Rama por defecto de este repositorio ha sido actualizado con éxito!
|
||||
settings.protected_branches=Ramas protegidas
|
||||
settings.protected_branches_desc=Proteger ramas force pushing, de eliminación accidental y lista blanca de committers de código.
|
||||
@@ -673,11 +672,11 @@ settings.protect_this_branch_desc=Desactivar force pushes y evite la eliminació
|
||||
settings.protect_require_pull_request=Requiere una solicitud pull, en lugar de un push directo
|
||||
settings.protect_require_pull_request_desc=Active esta opción para deshabilitar un push directo a esta rama. Los commits tienen que ser empujados a otra rama no protegida y fusionados a esta rama a través de la solicitud pull.
|
||||
settings.protect_whitelist_committers=Lista blanca de quienes pueden empujar a esta rama
|
||||
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch. Users in whitelist will bypass require pull request check.
|
||||
settings.protect_whitelist_users=Users who can push to this branch
|
||||
settings.protect_whitelist_search_users=Search users
|
||||
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
|
||||
settings.protect_whitelist_search_teams=Search teams
|
||||
settings.protect_whitelist_committers_desc=Añadir personas o equipos a la lista blanca de push directo a esta rama. Los usuarios en esta lista se saltan la comprobación de pull request.
|
||||
settings.protect_whitelist_users=Usuarios que pueden hacer push a esta rama
|
||||
settings.protect_whitelist_search_users=Buscar usuarios
|
||||
settings.protect_whitelist_teams=Equipos cuyos miembros pueden hacer push a esta rama
|
||||
settings.protect_whitelist_search_teams=Buscar equipos
|
||||
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
|
||||
settings.hooks=Webhooks
|
||||
settings.githooks=Git Hooks
|
||||
@@ -697,7 +696,7 @@ settings.external_wiki_url=URL externa de la Wiki
|
||||
settings.external_wiki_url_desc=Los visitantes serán redireccionados a la URL cuando hagan click en la barra.
|
||||
settings.issues_desc=Habilitar rastreo de incidencias
|
||||
settings.use_internal_issue_tracker=Usar rastreo de incidencias ligero incluido
|
||||
settings.allow_public_issues_desc=Allow public access to issues when repository is private
|
||||
settings.allow_public_issues_desc=Permitir acceso público a las incidencias cuando el repositorio es privado
|
||||
settings.use_external_issue_tracker=Usar tracker externo de incidencias
|
||||
settings.external_tracker_url=URL de seguimiento de problemas externos
|
||||
settings.external_tracker_url_desc=Los visitantes serán redirigidos a la URL cuando hagan click en la barra.
|
||||
@@ -777,20 +776,20 @@ settings.event_send_everything=Necesito <strong>todo</strong>.
|
||||
settings.event_choose=Déjeme elegir lo que necesito.
|
||||
settings.event_create=Crear
|
||||
settings.event_create_desc=Rama o etiqueta creada
|
||||
settings.event_delete=Delete
|
||||
settings.event_delete_desc=Branch or tag deleted
|
||||
settings.event_delete=Borrar
|
||||
settings.event_delete_desc=Rama o etiqueta borrada
|
||||
settings.event_fork=Fork
|
||||
settings.event_fork_desc=Repository forked
|
||||
settings.event_push=Push
|
||||
settings.event_push_desc=Git push a un repositorio
|
||||
settings.event_issues=Issues
|
||||
settings.event_issues_desc=Issue opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, milestoned, or demilestoned.
|
||||
settings.event_issue_comment=Issue Comment
|
||||
settings.event_issue_comment_desc=Issue comment created, edited, or deleted.
|
||||
settings.event_issues=Incidencias
|
||||
settings.event_issues_desc=Incidencia abierta, cerrada, reabierta, editada, asignada, desasignada, etiqueta actualizada, etiqueta limpiada, hito marcado, o desmarcado,.
|
||||
settings.event_issue_comment=Comentario de incidencia
|
||||
settings.event_issue_comment_desc=Comentario de incidencias creado, editado o borrado.
|
||||
settings.event_pull_request=Pull Request
|
||||
settings.event_pull_request_desc=Pull request opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, milestoned, demilestoned, or synchronized.
|
||||
settings.event_release=Release
|
||||
settings.event_release_desc=Release published in a repository.
|
||||
settings.event_pull_request_desc=Pull request abierto, cerrado, reabierto, editado, asignado, desasignado, etiqueta actualizada, etiqueta limpiada, hito marcado, hito desmarcado, o sincronizado.
|
||||
settings.event_release=Lanzamiento
|
||||
settings.event_release_desc=Lanzamiento publicado en un repositorio.
|
||||
settings.active=Activo
|
||||
settings.active_helper=Enviaremos detalles del evento cuando este hook se dispare.
|
||||
settings.add_hook_success=Se ha añadido un nuevo webhook.
|
||||
@@ -1050,7 +1049,7 @@ repos.private=Privado
|
||||
repos.watches=Vigilantes
|
||||
repos.stars=Estrellas
|
||||
repos.issues=Incidencias
|
||||
repos.size=Size
|
||||
repos.size=Tamaño
|
||||
|
||||
auths.auth_manage_panel=Panel de administración de autenticación
|
||||
auths.new=Añadir nuevo origen
|
||||
@@ -1129,9 +1128,9 @@ config.ssh_minimum_key_sizes=Tamaños de clave mínimos
|
||||
config.repo_config=Configuración del repositorio
|
||||
config.repo_root_path=Ruta del Repositorio
|
||||
config.script_type=Tipo de Script
|
||||
config.repo_force_private=Force Private
|
||||
config.repo_force_private=Forzar Privado
|
||||
config.max_creation_limit=Limite máximo de creación
|
||||
config.preferred_licenses=Preferred Licenses
|
||||
config.preferred_licenses=Licencias Preferidas
|
||||
config.disable_http_git=Desactivar HTTP Git
|
||||
config.enable_local_path_migration=Activar la migración de la ruta de acceso Local
|
||||
config.commits_fetch_concurrency=Commits Fetch Concurrency
|
||||
@@ -1208,8 +1207,8 @@ config.git_pull_timeout=Tiempo de espera de operación de pull
|
||||
config.git_gc_timeout=Tiempo de espera de operación de GC
|
||||
|
||||
config.log_config=Configuración del Log
|
||||
config.log_mode=Mode
|
||||
config.log_options=Options
|
||||
config.log_mode=Modo
|
||||
config.log_options=Opciones
|
||||
|
||||
monitor.cron=Tareas de Cron
|
||||
monitor.name=Nombre
|
||||
@@ -1251,10 +1250,10 @@ create_pull_request=`creado pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
|
||||
close_pull_request=`cerró el pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
|
||||
reopen_pull_request=`reabrió el pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
|
||||
merge_pull_request=`fusionado pull request <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>
|
||||
create_branch=nueva rama <a href="%[1]s/src/%[2]s">%[3]s</a> creada en <a href="%[1]s">%[4]s</a>
|
||||
delete_branch=borrada rama <code>%[2]s</code> at <a href="%[1]s">%[3]s</a>
|
||||
push_tag=hizo push del tag <a href="%s/src/%s">%[2]s</a> a <a href="%[1]s">%[3]s</a>
|
||||
delete_tag=deleted tag <code>%[2]s</code> at <a href="%[1]s">%[3]s</a>
|
||||
delete_tag=borrada etiqueta <code>%[2]s</code> en <a href="%[1]s">%[3]s</a>
|
||||
|
||||
[tool]
|
||||
ago=hace
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Profiili
|
||||
password=Salasana
|
||||
avatar=Profiilikuva
|
||||
ssh_keys=SSH avaimet
|
||||
social=Sosiaaliset tilit
|
||||
applications=Sovellukset
|
||||
orgs=Organisaatiot
|
||||
repos=Repositories
|
||||
orgs=Organisaatiot
|
||||
applications=Sovellukset
|
||||
delete=Poista tili
|
||||
uid=Käyttäjä ID
|
||||
|
||||
public_profile=Julkinen profiili
|
||||
profile_desc=Sähköposti osoitteesi on julkinen ja käytetään tiliin liittyviin ilmoituksiin, ja nettipohjaisiin toimintoihin joita on tehty sivujen kautta.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Oletushaara
|
||||
settings.default_branch_desc=Oletushaaraa käytetään "pohjahaarana" commiteille, pull-pyynnöille ja sivustolla toteutetuille muokkauksille.
|
||||
settings.update=Päivitä
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Repositoryn oletushaara päivitetty!
|
||||
settings.protected_branches=Suojatut haarat
|
||||
settings.protected_branches_desc=Suojaa haaroja pakotetulta push-operaatiolta, vahinkopoistamisilta ja sallitun listan committereilta.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Profil
|
||||
password=Mot de Passe
|
||||
avatar=Avatar
|
||||
ssh_keys=Clés SSH
|
||||
social=Réseaux Sociaux
|
||||
applications=Applications
|
||||
orgs=Organisations
|
||||
repos=Repositories
|
||||
orgs=Organisations
|
||||
applications=Applications
|
||||
delete=Supprimer le compte
|
||||
uid=ID d'Utilisateur
|
||||
|
||||
public_profile=Profil public
|
||||
profile_desc=Votre adresse e-mail est publique et sera utilisée pour les notifications relatives au compte, ainsi que pour toute opération Web effectuée via le site.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Branche par défaut
|
||||
settings.default_branch_desc=La branche par défaut est considérée comme la branche « originale » pour les commits de code, les requêtes de fusion et l'édition en ligne.
|
||||
settings.update=Actualiser
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=La branche par défaut de ce dépôt a bien été mise à jour.
|
||||
settings.protected_branches=Branches protégées
|
||||
settings.protected_branches_desc=Protéger les branches du push forcé, de la suppression accidentelle et des publicateurs de code en liste blanche.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Perfil
|
||||
password=Contrasinal
|
||||
avatar=Avatar
|
||||
ssh_keys=Claves SSH
|
||||
social=Redes sociais
|
||||
applications=Aplicacións
|
||||
orgs=Organizacións
|
||||
repos=Repositories
|
||||
orgs=Organizacións
|
||||
applications=Aplicacións
|
||||
delete=Eliminar conta
|
||||
uid=UUID
|
||||
|
||||
public_profile=Perfil público
|
||||
profile_desc=O teu correo electrónico é público e será usado para todas as notificacións relacionadas con calquera conta e calquera operación feita a través da web.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Profilo
|
||||
password=Password
|
||||
avatar=Avatar
|
||||
ssh_keys=Chiavi SSH
|
||||
social=Account Sociali
|
||||
applications=Applicazioni
|
||||
orgs=Organizzazioni
|
||||
repos=Repositories
|
||||
orgs=Organizzazioni
|
||||
applications=Applicazioni
|
||||
delete=Elimina account
|
||||
uid=Uid
|
||||
|
||||
public_profile=Profilo pubblico
|
||||
profile_desc=Il tuo indirizzo e-mail è pubblico e sarà usato per ogni notifica inerente al tuo account, e per qualsiasi operazione web effettuata attraverso il sito.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=プロフィール
|
||||
password=パスワード
|
||||
avatar=アバター
|
||||
ssh_keys=SSH キー
|
||||
social=SNSアカウント
|
||||
applications=アプリケーション
|
||||
orgs=組織
|
||||
repos=Repositories
|
||||
orgs=組織
|
||||
applications=アプリケーション
|
||||
delete=アカウントを削除
|
||||
uid=Uid
|
||||
|
||||
public_profile=パブリック プロフィール
|
||||
profile_desc=あなたのメールアドレスは公開され、任意のアカウント関連の通知に使用されます。また、Webベースの操作はサイトを介して行います。
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=프로필
|
||||
password=비밀번호
|
||||
avatar=아바타
|
||||
ssh_keys=SSH 키
|
||||
social=소셜 계정
|
||||
applications=애플리케이션
|
||||
orgs=조직
|
||||
repos=Repositories
|
||||
orgs=조직
|
||||
applications=애플리케이션
|
||||
delete=계정 삭제
|
||||
uid=Uid
|
||||
|
||||
public_profile=공개 프로필
|
||||
profile_desc=이메일 주소가 공개되며, 사이트를 통해 작업하거나 계정과 관련된 모든 알림에 사용됩니다.
|
||||
@@ -663,6 +661,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=기본 브랜치
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=업데이트
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=이 레포지토리의 기본 브랜치가 성공적으로 설정되었습니다!
|
||||
settings.protected_branches=보호된 브랜치
|
||||
settings.protected_branches_desc=보호된 브랜치는 force 푸시, 실수로 인한 코드 삭제를 방지하며 코드 커미터를 화이트리스트 합니다.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Profils
|
||||
password=Parole
|
||||
avatar=Profila attēls
|
||||
ssh_keys=SSH atslēgas
|
||||
social=Sociālie konti
|
||||
applications=Lietotnes
|
||||
orgs=Organizācijas
|
||||
repos=Repositories
|
||||
orgs=Organizācijas
|
||||
applications=Lietotnes
|
||||
delete=Dzēst kontu
|
||||
uid=Lietotāja ID
|
||||
|
||||
public_profile=Publiskais profils
|
||||
profile_desc=Jūsu e-pasta adrese ir publiska un tiks izmantota, lai nosūtītju Jums paziņojumus, kas saistīti ar Jūsu kontu vai darbībām veiktām caur šo mājas lapu.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Profiel
|
||||
password=Wachtwoord
|
||||
avatar=Profielfoto
|
||||
ssh_keys=SSH-sleutels
|
||||
social=Sociale netwerk-accounts
|
||||
applications=Toepassingen
|
||||
orgs=Organisaties
|
||||
repos=Repositories
|
||||
orgs=Organisaties
|
||||
applications=Toepassingen
|
||||
delete=Verwijder account
|
||||
uid=uid
|
||||
|
||||
public_profile=Openbaar profiel
|
||||
profile_desc=Uw e-mailadres is openbaar en zal gebruikt worden voor alle account gerelateerde berichtgevingen en bewerkingingen die via de website worden gedaan.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Profil
|
||||
password=Hasło
|
||||
avatar=Awatar
|
||||
ssh_keys=Klucze SSH
|
||||
social=Konta społecznościowe
|
||||
applications=Aplikacje
|
||||
orgs=Organizacje
|
||||
repos=Repositories
|
||||
orgs=Organizacje
|
||||
applications=Aplikacje
|
||||
delete=Usuń konto
|
||||
uid=UID
|
||||
|
||||
public_profile=Profil publiczny
|
||||
profile_desc=Twój adres e-mail jest publiczny i będzie używany dla wszystkich powiadomień związanych z kontem i dla każdej operacji wykonanej przez tę stronę.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Perfil
|
||||
password=Senha
|
||||
avatar=Avatar
|
||||
ssh_keys=Chaves SSH
|
||||
social=Contas sociais
|
||||
applications=Aplicativos
|
||||
orgs=Organizações
|
||||
repos=Repositories
|
||||
orgs=Organizações
|
||||
applications=Aplicativos
|
||||
delete=Deletar conta
|
||||
uid=Uid
|
||||
|
||||
public_profile=Perfil público
|
||||
profile_desc=Seu endereço de E-mail é publico e será usado para qualquer notificação relacionada à conta, e qualquer operação na web feita através do site.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Профиль
|
||||
password=Пароль
|
||||
avatar=Аватар
|
||||
ssh_keys=SSH ключи
|
||||
social=Учетные записи в соцсетях
|
||||
applications=Приложения
|
||||
orgs=Организации
|
||||
repos=Repositories
|
||||
orgs=Организации
|
||||
applications=Приложения
|
||||
delete=Удалить аккаунт
|
||||
uid=UID
|
||||
|
||||
public_profile=Открытый профиль
|
||||
profile_desc=Адрес вашей электронной почты является публичным и будет использован для любых уведомлений, связанных с аккаунтом, а также для любых действий, совершенных через сайт.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Ветка по умолчанию
|
||||
settings.default_branch_desc=Ветка по-умолчанию считается основной для коммитов, запросов на слияние и онлайн-редактирования.
|
||||
settings.update=Обновить
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Ветка по умолчанию для этого репозитория была успешно изменена!
|
||||
settings.protected_branches=Защищенные ветки
|
||||
settings.protected_branches_desc=Защитить ветки от принудительного push, случайного удаления и разрешить изменения только коммитерам из белого списка.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Профил
|
||||
password=Лозинка
|
||||
avatar=Аватар
|
||||
ssh_keys=SSH Кључеви
|
||||
social=Налози на друштвеним мрежама
|
||||
applications=Апликације
|
||||
orgs=Организације
|
||||
repos=Repositories
|
||||
orgs=Организације
|
||||
applications=Апликације
|
||||
delete=Уклоните налог
|
||||
uid=Uid
|
||||
|
||||
public_profile=Јавни профил
|
||||
profile_desc=Ваша адреса е-поште је јавна и коришће се за све обавести везане са налогом, као и друге операције почињене кроз Gogs.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Profil
|
||||
password=Lösenord
|
||||
avatar=Avatar
|
||||
ssh_keys=SSH-nycklar
|
||||
social=Sociala konton
|
||||
applications=Applikationer
|
||||
orgs=Organisationer
|
||||
repos=Repositories
|
||||
orgs=Organisationer
|
||||
applications=Applikationer
|
||||
delete=Radera konto
|
||||
uid=Uid
|
||||
|
||||
public_profile=Offentlig profil
|
||||
profile_desc=Din epostaddress är offentlig och kommer att användas för alla kontorelaterade notifieringar och alla webbaserade åtgärder gjorda på sidan.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Profil
|
||||
password=Parola
|
||||
avatar=Avatar
|
||||
ssh_keys=SSH Anahtarları
|
||||
social=Sosyal Medya Hesapları
|
||||
applications=Uygulamalar
|
||||
orgs=Organizasyonlar
|
||||
repos=Repositories
|
||||
orgs=Organizasyonlar
|
||||
applications=Uygulamalar
|
||||
delete=Hesabı Sil
|
||||
uid=Tekil ID
|
||||
|
||||
public_profile=Herkese Açık Profil
|
||||
profile_desc=E-posta adresiniz herkese açıktır ve hesabınızla ilgili bilgilendirmelerde ve web tabanlı operasyonlarda kullanılacaktır.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=Профіль
|
||||
password=Пароль
|
||||
avatar=Аватар
|
||||
ssh_keys=Ключі SSH
|
||||
social=Соціальні акаунти
|
||||
applications=Додатки
|
||||
orgs=Організації
|
||||
repos=Репозиторії
|
||||
orgs=Організації
|
||||
applications=Додатки
|
||||
delete=Видалити обліковий запис
|
||||
uid=Унікальний ідентифікатор користувача
|
||||
|
||||
public_profile=Загальнодоступний профіль
|
||||
profile_desc=Ваша адреса електронної пошти є публічною і буде використовуватися для будь-яких повідомлень щодо вашого облікового запису і будь-яких веб-операцій, що здійснюються через сайт.
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=Ви не можете керувати гілками у
|
||||
settings.default_branch=Гілка за замовчуванням
|
||||
settings.default_branch_desc=Гілка за замовчанням вважається базовою для комітів, запросів злиття та онлайн редагувань.
|
||||
settings.update=Оновлення
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Гілку за замовчуванням цього репозиторію було успішно оновлено!
|
||||
settings.protected_branches=Захищені гілки
|
||||
settings.protected_branches_desc=Захистіть гілки від force push, випадкового видалення та коміттерів з білого списку.
|
||||
|
||||
@@ -254,13 +254,11 @@ form.name_pattern_not_allowed=用户名不允许 '%s' 的格式。
|
||||
profile=个人信息
|
||||
password=修改密码
|
||||
avatar=头像设置
|
||||
ssh_keys=管理 SSH 密钥
|
||||
social=社交帐号绑定
|
||||
applications=管理授权应用
|
||||
orgs=管理组织
|
||||
repos=管理仓库
|
||||
ssh_keys=SSH 密钥
|
||||
repos=仓库列表
|
||||
orgs=组织列表
|
||||
applications=授权应用
|
||||
delete=删除帐户
|
||||
uid=用户 ID
|
||||
|
||||
public_profile=公开信息
|
||||
profile_desc=您的邮箱地址将会被公开,并被用于接收帐户的所有提醒和通知。
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=您无法对空仓库进行分支管理,请先推送一
|
||||
settings.default_branch=默认分支
|
||||
settings.default_branch_desc=默认分支是被用于代码提交、合并请求和在线编辑的基准分支。
|
||||
settings.update=更新
|
||||
settings.update_default_branch_unsupported=服务器上的 Git 版本不支持修改默认分支。
|
||||
settings.update_default_branch_success=仓库默认分支更新成功!
|
||||
settings.protected_branches=保护分支
|
||||
settings.protected_branches_desc=保护分支不被强制推送、意外删除和限制代码提交白名单。
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=個人信息
|
||||
password=修改密碼
|
||||
avatar=Avatar
|
||||
ssh_keys=管理 SSH 密鑰
|
||||
social=社交帳號綁定
|
||||
applications=管理授權應用
|
||||
orgs=管理組織
|
||||
repos=Repositories
|
||||
orgs=管理組織
|
||||
applications=管理授權應用
|
||||
delete=刪除帳戶
|
||||
uid=用戶 ID
|
||||
|
||||
public_profile=公開信息
|
||||
profile_desc=您的郵箱地址將會被公開,並被用於接收帳戶的所有提醒和通知。
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=Default Branch
|
||||
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
|
||||
settings.update=Update
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
|
||||
settings.protected_branches=Protected Branches
|
||||
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
|
||||
|
||||
@@ -255,12 +255,10 @@ profile=個人信息
|
||||
password=修改密碼
|
||||
avatar=頭像
|
||||
ssh_keys=管理 SSH 密鑰
|
||||
social=社交帳號綁定
|
||||
applications=管理授權應用
|
||||
orgs=管理組織
|
||||
repos=Repositories
|
||||
orgs=管理組織
|
||||
applications=管理授權應用
|
||||
delete=刪除帳戶
|
||||
uid=用戶 ID
|
||||
|
||||
public_profile=公開信息
|
||||
profile_desc=您的郵箱地址將會被公開,並被用於接收帳戶的所有提醒和通知。
|
||||
@@ -662,6 +660,7 @@ settings.branches_bare=You cannot manage branches for bare repository. Please pu
|
||||
settings.default_branch=預設分支
|
||||
settings.default_branch_desc=預設分支是程式碼 commit、pull requests 及線上編輯的基準分支。
|
||||
settings.update=更新
|
||||
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
|
||||
settings.update_default_branch_success=這個 repository 的預設分支更新成功!
|
||||
settings.protected_branches=保護分支
|
||||
settings.protected_branches_desc=保護分支不被強制 Push、意外刪除以及限制 Commit 者白名單
|
||||
|
||||
4
gogs.go
4
gogs.go
@@ -13,10 +13,10 @@ import (
|
||||
"github.com/urfave/cli"
|
||||
|
||||
"github.com/gogits/gogs/cmd"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.11.0.0403"
|
||||
const APP_VER = "0.11.4.0405"
|
||||
|
||||
func init() {
|
||||
setting.AppVer = APP_VER
|
||||
|
||||
@@ -21,8 +21,8 @@ import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type ActionType int
|
||||
@@ -108,7 +108,7 @@ func (a *Action) GetActUserName() string {
|
||||
}
|
||||
|
||||
func (a *Action) ShortActUserName() string {
|
||||
return base.EllipsisString(a.ActUserName, 20)
|
||||
return tool.EllipsisString(a.ActUserName, 20)
|
||||
}
|
||||
|
||||
func (a *Action) GetRepoUserName() string {
|
||||
@@ -116,7 +116,7 @@ func (a *Action) GetRepoUserName() string {
|
||||
}
|
||||
|
||||
func (a *Action) ShortRepoUserName() string {
|
||||
return base.EllipsisString(a.RepoUserName, 20)
|
||||
return tool.EllipsisString(a.RepoUserName, 20)
|
||||
}
|
||||
|
||||
func (a *Action) GetRepoName() string {
|
||||
@@ -124,7 +124,7 @@ func (a *Action) GetRepoName() string {
|
||||
}
|
||||
|
||||
func (a *Action) ShortRepoName() string {
|
||||
return base.EllipsisString(a.RepoName, 33)
|
||||
return tool.EllipsisString(a.RepoName, 33)
|
||||
}
|
||||
|
||||
func (a *Action) GetRepoPath() string {
|
||||
@@ -305,7 +305,7 @@ func (push *PushCommits) AvatarLink(email string) string {
|
||||
if !ok {
|
||||
u, err := GetUserByEmail(email)
|
||||
if err != nil {
|
||||
push.avatars[email] = base.AvatarLink(email)
|
||||
push.avatars[email] = tool.AvatarLink(email)
|
||||
if !errors.IsUserNotExist(err) {
|
||||
log.Error(4, "GetUserByEmail: %v", err)
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ import (
|
||||
"github.com/go-xorm/xorm"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type NoticeType int
|
||||
@@ -128,6 +128,6 @@ func DeleteNoticesByIDs(ids []int64) error {
|
||||
if len(ids) == 0 {
|
||||
return nil
|
||||
}
|
||||
_, err := x.Where("id IN (" + strings.Join(base.Int64sToStrings(ids), ",") + ")").Delete(new(Notice))
|
||||
_, err := x.Where("id IN (" + strings.Join(tool.Int64sToStrings(ids), ",") + ")").Delete(new(Notice))
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/go-xorm/xorm"
|
||||
gouuid "github.com/satori/go.uuid"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// Attachment represent a attachment of issue/comment/release.
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
)
|
||||
|
||||
// CommentType defines whether a comment is just a simple comment, an action (like close) or a reference.
|
||||
|
||||
@@ -5,63 +5,25 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"html"
|
||||
"html/template"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/Unknwon/com"
|
||||
"github.com/sergi/go-diff/diffmatchpatch"
|
||||
"golang.org/x/net/html/charset"
|
||||
"golang.org/x/text/transform"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/template/highlight"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/template/highlight"
|
||||
)
|
||||
|
||||
type DiffLineType uint8
|
||||
|
||||
const (
|
||||
DIFF_LINE_PLAIN DiffLineType = iota + 1
|
||||
DIFF_LINE_ADD
|
||||
DIFF_LINE_DEL
|
||||
DIFF_LINE_SECTION
|
||||
)
|
||||
|
||||
type DiffFileType uint8
|
||||
|
||||
const (
|
||||
DIFF_FILE_ADD DiffFileType = iota + 1
|
||||
DIFF_FILE_CHANGE
|
||||
DIFF_FILE_DEL
|
||||
DIFF_FILE_RENAME
|
||||
)
|
||||
|
||||
type DiffLine struct {
|
||||
LeftIdx int
|
||||
RightIdx int
|
||||
Type DiffLineType
|
||||
Content string
|
||||
}
|
||||
|
||||
func (d *DiffLine) GetType() int {
|
||||
return int(d.Type)
|
||||
}
|
||||
|
||||
type DiffSection struct {
|
||||
Name string
|
||||
Lines []*DiffLine
|
||||
*git.DiffSection
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -70,24 +32,24 @@ var (
|
||||
codeTagSuffix = []byte("</span>")
|
||||
)
|
||||
|
||||
func diffToHTML(diffs []diffmatchpatch.Diff, lineType DiffLineType) template.HTML {
|
||||
func diffToHTML(diffs []diffmatchpatch.Diff, lineType git.DiffLineType) template.HTML {
|
||||
buf := bytes.NewBuffer(nil)
|
||||
|
||||
// Reproduce signs which are cutted for inline diff before.
|
||||
switch lineType {
|
||||
case DIFF_LINE_ADD:
|
||||
case git.DIFF_LINE_ADD:
|
||||
buf.WriteByte('+')
|
||||
case DIFF_LINE_DEL:
|
||||
case git.DIFF_LINE_DEL:
|
||||
buf.WriteByte('-')
|
||||
}
|
||||
|
||||
for i := range diffs {
|
||||
switch {
|
||||
case diffs[i].Type == diffmatchpatch.DiffInsert && lineType == DIFF_LINE_ADD:
|
||||
case diffs[i].Type == diffmatchpatch.DiffInsert && lineType == git.DIFF_LINE_ADD:
|
||||
buf.Write(addedCodePrefix)
|
||||
buf.WriteString(html.EscapeString(diffs[i].Text))
|
||||
buf.Write(codeTagSuffix)
|
||||
case diffs[i].Type == diffmatchpatch.DiffDelete && lineType == DIFF_LINE_DEL:
|
||||
case diffs[i].Type == diffmatchpatch.DiffDelete && lineType == git.DIFF_LINE_DEL:
|
||||
buf.Write(removedCodePrefix)
|
||||
buf.WriteString(html.EscapeString(diffs[i].Text))
|
||||
buf.Write(codeTagSuffix)
|
||||
@@ -99,77 +61,34 @@ func diffToHTML(diffs []diffmatchpatch.Diff, lineType DiffLineType) template.HTM
|
||||
return template.HTML(buf.Bytes())
|
||||
}
|
||||
|
||||
// get an specific line by type (add or del) and file line number
|
||||
func (diffSection *DiffSection) GetLine(lineType DiffLineType, idx int) *DiffLine {
|
||||
var (
|
||||
difference = 0
|
||||
addCount = 0
|
||||
delCount = 0
|
||||
matchDiffLine *DiffLine
|
||||
)
|
||||
|
||||
LOOP:
|
||||
for _, diffLine := range diffSection.Lines {
|
||||
switch diffLine.Type {
|
||||
case DIFF_LINE_ADD:
|
||||
addCount++
|
||||
case DIFF_LINE_DEL:
|
||||
delCount++
|
||||
default:
|
||||
if matchDiffLine != nil {
|
||||
break LOOP
|
||||
}
|
||||
difference = diffLine.RightIdx - diffLine.LeftIdx
|
||||
addCount = 0
|
||||
delCount = 0
|
||||
}
|
||||
|
||||
switch lineType {
|
||||
case DIFF_LINE_DEL:
|
||||
if diffLine.RightIdx == 0 && diffLine.LeftIdx == idx-difference {
|
||||
matchDiffLine = diffLine
|
||||
}
|
||||
case DIFF_LINE_ADD:
|
||||
if diffLine.LeftIdx == 0 && diffLine.RightIdx == idx+difference {
|
||||
matchDiffLine = diffLine
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if addCount == delCount {
|
||||
return matchDiffLine
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var diffMatchPatch = diffmatchpatch.New()
|
||||
|
||||
func init() {
|
||||
diffMatchPatch.DiffEditCost = 100
|
||||
}
|
||||
|
||||
// computes inline diff for the given line
|
||||
func (diffSection *DiffSection) GetComputedInlineDiffFor(diffLine *DiffLine) template.HTML {
|
||||
// ComputedInlineDiffFor computes inline diff for the given line.
|
||||
func (diffSection *DiffSection) ComputedInlineDiffFor(diffLine *git.DiffLine) template.HTML {
|
||||
if setting.Git.DisableDiffHighlight {
|
||||
return template.HTML(html.EscapeString(diffLine.Content[1:]))
|
||||
}
|
||||
var (
|
||||
compareDiffLine *DiffLine
|
||||
compareDiffLine *git.DiffLine
|
||||
diff1 string
|
||||
diff2 string
|
||||
)
|
||||
|
||||
// try to find equivalent diff line. ignore, otherwise
|
||||
switch diffLine.Type {
|
||||
case DIFF_LINE_ADD:
|
||||
compareDiffLine = diffSection.GetLine(DIFF_LINE_DEL, diffLine.RightIdx)
|
||||
case git.DIFF_LINE_ADD:
|
||||
compareDiffLine = diffSection.Line(git.DIFF_LINE_DEL, diffLine.RightIdx)
|
||||
if compareDiffLine == nil {
|
||||
return template.HTML(html.EscapeString(diffLine.Content))
|
||||
}
|
||||
diff1 = compareDiffLine.Content
|
||||
diff2 = diffLine.Content
|
||||
case DIFF_LINE_DEL:
|
||||
compareDiffLine = diffSection.GetLine(DIFF_LINE_ADD, diffLine.LeftIdx)
|
||||
case git.DIFF_LINE_DEL:
|
||||
compareDiffLine = diffSection.Line(git.DIFF_LINE_ADD, diffLine.LeftIdx)
|
||||
if compareDiffLine == nil {
|
||||
return template.HTML(html.EscapeString(diffLine.Content))
|
||||
}
|
||||
@@ -186,336 +105,90 @@ func (diffSection *DiffSection) GetComputedInlineDiffFor(diffLine *DiffLine) tem
|
||||
}
|
||||
|
||||
type DiffFile struct {
|
||||
Name string
|
||||
OldName string
|
||||
Index string // 40-byte SHA, Changed/New: new SHA; Deleted: old SHA
|
||||
Addition, Deletion int
|
||||
Type DiffFileType
|
||||
IsCreated bool
|
||||
IsDeleted bool
|
||||
IsBin bool
|
||||
IsRenamed bool
|
||||
IsSubmodule bool
|
||||
Sections []*DiffSection
|
||||
IsIncomplete bool
|
||||
*git.DiffFile
|
||||
Sections []*DiffSection
|
||||
}
|
||||
|
||||
func (diffFile *DiffFile) GetType() int {
|
||||
return int(diffFile.Type)
|
||||
}
|
||||
|
||||
func (diffFile *DiffFile) GetHighlightClass() string {
|
||||
func (diffFile *DiffFile) HighlightClass() string {
|
||||
return highlight.FileNameToHighlightClass(diffFile.Name)
|
||||
}
|
||||
|
||||
type Diff struct {
|
||||
TotalAddition, TotalDeletion int
|
||||
Files []*DiffFile
|
||||
IsIncomplete bool
|
||||
*git.Diff
|
||||
Files []*DiffFile
|
||||
}
|
||||
|
||||
func (diff *Diff) NumFiles() int {
|
||||
return len(diff.Files)
|
||||
}
|
||||
|
||||
const DIFF_HEAD = "diff --git "
|
||||
|
||||
// TODO: move this function to gogits/git-module
|
||||
func ParsePatch(maxLines, maxLineCharacteres, maxFiles int, reader io.Reader) (*Diff, error) {
|
||||
var (
|
||||
diff = &Diff{Files: make([]*DiffFile, 0)}
|
||||
|
||||
curFile *DiffFile
|
||||
curSection = &DiffSection{
|
||||
Lines: make([]*DiffLine, 0, 10),
|
||||
}
|
||||
|
||||
leftLine, rightLine int
|
||||
lineCount int
|
||||
curFileLinesCount int
|
||||
)
|
||||
|
||||
input := bufio.NewReader(reader)
|
||||
isEOF := false
|
||||
for !isEOF {
|
||||
line, err := input.ReadString('\n')
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
isEOF = true
|
||||
} else {
|
||||
return nil, fmt.Errorf("ReadString: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if len(line) > 0 && line[len(line)-1] == '\n' {
|
||||
// Remove line break.
|
||||
line = line[:len(line)-1]
|
||||
}
|
||||
|
||||
if strings.HasPrefix(line, "+++ ") || strings.HasPrefix(line, "--- ") || len(line) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
curFileLinesCount++
|
||||
lineCount++
|
||||
|
||||
// Diff data too large, we only show the first about maxlines lines
|
||||
if curFileLinesCount >= maxLines || len(line) >= maxLineCharacteres {
|
||||
curFile.IsIncomplete = true
|
||||
}
|
||||
|
||||
switch {
|
||||
case line[0] == ' ':
|
||||
diffLine := &DiffLine{Type: DIFF_LINE_PLAIN, Content: line, LeftIdx: leftLine, RightIdx: rightLine}
|
||||
leftLine++
|
||||
rightLine++
|
||||
curSection.Lines = append(curSection.Lines, diffLine)
|
||||
continue
|
||||
case line[0] == '@':
|
||||
curSection = &DiffSection{}
|
||||
curFile.Sections = append(curFile.Sections, curSection)
|
||||
ss := strings.Split(line, "@@")
|
||||
diffLine := &DiffLine{Type: DIFF_LINE_SECTION, Content: line}
|
||||
curSection.Lines = append(curSection.Lines, diffLine)
|
||||
|
||||
// Parse line number.
|
||||
ranges := strings.Split(ss[1][1:], " ")
|
||||
leftLine, _ = com.StrTo(strings.Split(ranges[0], ",")[0][1:]).Int()
|
||||
if len(ranges) > 1 {
|
||||
rightLine, _ = com.StrTo(strings.Split(ranges[1], ",")[0]).Int()
|
||||
} else {
|
||||
log.Warn("Parse line number failed: %v", line)
|
||||
rightLine = leftLine
|
||||
}
|
||||
continue
|
||||
case line[0] == '+':
|
||||
curFile.Addition++
|
||||
diff.TotalAddition++
|
||||
diffLine := &DiffLine{Type: DIFF_LINE_ADD, Content: line, RightIdx: rightLine}
|
||||
rightLine++
|
||||
curSection.Lines = append(curSection.Lines, diffLine)
|
||||
continue
|
||||
case line[0] == '-':
|
||||
curFile.Deletion++
|
||||
diff.TotalDeletion++
|
||||
diffLine := &DiffLine{Type: DIFF_LINE_DEL, Content: line, LeftIdx: leftLine}
|
||||
if leftLine > 0 {
|
||||
leftLine++
|
||||
}
|
||||
curSection.Lines = append(curSection.Lines, diffLine)
|
||||
case strings.HasPrefix(line, "Binary"):
|
||||
curFile.IsBin = true
|
||||
continue
|
||||
}
|
||||
|
||||
// Get new file.
|
||||
if strings.HasPrefix(line, DIFF_HEAD) {
|
||||
middle := -1
|
||||
|
||||
// Note: In case file name is surrounded by double quotes (it happens only in git-shell).
|
||||
// e.g. diff --git "a/xxx" "b/xxx"
|
||||
hasQuote := line[len(DIFF_HEAD)] == '"'
|
||||
if hasQuote {
|
||||
middle = strings.Index(line, ` "b/`)
|
||||
} else {
|
||||
middle = strings.Index(line, " b/")
|
||||
}
|
||||
|
||||
beg := len(DIFF_HEAD)
|
||||
a := line[beg+2 : middle]
|
||||
b := line[middle+3:]
|
||||
if hasQuote {
|
||||
a = string(git.UnescapeChars([]byte(a[1 : len(a)-1])))
|
||||
b = string(git.UnescapeChars([]byte(b[1 : len(b)-1])))
|
||||
}
|
||||
|
||||
curFile = &DiffFile{
|
||||
Name: a,
|
||||
Type: DIFF_FILE_CHANGE,
|
||||
Sections: make([]*DiffSection, 0, 10),
|
||||
}
|
||||
diff.Files = append(diff.Files, curFile)
|
||||
if len(diff.Files) >= maxFiles {
|
||||
diff.IsIncomplete = true
|
||||
io.Copy(ioutil.Discard, reader)
|
||||
break
|
||||
}
|
||||
curFileLinesCount = 0
|
||||
|
||||
// Check file diff type and submodule.
|
||||
CHECK_TYPE:
|
||||
for {
|
||||
line, err := input.ReadString('\n')
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
isEOF = true
|
||||
} else {
|
||||
return nil, fmt.Errorf("ReadString: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
switch {
|
||||
case strings.HasPrefix(line, "new file"):
|
||||
curFile.Type = DIFF_FILE_ADD
|
||||
curFile.IsCreated = true
|
||||
curFile.IsSubmodule = strings.HasSuffix(line, " 160000\n")
|
||||
case strings.HasPrefix(line, "deleted"):
|
||||
curFile.Type = DIFF_FILE_DEL
|
||||
curFile.IsDeleted = true
|
||||
curFile.IsSubmodule = strings.HasSuffix(line, " 160000\n")
|
||||
case strings.HasPrefix(line, "index"):
|
||||
if curFile.IsDeleted {
|
||||
curFile.Index = line[6:46]
|
||||
} else if len(line) >= 88 {
|
||||
curFile.Index = line[49:88]
|
||||
} else {
|
||||
curFile.Index = curFile.Name
|
||||
}
|
||||
break CHECK_TYPE
|
||||
case strings.HasPrefix(line, "similarity index 100%"):
|
||||
curFile.Type = DIFF_FILE_RENAME
|
||||
curFile.IsRenamed = true
|
||||
curFile.OldName = curFile.Name
|
||||
curFile.Name = b
|
||||
curFile.Index = b
|
||||
break CHECK_TYPE
|
||||
}
|
||||
}
|
||||
}
|
||||
func NewDiff(gitDiff *git.Diff) *Diff {
|
||||
diff := &Diff{
|
||||
Diff: gitDiff,
|
||||
Files: make([]*DiffFile, gitDiff.NumFiles()),
|
||||
}
|
||||
|
||||
// FIXME: detect encoding while parsing.
|
||||
var buf bytes.Buffer
|
||||
for _, f := range diff.Files {
|
||||
for i := range gitDiff.Files {
|
||||
buf.Reset()
|
||||
for _, sec := range f.Sections {
|
||||
for _, l := range sec.Lines {
|
||||
buf.WriteString(l.Content)
|
||||
|
||||
diff.Files[i] = &DiffFile{
|
||||
DiffFile: gitDiff.Files[i],
|
||||
Sections: make([]*DiffSection, gitDiff.Files[i].NumSections()),
|
||||
}
|
||||
|
||||
for j := range gitDiff.Files[i].Sections {
|
||||
diff.Files[i].Sections[j] = &DiffSection{
|
||||
DiffSection: gitDiff.Files[i].Sections[j],
|
||||
}
|
||||
|
||||
for k := range diff.Files[i].Sections[j].Lines {
|
||||
buf.WriteString(diff.Files[i].Sections[j].Lines[k].Content)
|
||||
buf.WriteString("\n")
|
||||
}
|
||||
}
|
||||
charsetLabel, err := base.DetectEncoding(buf.Bytes())
|
||||
|
||||
charsetLabel, err := tool.DetectEncoding(buf.Bytes())
|
||||
if charsetLabel != "UTF-8" && err == nil {
|
||||
encoding, _ := charset.Lookup(charsetLabel)
|
||||
if encoding != nil {
|
||||
d := encoding.NewDecoder()
|
||||
for _, sec := range f.Sections {
|
||||
for _, l := range sec.Lines {
|
||||
if c, _, err := transform.String(d, l.Content); err == nil {
|
||||
l.Content = c
|
||||
for j := range diff.Files[i].Sections {
|
||||
for k := range diff.Files[i].Sections[j].Lines {
|
||||
if c, _, err := transform.String(d, diff.Files[i].Sections[j].Lines[k].Content); err == nil {
|
||||
diff.Files[i].Sections[j].Lines[k].Content = c
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return diff, nil
|
||||
|
||||
return diff
|
||||
}
|
||||
|
||||
func ParsePatch(maxLines, maxLineCharacteres, maxFiles int, reader io.Reader) (*Diff, error) {
|
||||
done := make(chan error)
|
||||
var gitDiff *git.Diff
|
||||
go func() {
|
||||
gitDiff = git.ParsePatch(done, maxLines, maxLineCharacteres, maxFiles, reader)
|
||||
}()
|
||||
|
||||
if err := <-done; err != nil {
|
||||
return nil, fmt.Errorf("ParsePatch: %v", err)
|
||||
}
|
||||
return NewDiff(gitDiff), nil
|
||||
}
|
||||
|
||||
func GetDiffRange(repoPath, beforeCommitID, afterCommitID string, maxLines, maxLineCharacteres, maxFiles int) (*Diff, error) {
|
||||
gitRepo, err := git.OpenRepository(repoPath)
|
||||
gitDiff, err := git.GetDiffRange(repoPath, beforeCommitID, afterCommitID, maxLines, maxLineCharacteres, maxFiles)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("GetDiffRange: %v", err)
|
||||
}
|
||||
|
||||
commit, err := gitRepo.GetCommit(afterCommitID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var cmd *exec.Cmd
|
||||
// if "after" commit given
|
||||
if len(beforeCommitID) == 0 {
|
||||
// First commit of repository.
|
||||
if commit.ParentCount() == 0 {
|
||||
cmd = exec.Command("git", "show", "--full-index", afterCommitID)
|
||||
} else {
|
||||
c, _ := commit.Parent(0)
|
||||
cmd = exec.Command("git", "diff", "--full-index", "-M", c.ID.String(), afterCommitID)
|
||||
}
|
||||
} else {
|
||||
cmd = exec.Command("git", "diff", "--full-index", "-M", beforeCommitID, afterCommitID)
|
||||
}
|
||||
cmd.Dir = repoPath
|
||||
cmd.Stderr = os.Stderr
|
||||
|
||||
stdout, err := cmd.StdoutPipe()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("StdoutPipe: %v", err)
|
||||
}
|
||||
|
||||
if err = cmd.Start(); err != nil {
|
||||
return nil, fmt.Errorf("Start: %v", err)
|
||||
}
|
||||
|
||||
pid := process.Add(fmt.Sprintf("GetDiffRange [repo_path: %s]", repoPath), cmd)
|
||||
defer process.Remove(pid)
|
||||
|
||||
diff, err := ParsePatch(maxLines, maxLineCharacteres, maxFiles, stdout)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("ParsePatch: %v", err)
|
||||
}
|
||||
|
||||
if err = cmd.Wait(); err != nil {
|
||||
return nil, fmt.Errorf("Wait: %v", err)
|
||||
}
|
||||
|
||||
return diff, nil
|
||||
}
|
||||
|
||||
type RawDiffType string
|
||||
|
||||
const (
|
||||
RAW_DIFF_NORMAL RawDiffType = "diff"
|
||||
RAW_DIFF_PATCH RawDiffType = "patch"
|
||||
)
|
||||
|
||||
// GetRawDiff dumps diff results of repository in given commit ID to io.Writer.
|
||||
// TODO: move this function to gogits/git-module
|
||||
func GetRawDiff(repoPath, commitID string, diffType RawDiffType, writer io.Writer) error {
|
||||
repo, err := git.OpenRepository(repoPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("OpenRepository: %v", err)
|
||||
}
|
||||
|
||||
commit, err := repo.GetCommit(commitID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetCommit: %v", err)
|
||||
}
|
||||
|
||||
var cmd *exec.Cmd
|
||||
switch diffType {
|
||||
case RAW_DIFF_NORMAL:
|
||||
if commit.ParentCount() == 0 {
|
||||
cmd = exec.Command("git", "show", commitID)
|
||||
} else {
|
||||
c, _ := commit.Parent(0)
|
||||
cmd = exec.Command("git", "diff", "-M", c.ID.String(), commitID)
|
||||
}
|
||||
case RAW_DIFF_PATCH:
|
||||
if commit.ParentCount() == 0 {
|
||||
cmd = exec.Command("git", "format-patch", "--no-signature", "--stdout", "--root", commitID)
|
||||
} else {
|
||||
c, _ := commit.Parent(0)
|
||||
query := fmt.Sprintf("%s...%s", commitID, c.ID.String())
|
||||
cmd = exec.Command("git", "format-patch", "--no-signature", "--stdout", query)
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("invalid diffType: %s", diffType)
|
||||
}
|
||||
|
||||
stderr := new(bytes.Buffer)
|
||||
|
||||
cmd.Dir = repoPath
|
||||
cmd.Stdout = writer
|
||||
cmd.Stderr = stderr
|
||||
|
||||
if err = cmd.Run(); err != nil {
|
||||
return fmt.Errorf("Run: %v - %s", err, stderr)
|
||||
}
|
||||
return nil
|
||||
return NewDiff(gitDiff), nil
|
||||
}
|
||||
|
||||
func GetDiffCommit(repoPath, commitID string, maxLines, maxLineCharacteres, maxFiles int) (*Diff, error) {
|
||||
return GetDiffRange(repoPath, "", commitID, maxLines, maxLineCharacteres, maxFiles)
|
||||
gitDiff, err := git.GetDiffCommit(repoPath, commitID, maxLines, maxLineCharacteres, maxFiles)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("GetDiffCommit: %v", err)
|
||||
}
|
||||
return NewDiff(gitDiff), nil
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
// Copyright 2016 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
dmp "github.com/sergi/go-diff/diffmatchpatch"
|
||||
"html/template"
|
||||
"testing"
|
||||
|
||||
"github.com/gogits/git-module"
|
||||
dmp "github.com/sergi/go-diff/diffmatchpatch"
|
||||
)
|
||||
|
||||
func assertEqual(t *testing.T, s1 string, s2 template.HTML) {
|
||||
@@ -12,24 +18,24 @@ func assertEqual(t *testing.T, s1 string, s2 template.HTML) {
|
||||
}
|
||||
}
|
||||
|
||||
func assertLineEqual(t *testing.T, d1 *DiffLine, d2 *DiffLine) {
|
||||
func assertLineEqual(t *testing.T, d1 *git.DiffLine, d2 *git.DiffLine) {
|
||||
if d1 != d2 {
|
||||
t.Errorf("%v should be equal %v", d1, d2)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDiffToHTML(t *testing.T) {
|
||||
func Test_diffToHTML(t *testing.T) {
|
||||
assertEqual(t, "+foo <span class=\"added-code\">bar</span> biz", diffToHTML([]dmp.Diff{
|
||||
dmp.Diff{dmp.DiffEqual, "foo "},
|
||||
dmp.Diff{dmp.DiffInsert, "bar"},
|
||||
dmp.Diff{dmp.DiffDelete, " baz"},
|
||||
dmp.Diff{dmp.DiffEqual, " biz"},
|
||||
}, DIFF_LINE_ADD))
|
||||
}, git.DIFF_LINE_ADD))
|
||||
|
||||
assertEqual(t, "-foo <span class=\"removed-code\">bar</span> biz", diffToHTML([]dmp.Diff{
|
||||
dmp.Diff{dmp.DiffEqual, "foo "},
|
||||
dmp.Diff{dmp.DiffDelete, "bar"},
|
||||
dmp.Diff{dmp.DiffInsert, " baz"},
|
||||
dmp.Diff{dmp.DiffEqual, " biz"},
|
||||
}, DIFF_LINE_DEL))
|
||||
}, git.DIFF_LINE_DEL))
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -1213,7 +1213,7 @@ func GetIssueStats(opts *IssueStatsOptions) *IssueStats {
|
||||
sess := x.Where("issue.repo_id = ?", opts.RepoID).And("is_pull = ?", opts.IsPull)
|
||||
|
||||
if len(opts.Labels) > 0 && opts.Labels != "0" {
|
||||
labelIDs := base.StringsToInt64s(strings.Split(opts.Labels, ","))
|
||||
labelIDs := tool.StringsToInt64s(strings.Split(opts.Labels, ","))
|
||||
if len(labelIDs) > 0 {
|
||||
sess.Join("INNER", "issue_label", "issue.id = issue_id").In("label_id", labelIDs)
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
)
|
||||
|
||||
var labelColorPattern = regexp.MustCompile("#([a-fA-F0-9]{6})")
|
||||
@@ -138,7 +138,7 @@ func GetLabelOfRepoByID(repoID, labelID int64) (*Label, error) {
|
||||
// it silently ignores label IDs that are not belong to the repository.
|
||||
func GetLabelsInRepoByIDs(repoID int64, labelIDs []int64) ([]*Label, error) {
|
||||
labels := make([]*Label, 0, len(labelIDs))
|
||||
return labels, x.Where("repo_id = ?", repoID).In("id", base.Int64sToStrings(labelIDs)).Asc("name").Find(&labels)
|
||||
return labels, x.Where("repo_id = ?", repoID).In("id", tool.Int64sToStrings(labelIDs)).Asc("name").Find(&labels)
|
||||
}
|
||||
|
||||
// GetLabelsByRepoID returns all labels that belong to given repository by ID.
|
||||
@@ -161,7 +161,7 @@ func getLabelsByIssueID(e Engine, issueID int64) ([]*Label, error) {
|
||||
}
|
||||
|
||||
labels := make([]*Label, 0, len(labelIDs))
|
||||
return labels, e.Where("id > 0").In("id", base.Int64sToStrings(labelIDs)).Asc("name").Find(&labels)
|
||||
return labels, e.Where("id > 0").In("id", tool.Int64sToStrings(labelIDs)).Asc("name").Find(&labels)
|
||||
}
|
||||
|
||||
// GetLabelsByIssueID returns all labels that belong to given issue by ID.
|
||||
|
||||
@@ -10,9 +10,9 @@ import (
|
||||
"github.com/Unknwon/com"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/mailer"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/mailer"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func (issue *Issue) MailSubject() string {
|
||||
|
||||
@@ -20,8 +20,8 @@ import (
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/auth/ldap"
|
||||
"github.com/gogits/gogs/modules/auth/pam"
|
||||
"github.com/gogits/gogs/pkg/auth/ldap"
|
||||
"github.com/gogits/gogs/pkg/auth/pam"
|
||||
)
|
||||
|
||||
type LoginType int
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/go-xorm/xorm"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
)
|
||||
|
||||
const _MIN_DB_VER = 10
|
||||
@@ -105,7 +105,7 @@ Please save following instructions to somewhere and start working:
|
||||
Once finished downloading,
|
||||
|
||||
1. Extract the archive and to upgrade steps as usual.
|
||||
2. Run it once. To verify, you should see some migration traces.
|
||||
2. Run it once. To verify, you should see some migration traces.
|
||||
3. Once it starts web server successfully, stop it.
|
||||
4. Now it's time to put back the release archive you originally intent to upgrade.
|
||||
5. Enjoy!
|
||||
@@ -159,10 +159,10 @@ func generateOrgRandsAndSalt(x *xorm.Engine) (err error) {
|
||||
}
|
||||
|
||||
for _, org := range orgs {
|
||||
if org.Rands, err = base.GetRandomString(10); err != nil {
|
||||
if org.Rands, err = tool.GetRandomString(10); err != nil {
|
||||
return err
|
||||
}
|
||||
if org.Salt, err = base.GetRandomString(10); err != nil {
|
||||
if org.Salt, err = tool.GetRandomString(10); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err = sess.Id(org.ID).Update(org); err != nil {
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/go-xorm/xorm"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func generateAndMigrateGitHooks(x *xorm.Engine) (err error) {
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func updateRepositorySizes(x *xorm.Engine) (err error) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// Milestone represents a milestone of repository.
|
||||
|
||||
@@ -6,6 +6,7 @@ package models
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -17,9 +18,9 @@ import (
|
||||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/sync"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/sync"
|
||||
)
|
||||
|
||||
var MirrorQueue = sync.NewUniqueQueue(setting.Repository.MirrorQueueLength)
|
||||
@@ -70,6 +71,46 @@ func (m *Mirror) ScheduleNextUpdate() {
|
||||
m.NextUpdate = time.Now().Add(time.Duration(m.Interval) * time.Hour)
|
||||
}
|
||||
|
||||
// findPasswordInMirrorAddress returns start (inclusive) and end index (exclusive)
|
||||
// of password portion of credentials in given mirror address.
|
||||
// It returns a boolean value to indicate whether password portion is found.
|
||||
func findPasswordInMirrorAddress(addr string) (start int, end int, found bool) {
|
||||
// Find end of credentials (start of path)
|
||||
end = strings.LastIndex(addr, "@")
|
||||
if end == -1 {
|
||||
return -1, -1, false
|
||||
}
|
||||
|
||||
// Find delimiter of credentials (end of username)
|
||||
start = strings.Index(addr, "://")
|
||||
if start == -1 {
|
||||
return -1, -1, false
|
||||
}
|
||||
start += 3
|
||||
delim := strings.Index(addr[start:], ":")
|
||||
if delim == -1 {
|
||||
return -1, -1, false
|
||||
}
|
||||
delim += 1
|
||||
|
||||
if start+delim >= end {
|
||||
return -1, -1, false // No password portion presented
|
||||
}
|
||||
|
||||
return start + delim, end, true
|
||||
}
|
||||
|
||||
// unescapeMirrorCredentials returns mirror address with unescaped credentials.
|
||||
func unescapeMirrorCredentials(addr string) string {
|
||||
start, end, found := findPasswordInMirrorAddress(addr)
|
||||
if !found {
|
||||
return addr
|
||||
}
|
||||
|
||||
password, _ := url.QueryUnescape(addr[start:end])
|
||||
return addr[:start] + password + addr[end:]
|
||||
}
|
||||
|
||||
func (m *Mirror) readAddress() {
|
||||
if len(m.address) > 0 {
|
||||
return
|
||||
@@ -83,10 +124,10 @@ func (m *Mirror) readAddress() {
|
||||
m.address = cfg.Section("remote \"origin\"").Key("url").Value()
|
||||
}
|
||||
|
||||
// HandleCloneUserCredentials replaces user credentials from HTTP/HTTPS URL
|
||||
// HandleMirrorCredentials replaces user credentials from HTTP/HTTPS URL
|
||||
// with placeholder <credentials>.
|
||||
// It will fail for any other forms of clone addresses.
|
||||
func HandleCloneUserCredentials(url string, mosaics bool) string {
|
||||
// It returns original string if protocol is not HTTP/HTTPS.
|
||||
func HandleMirrorCredentials(url string, mosaics bool) string {
|
||||
i := strings.Index(url, "@")
|
||||
if i == -1 {
|
||||
return url
|
||||
@@ -104,21 +145,37 @@ func HandleCloneUserCredentials(url string, mosaics bool) string {
|
||||
// Address returns mirror address from Git repository config without credentials.
|
||||
func (m *Mirror) Address() string {
|
||||
m.readAddress()
|
||||
return HandleCloneUserCredentials(m.address, false)
|
||||
return HandleMirrorCredentials(m.address, false)
|
||||
}
|
||||
|
||||
// MosaicsAddress returns mirror address from Git repository config with credentials under mosaics.
|
||||
func (m *Mirror) MosaicsAddress() string {
|
||||
m.readAddress()
|
||||
return HandleCloneUserCredentials(m.address, true)
|
||||
return HandleMirrorCredentials(m.address, true)
|
||||
}
|
||||
|
||||
// FullAddress returns mirror address from Git repository config.
|
||||
func (m *Mirror) FullAddress() string {
|
||||
// RawAddress returns raw mirror address directly from Git repository config.
|
||||
func (m *Mirror) RawAddress() string {
|
||||
m.readAddress()
|
||||
return m.address
|
||||
}
|
||||
|
||||
// FullAddress returns mirror address from Git repository config with unescaped credentials.
|
||||
func (m *Mirror) FullAddress() string {
|
||||
m.readAddress()
|
||||
return unescapeMirrorCredentials(m.address)
|
||||
}
|
||||
|
||||
// escapeCredentials returns mirror address with escaped credentials.
|
||||
func escapeMirrorCredentials(addr string) string {
|
||||
start, end, found := findPasswordInMirrorAddress(addr)
|
||||
if !found {
|
||||
return addr
|
||||
}
|
||||
|
||||
return addr[:start] + url.QueryEscape(addr[start:end]) + addr[end:]
|
||||
}
|
||||
|
||||
// SaveAddress writes new address to Git repository config.
|
||||
func (m *Mirror) SaveAddress(addr string) error {
|
||||
configPath := m.Repo.GitConfigPath()
|
||||
@@ -127,7 +184,7 @@ func (m *Mirror) SaveAddress(addr string) error {
|
||||
return fmt.Errorf("Load: %v", err)
|
||||
}
|
||||
|
||||
cfg.Section("remote \"origin\"").Key("url").SetValue(addr)
|
||||
cfg.Section("remote \"origin\"").Key("url").SetValue(escapeMirrorCredentials(addr))
|
||||
return cfg.SaveToIndent(configPath, "\t")
|
||||
}
|
||||
|
||||
@@ -140,7 +197,7 @@ func (m *Mirror) runSync() bool {
|
||||
// Do a fast-fail testing against on repository URL to ensure it is accessible under
|
||||
// good condition to prevent long blocking on URL resolution without syncing anything.
|
||||
if !git.IsRepoURLAccessible(git.NetworkOptions{
|
||||
URL: m.FullAddress(),
|
||||
URL: m.RawAddress(),
|
||||
Timeout: 10 * time.Second,
|
||||
}) {
|
||||
desc := fmt.Sprintf("Source URL of mirror repository '%s' is not accessible: %s", m.Repo.FullName(), m.MosaicsAddress())
|
||||
|
||||
74
models/mirror_test.go
Normal file
74
models/mirror_test.go
Normal file
@@ -0,0 +1,74 @@
|
||||
// Copyright 2017 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
func Test_findPasswordInMirrorAddress(t *testing.T) {
|
||||
Convey("Find password portion in mirror address", t, func() {
|
||||
testCases := []struct {
|
||||
addr string
|
||||
start, end int
|
||||
found bool
|
||||
password string
|
||||
}{
|
||||
{"http://localhost:3000/user/repo.git", -1, -1, false, ""},
|
||||
{"http://user@localhost:3000/user/repo.git", -1, -1, false, ""},
|
||||
{"http://user:@localhost:3000/user/repo.git", -1, -1, false, ""},
|
||||
{"http://user:password@localhost:3000/user/repo.git", 12, 20, true, "password"},
|
||||
{"http://username:my%3Asecure%3Bpassword@localhost:3000/user/repo.git", 16, 38, true, "my%3Asecure%3Bpassword"},
|
||||
{"http://username:my%40secure%23password@localhost:3000/user/repo.git", 16, 38, true, "my%40secure%23password"},
|
||||
{"http://username:@@localhost:3000/user/repo.git", 16, 17, true, "@"},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
start, end, found := findPasswordInMirrorAddress(tc.addr)
|
||||
So(start, ShouldEqual, tc.start)
|
||||
So(end, ShouldEqual, tc.end)
|
||||
So(found, ShouldEqual, tc.found)
|
||||
if found {
|
||||
So(tc.addr[start:end], ShouldEqual, tc.password)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func Test_unescapeMirrorCredentials(t *testing.T) {
|
||||
Convey("Escape credentials in mirror address", t, func() {
|
||||
testCases := []string{
|
||||
"http://localhost:3000/user/repo.git", "http://localhost:3000/user/repo.git",
|
||||
"http://user@localhost:3000/user/repo.git", "http://user@localhost:3000/user/repo.git",
|
||||
"http://user:@localhost:3000/user/repo.git", "http://user:@localhost:3000/user/repo.git",
|
||||
"http://user:password@localhost:3000/user/repo.git", "http://user:password@localhost:3000/user/repo.git",
|
||||
"http://user:my%3Asecure%3Bpassword@localhost:3000/user/repo.git", "http://user:my:secure;password@localhost:3000/user/repo.git",
|
||||
"http://user:my%40secure%23password@localhost:3000/user/repo.git", "http://user:my@secure#password@localhost:3000/user/repo.git",
|
||||
}
|
||||
|
||||
for i := 0; i < len(testCases); i += 2 {
|
||||
So(unescapeMirrorCredentials(testCases[i]), ShouldEqual, testCases[i+1])
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func Test_escapeMirrorCredentials(t *testing.T) {
|
||||
Convey("Escape credentials in mirror address", t, func() {
|
||||
testCases := []string{
|
||||
"http://localhost:3000/user/repo.git", "http://localhost:3000/user/repo.git",
|
||||
"http://user@localhost:3000/user/repo.git", "http://user@localhost:3000/user/repo.git",
|
||||
"http://user:@localhost:3000/user/repo.git", "http://user:@localhost:3000/user/repo.git",
|
||||
"http://user:password@localhost:3000/user/repo.git", "http://user:password@localhost:3000/user/repo.git",
|
||||
"http://user:my:secure;password@localhost:3000/user/repo.git", "http://user:my%3Asecure%3Bpassword@localhost:3000/user/repo.git",
|
||||
"http://user:my@secure#password@localhost:3000/user/repo.git", "http://user:my%40secure%23password@localhost:3000/user/repo.git",
|
||||
}
|
||||
|
||||
for i := 0; i < len(testCases); i += 2 {
|
||||
So(escapeMirrorCredentials(testCases[i]), ShouldEqual, testCases[i+1])
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/models/migrations"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// Engine represents a xorm engine or session.
|
||||
|
||||
@@ -19,9 +19,9 @@ import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/sync"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/sync"
|
||||
)
|
||||
|
||||
var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength)
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
)
|
||||
|
||||
// Release represents a release of repository.
|
||||
|
||||
@@ -27,11 +27,11 @@ import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/bindata"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/sync"
|
||||
"github.com/gogits/gogs/pkg/bindata"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/sync"
|
||||
)
|
||||
|
||||
var repoWorkingPool = sync.NewExclusivePool()
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/Unknwon/com"
|
||||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
)
|
||||
|
||||
type Branch struct {
|
||||
@@ -149,10 +149,10 @@ func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whit
|
||||
}
|
||||
|
||||
hasUsersChanged := false
|
||||
validUserIDs := base.StringsToInt64s(strings.Split(protectBranch.WhitelistUserIDs, ","))
|
||||
validUserIDs := tool.StringsToInt64s(strings.Split(protectBranch.WhitelistUserIDs, ","))
|
||||
if protectBranch.WhitelistUserIDs != whitelistUserIDs {
|
||||
hasUsersChanged = true
|
||||
userIDs := base.StringsToInt64s(strings.Split(whitelistUserIDs, ","))
|
||||
userIDs := tool.StringsToInt64s(strings.Split(whitelistUserIDs, ","))
|
||||
validUserIDs = make([]int64, 0, len(userIDs))
|
||||
for _, userID := range userIDs {
|
||||
has, err := HasAccess(userID, repo, ACCESS_MODE_WRITE)
|
||||
@@ -165,14 +165,14 @@ func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whit
|
||||
validUserIDs = append(validUserIDs, userID)
|
||||
}
|
||||
|
||||
protectBranch.WhitelistUserIDs = strings.Join(base.Int64sToStrings(validUserIDs), ",")
|
||||
protectBranch.WhitelistUserIDs = strings.Join(tool.Int64sToStrings(validUserIDs), ",")
|
||||
}
|
||||
|
||||
hasTeamsChanged := false
|
||||
validTeamIDs := base.StringsToInt64s(strings.Split(protectBranch.WhitelistTeamIDs, ","))
|
||||
validTeamIDs := tool.StringsToInt64s(strings.Split(protectBranch.WhitelistTeamIDs, ","))
|
||||
if protectBranch.WhitelistTeamIDs != whitelistTeamIDs {
|
||||
hasTeamsChanged = true
|
||||
teamIDs := base.StringsToInt64s(strings.Split(whitelistTeamIDs, ","))
|
||||
teamIDs := tool.StringsToInt64s(strings.Split(whitelistTeamIDs, ","))
|
||||
teams, err := GetTeamsHaveAccessToRepo(repo.OwnerID, repo.ID, ACCESS_MODE_WRITE)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetTeamsHaveAccessToRepo [org_id: %d, repo_id: %d]: %v", repo.OwnerID, repo.ID, err)
|
||||
@@ -184,7 +184,7 @@ func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whit
|
||||
}
|
||||
}
|
||||
|
||||
protectBranch.WhitelistTeamIDs = strings.Join(base.Int64sToStrings(validTeamIDs), ",")
|
||||
protectBranch.WhitelistTeamIDs = strings.Join(tool.Int64sToStrings(validTeamIDs), ",")
|
||||
}
|
||||
|
||||
// Make sure protectBranch.ID is not 0 for whitelists
|
||||
|
||||
@@ -21,8 +21,8 @@ import (
|
||||
|
||||
git "github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// ___________ .___.__ __ ___________.__.__
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
. "github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
)
|
||||
|
||||
func TestRepo(t *testing.T) {
|
||||
|
||||
@@ -23,9 +23,9 @@ import (
|
||||
"golang.org/x/crypto/ssh"
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
"github.com/gogits/gogs/pkg/process"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -484,7 +484,7 @@ func deletePublicKeys(e *xorm.Session, keyIDs ...int64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := e.In("id", strings.Join(base.Int64sToStrings(keyIDs), ",")).Delete(new(PublicKey))
|
||||
_, err := e.In("id", strings.Join(tool.Int64sToStrings(keyIDs), ",")).Delete(new(PublicKey))
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/go-xorm/xorm"
|
||||
gouuid "github.com/satori/go.uuid"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
)
|
||||
|
||||
// AccessToken represents a personal access token.
|
||||
@@ -49,7 +49,7 @@ func (t *AccessToken) AfterSet(colName string, _ xorm.Cell) {
|
||||
|
||||
// NewAccessToken creates new access token.
|
||||
func NewAccessToken(t *AccessToken) error {
|
||||
t.Sha1 = base.EncodeSha1(gouuid.NewV4().String())
|
||||
t.Sha1 = tool.EncodeSha1(gouuid.NewV4().String())
|
||||
_, err := x.Insert(t)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/avatar"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/avatar"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type UserType int
|
||||
@@ -191,7 +191,7 @@ func (u *User) HTMLURL() string {
|
||||
|
||||
// GenerateEmailActivateCode generates an activate code based on user information and given e-mail.
|
||||
func (u *User) GenerateEmailActivateCode(email string) string {
|
||||
code := base.CreateTimeLimitCode(
|
||||
code := tool.CreateTimeLimitCode(
|
||||
com.ToStr(u.ID)+email+u.LowerName+u.Passwd+u.Rands,
|
||||
setting.Service.ActiveCodeLives, nil)
|
||||
|
||||
@@ -262,7 +262,7 @@ func (u *User) RelAvatarLink() string {
|
||||
|
||||
return setting.AppSubUrl + "/avatars/" + com.ToStr(u.ID)
|
||||
}
|
||||
return base.AvatarLink(u.AvatarEmail)
|
||||
return tool.AvatarLink(u.AvatarEmail)
|
||||
}
|
||||
|
||||
// AvatarLink returns user avatar absolute link.
|
||||
@@ -462,7 +462,7 @@ func (u *User) DisplayName() string {
|
||||
}
|
||||
|
||||
func (u *User) ShortName(length int) string {
|
||||
return base.EllipsisString(u.Name, length)
|
||||
return tool.EllipsisString(u.Name, length)
|
||||
}
|
||||
|
||||
// IsMailable checks if a user is elegible
|
||||
@@ -484,7 +484,7 @@ func IsUserExist(uid int64, name string) (bool, error) {
|
||||
|
||||
// GetUserSalt returns a ramdom user salt token.
|
||||
func GetUserSalt() (string, error) {
|
||||
return base.GetRandomString(10)
|
||||
return tool.GetRandomString(10)
|
||||
}
|
||||
|
||||
// NewGhostUser creates and returns a fake user for someone has deleted his/her account.
|
||||
@@ -553,7 +553,7 @@ func CreateUser(u *User) (err error) {
|
||||
|
||||
u.LowerName = strings.ToLower(u.Name)
|
||||
u.AvatarEmail = u.Email
|
||||
u.Avatar = base.HashEmail(u.AvatarEmail)
|
||||
u.Avatar = tool.HashEmail(u.AvatarEmail)
|
||||
if u.Rands, err = GetUserSalt(); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -596,12 +596,12 @@ func Users(page, pageSize int) ([]*User, error) {
|
||||
|
||||
// get user by erify code
|
||||
func getVerifyUser(code string) (user *User) {
|
||||
if len(code) <= base.TimeLimitCodeLength {
|
||||
if len(code) <= tool.TimeLimitCodeLength {
|
||||
return nil
|
||||
}
|
||||
|
||||
// use tail hex username query user
|
||||
hexStr := code[base.TimeLimitCodeLength:]
|
||||
hexStr := code[tool.TimeLimitCodeLength:]
|
||||
if b, err := hex.DecodeString(hexStr); err == nil {
|
||||
if user, err = GetUserByName(string(b)); user != nil {
|
||||
return user
|
||||
@@ -618,10 +618,10 @@ func VerifyUserActiveCode(code string) (user *User) {
|
||||
|
||||
if user = getVerifyUser(code); user != nil {
|
||||
// time limit code
|
||||
prefix := code[:base.TimeLimitCodeLength]
|
||||
prefix := code[:tool.TimeLimitCodeLength]
|
||||
data := com.ToStr(user.ID) + user.Email + user.LowerName + user.Passwd + user.Rands
|
||||
|
||||
if base.VerifyTimeLimitCode(data, minutes, prefix) {
|
||||
if tool.VerifyTimeLimitCode(data, minutes, prefix) {
|
||||
return user
|
||||
}
|
||||
}
|
||||
@@ -634,10 +634,10 @@ func VerifyActiveEmailCode(code, email string) *EmailAddress {
|
||||
|
||||
if user := getVerifyUser(code); user != nil {
|
||||
// time limit code
|
||||
prefix := code[:base.TimeLimitCodeLength]
|
||||
prefix := code[:tool.TimeLimitCodeLength]
|
||||
data := com.ToStr(user.ID) + email + user.LowerName + user.Passwd + user.Rands
|
||||
|
||||
if base.VerifyTimeLimitCode(data, minutes, prefix) {
|
||||
if tool.VerifyTimeLimitCode(data, minutes, prefix) {
|
||||
emailAddress := &EmailAddress{Email: email}
|
||||
if has, _ := x.Get(emailAddress); has {
|
||||
return emailAddress
|
||||
@@ -696,13 +696,13 @@ func updateUser(e Engine, u *User) error {
|
||||
if len(u.AvatarEmail) == 0 {
|
||||
u.AvatarEmail = u.Email
|
||||
}
|
||||
u.Avatar = base.HashEmail(u.AvatarEmail)
|
||||
u.Avatar = tool.HashEmail(u.AvatarEmail)
|
||||
}
|
||||
|
||||
u.LowerName = strings.ToLower(u.Name)
|
||||
u.Location = base.TruncateString(u.Location, 255)
|
||||
u.Website = base.TruncateString(u.Website, 255)
|
||||
u.Description = base.TruncateString(u.Description, 255)
|
||||
u.Location = tool.TruncateString(u.Location, 255)
|
||||
u.Website = tool.TruncateString(u.Website, 255)
|
||||
u.Description = tool.TruncateString(u.Description, 255)
|
||||
|
||||
_, err := e.Id(u.ID).AllCols().Update(u)
|
||||
return err
|
||||
|
||||
@@ -22,9 +22,9 @@ import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/httplib"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/sync"
|
||||
"github.com/gogits/gogs/pkg/httplib"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/sync"
|
||||
)
|
||||
|
||||
var HookQueue = sync.NewUniqueQueue(setting.Webhook.QueueLength)
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/gogits/git-module"
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type DiscordEmbedFooterObject struct {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/gogits/git-module"
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type SlackMeta struct {
|
||||
|
||||
@@ -17,8 +17,8 @@ import (
|
||||
|
||||
"github.com/gogits/git-module"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/sync"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
"github.com/gogits/gogs/pkg/sync"
|
||||
)
|
||||
|
||||
var wikiWorkingPool = sync.NewExclusivePool()
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package base
|
||||
|
||||
const DOC_URL = "https://github.com/gogits/go-gogs-client/wiki"
|
||||
|
||||
type (
|
||||
TplName string
|
||||
)
|
||||
@@ -15,8 +15,8 @@ import (
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func IsAPIPath(url string) bool {
|
||||
@@ -122,7 +122,7 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
|
||||
if len(baHead) > 0 {
|
||||
auths := strings.Fields(baHead)
|
||||
if len(auths) == 2 && auths[0] == "Basic" {
|
||||
uname, passwd, _ := base.BasicAuthDecode(auths[1])
|
||||
uname, passwd, _ := tool.BasicAuthDecode(auths[1])
|
||||
|
||||
u, err := models.UserSignIn(uname, passwd)
|
||||
if err != nil {
|
||||
File diff suppressed because one or more lines are too long
@@ -12,8 +12,7 @@ import (
|
||||
log "gopkg.in/clog.v1"
|
||||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type APIContext struct {
|
||||
@@ -21,6 +20,9 @@ type APIContext struct {
|
||||
Org *APIOrganization
|
||||
}
|
||||
|
||||
// FIXME: move to github.com/gogits/go-gogs-client
|
||||
const DOC_URL = "https://github.com/gogits/go-gogs-client/wiki"
|
||||
|
||||
// Error responses error message to client with given message.
|
||||
// If status is 500, also it prints error to log.
|
||||
func (ctx *APIContext) Error(status int, title string, obj interface{}) {
|
||||
@@ -37,7 +39,7 @@ func (ctx *APIContext) Error(status int, title string, obj interface{}) {
|
||||
|
||||
ctx.JSON(status, map[string]string{
|
||||
"message": message,
|
||||
"url": base.DOC_URL,
|
||||
"url": DOC_URL,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"github.com/go-macaron/csrf"
|
||||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/auth"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/auth"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type ToggleOptions struct {
|
||||
@@ -20,10 +20,9 @@ import (
|
||||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/auth"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/form"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/auth"
|
||||
"github.com/gogits/gogs/pkg/form"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// Context represents context of a request.
|
||||
@@ -80,56 +79,60 @@ func (ctx *Context) HasValue(name string) bool {
|
||||
}
|
||||
|
||||
// HTML responses template with given status.
|
||||
func (ctx *Context) HTML(status int, name base.TplName) {
|
||||
func (ctx *Context) HTML(status int, name string) {
|
||||
log.Trace("Template: %s", name)
|
||||
ctx.Context.HTML(status, string(name))
|
||||
ctx.Context.HTML(status, name)
|
||||
}
|
||||
|
||||
// Success responses template with status 200.
|
||||
func (c *Context) Success(name base.TplName) {
|
||||
c.HTML(200, name)
|
||||
// Success responses template with status http.StatusOK.
|
||||
func (c *Context) Success(name string) {
|
||||
c.HTML(http.StatusOK, name)
|
||||
}
|
||||
|
||||
// RenderWithErr used for page has form validation but need to prompt error to users.
|
||||
func (ctx *Context) RenderWithErr(msg string, tpl base.TplName, f interface{}) {
|
||||
func (ctx *Context) RenderWithErr(msg, tpl string, f interface{}) {
|
||||
if f != nil {
|
||||
form.Assign(f, ctx.Data)
|
||||
}
|
||||
ctx.Flash.ErrorMsg = msg
|
||||
ctx.Data["Flash"] = ctx.Flash
|
||||
ctx.HTML(200, tpl)
|
||||
ctx.HTML(http.StatusOK, tpl)
|
||||
}
|
||||
|
||||
// Handle handles and logs error by given status.
|
||||
func (ctx *Context) Handle(status int, title string, err error) {
|
||||
switch status {
|
||||
case 404:
|
||||
case http.StatusNotFound:
|
||||
ctx.Data["Title"] = "Page Not Found"
|
||||
case 500:
|
||||
case http.StatusInternalServerError:
|
||||
ctx.Data["Title"] = "Internal Server Error"
|
||||
log.Error(2, "%s: %v", title, err)
|
||||
if !setting.ProdMode || (ctx.IsSigned && ctx.User.IsAdmin) {
|
||||
ctx.Data["ErrorMsg"] = err
|
||||
}
|
||||
}
|
||||
ctx.HTML(status, base.TplName(fmt.Sprintf("status/%d", status)))
|
||||
ctx.HTML(status, fmt.Sprintf("status/%d", status))
|
||||
}
|
||||
|
||||
// NotFound simply renders the 404 page.
|
||||
// NotFound renders the 404 page.
|
||||
func (ctx *Context) NotFound() {
|
||||
ctx.Handle(404, "", nil)
|
||||
ctx.Handle(http.StatusNotFound, "", nil)
|
||||
}
|
||||
|
||||
// ServerError renders the 500 page.
|
||||
func (c *Context) ServerError(title string, err error) {
|
||||
c.Handle(http.StatusInternalServerError, title, err)
|
||||
}
|
||||
|
||||
// NotFoundOrServerError use error check function to determine if the error
|
||||
// is about not found. It responses with 404 status code for not found error,
|
||||
// or error context description for logging purpose of 500 server error.
|
||||
func (ctx *Context) NotFoundOrServerError(title string, errck func(error) bool, err error) {
|
||||
func (c *Context) NotFoundOrServerError(title string, errck func(error) bool, err error) {
|
||||
if errck(err) {
|
||||
ctx.NotFound()
|
||||
c.NotFound()
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Handle(500, title, err)
|
||||
c.ServerError(title, err)
|
||||
}
|
||||
|
||||
func (ctx *Context) HandleText(status int, title string) {
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type Organization struct {
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type PullRequest struct {
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/gogits/cron"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
var c = cron.New()
|
||||
@@ -12,21 +12,20 @@ import (
|
||||
"gopkg.in/gomail.v2"
|
||||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/markup"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
const (
|
||||
MAIL_AUTH_ACTIVATE base.TplName = "auth/activate"
|
||||
MAIL_AUTH_ACTIVATE_EMAIL base.TplName = "auth/activate_email"
|
||||
MAIL_AUTH_RESET_PASSWORD base.TplName = "auth/reset_passwd"
|
||||
MAIL_AUTH_REGISTER_NOTIFY base.TplName = "auth/register_notify"
|
||||
MAIL_AUTH_ACTIVATE = "auth/activate"
|
||||
MAIL_AUTH_ACTIVATE_EMAIL = "auth/activate_email"
|
||||
MAIL_AUTH_RESET_PASSWORD = "auth/reset_passwd"
|
||||
MAIL_AUTH_REGISTER_NOTIFY = "auth/register_notify"
|
||||
|
||||
MAIL_ISSUE_COMMENT base.TplName = "issue/comment"
|
||||
MAIL_ISSUE_MENTION base.TplName = "issue/mention"
|
||||
MAIL_ISSUE_COMMENT = "issue/comment"
|
||||
MAIL_ISSUE_MENTION = "issue/mention"
|
||||
|
||||
MAIL_NOTIFY_COLLABORATOR base.TplName = "notify/collaborator"
|
||||
MAIL_NOTIFY_COLLABORATOR = "notify/collaborator"
|
||||
)
|
||||
|
||||
type MailRender interface {
|
||||
@@ -79,7 +78,7 @@ type Issue interface {
|
||||
HTMLURL() string
|
||||
}
|
||||
|
||||
func SendUserMail(c *macaron.Context, u User, tpl base.TplName, code, subject, info string) {
|
||||
func SendUserMail(c *macaron.Context, u User, tpl, code, subject, info string) {
|
||||
data := map[string]interface{}{
|
||||
"Username": u.DisplayName(),
|
||||
"ActiveCodeLives": setting.Service.ActiveCodeLives / 60,
|
||||
@@ -172,12 +171,12 @@ func composeTplData(subject, body, link string) map[string]interface{} {
|
||||
return data
|
||||
}
|
||||
|
||||
func composeIssueMessage(issue Issue, repo Repository, doer User, tplName base.TplName, tos []string, info string) *Message {
|
||||
func composeIssueMessage(issue Issue, repo Repository, doer User, tplName string, tos []string, info string) *Message {
|
||||
subject := issue.MailSubject()
|
||||
body := string(markup.RenderSpecialLink([]byte(issue.Content()), repo.HTMLURL(), repo.ComposeMetas()))
|
||||
data := composeTplData(subject, body, issue.HTMLURL())
|
||||
data["Doer"] = doer
|
||||
content, err := mailRender.HTMLString(string(tplName), data)
|
||||
content, err := mailRender.HTMLString(tplName, data)
|
||||
if err != nil {
|
||||
log.Error(3, "HTMLString (%s): %v", tplName, err)
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
log "gopkg.in/clog.v1"
|
||||
"gopkg.in/gomail.v2"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
type Message struct {
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
|
||||
"github.com/russross/blackfriday"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// IsMarkdownFile reports whether name looks like a Markdown file based on its extension.
|
||||
@@ -72,7 +72,7 @@ func (r *MarkdownRenderer) AutoLink(out *bytes.Buffer, link []byte, kind int) {
|
||||
if j == -1 {
|
||||
j = len(m)
|
||||
}
|
||||
out.WriteString(fmt.Sprintf(` <code><a href="%s">%s</a></code>`, m, base.ShortSha(string(m[i+7:j]))))
|
||||
out.WriteString(fmt.Sprintf(` <code><a href="%s">%s</a></code>`, m, tool.ShortSha(string(m[i+7:j]))))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"github.com/russross/blackfriday"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
. "github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
. "github.com/gogits/gogs/pkg/markup"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func Test_IsMarkdownFile(t *testing.T) {
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
"github.com/Unknwon/com"
|
||||
"golang.org/x/net/html"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/tool"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// IsReadmeFile reports whether name looks like a README file based on its extension.
|
||||
@@ -140,7 +140,7 @@ func RenderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte {
|
||||
if com.StrTo(m).MustInt() > 0 {
|
||||
return m
|
||||
}
|
||||
return fmt.Sprintf(`<a href="%s/commit/%s"><code>%s</code></a>`, urlPrefix, m, base.ShortSha(string(m)))
|
||||
return fmt.Sprintf(`<a href="%s/commit/%s"><code>%s</code></a>`, urlPrefix, m, tool.ShortSha(string(m)))
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
. "github.com/gogits/gogs/modules/markup"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
. "github.com/gogits/gogs/pkg/markup"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func Test_IsReadmeFile(t *testing.T) {
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/microcosm-cc/bluemonday"
|
||||
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
// Sanitizer is a protection wrapper of *bluemonday.Policy which does not allow
|
||||
@@ -20,14 +20,15 @@ type Sanitizer struct {
|
||||
init sync.Once
|
||||
}
|
||||
|
||||
var sanitizer = &Sanitizer{}
|
||||
var sanitizer = &Sanitizer{
|
||||
policy: bluemonday.UGCPolicy(),
|
||||
}
|
||||
|
||||
// NewSanitizer initializes sanitizer with allowed attributes based on settings.
|
||||
// Multiple calls to this function will only create one instance of Sanitizer during
|
||||
// entire application lifecycle.
|
||||
func NewSanitizer() {
|
||||
sanitizer.init.Do(func() {
|
||||
sanitizer.policy = bluemonday.UGCPolicy()
|
||||
// We only want to allow HighlightJS specific classes for code blocks
|
||||
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`^language-\w+$`)).OnElements("code")
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
. "github.com/gogits/gogs/modules/markup"
|
||||
. "github.com/gogits/gogs/pkg/markup"
|
||||
)
|
||||
|
||||
func Test_Sanitizer(t *testing.T) {
|
||||
@@ -26,8 +26,8 @@ import (
|
||||
|
||||
"github.com/gogits/go-libravatar"
|
||||
|
||||
"github.com/gogits/gogs/modules/bindata"
|
||||
"github.com/gogits/gogs/modules/user"
|
||||
"github.com/gogits/gogs/pkg/bindata"
|
||||
"github.com/gogits/gogs/pkg/user"
|
||||
)
|
||||
|
||||
type Scheme string
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
log "gopkg.in/clog.v1"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
)
|
||||
|
||||
func cleanCommand(cmd string) string {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user