summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md34
-rw-r--r--README.md5
-rw-r--r--README_ZH.md2
-rw-r--r--cmd/serve.go6
-rw-r--r--conf/app.ini6
-rw-r--r--conf/locale/TRANSLATORS1
-rwxr-xr-xconf/locale/locale_de-DE.ini1
-rw-r--r--conf/locale/locale_en-US.ini1
-rwxr-xr-xconf/locale/locale_es-ES.ini720
-rwxr-xr-xconf/locale/locale_fr-CA.ini28
-rwxr-xr-xconf/locale/locale_ja-JP.ini18
-rwxr-xr-xconf/locale/locale_lv-LV.ini18
-rwxr-xr-xconf/locale/locale_nl-NL.ini18
-rwxr-xr-xconf/locale/locale_ru-RU.ini1
-rwxr-xr-xconf/locale/locale_zh-CN.ini18
-rwxr-xr-xconf/locale/locale_zh-HK.ini18
-rw-r--r--gogs.go2
-rw-r--r--models/action.go93
-rw-r--r--models/issue.go26
-rw-r--r--models/repo.go4
-rw-r--r--modules/asn1-ber/ber.go8
-rw-r--r--modules/base/markdown.go8
-rw-r--r--modules/middleware/context.go2
-rw-r--r--modules/middleware/repo.go1
-rw-r--r--modules/setting/setting.go8
-rw-r--r--public/ng/css/gogs.css18
-rw-r--r--public/ng/js/gogs.js34
-rw-r--r--public/ng/less/gogs/markdown.less167
-rw-r--r--public/ng/less/gogs/repository.less14
-rw-r--r--routers/repo/http.go54
-rw-r--r--routers/repo/issue.go24
-rw-r--r--routers/repo/view.go12
-rw-r--r--templates/.VERSION2
-rw-r--r--templates/admin/config.tmpl2
-rw-r--r--templates/home.tmpl2
-rw-r--r--templates/ng/base/header.tmpl2
-rw-r--r--templates/repo/header.tmpl8
37 files changed, 1088 insertions, 298 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ea713ca455..d3619018a4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,7 +2,7 @@
> This guidelines sheet is forked from [CONTRIBUTING.md](https://github.com/drone/drone/blob/master/CONTRIBUTING.md).
-Gogs is not perfect and it has bugs, or incomplete features for rare cases. You're welcome to tell us or contribute some code. This document describles details about how can you contribute to Gogs project.
+Gogs is not perfect and it has bugs, or incomplete features for rare cases. You're welcome to tell us or contribute some code. This document describes details about how can you contribute to Gogs project.
## Contribution guidelines
@@ -15,36 +15,30 @@ Depends on the situation, you will:
### Bug Report
-If you find or consider something is a bug, please create a issue on [GitHub](https://github.com/gogits/gogs/issues). To reduce unnecessary time wasting of interacting and waiting with team members, please use following form as template in the first place:
+If you find or consider something is a bug, please create a issue on [GitHub](https://github.com/gogits/gogs/issues). To reduce unnecessary time wasting of interacting and waiting with team members, please include following information in the first place with a comfortable form for you:
-```
-- **Bug Description**:
-- **Gogs Version**:
-- **Git Version**:
-- **System Type**:
-- **Error Log**:
-- **Other information**:
-```
+- Bug Description
+- Gogs Version
+- Git Version
+- System Type
+- Error Log
+- Other information
Please take a moment to check that an issue on [GitHub](https://github.com/gogits/gogs/issues) doesn't already exist documenting your bug report or improvement proposal. If it does, it never hurts to add a quick "+1" or "I have this problem too". This will help prioritize the most common problems and requests.
#### Bug Report Example
-- **Bug Description**: Crash when create repository with license|
-- **Gogs Version**: `v0.4.9.0901`
-- **Git Version**: `1.9.0`
-- **System Type**: `Ubuntu 12.04`
-- **Error Log**:
+Gogs crashed when create repository with license, using v0.5.13.0207, SQLite3, Git 1.9.0, Ubuntu 12.04.
+
+Error log:
```
2014/09/01 07:21:49 [E] nil pointer
```
-- **Other information**: Use SQLite3 as database
-
### Feature Request
-There is no standard form of making a feature request, just try to describle the feature as clear as possible because team members may not have experience with the functionality you're talking about.
+There is no standard form of making a feature request, just try to describe the feature as clear as possible because team members may not have experience with the functionality you're talking about.
### Pull Request
@@ -54,7 +48,7 @@ We are always thrilled to receive pull requests, and do our best to process them
If your pull request is not accepted on the first try, don't be discouraged! If there's a problem with the implementation, hopefully you received feedback on what to improve.
-We're trying very hard to keep Gogs lean and focused. We don't want it to do everything for everybody. This means that we might decide against incorporating a new feature.
+We're trying very hard to keep Gogs lean and focused. We don't want it to do everything for everybody. This means that we might decide against incorporating a new feature. We believe you do like to discuss with us first in [Gitter](https://gitter.im/gogits/gogs).
### Ask For Help
@@ -77,4 +71,4 @@ Project maintainers have the right and responsibility to remove, edit, or reject
Instances of abusive, harassing, or otherwise unacceptable behavior can be
reported by emailing contact@gitlab.com
-This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/) \ No newline at end of file
+This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
diff --git a/README.md b/README.md
index 3d87e3a1ff..588881cd2a 100644
--- a/README.md
+++ b/README.md
@@ -7,12 +7,13 @@ Gogs(Go Git Service) is a painless self-hosted Git Service written in Go.
![Demo](http://gogs.qiniudn.com/gogs_demo.gif)
-##### Current version: 0.5.12 Beta
+##### Current version: 0.5.13 Beta
### NOTICES
- Due to testing purpose, data of [try.gogs.io](https://try.gogs.io) has been reset in **Jan 28, 2015** and will reset multiple times after. Please do **NOT** put your important data on the site.
- Demo site [try.gogs.io](https://try.gogs.io) is running under `dev` branch.
+- You **MUST** read [CONTRIBUTING.md](CONTRIBUTING.md) before you start filing a issue or making a Pull Request.
- If you think there are vulnerabilities in the project, please talk private to **u@gogs.io**, thanks!
#### Other language version
@@ -81,7 +82,7 @@ There are 5 ways to install Gogs:
## Contributors
-- The [core team](http://gogs.io/team) of this project.
+- The [core team](http://gogs.io/team) of this project.
- See [contributors page](https://github.com/gogits/gogs/graphs/contributors) for full list of contributors.
- See [TRANSLATORS](conf/locale/TRANSLATORS) for full list of translators.
diff --git a/README_ZH.md b/README_ZH.md
index be3a2b1bc4..54e66315a8 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -5,7 +5,7 @@ Gogs(Go Git Service) 是一个基于 Go 语言的自助 Git 服务。
![Demo](http://gogs.qiniudn.com/gogs_demo.gif)
-##### 当前版本:0.5.12 Beta
+##### 当前版本:0.5.13 Beta
## 开发目的
diff --git a/cmd/serve.go b/cmd/serve.go
index 7b593f40ad..af18e05c1e 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -35,6 +35,12 @@ var CmdServ = cli.Command{
func setup(logPath string) {
setting.NewConfigContext()
log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))
+
+ if setting.DisableSSH {
+ println("Gogs: SSH has been disabled")
+ os.Exit(1)
+ }
+
models.LoadModelsConfig()
if models.UseSQLite3 {
diff --git a/conf/app.ini b/conf/app.ini
index b7a0f1a7c5..782dc51c89 100644
--- a/conf/app.ini
+++ b/conf/app.ini
@@ -18,6 +18,8 @@ DOMAIN = localhost
ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
HTTP_ADDR =
HTTP_PORT = 3000
+; Disable SSH feature when not available
+DISABLE_SSH = false
SSH_PORT = 22
; Disable CDN even in "prod" mode
OFFLINE_MODE = false
@@ -278,5 +280,5 @@ INTERVAL = 24
ARGS =
[i18n]
-LANGS = en-US,zh-CN,zh-HK,de-DE,fr-CA,nl-NL,lv-LV,ru-RU,ja-JP
-NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本语
+LANGS = en-US,zh-CN,zh-HK,de-DE,fr-CA,nl-NL,lv-LV,ru-RU,ja-JP,es-ES
+NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本语,Español
diff --git a/conf/locale/TRANSLATORS b/conf/locale/TRANSLATORS
index 6c72f3342a..4cd8bf6a4e 100644
--- a/conf/locale/TRANSLATORS
+++ b/conf/locale/TRANSLATORS
@@ -3,6 +3,7 @@
Akihiro YAGASAKI <yaggytter@momiage.com>
Christoph Kisfeld <christoph.kisfeld@gmail.com>
+Huimin Wang <wanghm2009@hotmail.co.jp>
Thomas Fanninger <gogs.thomas@fanninger.at>
Łukasz Jan Niemier <lukasz@niemier.pl>
Lafriks <lafriks@gmail.com>
diff --git a/conf/locale/locale_de-DE.ini b/conf/locale/locale_de-DE.ini
index dbf31a3297..2d22d0491c 100755
--- a/conf/locale/locale_de-DE.ini
+++ b/conf/locale/locale_de-DE.ini
@@ -631,6 +631,7 @@ config.db_path_helper=(nur für "sqlite3")
config.service_config=Service-Einstellungen
config.register_email_confirm=E-Mail-Bestätigung bei Registrierung
config.disable_register=Registrierung deaktivieren
+config.show_registration_button = Registrierungs-Button anzeigen
config.require_sign_in_view=Ansehen erfordert Registrierung
config.mail_notify=E-Mail-Benachrichtigung
config.enable_cache_avatar=Avatar-Cache aktivieren
diff --git a/conf/locale/locale_en-US.ini b/conf/locale/locale_en-US.ini
index 660fb253bb..4b8325ef4e 100644
--- a/conf/locale/locale_en-US.ini
+++ b/conf/locale/locale_en-US.ini
@@ -635,6 +635,7 @@ config.db_path_helper = (for "sqlite3" only)
config.service_config = Service Configuration
config.register_email_confirm = Require E-mail Confirmation
config.disable_register = Disable Registration
+config.show_registration_button = Show Register Button
config.require_sign_in_view = Require Sign In View
config.mail_notify = Mail Notification
config.enable_cache_avatar = Enable Cache Avatar
diff --git a/conf/locale/locale_es-ES.ini b/conf/locale/locale_es-ES.ini
new file mode 100755
index 0000000000..f76d0a314a
--- /dev/null
+++ b/conf/locale/locale_es-ES.ini
@@ -0,0 +1,720 @@
+app_desc=Un servicio de Git auto alojado y sin complicaciones
+
+home=Incio
+dashboard=Panel de control
+explore=Explorar
+help=Ayuda
+sign_in=Iniciar sesión
+social_sign_in=Inicio de sesión social: 2° paso <small>cuenta de asociado</small>
+sign_out=Cerrar sesión
+sign_up=Suscripción
+register=Registro
+website=Pagina Web
+version=Versión
+page=Página
+template=Plantilla
+language=Lenguaje
+
+username=Nombre de usuario
+email=Correo electrónico
+password=Contraseña
+re_type=Ingrese de nuevo
+captcha=Captcha
+
+repository=Repositorio
+organization=Organización
+mirror=Espejo
+new_repo=Nuevo repositorio
+new_migrate=Nueva Migración
+new_fork=Nuevo Fork del Repositorio
+new_org=Nueva organización
+manage_org=Administrar organizaciones
+admin_panel=Panel de administración
+account_settings=Configuraciones de la cuenta
+settings=Configuraciones
+
+news_feed=entrada de noticias
+pull_requests=Solicitudes de retiro
+issues=Publicaciones
+
+cancel=Cancelar
+
+[install]
+install=Instalación
+title=Pasos de la instalación por primera vez
+requite_db_desc=Gogs necesita MySQL, PostgreSQL o SQLite3.
+db_type=Tipo de base de datos
+host=Anfitrión
+user=Usuario
+password=Contraseña
+db_name=Nombre de la base de datos
+db_helper=Por favor utilice el motor INNODB con la configuración de caracteres utf8_general_ci para MySQL.
+ssl_mode=Modo SSL
+path=Ruta
+sqlite_helper=Ruta del archivo de la base de datos de SQLite3.
+general_title=Configuraciones Generales de Gogs
+repo_path=Ruta del repositorio de Raiz (Root)
+repo_path_helper=Todos los repositorios remotos de Git se guardarán en este directorio.
+run_user=Abrir el usuario
+run_user_helper=El usuario necesita tener acceso a la Ruta Raíz del Repositorio y ejecutar Gogs.
+domain=Dominio
+domain_helper=Esto afecta a las URLs para clonar por SSH.
+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.
+email_title=Configuración del Servicio de Correo (Opcional)
+smtp_host=SMTP Host
+mailer_user=Remitente del Correo Electrónico
+mailer_password=Contraseña del Remitente
+notify_title=Configuración de Notificaciones (Opcional)
+register_confirm=Habilitar la Confirmación en el Registro
+mail_notify=Habilitar las Notificaciones de Correo
+admin_title=Configuración de la Cuenta de Administrador
+admin_name=Nombre de usuario
+admin_password=Contraseña
+confirm_password=Confirmar Contraseña
+admin_email=Correo electrónico
+install_gogs=Instalar Gogs
+test_git_failed=Fallo al probar el comando 'git': %v
+sqlite3_not_available=Tu versión no soporta SQLite3, por favor descarga el binario oficial desde %s, NO la versión de gobuild.
+invalid_db_setting=La configuración de la base de datos no es correcta: %v
+invalid_repo_path=La ruta de la raíz del repositorio es inválida: %v
+run_user_not_match=El usuario que está ejecutando la aplicación no es el usuario actual: %s -> %s
+save_config_failed=Error al guardar la configuración: %v
+invalid_admin_setting=La configuración de la cuenta de administración es inválida: %v
+install_success=Bienvenido! Estamos encantados de que hayas escogido Gogs, diviértete y cuídate.
+
+[home]
+uname_holder=Nombre de usuario o correo electrónico
+password_holder=Contraseña
+switch_dashboard_context=Cambiar el contexto del Dashboard
+my_repos=Mis Repositorios
+collaborative_repos=Repositorios Colaborativos
+my_orgs=Mis Organizaciones
+my_mirrors=Mis Mirrors
+
+[explore]
+repos=Repositorios
+
+[auth]
+create_new_account=Crear una Nueva Cuenta
+register_hepler_msg=¿Ya tienes una cuenta? ¡Inicia sesión!
+social_register_hepler_msg=¿Ya tienes una cuenta? ¡Enlázala!
+disable_register_prompt=Lo sentimos, el registro está deshabilitado. Por favor, contacta con el administrador del sitio.
+disable_register_mail=Lo sentimos. Los correos de Confirmación de Registro están deshabilitados.
+remember_me=Recuérdame
+forgot_password=He olvidado mi contraseña
+forget_password=¿Has olvidado tu contraseña?
+sign_up_now=¿Necesitas una cuenta? Regístrate ahora.
+confirmation_mail_sent_prompt=Un nuevo correo de confirmación se ha enviado a <b>%s</b>. Por favor, comprueba tu bandeja de entrada en las siguientes %d horas para completar el proceso de registro.
+sign_in_email=Inicia sesión con tu correo electrónico
+active_your_account=Activa tu cuenta
+resent_limit_prompt=Lo sentimos, estás solicitando el reenvío del mail de activación con demasiada frecuencia. Por favor, espera 3 minutos.
+has_unconfirmed_mail=Hola %s, tu correo electrónico (<b>%s</b>) no está confirmado. Si no has recibido un correo de confirmación o necesitas que lo enviemos de nuevo, por favor, haz click en el siguiente botón.
+resend_mail=Haz click aquí para reenviar tu correo electrónico de activación
+email_not_associate=Esta dirección de correo electrónico no esta asociada a cuenta alguna.
+send_reset_mail=Haga clic aquí para (re)enviar el correo para el restablecimiento de la contraseña
+reset_password=Restablecer su contraseña
+invalid_code=Lo sentimos, su código de confirmación ha expirado o no es valido.
+reset_password_helper=Haga Clic aquí para restablecer su contraseña
+password_too_short=La longitud de la contraseña no puede ser menor a 6.
+
+[form]
+UserName=Nombre de usuario
+RepoName=Nombre del repositorio
+Email=Dirección de correo electrónico
+Password=Contraseña
+Retype=Vuelva a escribir la contraseña
+SSHTitle=Nombre de la Clave de SSH
+HttpsUrl=HTTPS URL
+PayloadUrl=URL de carga
+TeamName=Nombre del equipo
+AuthName=Nombre de autorización
+AdminEmail=Correo electrónico del administrador
+
+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.`
+min_size_error=` debe contener al menos %s caracteres.`
+max_size_error=` debe contener como máximo %s caracteres.`
+email_error=` no es una dirección de correo válida.`
+url_error=` no es una URL válida.`
+unknown_error=Error desconocido:
+captcha_incorrect=El captcha no es válido.
+password_not_match=La contraseña de confirmación no coincide.
+
+username_been_taken=Ya existe un usuario con este nombre.
+repo_name_been_taken=Ya existe un repositorio con este nombre.
+org_name_been_taken=Ya existe una organización con este nombre.
+team_name_been_taken=Ya existe un equipo con este nombre.
+email_been_used=Esta dirección de correo electrónico ya está en uso.
+ssh_key_been_used=Este nombre de clave pública ya está en uso.
+illegal_username=Tu nombre de usuario contiene caracteres inválidos.
+illegal_repo_name=El nombre del repositorio contiene caracteres inválidos.
+illegal_org_name=El nombre de la organización contiene caracteres inválidos.
+illegal_team_name=El nombre del equipo contiene caracteres inválidos.
+username_password_incorrect=Nombre de usuario o contraseña incorrectos.
+enterred_invalid_repo_name=Por favor, asegúrate de que has introducido correctamente el nombre del repositorio.
+enterred_invalid_owner_name=Por favor, asegúrate de que has introducido correctamente el nombre del propietario.
+enterred_invalid_password=Por favor, asegúrate de que has introducido correctamente tu contraseña.
+user_not_exist=El usuario indicado no existe.
+last_org_owner=El usuario que se intenta eliminar es el último miembro del equipo de propietarios. Debe existir otro propietario.
+
+invalid_ssh_key=Lo sentimos, no somos capaces de verificar tu clave SSH: %s
+unable_verify_ssh_key=Gogs no puede velificar tu clave SSH, pero asumimos que es válida. Por favor, asegúrate de que es así.
+auth_failed=Error de autenticación: %v
+
+still_own_repo=Tu cuenta es la propietaria de uno o más repositorios, tienes que borrarlos o transferirlos primero.
+still_has_org=Tu cuenta es miembro de una o más organizaciones, tienes que abandonarlas o eliminarlas primero.
+org_still_own_repo=Esta organización es dueña de uno o más repositorios, tienes que eliminarlos o transferirlos primero.
+
+still_own_user=Esta autenticación está en uso por algunos usuarios, debes moverlos y antes de eliminarla.
+
+target_branch_not_exist=La rama de destino no existe
+
+[user]
+change_avatar=Cambia tu avatar en gravatar.com
+change_custom_avatar=Cambia tu avatar en la configuración
+join_on=Registrado en
+repositories=Repositorios
+activity=Actividad pública
+followers=Seguidores
+starred=Destacados
+following=Siguiendo
+
+[settings]
+profile=Perfil
+password=Contraseña
+ssh_keys=Claves SSH
+social=Redes Sociales
+applications=Aplicaciones
+orgs=Organizaciones
+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.
+full_name=Nombre Completo
+website=Página Web
+location=Localización
+update_profile=Actualizar Perfil
+update_profile_success=Tu perfil se ha actualizado correctamente.
+change_username=Nombre de usuario modificado
+change_username_desc=El nombre de usuario ha sido modificado, ¿quieres continuar? Esta acción afectará a todos los enlaces relacionados con tu cuenta.
+continue=Continuar
+cancel=Cancelar
+
+enable_custom_avatar=Activar Avatar Personalizado
+enable_custom_avatar_helper=Activa esto para desactivar los avatares de Gravatar
+choose_new_avatar=Selecciona nuevo avatar
+update_avatar=Actualizar Configuración del Avatar
+uploaded_avatar_not_a_image=El archivo enviado no es una imagen.
+no_custom_avatar_available=No hay ningún avatar personalizado disponible, no se puede habilitar.
+update_avatar_success=La configuración de tu avatar se ha actualizado correctamente.
+
+change_password=Cambiar contraseña
+old_password=Contraseña actual
+new_password=Nueva contraseña
+password_incorrect=Contraseña actual incorrecta.
+change_password_success=La contraseña se ha modificado correctamente. Ya puedes iniciar sesión con tu nueva contraseña.
+
+emails=Direcciones de correo electrónico
+manage_emails=Gestionar direcciones de correo electrónico
+email_desc=Tu dirección de correo principal se utilizará para las notificaciones y otras operaciones.
+primary=Principal
+primary_email=Marcar como principal
+delete_email=Eliminar
+add_new_email=Añadir nueva dirección de correo electrónico
+add_email=Añadir correo electrónico
+add_email_success=Tu nuevo correo electrónico se ha añadido correctamente.
+
+manage_ssh_keys=Gestionar Claves SSH
+add_key=Añadir Clave
+ssh_desc=Esta es la lista de claves SSH asociadas con tu cuenta. Elimina cualquier clave que no reconozcas.
+ssh_helper=<strong>¿Necesitas ayuda?</strong>. Consulta nuestra guía para <a href="%s">generar claves SSH</a> o solucionar <a href="%s">problemas comunes de SSH</a>.
+add_new_key=Añadir clave SSH
+key_name=Nombre de la Clave
+key_content=Contenido
+add_key_success=¡Se ha añadido una nueva clave SSH!
+delete_key=Eliminar
+add_on=Añadido en
+last_used=Utilizado por última vez en
+no_activity=No hay actividad reciente
+
+manage_social=Gestionar Redes Sociales asociadas
+social_desc=Esta es una lista de las Redes Sociales asociadas. Elimina cualquier vínculo que no reconozcas.
+unbind=Desvincular
+unbind_success=La Red Social ha sido desvinculada.
+
+manage_access_token=Gestionar los Tokens de Acceso personales
+generate_new_token=Generar nuevo Token
+tokens_desc=Tokens generados que pueden ser usados para acceder al API de Gogs.
+new_token_desc=Desde ahora, todos los tokens tendrán acceso completo a tu cuenta.
+token_name=Nombre del Token
+generate_token=Generar Token
+generate_token_succees=¡Los nuevos tokens de acceso se han generado correctamente! Asegúrate de copiar tu nuevo token de acceso personal. ¡No podrás verlo de nuevo!
+delete_token=Eliminar
+delete_token_success=¡Los tokens de acceso personales se han eliminado correctamente! No olvides actualizar las aplicaciones que los usasen.
+
+delete_account=Elimina tu cuenta
+delete_prompt=La operación eliminará tu cuenta de forma permanente y ¡<strong>NO</strong> se puede deshacer!
+confirm_delete_account=Confirmar Eliminación
+delete_account_title=Eliminación de Cuenta
+delete_account_desc=Esta cuenta se va a eliminar permanentemente, ¿quieres continuar?
+
+[repo]
+owner=Propietario
+repo_name=Nombre del Repositorio
+repo_name_helper=Los grandes nombres de repositorios son cortos, memorables y <strong>únicos</strong>.
+visibility=Visibilidad
+visiblity_helper=Este repositorio es <span class="label label-red label-radius">Privado</span>
+fork_repo=Hacer Fork del repositorio
+fork_from=Crear un Fork desde
+fork_visiblity_helper=No es posible cambiar la visibilidad de un Fork
+repo_desc=Descripción
+repo_lang=Idioma
+repo_lang_helper=Selecciona un fichero .gitignore
+license=Licencia
+license_helper=Selecciona un fichero de licencia
+init_readme=Crear este repositorio con un fichero README.md
+create_repo=Crear Repositorio
+default_branch=Rama por defecto
+mirror_interval=Intervalo de mirror(en horas)
+goget_meta=Go-Get Meta
+goget_meta_helper=Este repositorio será <span class="label label-blue label-radius">Go-Getable</span>
+
+need_auth=Requiere Autorización
+migrate_type=Tipo de Migración
+migrate_type_helper=Este repositorio será un <span class="label label-blue label-radius">Mirror</span>
+migrate_repo=Migrar Repositorio
+
+copy_link=Copiar
+click_to_copy=Copiar al portapapeles
+copied=Copiado correctamente
+clone_helper=¿Necesitas ayuda con el clone? ¡Consulta la <a target="_blank" href="%s">Ayuda</a>!
+unwatch=Dejar de vigilar
+watch=Vigilar
+unstar=Eliminar destacado
+star=Destacar
+fork=Fork
+
+no_desc=Sin Descripción
+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
+
+branch=Rama
+tree=Árbol
+branch_and_tags=Ramas y Etiquetas
+branches=Ramas
+tags=Etiquetas
+issues=Incidencias
+commits=Commits
+releases=Releases
+file_raw=Raw
+file_history=Histórico
+file_view_raw=Ver Raw
+
+commits.commits=Commits
+commits.search=Buscar Commits
+commits.find=Buscar
+commits.author=Autor
+commits.message=Mensaje
+commits.date=Fecha
+commits.older=Anterior
+commits.newer=Posterior
+
+settings=Configuración
+settings.options=Opciones
+settings.collaboration=Colaboración
+settings.hooks=Webhooks
+settings.githooks=Git Hooks
+settings.deploy_keys=Claves de Despliegue
+settings.basic_settings=Configuración Básica
+settings.danger_zone=Zona de Peligro
+settings.site=Sitio Oficial
+settings.update_settings=Actualizar Configuración
+settings.change_reponame=Nombre del Repositorio Modificado
+settings.change_reponame_desc=El nombre del repositorio ha sido modificado, ¿quieres continuar? Esto afectará a todos los enlaces relacionados con este repositorio.
+settings.transfer=Transferir la Propiedad
+settings.transfer_desc=Transferir este repositorio a otro usuario u organización donde tengas permisos de administración.
+settings.new_owner_has_same_repo=El nuevo propietario tiene un repositorio con el mismo nombre.
+settings.delete=Eliminar este Repositorio
+settings.delete_desc=Una vez has eliminado un repositorio, no hay vuelta atrás. Por favor, asegúrate de que es lo que quieres.
+settings.transfer_notices=<p>- Perderás acceso si el nuevo propietario es un usuario individual.</p><p>- Seguirás teniendo acceso si el nuevo propietario es una organización y estás en el grupo de los propietarios.</p>
+settings.update_settings_success=Las opciones del repositorio se han actualizado correctamente.
+settings.transfer_owner=Nuevo Propietario
+settings.make_transfer=Transferir
+settings.transfer_succeed=La propiedad del repositorio ha sido transferida exitosamente.
+settings.confirm_delete=Confirmar Eliminación
+settings.add_collaborator=Añadir Nuevo Colaborador
+settings.add_collaborator_success=Se ha añadido el nuevo colaborador.
+settings.remove_collaborator_success=Se ha eliminado el colaborador.
+settings.user_is_org_member=El usuario es miembro de la organización, no puede ser añadido como colaborador.
+settings.add_webhook=Añadir Webhook
+settings.hooks_desc=Los Webhooks permiten a servicios externos recibir notificaciones cuando sucedan ciertos eventos en Gogs. Cuando sucedan los eventos especificados, enviaremos una petición POST a cada una de las URLs indicadas. Para obtener más información, consulta nuestra <a target="_blank" href="%s">Guía de Webhooks</a>.
+settings.githooks_desc=Los Git Hooks son una funcionalidad del propio Git, puedes editar los ficheros de los hooks soportados en la siguiente lista para aplicar operaciones personalizadas.
+settings.githook_edit_desc=Si el hook no está activo, se mostrará contenido de ejemplo. Dejar el contenido vacío deshabilitará este hook.
+settings.githook_name=Nombre del Hook
+settings.githook_content=Contenido del Hook
+settings.update_githook=Actualizar Hook
+settings.remove_hook_success=El Webhook ha sido eliminado.
+settings.add_webhook_desc=Enviaremos una petición <code>POST</code> a la siguiente URL con los detalles de cualquier evento suscrito. También puedes especificar qué formato de datos te gustaría recibir (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). Puedes encontrar más información en la <a target="_blank" href="%s">Guía de Webhooks</a>.
+settings.payload_url=URL de Payload
+settings.content_type=Tipo de Contenido
+settings.secret=Secreto
+settings.event_desc=¿Qué eventos te gustaría que desencadenasen este webhook?
+settings.event_push_only=Solo el evento <code>push</code>.
+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.
+settings.update_webhook=Actualizar Webhook
+settings.update_hook_success=Se ha actualizado el Webhook.
+settings.delete_webhook=Borrar Webhook
+settings.recent_deliveries=Envíos Recientes
+settings.hook_type=Tipo de Hook
+settings.add_slack_hook_desc=Añade integración con <a href="%s">Slack</a> a tu repositorio.
+settings.slack_token=Token
+settings.slack_domain=Dominio
+settings.slack_channel=Canal
+
+diff.browse_source=Explorar el Código
+diff.parent=padre
+diff.commit=commit
+diff.data_not_available=Los datos del Diff no están disponibles.
+diff.show_diff_stats=Mostrar Estadísticas de Diff
+diff.stats_desc=Se han <strong>modificado %d ficheros</strong> con <strong>%d adiciones</strong> y <strong>%d borrados</strong>
+diff.bin=BIN
+diff.view_file=Ver Fichero
+
+release.releases=Releases
+release.new_release=Nueva Release
+release.draft=Borrador
+release.prerelease=Pre-Release
+release.stable=Estable
+release.edit=editar
+release.ahead=<strong>%d</strong> commits en %s desde esta release
+release.source_code=Código Fuente
+release.tag_name=Nombre de la etiqueta
+release.target=Destino
+release.tag_helper=Escoge una etiqueta o crea una nueva al publicar.
+release.release_title=Título de la Release
+release.content_with_md=Contenido con formato <a href="%s">Markdown</a>
+release.write=Escribir
+release.preview=Vista Previa
+release.content_placeholder=Escribe algo de contenido
+release.loading=Cargando...
+release.prerelease_desc=Esta es una pre-release
+release.prerelease_helper=Esta release está marcada como no apta para producción.
+release.publish=Publicar Release
+release.save_draft=Guardar Borrador
+release.edit_release=Editar Release
+release.tag_name_already_exist=Ya existe una Release con esta etiqueta.
+
+[org]
+org_name_holder=Nombre de la Organización
+org_name_helper=Los grandes nombres de organizaciones son cortos y memorables.
+org_email_helper=Los correos electrónicos de las organizaciones reciben todas las notificaciones y confirmaciones.
+create_org=Crear Organización
+repo_updated=Actualizado
+people=Personas
+invite_someone=Invitar a alguien
+teams=Equipos
+lower_members=miembros
+lower_repositories=repositorios
+create_new_team=Crear un Nuevo Equipo
+org_desc=Descripción
+team_name=Nombre del Equipo
+team_desc=Descripción
+team_name_helper=Utiliza este nombre para mencionar a este equipo en las conversaciones.
+team_desc_helper=¿En qué consiste este equipo?
+team_permission_desc=¿Qué nivel de permisos debería tener este equipo?
+
+settings=Configuración
+settings.options=Opciones
+settings.full_name=Nombre Completo
+settings.website=Sitio Web
+settings.location=Localización
+settings.update_settings=Actualizar Configuración
+settings.change_orgname=Nombre de la Organización Modificado
+settings.change_orgname_desc=El nombre de la organización ha sido modificado, ¿quieres continuar? Esta acción afectará a todos los enlaces relacionados con esta organización.
+settings.update_setting_success=La configuración de la Organización se ha actualizado correctamente.
+settings.delete=Eliminar Organización
+settings.delete_account=Eliminar esta Organización
+settings.delete_prompt=Esta operación eliminará esta organización de manera permanente, y ¡<strong>NO PUEDE</strong> deshacerse!
+settings.confirm_delete_account=Confirmar Eliminación
+settings.delete_org_title=Eliminación de la Organización
+settings.delete_org_desc=Esta organización se va a eliminar permanentemente, ¿quieres continuar?
+settings.hooks_desc=Añadir webhooks que serán ejecutados para <strong>todos los repositorios</strong> de esta organización.
+
+members.public=Público
+members.public_helper=convertir en privado
+members.private=Privado
+members.private_helper=convertir en público
+members.owner=Propietario
+members.member=Miembro
+members.conceal=Ocultar
+members.remove=Eliminar
+members.leave=Abandonar
+members.invite_desc=Comienza a teclear un nombre de usuario para invitar a un nuevo miembro a %s:
+members.invite_now=Invitar
+
+teams.join=Unirse
+teams.leave=Abandonar
+teams.read_access=Acceso de Lectura
+teams.read_access_helper=Este equipo podrá ver y clonar sus repositorios.
+teams.write_access=Acceso de Escritura
+teams.write_access_helper=Este equipo podrá leer sus repositorios, así como hacer push en ellos.
+teams.admin_access=Acceso de Administrador
+teams.admin_access_helper=Este equipo podrá hacer push/pull en sus repositorios, así como añadir colaboradores a ellos.
+teams.no_desc=Este equipo no tiene descripción
+teams.settings=Configuración
+teams.owners_permission_desc=Los propietarios tienen acceso completo a <strong>todos los repositorios</strong> y tienen <strong>derechos de administración</strong> en la organización.
+teams.members=Miembros del Equipo
+teams.update_settings=Actualizar Configuración
+teams.delete_team=Borrar este Equipo
+teams.add_team_member=Añadir Miembro al Equipo
+teams.delete_team_title=Eliminar Equipo
+teams.delete_team_desc=Este equipo va a ser eliminado, ¿seguro que quieres continuar? Los miembros de este equipo pueden perder acceso a algunos repositorios.
+teams.delete_team_success=El Equipo se ha eliminado correctamente.
+teams.read_permission_desc=Este equipo tiene permisos de <strong>Lectura</strong>: sus miembros pueden ver y clonar los repositorios del equipo.
+teams.write_permission_desc=Este equipo tiene permisos de <strong>Escritura</strong>: sus miembros pueden leer y hacer push a los repositorios del equipo.
+teams.admin_permission_desc=Este equipo tiene permisos de <strong>Administración</strong>: sus miembros pueden leer, hacer push y añadir colaboradores a los repositorios del equipo.
+teams.repositories=Repositorios del Equipo
+teams.add_team_repository=Añadir Repositorio al Equipo
+teams.remove_repo=Eliminar
+teams.add_nonexistent_repo=El repositorio que estás intentando añadir no existe, por favor, créalo primero.
+
+[admin]
+dashboard=Dashboard
+users=Usuarios
+organizations=Organizaciones
+repositories=Repositorios
+authentication=Autenticaciones
+config=Configuración
+notices=Avisos del Sistema
+monitor=Monitorización
+prev=Anterior
+next=Siguiente
+
+dashboard.statistic=Estadísticas
+dashboard.operations=Operaciones
+dashboard.system_status=Estado del Monitor del Sistema
+dashboard.statistic_info=La base de datos de Gogs contiene <b>%d</b> usuarios, <b>%d</b> organizaciones, <b>%d</b> claves públicas, <b>%d</b> repositorios, <b>%d</b> vigilados, <b>%d</b> destacados, <b>%d</b> acciones, <b>%d</b> accesos, <b>%d</b> incidencias, <b>%d</b> comentarios, <b>%d</b> cuentas de redes sociales, <b>%d</b> seguidores, <b>%d</b> mirrors, <b>%d</b> releases, <b>%d</b> fuentes de login, <b>%d</b> webhooks, <b>%d</b> milestones, <b>%d</b> etiquetas, <b>%d</b> hooks, <b>%d</b> equipos, <b>%d</b> tareas actualizadas, <b>%d</b> adjuntos.
+dashboard.operation_name=Nombre de la Operación
+dashboard.operation_switch=Interruptor
+dashboard.operation_run=Ejecutar
+dashboard.clean_unbind_oauth=Limpiar solicitudes de OAuth sin confirmar
+dashboard.clean_unbind_oauth_success=Las solicitudes de OAuth sin confirmar se han eliminado correctamente.
+dashboard.delete_inactivate_accounts=Eliminar todas las cuentas inactivas
+dashboard.delete_inactivate_accounts_success=Todas las cuentas inactivas se han eliminado correctamente.
+dashboard.delete_repo_archives=Eliminar todos los archivos de repositorios
+dashboard.delete_repo_archives_success=Todos los archivos de repositorios se han eliminado correctamente.
+dashboard.git_gc_repos=Ejecutar la recolección de basura en los repositorios
+dashboard.git_gc_repos_success=Todos los repositorios han ejecutado correctamente el recolector de basuras.
+dashboard.resync_all_sshkeys=Reescribir el fichero '.ssh/authorized_key'(atención: se perderán las claves que no pertenezcan a Gogs)
+dashboard.resync_all_sshkeys_success=Todas las claves públicas se han reescrito correctamente.
+dashboard.server_uptime=Uptime del Servidor
+dashboard.current_goroutine=Gorutinas Actuales
+dashboard.current_memory_usage=Uso de Memoria Actual
+dashboard.total_memory_allocated=Total de Memoria Reservada
+dashboard.memory_obtained=Memoria Obtenida
+dashboard.pointer_lookup_times=Tiempos de Búsqueda de Punteros
+dashboard.memory_allocate_times=Tiempos de Reserva de Memoria
+dashboard.memory_free_times=Tiempos de Liberado de Memoria
+dashboard.current_heap_usage=Uso de Heap Actual
+dashboard.heap_memory_obtained=Memoria de Heap Obtenida
+dashboard.heap_memory_idle=Memoria de Heap Inactiva
+dashboard.heap_memory_in_use=Memoria de Heap en Uso
+dashboard.heap_memory_released=Memoria de Heap Liberada
+dashboard.heap_objects=Objetos en el Heap
+dashboard.bootstrap_stack_usage=Uso de la Pila de Bootstrap
+dashboard.stack_memory_obtained=Memoria de Pila Obtenida
+dashboard.mspan_structures_usage=Uso de Estructuras MSpan
+dashboard.mspan_structures_obtained=Estructuras MSpan Obtenidas
+dashboard.mcache_structures_usage=Uso de estructuras MCache
+dashboard.mcache_structures_obtained=Estructuras MCache Obtenidas
+dashboard.profiling_bucket_hash_table_obtained=Profiling Bucket Hash Table Obtenido
+dashboard.gc_metadata_obtained=Metadatos del Recolector de Basuras Obtenidos
+dashboard.other_system_allocation_obtained=Otros Recursos del Sistema Asignados
+dashboard.next_gc_recycle=Siguiente Reciclado del Recolector de Basuras
+dashboard.last_gc_time=Tiempo desde el Último GC
+dashboard.total_gc_time=Pausa Total por GC
+dashboard.total_gc_pause=Pausa Total por GC
+dashboard.last_gc_pause=Última Pausa por GC
+dashboard.gc_times=GC Times
+
+users.user_manage_panel=User Manage Panel
+users.new_account=Create New Account
+users.name=Name
+users.activated=Activated
+users.admin=Admin
+users.repos=Repos
+users.created=Created
+users.edit=Edit
+users.auth_source=Authorization Source
+users.local=Local
+users.auth_login_name=Authorization Login Name
+users.update_profile_success=Account profile has been updated successfully.
+users.edit_account=Editar Cuenta
+users.is_activated=Esta cuenta está activada
+users.is_admin=This account has administrator permissions
+users.allow_git_hook=This account has permissions to create Git hooks
+users.update_profile=Update Account Profile
+users.delete_account=Delete This Account
+users.still_own_repo=This account still have ownership of repository, you have to delete or transfer them first.
+users.still_has_org=This account still have membership of organization, you have to left or delete them first.
+
+orgs.org_manage_panel=Organization Manage Panel
+orgs.name=Name
+orgs.teams=Teams
+orgs.members=Members
+
+repos.repo_manage_panel=Repository Manage Panel
+repos.owner=Owner
+repos.name=Name
+repos.private=Private
+repos.watches=Watches
+repos.stars=Stars
+repos.issues=Issues
+
+auths.auth_manage_panel=Authorization Manage Panel
+auths.new=Add New Authorization Source
+auths.name=Name
+auths.type=Type
+auths.enabled=Enabled
+auths.updated=Updated
+auths.auth_type=Authorization Type
+auths.auth_name=Authorization Name
+auths.domain=Domain
+auths.host=Host
+auths.port=Port
+auths.base_dn=Base DN
+auths.attributes=Search Attributes
+auths.filter=Search Filter
+auths.ms_ad_sa=Ms Ad SA
+auths.smtp_auth=SMTP Authorization Type
+auths.smtphost=SMTP Host
+auths.smtpport=SMTP Port
+auths.enable_tls=Enable TLS Encryption
+auths.enable_auto_register=Enable Auto Registration
+auths.tips=Consejos
+auths.edit=Editar la Configuración de Autorización
+auths.activated=Esta autenticación ha sido activada
+auths.update_success=La Configuración de Autorización ha sido actualizada correctamente.
+auths.update=Actualizar la Configuración de Autorización
+auths.delete=Eliminar esta Autorización
+auths.delete_auth_title=Eliminación de Autorización
+auths.delete_auth_desc=Se va a eliminar esta autorización, ¿quieres continuar?
+
+config.server_config=Configuración del Servidor
+config.app_name=Nombre de la Aplicación
+config.app_ver=Versión de la Aplicación
+config.app_url=URL de la Aplicación
+config.domain=Dominio
+config.offline_mode=Modo Sin Conexión
+config.disable_router_log=Deshabilitar Log del Router
+config.run_user=Usuario de Ejecución
+config.run_mode=Modo de Ejecución
+config.repo_root_path=Ruta del Repositorio
+config.static_file_root_path=Ruta de los Ficheros Estáticos
+config.log_file_root_path=Ruta de los Ficheros de Log
+config.script_type=Tipo de Script
+config.reverse_auth_user=Reverse Authentication User
+config.db_config=Configuración de la Base de Datos
+config.db_type=Tipo
+config.db_host=Host
+config.db_name=Nombre
+config.db_user=Usuario
+config.db_ssl_mode=Modo SSL
+config.db_ssl_mode_helper=(solo para "postgres")
+config.db_path=Ruta
+config.db_path_helper=(solo para "sqlite3")
+config.service_config=Configuración del Servicio
+config.register_email_confirm=Solicitar Confirmación por Correo Electrónico
+config.disable_register=Deshabilitar el Registro
+config.show_registration_button=Mostrar Botón de Registro
+config.require_sign_in_view=Solicitar la Vista de Inicio de Sesión
+config.mail_notify=Notificación por Correo Electrónico
+config.enable_cache_avatar=Activar la Caché de Avatar
+config.active_code_lives=Active Code Lives
+config.reset_password_code_lives=Reset Password Code Lives
+config.webhook_config=Webhook Configuration
+config.task_interval=Task Interval
+config.deliver_timeout=Deliver Timeout
+config.mailer_config=Mailer Configuration
+config.mailer_enabled=Enabled
+config.mailer_name=Name
+config.mailer_host=Host
+config.mailer_user=User
+config.oauth_config=OAuth Configuration
+config.oauth_enabled=Enabled
+config.cache_config=Cache Configuration
+config.cache_adapter=Cache Adapter
+config.cache_interval=Cache Interval
+config.cache_conn=Cache Connection
+config.session_config=Session Configuration
+config.session_provider=Session Provider
+config.provider_config=Provider Config
+config.cookie_name=Cookie Name
+config.enable_set_cookie=Enable Set Cookie
+config.gc_interval_time=GC Interval Time
+config.session_life_time=Session Life Time
+config.https_only=HTTPS Only
+config.cookie_life_time=Cookie Life Time
+config.picture_config=Picture Configuration
+config.picture_service=Picture Service
+config.disable_gravatar=Disable Gravatar
+config.log_config=Log Configuration
+config.log_mode=Log Mode
+
+monitor.cron=Cron Tasks
+monitor.name=Name
+monitor.schedule=Schedule
+monitor.next=Next Time
+monitor.previous=Previous Time
+monitor.execute_times=Execute Times
+monitor.process=Running Processes
+monitor.desc=Description
+monitor.start=Start Time
+monitor.execute_time=Execution Time
+
+notices.system_notice_list=System Notices
+notices.type=Type
+notices.type_1=Repository
+notices.desc=Description
+notices.op=Op.
+notices.delete_success=System notice has been deleted successfully.
+
+[action]
+create_repo=created repository <a href="%s/%s">%s</a>
+commit_repo=pushed to <a href="%s/%s/src/%s">%s</a> at <a href="%s/%s">%s</a>
+create_issue=opened issue <a href="%s/%s/issues/%s">%s#%s</a>
+comment_issue=commented on issue <a href="%s/%s/issues/%s">%s#%s</a>
+transfer_repo=transfered repository <code>%s</code> to <a href="/%s%s">%s</a>
+push_tag=pushed tag <a href="%s/%s/src/%s">%s</a> to <a href="%s/%s">%s</a>
+compare_2_commits=View comparison for these 2 commits
+
+[tool]
+ago=ago
+from_now=from now
+now=now
+1s=1 second %s
+1m=1 minute %s
+1h=1 hour %s
+1d=1 day %s
+1w=1 week %s
+1mon=1 month %s
+1y=1 year %s
+seconds=%d seconds %s
+minutes=%d minutes %s
+hours=%d hours %s
+days=%d days %s
+weeks=%d weeks %s
+months=%d months %s
+years=%d years %s
+raw_seconds=seconds
+raw_minutes=minutes
+
diff --git a/conf/locale/locale_fr-CA.ini b/conf/locale/locale_fr-CA.ini
index 833d8e1dc0..ebe74e19bb 100755
--- a/conf/locale/locale_fr-CA.ini
+++ b/conf/locale/locale_fr-CA.ini
@@ -61,7 +61,7 @@ domain=Domaine
domain_helper=Cela affecte les doublons d'URL SSH.
app_url=URL de l'Application
app_url_helper=Cela affecte les doublons d'URL HTTP/HTTPS et le contenu d'e-mail.
-email_title=E-mail Service Settings (Optional)
+email_title=Paramètres du Service de Messagerie (Facultatif)
smtp_host=Hôte SMTP
mailer_user=E-mail de l'Expéditeur
mailer_password=Mot de Passe de l'Expéditeur
@@ -109,7 +109,7 @@ confirmation_mail_sent_prompt=Un nouveau mail de confirmation à été envoyé
sign_in_email=Connexion avec l'E-mail
active_your_account=Activer votre Compte
resent_limit_prompt=Désolé, vos tentatives d'activation sont trop fréquentes. Veuillez réessayer dans 3 minutes.
-has_unconfirmed_mail=Hi %s, you have an unconfirmed e-mail address <b>%s</b>). If you haven't received a confirmation e-mail or need to resend a new one, please click on the button below.
+has_unconfirmed_mail=Bonjour %s, votre adresse courriel (<b>%s</b>) n'a pas été confirmée. Si vous n'avez reçu aucun courriel de confirmation ou souhaitez renouveler l'envoi, appuyez sur le bouton ci-dessous.
resend_mail=Appuyez ici pour renvoyer un mail de confirmation
email_not_associate=Cette adresse e-mail n'est associée à aucun compte.
send_reset_mail=Appuyez ici pour (r)envoyer le mail de réinitialisation du mot de passe
@@ -192,7 +192,7 @@ delete=Supprimer le Compte
uid=ID d'Utilisateur
public_profile=Profil Public
-profile_desc=Your E-mail address is public and will be used for any account related notifications, and any web based operations made via the site.
+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.
full_name=Non Complet
website=Site Web
location=Localisation
@@ -217,15 +217,15 @@ new_password=Nouveau Mot de Passe
password_incorrect=Mot de passe actuel incorrect.
change_password_success=Mot de passe modifié avec succès. Vous pouvez à présent vous connecter avec le nouveau mot de passe.
-emails=E-mail Addresses
-manage_emails=Manage e-mail addresses
-email_desc=Your primary e-mail address will be used for notifications and other operations.
-primary=Primary
-primary_email=Set as primary
-delete_email=Delete
-add_new_email=Add new e-mail address
-add_email=Add e-mail
-add_email_success=Your new E-mail address was successfully added.
+emails=Adresses E-mail
+manage_emails=Gérer les adresses e-mail
+email_desc=Votre adresse e-mail principale sera utilisée pour les notifications et d'autres opérations.
+primary=Principale
+primary_email=Définir comme principale
+delete_email=Supprimer
+add_new_email=Ajouter une nouvelle adresse courriel
+add_email=Ajouter un courriel
+add_email_success=Votre courriel a été ajouté avec succès.
manage_ssh_keys=Gérer les clés SSH
add_key=Ajouter une Clé
@@ -414,7 +414,7 @@ release.tag_name_already_exist=Une publication avec ce nom de tag a déjà exist
[org]
org_name_holder=Nom d'organisation
org_name_helper=Idéalement, un nom d'organisation devrait être court et mémorable.
-org_email_helper=Organization's E-mail receives all notifications and confirmations.
+org_email_helper=Le courriel de l'organisation recevra toutes les notifications et confirmations.
create_org=Créer une organisation
repo_updated=Mis à jour
people=Contacts
@@ -629,7 +629,7 @@ config.db_ssl_mode_helper=("postgres" uniquement)
config.db_path=Emplacement
config.db_path_helper=("sqlite3" uniquement)
config.service_config=Configuration du Service
-config.register_email_confirm=Require E-mail Confirmation
+config.register_email_confirm=Nécessite une confirmation par courriel
config.disable_register=Désactiver l'Enregistrement
config.require_sign_in_view=Connexion Obligatoire pour Visualiser
config.mail_notify=Mailer les Notifications
diff --git a/conf/locale/locale_ja-JP.ini b/conf/locale/locale_ja-JP.ini
index 1d1d61493d..a64ed0071f 100755
--- a/conf/locale/locale_ja-JP.ini
+++ b/conf/locale/locale_ja-JP.ini
@@ -59,6 +59,8 @@ run_user=実行ユーザ
run_user_helper=ユーザーはリポジトリ ルートパスへのアクセス、及びGogs を実行する権限を所有する必要があります。
domain=ドメイン
domain_helper=これはSSHクローンURLに影響する。
+http_port=HTTP ポート
+http_port_helper=アプリケーションが待ち受けするポート番号。
app_url=アプリケーションの URL
app_url_helper=この設定は、HTTP / HTTPSのクローンURLおよび、一部のメールボックスへのリンクに影響を与えます。
email_title=E-mailサービス設定(Optional)
@@ -512,6 +514,8 @@ dashboard.delete_repo_archives=リポジトリのすべてのアーカイブを
dashboard.delete_repo_archives_success=リポジトリのすべてのアーカイブが正常に削除されました。
dashboard.git_gc_repos=リポジトリでのガベージコレクションを実行します。
dashboard.git_gc_repos_success=すべてのリポジトリは正常にガベージ コレクションを行いました。
+dashboard.resync_all_sshkeys='.ssh/ autorized_key' ファイルを再生成します。(警告:Gogsキー以外は失われます)
+dashboard.resync_all_sshkeys_success=すべての公開鍵が正常に書き換えられました。
dashboard.server_uptime=サーバーの稼働時間
dashboard.current_goroutine=現在のGoroutine
dashboard.current_memory_usage=現在のメモリ使用量
@@ -631,6 +635,7 @@ config.db_path_helper=(「sqlite3」のみ)
config.service_config=サービスの構成
config.register_email_confirm=電子メールの確認を必要
config.disable_register=登録を無効にする
+config.show_registration_button=登録ボタンを表示します。
config.require_sign_in_view=サインインを要求
config.mail_notify=メール通知
config.enable_cache_avatar=アバターのキャッシュを有効にします。
@@ -713,16 +718,3 @@ years=%d 年 %s
raw_seconds=秒
raw_minutes=分
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/locale/locale_lv-LV.ini b/conf/locale/locale_lv-LV.ini
index 19373118f3..34430ed64a 100755
--- a/conf/locale/locale_lv-LV.ini
+++ b/conf/locale/locale_lv-LV.ini
@@ -59,6 +59,8 @@ run_user=Izpildes lietotājs
run_user_helper=Lietotājam ir jābūt rakstīšanas tiesībām repozitorija saknes direktorijai un Gogs jābūt palaistam zem šī lietotāja.
domain=Domēns
domain_helper=Tas ietekmē SSH klonēšanas URL.
+http_port=HTTP ports
+http_port_helper=Porta numurs pēc kura lietojumprogrammai būs iespējams pieslēgties.
app_url=Lietotnes URL
app_url_helper=Tas ietekmē HTTP/HTTPS klonēšanas URL un e-pasta saturā izsūtītās saites.
email_title=E-pasta pakalpojuma iestatījumi (neobligāti)
@@ -512,6 +514,8 @@ dashboard.delete_repo_archives=Dzēst visu repozitoriju arhīvus
dashboard.delete_repo_archives_success=Visu repozitoriju arhīvi tika veiksmīgi izdzēsti.
dashboard.git_gc_repos=Veikt repozitoriju datu sakārtošānu (git gc)
dashboard.git_gc_repos_success=Datu sakārtošana visiem repozitorijiem veiksmīgi pabeigta.
+dashboard.resync_all_sshkeys=Pārrakstīt '.ssh/authorized_key' failu (brīdinājums: ne-Git atslēgas tiks pazaudētas)
+dashboard.resync_all_sshkeys_success=Visas publiskās atslēgas tika veiksmīgi pārrakstītas.
dashboard.server_uptime=Servera darbības laiks
dashboard.current_goroutine=Izmantotās Gorutīnas
dashboard.current_memory_usage=Pašreiz izmantotā atmiņa
@@ -631,6 +635,7 @@ config.db_path_helper=(tikai Sqlite3 datu bāzei)
config.service_config=Pakalpojuma konfigurācija
config.register_email_confirm=Pieprasīt e-pasta apstiprināšanu
config.disable_register=Atspējot jaunu lietotāju reģistrāciju
+config.show_registration_button=Rādīt reģistrēšanās pogu
config.require_sign_in_view=Nepieciešama autorizācija
config.mail_notify=Pasta paziņojumi
config.enable_cache_avatar=Glabāt profila attēlus kešatmiņā
@@ -713,16 +718,3 @@ years=%d gadi %s
raw_seconds=sekundes
raw_minutes=minūtes
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/locale/locale_nl-NL.ini b/conf/locale/locale_nl-NL.ini
index f0bc7c70a2..414eb1ff81 100755
--- a/conf/locale/locale_nl-NL.ini
+++ b/conf/locale/locale_nl-NL.ini
@@ -59,6 +59,8 @@ run_user=Uitvoerende gebruikersnaam
run_user_helper=Deze gebruiker moet toegang hebben tot de git repositorie directorie en moet Gogs kunnen starten
domain=Domein
domain_helper=Dit heeft invloed op de SSH kloon URLs
+http_port=HTTP-poort
+http_port_helper=Poortnummer waar het programma naar luistert.
app_url=Applicatie URL
app_url_helper=Dit heeft invloed op de HTTP/HTTPS kloon urls en de urls die in de email worden gebruikt
email_title=E-mail service instellingen (Optioneel)
@@ -512,6 +514,8 @@ dashboard.delete_repo_archives=Verwijderen van alle repositories archieven
dashboard.delete_repo_archives_success=Alle repositories archieven hebben verwijderd.
dashboard.git_gc_repos=Garbage collectie uitvoeren
dashboard.git_gc_repos_success=Garbage collectie met succes uitgevoerd.
+dashboard.resync_all_sshkeys=Herschrijf '.ssh/authorized_keys' (Let op: alle sleutels die niet van Gogs zijn zullen verloren gaan!)
+dashboard.resync_all_sshkeys_success=Alle publieke sleutels zijn herschreven.
dashboard.server_uptime=Uptime server
dashboard.current_goroutine=Huidige Goroutines
dashboard.current_memory_usage=Huidige geheugen gebruik
@@ -631,6 +635,7 @@ config.db_path_helper=(alleen voor "sqlite3")
config.service_config=Serviceconfiguratie
config.register_email_confirm=E-mailbevestiging registreren
config.disable_register=Registratie uitgeschakeld
+config.show_registration_button=Registeren knop weergeven
config.require_sign_in_view=Inloggen vereist om te kunnen inzien
config.mail_notify=E-mailnotificaties
config.enable_cache_avatar=Avatar Cache inschakelen
@@ -713,16 +718,3 @@ years=%d jaren %s
raw_seconds=seconden
raw_minutes=minuten
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/locale/locale_ru-RU.ini b/conf/locale/locale_ru-RU.ini
index b0da5c550f..dfb5870dfd 100755
--- a/conf/locale/locale_ru-RU.ini
+++ b/conf/locale/locale_ru-RU.ini
@@ -631,6 +631,7 @@ config.db_path_helper=(for "sqlite3" only)
config.service_config=Service Configuration
config.register_email_confirm=Require E-mail Confirmation
config.disable_register=Отключить регистрацию
+config.show_registration_button = Показать Регистрация Кнопка
config.require_sign_in_view=Для просмотра необходима авторизация
config.mail_notify=Почтовые уведомления
config.enable_cache_avatar=Кешировать аватар
diff --git a/conf/locale/locale_zh-CN.ini b/conf/locale/locale_zh-CN.ini
index 49c013a9f1..e188a648ae 100755
--- a/conf/locale/locale_zh-CN.ini
+++ b/conf/locale/locale_zh-CN.ini
@@ -59,6 +59,8 @@ run_user=运行系统用户
run_user_helper=该用户必须具有对仓库根目录和运行 Gogs 的操作权限。
domain=域名
domain_helper=该设置影响 SSH 克隆地址。
+http_port=HTTP 端口号
+http_port_helper=应用监听的端口号
app_url=应用 URL
app_url_helper=该设置影响 HTTP/HTTPS 克隆地址和一些邮箱中的链接。
email_title=邮件服务设置(可选)
@@ -512,6 +514,8 @@ dashboard.delete_repo_archives=删除所有仓库存档
dashboard.delete_repo_archives_success=所有仓库存档清除成功!
dashboard.git_gc_repos=对仓库进行垃圾回收
dashboard.git_gc_repos_success=所有仓库垃圾回收成功!
+dashboard.resync_all_sshkeys=重新生成 '.ssh/autorized_key' 文件(警告:不是 Gogs 的密钥也会被删除)
+dashboard.resync_all_sshkeys_success=所有公钥重新生成成功!
dashboard.server_uptime=服务运行时间
dashboard.current_goroutine=当前 Goroutines 数量
dashboard.current_memory_usage=当前内存使用量
@@ -631,6 +635,7 @@ config.db_path_helper=(仅限 "sqlite3" 使用)
config.service_config=服务配置
config.register_email_confirm=注册邮件确认
config.disable_register=关闭注册功能
+config.show_registration_button=显示注册按钮
config.require_sign_in_view=强制登录浏览
config.mail_notify=邮件通知提醒
config.enable_cache_avatar=开启缓存头像
@@ -713,16 +718,3 @@ years=%d 年%s
raw_seconds=秒
raw_minutes=分钟
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/locale/locale_zh-HK.ini b/conf/locale/locale_zh-HK.ini
index accf079572..2fa837896d 100755
--- a/conf/locale/locale_zh-HK.ini
+++ b/conf/locale/locale_zh-HK.ini
@@ -59,6 +59,8 @@ run_user=執行系統用戶
run_user_helper=該用戶必須具有對倉庫根目錄和執行 Gogs 的操作權限。
domain=域名
domain_helper=該設置影響 SSH 複製地址。
+http_port=HTTP 端口號
+http_port_helper=應用監聽的端口號
app_url=應用 URL
app_url_helper=該設置影響 HTTP/HTTPS 複製地址和一些郵箱中的連結。
email_title=電子郵件服務設定(可選)
@@ -512,6 +514,8 @@ dashboard.delete_repo_archives=刪除所有倉庫存檔
dashboard.delete_repo_archives_success=所有倉庫存檔清除成功!
dashboard.git_gc_repos=對倉庫進行垃圾回收
dashboard.git_gc_repos_success=所有倉庫的垃圾回收已成功完成!
+dashboard.resync_all_sshkeys=重新生成 '.ssh/autorized_key' 文件(警告:不是 Gogs 的密鑰也會被刪除)
+dashboard.resync_all_sshkeys_success=所有公鑰重新生成成功!
dashboard.server_uptime=服務執行時間
dashboard.current_goroutine=當前 Goroutines 數量
dashboard.current_memory_usage=當前內存使用量
@@ -631,6 +635,7 @@ config.db_path_helper=(僅限 "sqlite3" 使用)
config.service_config=服務配置
config.register_email_confirm=註冊電子郵件確認
config.disable_register=關閉註冊功能
+config.show_registration_button=顯示註冊按鈕
config.require_sign_in_view=強制登錄瀏覽
config.mail_notify=郵件通知提醒
config.enable_cache_avatar=開啟緩存頭像
@@ -713,16 +718,3 @@ years=%d 年%s
raw_seconds=秒
raw_minutes=分鐘
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/gogs.go b/gogs.go
index 5e69bd68e5..c09c4ca196 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
-const APP_VER = "0.5.12.0204 Beta"
+const APP_VER = "0.5.13.0207 Beta"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/models/action.go b/models/action.go
index 318a5f6ad4..a6c6cfbfaa 100644
--- a/models/action.go
+++ b/models/action.go
@@ -41,14 +41,21 @@ var (
var (
// Same as Github. See https://help.github.com/articles/closing-issues-via-commit-messages
- IssueCloseKeywords = []string{"close", "closes", "closed", "fix", "fixes", "fixed", "resolve", "resolves", "resolved"}
- IssueCloseKeywordsPat *regexp.Regexp
- IssueReferenceKeywordsPat *regexp.Regexp
+ IssueCloseKeywords = []string{"close", "closes", "closed", "fix", "fixes", "fixed", "resolve", "resolves", "resolved"}
+ IssueReopenKeywords = []string{"reopen", "reopens", "reopened"}
+
+ IssueCloseKeywordsPat, IssueReopenKeywordsPat *regexp.Regexp
+ IssueReferenceKeywordsPat *regexp.Regexp
)
+func assembleKeywordsPattern(words []string) string {
+ return fmt.Sprintf(`(?i)(?:%s) \S+`, strings.Join(words, "|"))
+}
+
func init() {
- IssueCloseKeywordsPat = regexp.MustCompile(fmt.Sprintf(`(?i)(?:%s) \S+`, strings.Join(IssueCloseKeywords, "|")))
- IssueReferenceKeywordsPat = regexp.MustCompile(fmt.Sprintf(`(?i)(?:) \S+`))
+ IssueCloseKeywordsPat = regexp.MustCompile(assembleKeywordsPattern(IssueCloseKeywords))
+ IssueReopenKeywordsPat = regexp.MustCompile(assembleKeywordsPattern(IssueReopenKeywords))
+ IssueReferenceKeywordsPat = regexp.MustCompile(`(?i)(?:)(^| )\S+`)
}
// Action represents user operation type and other information to repository.,
@@ -112,13 +119,11 @@ func (a Action) GetIssueInfos() []string {
func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, commits []*base.PushCommit) error {
for _, c := range commits {
- references := IssueReferenceKeywordsPat.FindAllString(c.Message, -1)
-
- for _, ref := range references {
+ for _, ref := range IssueReferenceKeywordsPat.FindAllString(c.Message, -1) {
ref := ref[strings.IndexByte(ref, byte(' '))+1:]
ref = strings.TrimRightFunc(ref, func(c rune) bool {
- return !unicode.IsDigit(c)
- })
+ return !unicode.IsDigit(c)
+ })
if len(ref) == 0 {
continue
@@ -128,33 +133,29 @@ func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, com
if ref[0] == '#' {
ref = fmt.Sprintf("%s/%s%s", repoUserName, repoName, ref)
} else if strings.Contains(ref, "/") == false {
- // We don't support User#ID syntax yet
+ // FIXME: We don't support User#ID syntax yet
// return ErrNotImplemented
continue
}
issue, err := GetIssueByRef(ref)
-
if err != nil {
return err
}
url := fmt.Sprintf("%s/%s/%s/commit/%s", setting.AppSubUrl, repoUserName, repoName, c.Sha1)
message := fmt.Sprintf(`<a href="%s">%s</a>`, url, c.Message)
-
- if _, err = CreateComment(userId, issue.RepoId, issue.Id, 0, 0, COMMIT, message, nil); err != nil {
+ if _, err = CreateComment(userId, issue.RepoId, issue.Id, 0, 0, COMMENT_TYPE_COMMIT, message, nil); err != nil {
return err
}
}
- closes := IssueCloseKeywordsPat.FindAllString(c.Message, -1)
-
- for _, ref := range closes {
+ for _, ref := range IssueCloseKeywordsPat.FindAllString(c.Message, -1) {
ref := ref[strings.IndexByte(ref, byte(' '))+1:]
ref = strings.TrimRightFunc(ref, func(c rune) bool {
- return !unicode.IsDigit(c)
- })
+ return !unicode.IsDigit(c)
+ })
if len(ref) == 0 {
continue
@@ -171,7 +172,6 @@ func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, com
}
issue, err := GetIssueByRef(ref)
-
if err != nil {
return err
}
@@ -180,7 +180,6 @@ func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, com
if issue.IsClosed {
continue
}
-
issue.IsClosed = true
if err = UpdateIssue(issue); err != nil {
@@ -194,14 +193,60 @@ func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, com
}
// If commit happened in the referenced repository, it means the issue can be closed.
- if _, err = CreateComment(userId, repoId, issue.Id, 0, 0, CLOSE, "", nil); err != nil {
+ if _, err = CreateComment(userId, repoId, issue.Id, 0, 0, COMMENT_TYPE_CLOSE, "", nil); err != nil {
return err
}
}
}
-
- }
+ for _, ref := range IssueReopenKeywordsPat.FindAllString(c.Message, -1) {
+ ref := ref[strings.IndexByte(ref, byte(' '))+1:]
+ ref = strings.TrimRightFunc(ref, func(c rune) bool {
+ return !unicode.IsDigit(c)
+ })
+
+ if len(ref) == 0 {
+ continue
+ }
+
+ // Add repo name if missing
+ if ref[0] == '#' {
+ ref = fmt.Sprintf("%s/%s%s", repoUserName, repoName, ref)
+ } else if strings.Contains(ref, "/") == false {
+ // We don't support User#ID syntax yet
+ // return ErrNotImplemented
+
+ continue
+ }
+
+ issue, err := GetIssueByRef(ref)
+ if err != nil {
+ return err
+ }
+
+ if issue.RepoId == repoId {
+ if !issue.IsClosed {
+ continue
+ }
+ issue.IsClosed = false
+
+ if err = UpdateIssue(issue); err != nil {
+ return err
+ } else if err = UpdateIssueUserPairsByStatus(issue.Id, issue.IsClosed); err != nil {
+ return err
+ }
+
+ if err = ChangeMilestoneIssueStats(issue); err != nil {
+ return err
+ }
+
+ // If commit happened in the referenced repository, it means the issue can be closed.
+ if _, err = CreateComment(userId, repoId, issue.Id, 0, 0, COMMENT_TYPE_REOPEN, "", nil); err != nil {
+ return err
+ }
+ }
+ }
+ }
return nil
}
diff --git a/models/issue.go b/models/issue.go
index c756e49759..d9a24063c2 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -859,22 +859,16 @@ type CommentType int
const (
// Plain comment, can be associated with a commit (CommitId > 0) and a line (Line > 0)
- COMMENT CommentType = iota
-
- // Reopen action
- REOPEN
-
- // Close action
- CLOSE
-
- // Reference from another issue
- ISSUE
+ COMMENT_TYPE_COMMENT CommentType = iota
+ COMMENT_TYPE_REOPEN
+ COMMENT_TYPE_CLOSE
+ // References.
+ COMMENT_TYPE_ISSUE
// Reference from some commit (not part of a pull request)
- COMMIT
-
+ COMMENT_TYPE_COMMIT
// Reference from some pull request
- PULL
+ COMMENT_TYPE_PULL
)
// Comment represents a comment in commit and issue page.
@@ -908,7 +902,7 @@ func CreateComment(userId, repoId, issueId, commitId, line int64, cmtType Commen
// Check comment type.
switch cmtType {
- case COMMENT:
+ case COMMENT_TYPE_COMMENT:
rawSql := "UPDATE `issue` SET num_comments = num_comments + 1 WHERE id = ?"
if _, err := sess.Exec(rawSql, issueId); err != nil {
sess.Rollback()
@@ -929,13 +923,13 @@ func CreateComment(userId, repoId, issueId, commitId, line int64, cmtType Commen
return nil, err
}
}
- case REOPEN:
+ case COMMENT_TYPE_REOPEN:
rawSql := "UPDATE `repository` SET num_closed_issues = num_closed_issues - 1 WHERE id = ?"
if _, err := sess.Exec(rawSql, repoId); err != nil {
sess.Rollback()
return nil, err
}
- case CLOSE:
+ case COMMENT_TYPE_CLOSE:
rawSql := "UPDATE `repository` SET num_closed_issues = num_closed_issues + 1 WHERE id = ?"
if _, err := sess.Exec(rawSql, repoId); err != nil {
sess.Rollback()
diff --git a/models/repo.go b/models/repo.go
index edd156133b..5a40c5b987 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -247,8 +247,8 @@ func (repo *Repository) CloneLink() (cl CloneLink, err error) {
if err = repo.GetOwner(); err != nil {
return cl, err
}
- if setting.SshPort != 22 {
- cl.SSH = fmt.Sprintf("ssh://%s@%s:%d/%s/%s.git", setting.RunUser, setting.Domain, setting.SshPort, repo.Owner.LowerName, repo.LowerName)
+ if setting.SSHPort != 22 {
+ cl.SSH = fmt.Sprintf("ssh://%s@%s:%d/%s/%s.git", setting.RunUser, setting.Domain, setting.SSHPort, repo.Owner.LowerName, repo.LowerName)
} else {
cl.SSH = fmt.Sprintf("%s@%s:%s/%s.git", setting.RunUser, setting.Domain, repo.Owner.LowerName, repo.LowerName)
}
diff --git a/modules/asn1-ber/ber.go b/modules/asn1-ber/ber.go
index 3e99a273c6..52b9a59180 100644
--- a/modules/asn1-ber/ber.go
+++ b/modules/asn1-ber/ber.go
@@ -256,11 +256,11 @@ func ReadPacket(reader io.Reader) (*Packet, error) {
}
func DecodeString(data []byte) (ret string) {
- for _, c := range data {
- ret += fmt.Sprintf("%c", c)
- }
+ // for _, c := range data {
+ // ret += fmt.Sprintf("%c", c)
+ // }
- return
+ return string(data)
}
func DecodeInteger(data []byte) (ret uint64) {
diff --git a/modules/base/markdown.go b/modules/base/markdown.go
index d3f3e5feaf..b5f397dce0 100644
--- a/modules/base/markdown.go
+++ b/modules/base/markdown.go
@@ -106,7 +106,7 @@ func (options *CustomRender) Image(out *bytes.Buffer, link []byte, title []byte,
}
var (
- MentionPattern = regexp.MustCompile(`@[0-9a-zA-Z_]{1,}`)
+ MentionPattern = regexp.MustCompile(`((^|\s)@)[0-9a-zA-Z_]{1,}`)
commitPattern = regexp.MustCompile(`(\s|^)https?.*commit/[0-9a-zA-Z]+(#+[0-9a-zA-Z-]*)?`)
issueFullPattern = regexp.MustCompile(`(\s|^)https?.*issues/[0-9]+(#+[0-9a-zA-Z-]*)?`)
issueIndexPattern = regexp.MustCompile(`( |^)#[0-9]+`)
@@ -129,7 +129,7 @@ func RenderSpecialLink(rawBytes []byte, urlPrefix string) []byte {
ms := MentionPattern.FindAll(line, -1)
for _, m := range ms {
line = bytes.Replace(line, m,
- []byte(fmt.Sprintf(`<a href="%s/user/%s">%s</a>`, setting.AppSubUrl, m[1:], m)), -1)
+ []byte(fmt.Sprintf(`<a href="%s/%s">%s</a>`, setting.AppSubUrl, m[2:], m)), -1)
}
}
@@ -177,8 +177,8 @@ func RenderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte {
func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string) []byte {
ms := issueIndexPattern.FindAll(rawBytes, -1)
for _, m := range ms {
- rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(
- `<a href="%s/issues/%s">%s</a>`, urlPrefix, m[1:], m)), -1)
+ rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(`<a href="%s/issues/%s">%s</a>`,
+ urlPrefix, strings.TrimPrefix(string(m[1:]), "#"), m)), -1)
}
return rawBytes
}
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index fc7814401f..28be3a3025 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -192,6 +192,8 @@ func Contexter() macaron.Handler {
ctx.Data["CsrfToken"] = x.GetToken()
ctx.Data["CsrfTokenHtml"] = template.HTML(`<input type="hidden" name="_csrf" value="` + x.GetToken() + `">`)
+ ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton
+
c.Map(ctx)
}
}
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index d143d8a86b..1ab158dd6d 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -386,6 +386,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner
ctx.Data["IsRepositoryTrueOwner"] = ctx.Repo.IsTrueOwner
+ ctx.Data["DisableSSH"] = setting.DisableSSH
ctx.Repo.CloneLink, err = repo.CloneLink()
if err != nil {
ctx.Handle(500, "CloneLink", err)
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 79aaf7a064..f5212a2867 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -50,7 +50,8 @@ var (
Protocol Scheme
Domain string
HttpAddr, HttpPort string
- SshPort int
+ DisableSSH bool
+ SSHPort int
OfflineMode bool
DisableRouterLog bool
CertFile, KeyFile string
@@ -213,7 +214,8 @@ func NewConfigContext() {
Domain = sec.Key("DOMAIN").MustString("localhost")
HttpAddr = sec.Key("HTTP_ADDR").MustString("0.0.0.0")
HttpPort = sec.Key("HTTP_PORT").MustString("3000")
- SshPort = sec.Key("SSH_PORT").MustInt(22)
+ DisableSSH = sec.Key("DISABLE_SSH").MustBool()
+ SSHPort = sec.Key("SSH_PORT").MustInt(22)
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(workDir)
@@ -315,6 +317,7 @@ func NewConfigContext() {
var Service struct {
RegisterEmailConfirm bool
DisableRegistration bool
+ ShowRegistrationButton bool
RequireSignInView bool
EnableCacheAvatar bool
EnableNotifyMail bool
@@ -328,6 +331,7 @@ func newService() {
Service.ActiveCodeLives = Cfg.Section("service").Key("ACTIVE_CODE_LIVE_MINUTES").MustInt(180)
Service.ResetPwdCodeLives = Cfg.Section("service").Key("RESET_PASSWD_CODE_LIVE_MINUTES").MustInt(180)
Service.DisableRegistration = Cfg.Section("service").Key("DISABLE_REGISTRATION").MustBool()
+ Service.ShowRegistrationButton = Cfg.Section("service").Key("SHOW_REGISTRATION_BUTTON").MustBool(!Service.DisableRegistration)
Service.RequireSignInView = Cfg.Section("service").Key("REQUIRE_SIGNIN_VIEW").MustBool()
Service.EnableCacheAvatar = Cfg.Section("service").Key("ENABLE_CACHE_AVATAR").MustBool()
Service.EnableReverseProxyAuth = Cfg.Section("service").Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool()
diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css
index dc451a7051..71208f4b56 100644
--- a/public/ng/css/gogs.css
+++ b/public/ng/css/gogs.css
@@ -364,6 +364,9 @@ img.avatar-100 {
.markdown table tr:nth-child(2n) {
background-color: #F8F8F8;
}
+.markdown p {
+ margin: 20px 0;
+}
.markdown a {
color: #428BCA;
}
@@ -1215,6 +1218,9 @@ The register and sign-in page style
#repo-files-table {
margin-bottom: 20px;
}
+#repo-files-table .sha .label {
+ font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+}
#repo-files-table th,
#repo-files-table td {
text-align: left;
@@ -1620,11 +1626,23 @@ The register and sign-in page style
background-color: #E0E0E0 !important;
border-color: #ADADAD !important;
}
+.diff-file-box .code-diff tbody tr.tag-code td.selected-line,
+.diff-file-box .code-diff tbody tr.tag-code td.selected-line pre {
+ background-color: #ffffdd !important;
+}
+.diff-file-box .code-diff tbody tr.same-code td.selected-line,
+.diff-file-box .code-diff tbody tr.same-code td.selected-line pre {
+ background-color: #ffffdd !important;
+}
.diff-file-box .code-diff tbody tr.del-code td,
.diff-file-box .code-diff tbody tr.del-code pre {
background-color: #ffe2dd !important;
border-color: #e9aeae !important;
}
+.diff-file-box .code-diff tbody tr.del-code td.selected-line,
+.diff-file-box .code-diff tbody tr.del-code td.selected-line pre {
+ background-color: #ffffdd !important;
+}
.diff-file-box .code-diff tbody tr.add-code td,
.diff-file-box .code-diff tbody tr.add-code pre {
background-color: #d1ffd6 !important;
diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js
index e9b44d6575..a6b9753e17 100644
--- a/public/ng/js/gogs.js
+++ b/public/ng/js/gogs.js
@@ -206,10 +206,18 @@ var Gogs = {};
Gogs.renderDiffView = function () {
function selectRange($list, $select, $from) {
$list.removeClass('active');
+ $list.parents('tr').removeClass('end-selected-line');
$list.parents('tr').find('td').removeClass('selected-line');
if ($from) {
- var a = parseInt($select.attr('rel').substr(1));
- var b = parseInt($from.attr('rel').substr(1));
+ var expr = new RegExp(/diff-(\d+)L(\d+)/);
+ var selectMatches = $select.attr('rel').match(expr)
+ var fromMatches = $from.attr('rel').match(expr)
+ var a = parseInt(selectMatches[2]);
+ var b = parseInt(fromMatches[2]);
+ var linesIntToStr = {};
+ linesIntToStr[a] = selectMatches[2];
+ linesIntToStr[b] = fromMatches[2];
+
var c;
if (a != b) {
if (a > b) {
@@ -217,13 +225,11 @@ var Gogs = {};
a = b;
b = c;
}
- var classes = [];
- for (i = a; i <= b; i++) {
- classes.push('[rel=L' + i + ']');
- }
- $list.filter(classes.join(',')).addClass('active');
- $list.filter(classes.join(',')).parents('tr').find('td').addClass('selected-line');
- $.changeHash('#L' + a + '-' + 'L' + b);
+ $('[rel=diff-'+fromMatches[1]+'L' + linesIntToStr[b] + ']').parents('tr').next().addClass('end-selected-line');
+ var $selectedLines = $('[rel=diff-'+fromMatches[1]+'L' + linesIntToStr[a] + ']').parents('tr').nextUntil('.end-selected-line').andSelf();
+ $selectedLines.find('td.lines-num > span').addClass('active')
+ $selectedLines.find('td').addClass('selected-line');
+ $.changeHash('#diff-'+fromMatches[1]+'L' + linesIntToStr[a] + '-L' + linesIntToStr[b]);
return
}
}
@@ -256,18 +262,18 @@ var Gogs = {};
});
$(window).on('hashchange', function (e) {
- var m = window.location.hash.match(/^#(L\d+)\-(L\d+)$/);
+ var m = window.location.hash.match(/^#diff-(\d+)(L\d+)\-(L\d+)$/);
var $list = $('.code-diff td.lines-num > span');
var $first;
if (m) {
- $first = $list.filter('[rel=' + m[1] + ']');
- selectRange($list, $first, $list.filter('[rel=' + m[2] + ']'));
+ $first = $list.filter('[rel=diff-' + m[1] + m[2] + ']');
+ selectRange($list, $first, $list.filter('[rel=diff-' + m[1] + m[3] + ']'));
$("html, body").scrollTop($first.offset().top - 200);
return;
}
- m = window.location.hash.match(/^#(L\d+)$/);
+ m = window.location.hash.match(/^#diff-(\d+)(L\d+)$/);
if (m) {
- $first = $list.filter('[rel=' + m[1] + ']');
+ $first = $list.filter('[rel=diff-' + m[1] + m[2] + ']');
selectRange($list, $first);
$("html, body").scrollTop($first.offset().top - 200);
}
diff --git a/public/ng/less/gogs/markdown.less b/public/ng/less/gogs/markdown.less
index e3abb480a2..cd2eef99bc 100644
--- a/public/ng/less/gogs/markdown.less
+++ b/public/ng/less/gogs/markdown.less
@@ -1,88 +1,91 @@
.markdown {
- background-color: white;
- font-size: 16px;
- line-height: 24px;
- .markdown-body {
- padding-left: 24px;
- padding-right: 16px;
- }
- h5,
- h6 {
- font-size: 1em;
- }
- ul {
- padding: 10px 0 0 15px;
- li {
- list-style: inside;
- }
- }
- ol li {
- list-style: decimal inside;
- }
+ background-color: white;
+ font-size: 16px;
+ line-height: 24px;
+ .markdown-body {
+ padding-left: 24px;
+ padding-right: 16px;
+ }
+ h5,
+ h6 {
+ font-size: 1em;
+ }
+ ul {
+ padding: 10px 0 0 15px;
li {
- line-height: 1.6;
- margin-top: 6px;
- &:first-child {
- margin-top: 0;
- }
- }
+ list-style: inside;
+ }
+ }
+ ol li {
+ list-style: decimal inside;
+ }
+ li {
+ line-height: 1.6;
+ margin-top: 6px;
+ &:first-child {
+ margin-top: 0;
+ }
+ }
+ code {
+ padding: 0.2em 0.5em;
+ margin: 0;
+ background-color: rgba(0,0,0,0.04);
+ border-radius: 3px;
+ }
+ >pre {
+ font-size: 14px;
+ line-height: 1.6;
+ overflow: auto;
+ border: 1px solid #ddd;
+ border-radius: .25em;
+ margin: 5px 0;
+ padding: 10px;
+ background-color: #f8f8f8;
code {
- padding: 0.2em 0.5em;
- margin: 0;
- background-color: rgba(0,0,0,0.04);
- border-radius: 3px;
- }
- >pre {
- font-size: 14px;
- line-height: 1.6;
- overflow: auto;
- border: 1px solid #ddd;
- border-radius: .25em;
- margin: 5px 0;
- padding: 10px;
- background-color: #f8f8f8;
- code {
- padding: 0;
- background-color: inherit;
- }
- }
- img {
- padding: 10px 0;
- max-width: 100%;
- }
- blockquote {
- border-left: 4px solid #ddd;
- margin-bottom: 16px;
- p {
- font-size: 14px;
- padding: 5px 15px;
- color: #777;
- }
- }
- table {
- display: block;
- width: 100%;
- overflow: auto;
- word-break: normal;
- margin: 15px 0;
- border-collapse: collapse;
- border-spacing: 0;
- display: block;
- th {
- font-weight: 700;
- }
- th, td {
- border: 1px solid #DDD;
- padding: 6px 13px !important;
- }
- tr {
- background-color: #FFF;
- border-top: 1px solid #CCC;
- &:nth-child(2n) {
- background-color: #F8F8F8;
- }
- }
- }
+ padding: 0;
+ background-color: inherit;
+ }
+ }
+ img {
+ padding: 10px 0;
+ max-width: 100%;
+ }
+ blockquote {
+ border-left: 4px solid #ddd;
+ margin-bottom: 16px;
+ p {
+ font-size: 14px;
+ padding: 5px 15px;
+ color: #777;
+ }
+ }
+ table {
+ display: block;
+ width: 100%;
+ overflow: auto;
+ word-break: normal;
+ margin: 15px 0;
+ border-collapse: collapse;
+ border-spacing: 0;
+ display: block;
+ th {
+ font-weight: 700;
+ }
+ th, td {
+ border: 1px solid #DDD;
+ padding: 6px 13px !important;
+ }
+ tr {
+ background-color: #FFF;
+ border-top: 1px solid #CCC;
+ &:nth-child(2n) {
+ background-color: #F8F8F8;
+ }
+ }
+ }
+ p {
+ margin: 20px 0;
+ }
}
.markdown a {
color: #428BCA;
diff --git a/public/ng/less/gogs/repository.less b/public/ng/less/gogs/repository.less
index e48f5c8713..59513c77c7 100644
--- a/public/ng/less/gogs/repository.less
+++ b/public/ng/less/gogs/repository.less
@@ -247,6 +247,9 @@
}
#repo-files-table {
margin-bottom: 20px;
+ .sha .label {
+ font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
+ }
th, td {
text-align: left;
line-height: 32px;
@@ -653,12 +656,23 @@
background-color: #E0E0E0 !important;
border-color: #ADADAD !important;
}
+ td.selected-line, td.selected-line pre {
+ background-color: #ffffdd !important;
+ }
+ }
+ &.same-code {
+ td.selected-line, td.selected-line pre {
+ background-color: #ffffdd !important;
+ }
}
&.del-code {
td, pre {
background-color: #ffe2dd !important;
border-color: #e9aeae !important;
}
+ td.selected-line, td.selected-line pre {
+ background-color: #ffffdd !important;
+ }
}
&.add-code {
td, pre {
diff --git a/routers/repo/http.go b/routers/repo/http.go
index a5e01efc8f..f5dc0c9d6a 100644
--- a/routers/repo/http.go
+++ b/routers/repo/http.go
@@ -73,11 +73,14 @@ func Http(ctx *middleware.Context) {
return
}
- // only public pull don't need auth
+ // Only public pull don't need auth.
isPublicPull := !repo.IsPrivate && isPull
- var askAuth = !isPublicPull || setting.Service.RequireSignInView
- var authUser *models.User
- var authUsername, passwd string
+ var (
+ askAuth = !isPublicPull || setting.Service.RequireSignInView
+ authUser *models.User
+ authUsername string
+ authPasswd string
+ )
// check access
if askAuth {
@@ -90,12 +93,13 @@ func Http(ctx *middleware.Context) {
auths := strings.Fields(baHead)
// currently check basic auth
// TODO: support digit auth
- // FIXME: middlewares/context.go did basic auth check already
+ // FIXME: middlewares/context.go did basic auth check already,
+ // maybe could use that one.
if len(auths) != 2 || auths[0] != "Basic" {
ctx.Handle(401, "no basic auth and digit auth", nil)
return
}
- authUsername, passwd, err = base.BasicAuthDecode(auths[1])
+ authUsername, authPasswd, err = base.BasicAuthDecode(auths[1])
if err != nil {
ctx.Handle(401, "no basic auth and digit auth", nil)
return
@@ -103,15 +107,33 @@ func Http(ctx *middleware.Context) {
authUser, err = models.GetUserByName(authUsername)
if err != nil {
- ctx.Handle(401, "no basic auth and digit auth", nil)
- return
- }
+ if err != models.ErrUserNotExist {
+ ctx.Handle(500, "GetUserByName", err)
+ return
+ }
- newUser := &models.User{Passwd: passwd, Salt: authUser.Salt}
- newUser.EncodePasswd()
- if authUser.Passwd != newUser.Passwd {
- ctx.Handle(401, "no basic auth and digit auth", nil)
- return
+ // Assume username now is a token.
+ token, err := models.GetAccessTokenBySha(authUsername)
+ if err != nil {
+ if err == models.ErrAccessTokenNotExist {
+ ctx.Handle(401, "invalid token", nil)
+ } else {
+ ctx.Handle(500, "GetAccessTokenBySha", err)
+ }
+ return
+ }
+ authUser, err = models.GetUserById(token.Uid)
+ if err != nil {
+ ctx.Handle(500, "GetUserById", err)
+ return
+ }
+ authUsername = authUser.Name
+ } else {
+ // Check user's password when username is correctly presented.
+ if !authUser.ValidtePassword(authPasswd) {
+ ctx.Handle(401, "invalid password", nil)
+ return
+ }
}
if !isPublicPull {
@@ -139,9 +161,7 @@ func Http(ctx *middleware.Context) {
}
}
- var f func(rpc string, input []byte)
-
- f = func(rpc string, input []byte) {
+ var f = func(rpc string, input []byte) {
if rpc == "receive-pack" {
var lastLine int64 = 0
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 999fd0a892..3e0206dafb 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -424,7 +424,7 @@ func ViewIssue(ctx *middleware.Context) {
}
comments[i].Poster = u
- if comments[i].Type == models.COMMENT {
+ if comments[i].Type == models.COMMENT_TYPE_COMMENT {
comments[i].Content = string(base.RenderMarkdown([]byte(comments[i].Content), ctx.Repo.RepoLink))
}
}
@@ -774,9 +774,9 @@ func Comment(ctx *middleware.Context) {
}
}
- cmtType := models.CLOSE
+ cmtType := models.COMMENT_TYPE_CLOSE
if !issue.IsClosed {
- cmtType = models.REOPEN
+ cmtType = models.COMMENT_TYPE_REOPEN
}
if _, err = models.CreateComment(ctx.User.Id, ctx.Repo.Repository.Id, issue.Id, 0, 0, cmtType, "", nil); err != nil {
@@ -795,7 +795,7 @@ func Comment(ctx *middleware.Context) {
if len(content) > 0 || len(ctx.Req.MultipartForm.File["attachments"]) > 0 {
switch ctx.Params(":action") {
case "new":
- if comment, err = models.CreateComment(ctx.User.Id, ctx.Repo.Repository.Id, issue.Id, 0, 0, models.COMMENT, content, nil); err != nil {
+ if comment, err = models.CreateComment(ctx.User.Id, ctx.Repo.Repository.Id, issue.Id, 0, 0, models.COMMENT_TYPE_COMMENT, content, nil); err != nil {
send(500, nil, err)
return
}
@@ -1122,18 +1122,18 @@ func IssueGetAttachment(ctx *middleware.Context) {
// testing route handler for new issue ui page
// todo : move to Issue() function
-func Issues2(ctx *middleware.Context){
- ctx.HTML(200,"repo/issue2/list")
+func Issues2(ctx *middleware.Context) {
+ ctx.HTML(200, "repo/issue2/list")
}
-func PullRequest2(ctx *middleware.Context){
- ctx.HTML(200,"repo/pr2/list")
+func PullRequest2(ctx *middleware.Context) {
+ ctx.HTML(200, "repo/pr2/list")
}
-func Labels2(ctx *middleware.Context){
- ctx.HTML(200,"repo/issue2/labels")
+func Labels2(ctx *middleware.Context) {
+ ctx.HTML(200, "repo/issue2/labels")
}
-func Milestones2(ctx *middleware.Context){
- ctx.HTML(200,"repo/milestone2/list")
+func Milestones2(ctx *middleware.Context) {
+ ctx.HTML(200, "repo/milestone2/list")
}
diff --git a/routers/repo/view.go b/routers/repo/view.go
index cb689df6a0..cfe0fa010c 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -127,7 +127,6 @@ func Home(ctx *middleware.Context) {
entries.Sort()
files := make([][]interface{}, 0, len(entries))
-
for _, te := range entries {
if te.Type != git.COMMIT {
c, err := ctx.Repo.Commit.GetCommitOfRelPath(filepath.Join(treePath, te.Name()))
@@ -151,16 +150,6 @@ func Home(ctx *middleware.Context) {
files = append(files, []interface{}{te, git.NewSubModuleFile(c, sm.Url, te.Id.String())})
}
}
-
- // Render issue index links.
- for _, f := range files {
- switch c := f[1].(type) {
- case *git.Commit:
- c.CommitMessage = c.CommitMessage
- case *git.SubModuleFile:
- c.CommitMessage = c.CommitMessage
- }
- }
ctx.Data["Files"] = files
var readmeFile *git.Blob
@@ -208,7 +197,6 @@ func Home(ctx *middleware.Context) {
}
lastCommit := ctx.Repo.Commit
- lastCommit.CommitMessage = string(base.RenderIssueIndexPattern([]byte(lastCommit.CommitMessage), ctx.Repo.RepoLink))
if len(treePath) > 0 {
c, err := ctx.Repo.Commit.GetCommitOfRelPath(treePath)
if err != nil {
diff --git a/templates/.VERSION b/templates/.VERSION
index 40246b9eca..5a5ed364d9 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.5.12.0204 Beta \ No newline at end of file
+0.5.13.0207 Beta \ No newline at end of file
diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl
index 1f8a85ecb2..f8b4be0b83 100644
--- a/templates/admin/config.tmpl
+++ b/templates/admin/config.tmpl
@@ -78,6 +78,8 @@
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
<dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
+ <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
diff --git a/templates/home.tmpl b/templates/home.tmpl
index 8603f26f41..29865dbf9a 100644
--- a/templates/home.tmpl
+++ b/templates/home.tmpl
@@ -14,7 +14,9 @@
<input class="ipt ipt-large" name="password" type="password" placeholder="{{.i18n.Tr "home.password_holder"}}"/>
<input name="from" type="hidden" value="home">
<button class="btn btn-black btn-large">{{.i18n.Tr "sign_in"}}</button>
+ {{if .ShowRegistrationButton}}
<button class="btn btn-green btn-large" id="register-button">{{.i18n.Tr "register"}}</button>
+ {{end}}
</form>
<div id="promo-social" class="social-buttons">
{{template "ng/base/social" .}}
diff --git a/templates/ng/base/header.tmpl b/templates/ng/base/header.tmpl
index aec4e2ef66..da9218368d 100644
--- a/templates/ng/base/header.tmpl
+++ b/templates/ng/base/header.tmpl
@@ -49,10 +49,12 @@
<li class="right" id="header-nav-sign-in">
<a href="{{AppSubUrl}}/user/login" title="Sign In"><i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}</a>
</li>
+ {{if .ShowRegistrationButton}}
<li class="right">
<a href="{{AppSubUrl}}/user/sign_up" title="Account Settings"><i class="octicon octicon-person-add"></i> {{.i18n.Tr "register"}}</a>
</li>
{{end}}
+ {{end}}
{{end}}
</ul>
</header> \ No newline at end of file
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 20e67db810..9e52efc727 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -18,9 +18,11 @@
</a>
<div id="repo-header-download-drop" class="drop-down">
<div id="repo-clone" class="clear">
- <button class="btn btn-blue left left btn-left-radius" id="repo-clone-ssh" data-link="{{$.CloneLink.SSH}}">SSH</button>
- <button class="btn btn-gray left" id="repo-clone-https" data-link="{{$.CloneLink.HTTPS}}">HTTPS</button>
- <input id="repo-clone-url" class="ipt ipt-disabled left" value="{{$.CloneLink.SSH}}" readonly />
+ {{if not $.DisableSSH}}
+ <button class="btn btn-blue left btn-left-radius" id="repo-clone-ssh" data-link="{{$.CloneLink.SSH}}">SSH</button>
+ {{end}}
+ <button class="btn {{if $.DisableSSH}}btn-blue{{else}}btn-gray{{end}} left" id="repo-clone-https" data-link="{{$.CloneLink.HTTPS}}">HTTPS</button>
+ <input id="repo-clone-url" class="ipt ipt-disabled left" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly />
<button id="repo-clone-copy" class="btn btn-black left btn-right-radius" data-copy-val="val" data-copy-from="#repo-clone-url" original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-after-title="{{$.i18n.Tr "repo.copied"}}">{{$.i18n.Tr "repo.copy_link"}}</button>
<p class="text-center" id="repo-clone-help">{{$.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</p>
<hr/>