install - add mail from setting
This commit is contained in:
		
							parent
							
								
									b9dc2147b4
								
							
						
					
					
						commit
						a2a9e151f8
					
				
					 9 changed files with 68 additions and 50 deletions
				
			
		|  | @ -79,6 +79,8 @@ app_url_helper = This affects HTTP/HTTPS clone URL and somewhere in e-mail. | ||||||
| optional_title = Optional Settings | optional_title = Optional Settings | ||||||
| email_title = E-mail Service Settings | email_title = E-mail Service Settings | ||||||
| smtp_host = SMTP Host | smtp_host = SMTP Host | ||||||
|  | smtp_from = From | ||||||
|  | smtp_from_helper = Mail from address, RFC 5322. It can be just an email address, or the "Name" <email@example.com> format. | ||||||
| mailer_user = Sender E-mail | mailer_user = Sender E-mail | ||||||
| mailer_password = Sender Password | mailer_password = Sender Password | ||||||
| register_confirm = Enable Register Confirmation | register_confirm = Enable Register Confirmation | ||||||
|  |  | ||||||
|  | @ -50,7 +50,7 @@ code=Código | ||||||
| install=Instalación | install=Instalación | ||||||
| title=Pasos de la instalación por primera vez | title=Pasos de la instalación por primera vez | ||||||
| requite_db_desc=Gogs necesita MySQL, PostgreSQL o SQLite3. | requite_db_desc=Gogs necesita MySQL, PostgreSQL o SQLite3. | ||||||
| db_title=Database Settings | db_title=Configuración de base de datos | ||||||
| db_type=Tipo de base de datos | db_type=Tipo de base de datos | ||||||
| host=Anfitrión | host=Anfitrión | ||||||
| user=Usuario | user=Usuario | ||||||
|  | @ -60,11 +60,11 @@ db_helper=Por favor utilice el motor INNODB con la configuración de caracteres | ||||||
| ssl_mode=Modo SSL | ssl_mode=Modo SSL | ||||||
| path=Ruta | path=Ruta | ||||||
| sqlite_helper=Ruta del archivo de la base de datos de SQLite3. | sqlite_helper=Ruta del archivo de la base de datos de SQLite3. | ||||||
| err_empty_sqlite_path=SQLite3 database path cannot be empty. | err_empty_sqlite_path=La ruta de la base de datos SQLite3 no puede estar vacía. | ||||||
| 
 | 
 | ||||||
| general_title=Configuración General de Gogs | general_title=Configuración General de Gogs | ||||||
| app_name=Application Name | app_name=Nombre de la Aplicación | ||||||
| app_name_helper=Put your organization name here huge and loud! | app_name_helper=Pon aquí el nombre de tu organización, ¡alto y claro! | ||||||
| repo_path=Ruta del repositorio de Raiz (Root) | repo_path=Ruta del repositorio de Raiz (Root) | ||||||
| repo_path_helper=Todos los repositorios remotos de Git se guardarán en este directorio. | repo_path_helper=Todos los repositorios remotos de Git se guardarán en este directorio. | ||||||
| run_user=Abrir el usuario | run_user=Abrir el usuario | ||||||
|  | @ -76,21 +76,23 @@ http_port_helper=Puerto en el que escuchará la aplicación. | ||||||
| app_url=URL de 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. | app_url_helper=Esto afecta a las URLs para clonar por HTTP/HTTPS y a algunos correos electrónicos. | ||||||
| 
 | 
 | ||||||
| optional_title=Optional Settings | optional_title=Configuración Opcional | ||||||
| email_title=Configuración del Servicio de Correo | email_title=Configuración del Servicio de Correo | ||||||
| smtp_host=SMTP Host | smtp_host=SMTP Host | ||||||
|  | smtp_from=From | ||||||
|  | smtp_from_helper=Mail from address, RFC 5322. It can be just an email address, or the "Name" <email@example.com> format. | ||||||
| mailer_user=Remitente del Correo Electrónico | mailer_user=Remitente del Correo Electrónico | ||||||
| mailer_password=Contraseña del Remitente | mailer_password=Contraseña del Remitente | ||||||
| register_confirm=Habilitar la Confirmación en el Registro | register_confirm=Habilitar la Confirmación en el Registro | ||||||
| mail_notify=Habilitar las Notificaciones de Correo | mail_notify=Habilitar las Notificaciones de Correo | ||||||
| server_service_title=Server and Other Services Settings | server_service_title=Configuración de Servidor y Otros Servicios | ||||||
| offline_mode=Enable Offline Mode | offline_mode=Activar el modo Sin Conexión | ||||||
| offline_mode_popup=Disable CDN even in production mode, all resource files will be served locally. | offline_mode_popup=Desactivar el CDN incluso en el modo de producción, todos los recursos se servirán localmente. | ||||||
| disable_registration=Disable Self-registration | disable_registration=Desactivar Auto-Registro | ||||||
| disable_registration_popup=Disable user self-registration, only admin can create accounts. | disable_registration_popup=Desactivar auto-registro del usuario, solo el administrador podrá crear cuentas nuevas. | ||||||
| require_sign_in_view=Enable Require Sign In to View Pages | require_sign_in_view=Activar el Inicio de Sesión obligatorio para Ver Páginas | ||||||
| require_sign_in_view_popup=Only signed in users can view pages, visitors will only be able to see sign in/up pages. | require_sign_in_view_popup=Solo los usuarios logados pueden ver páginas, los visitantes anónimos solo podrán ver las páginas de login/registro. | ||||||
| admin_setting_desc=You do not have to create an admin account right now, user whoever ID=1 will gain admin access automatically. | admin_setting_desc=No es necesario crear una cuenta de administrador ahora mismo, el usuario que tenga ID=1 obtendrá privilegios de administrador automáticamente. | ||||||
| admin_title=Configuración de la Cuenta de Administrador | admin_title=Configuración de la Cuenta de Administrador | ||||||
| admin_name=Nombre de usuario | admin_name=Nombre de usuario | ||||||
| admin_password=Contraseña | admin_password=Contraseña | ||||||
|  | @ -633,7 +635,7 @@ auths.smtp_auth=Tipo de Autorización SMTP | ||||||
| auths.smtphost=SMTP Host | auths.smtphost=SMTP Host | ||||||
| auths.smtpport=Puerto SMTP | auths.smtpport=Puerto SMTP | ||||||
| auths.enable_tls=Habilitar Cifrado TLS | auths.enable_tls=Habilitar Cifrado TLS | ||||||
| auths.pam_service_name=PAM Service Name | auths.pam_service_name=Nombre del Servicio PAM | ||||||
| auths.enable_auto_register=Hablilitar Auto-Registro | auths.enable_auto_register=Hablilitar Auto-Registro | ||||||
| auths.tips=Consejos | auths.tips=Consejos | ||||||
| auths.edit=Editar la Configuración de Autorización | auths.edit=Editar la Configuración de Autorización | ||||||
|  | @ -682,7 +684,7 @@ config.deliver_timeout=Timeout de Entrega | ||||||
| config.skip_tls_verify=Omitir la Verificación TLS | config.skip_tls_verify=Omitir la Verificación TLS | ||||||
| config.mailer_config=Configuración del Mailer | config.mailer_config=Configuración del Mailer | ||||||
| config.mailer_enabled=Activado | config.mailer_enabled=Activado | ||||||
| config.mailer_disable_helo=Disable HELO | config.mailer_disable_helo=Desactivar HELO | ||||||
| config.mailer_name=Nombre | config.mailer_name=Nombre | ||||||
| config.mailer_host=Host | config.mailer_host=Host | ||||||
| config.mailer_user=Usuario | config.mailer_user=Usuario | ||||||
|  |  | ||||||
|  | @ -50,7 +50,7 @@ code=Code | ||||||
| install=Installatie | install=Installatie | ||||||
| title=Installatiestappen voor de eerste keer opstarten | title=Installatiestappen voor de eerste keer opstarten | ||||||
| requite_db_desc=Om Gogs te gebruiken is MySQL, PostgreSQL of SQLite3 vereist (SQLite3 is beschikbaar in de officiële versie). | requite_db_desc=Om Gogs te gebruiken is MySQL, PostgreSQL of SQLite3 vereist (SQLite3 is beschikbaar in de officiële versie). | ||||||
| db_title=Database Settings | db_title=Database instellingen | ||||||
| db_type=Database-type | db_type=Database-type | ||||||
| host=Host | host=Host | ||||||
| user=Gebruikersnaam | user=Gebruikersnaam | ||||||
|  | @ -60,10 +60,10 @@ db_helper=Gebruik InnoDB engine met utf8_general_ci karakterset voor MySQL. | ||||||
| ssl_mode=SSL-modus | ssl_mode=SSL-modus | ||||||
| path=Pad | path=Pad | ||||||
| sqlite_helper=Het pad naar de SQLite3 database. | sqlite_helper=Het pad naar de SQLite3 database. | ||||||
| err_empty_sqlite_path=SQLite3 database path cannot be empty. | err_empty_sqlite_path=SQLite3 database pad mag niet leeg zijn. | ||||||
| 
 | 
 | ||||||
| general_title=Toepassing algemene instellingen | general_title=Toepassing algemene instellingen | ||||||
| app_name=Application Name | app_name=Applicatienaam | ||||||
| app_name_helper=Put your organization name here huge and loud! | app_name_helper=Put your organization name here huge and loud! | ||||||
| repo_path=Repositories basis directorie | repo_path=Repositories basis directorie | ||||||
| repo_path_helper=Alle remote Git repositories worden in deze directorie opgeslagen | repo_path_helper=Alle remote Git repositories worden in deze directorie opgeslagen | ||||||
|  | @ -76,15 +76,17 @@ http_port_helper=Poortnummer waar het programma naar luistert. | ||||||
| app_url=Applicatie URL | 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 | app_url_helper=Dit heeft invloed op de HTTP/HTTPS kloon urls en de urls die in de email worden gebruikt | ||||||
| 
 | 
 | ||||||
| optional_title=Optional Settings | optional_title=Optionele instellingen | ||||||
| email_title=E-mail service instellingen | email_title=E-mail service instellingen | ||||||
| smtp_host=SMTP host | smtp_host=SMTP host | ||||||
|  | smtp_from=From | ||||||
|  | smtp_from_helper=Mail from address, RFC 5322. It can be just an email address, or the "Name" <email@example.com> format. | ||||||
| mailer_user=Afzender e-mail / gebruikersnaam | mailer_user=Afzender e-mail / gebruikersnaam | ||||||
| mailer_password=Wachtwoord | mailer_password=Wachtwoord | ||||||
| register_confirm=Activeer registratie emails | register_confirm=Activeer registratie emails | ||||||
| mail_notify=Activeer e-mailnotificaties | mail_notify=Activeer e-mailnotificaties | ||||||
| server_service_title=Server and Other Services Settings | server_service_title=Server en andere Services-instellingen | ||||||
| offline_mode=Enable Offline Mode | offline_mode=Off line modus inschakelen | ||||||
| offline_mode_popup=Disable CDN even in production mode, all resource files will be served locally. | offline_mode_popup=Disable CDN even in production mode, all resource files will be served locally. | ||||||
| disable_registration=Disable Self-registration | disable_registration=Disable Self-registration | ||||||
| disable_registration_popup=Disable user self-registration, only admin can create accounts. | disable_registration_popup=Disable user self-registration, only admin can create accounts. | ||||||
|  |  | ||||||
|  | @ -50,7 +50,7 @@ code=Kod | ||||||
| install=Instalacja | install=Instalacja | ||||||
| title=Kroki instalacyjne dla pierwszego uruchomienia | title=Kroki instalacyjne dla pierwszego uruchomienia | ||||||
| requite_db_desc=Gogs wymaga MySQL, PostgreSQL lub SQLite3. | requite_db_desc=Gogs wymaga MySQL, PostgreSQL lub SQLite3. | ||||||
| db_title=Database Settings | db_title=Ustawienia bazy danych | ||||||
| db_type=Typ bazy danych | db_type=Typ bazy danych | ||||||
| host=Host | host=Host | ||||||
| user=Użytkownik | user=Użytkownik | ||||||
|  | @ -60,11 +60,11 @@ db_helper=Proszę użyć silnika INNODB z kodowaniem utf8_general_ci dla MySQL. | ||||||
| ssl_mode=Tryb SSL | ssl_mode=Tryb SSL | ||||||
| path=Ścieżka | path=Ścieżka | ||||||
| sqlite_helper=Ścieżka do bazy SQLite3. | sqlite_helper=Ścieżka do bazy SQLite3. | ||||||
| err_empty_sqlite_path=SQLite3 database path cannot be empty. | err_empty_sqlite_path=Ścieżka do bazy danych SQLite3 nie może być pusta. | ||||||
| 
 | 
 | ||||||
| general_title=Ustawienia ogólne Gogs | general_title=Ustawienia ogólne Gogs | ||||||
| app_name=Application Name | app_name=Nazwa aplikacji | ||||||
| app_name_helper=Put your organization name here huge and loud! | app_name_helper=Umieść tutaj wielką i głośną nazwę swojej organizacji! | ||||||
| repo_path=Katalog repozytoriów | repo_path=Katalog repozytoriów | ||||||
| repo_path_helper=W tym katalogu zostaną zapisane wszystkie repozytoria Git. | repo_path_helper=W tym katalogu zostaną zapisane wszystkie repozytoria Git. | ||||||
| run_user=Nazwa użytkownika uruchomieniowego | run_user=Nazwa użytkownika uruchomieniowego | ||||||
|  | @ -76,20 +76,22 @@ http_port_helper=Numer portu na którym aplikacja jest dostępna. | ||||||
| app_url=Adres URL aplikacji | app_url=Adres URL aplikacji | ||||||
| app_url_helper=To wpłynie na adresy klonowania HTTP/HTTPS i w wiadomościach e-mail. | app_url_helper=To wpłynie na adresy klonowania HTTP/HTTPS i w wiadomościach e-mail. | ||||||
| 
 | 
 | ||||||
| optional_title=Optional Settings | optional_title=Ustawienia opcjonalne | ||||||
| email_title=Ustawienia serwera e-mail | email_title=Ustawienia serwera e-mail | ||||||
| smtp_host=Serwer SMTP | smtp_host=Serwer SMTP | ||||||
|  | smtp_from=From | ||||||
|  | smtp_from_helper=Mail from address, RFC 5322. It can be just an email address, or the "Name" <email@example.com> format. | ||||||
| mailer_user=Nadawca wiadomości E-mail | mailer_user=Nadawca wiadomości E-mail | ||||||
| mailer_password=Hasło nadawcy | mailer_password=Hasło nadawcy | ||||||
| register_confirm=Włącz potwierdzenia rejestracji | register_confirm=Włącz potwierdzenia rejestracji | ||||||
| mail_notify=Włącz powiadomienia e-mail | mail_notify=Włącz powiadomienia e-mail | ||||||
| server_service_title=Server and Other Services Settings | server_service_title=Ustawienia serwera i innych usług | ||||||
| offline_mode=Enable Offline Mode | offline_mode=Włącz tryb offline | ||||||
| offline_mode_popup=Disable CDN even in production mode, all resource files will be served locally. | offline_mode_popup=Wyłącz CDN, nawet w trybie produkcyjnym, wszystkie pliki zasobów będą podawane lokalnie. | ||||||
| disable_registration=Disable Self-registration | disable_registration=Wyłącz samodzielną rejestrację | ||||||
| disable_registration_popup=Disable user self-registration, only admin can create accounts. | disable_registration_popup=Wyłącz samodzielną rejestrację użytkownika, tylko administrator będzie mógł tworzyć konta. | ||||||
| require_sign_in_view=Enable Require Sign In to View Pages | require_sign_in_view=Włącz wymóg zalogowania do przeglądania stron | ||||||
| require_sign_in_view_popup=Only signed in users can view pages, visitors will only be able to see sign in/up pages. | require_sign_in_view_popup=Tylko zalogowani użytkownicy będą mogli przeglądać strony, goście zobaczą tylko stronę logowania. | ||||||
| admin_setting_desc=You do not have to create an admin account right now, user whoever ID=1 will gain admin access automatically. | admin_setting_desc=You do not have to create an admin account right now, user whoever ID=1 will gain admin access automatically. | ||||||
| admin_title=Ustawienia konta administratora | admin_title=Ustawienia konta administratora | ||||||
| admin_name=Nazwa Użytkownika | admin_name=Nazwa Użytkownika | ||||||
|  |  | ||||||
|  | @ -79,6 +79,8 @@ app_url_helper=该设置影响 HTTP/HTTPS 克隆地址和一些邮箱中的链 | ||||||
| optional_title=可选设置 | optional_title=可选设置 | ||||||
| email_title=邮件服务设置 | email_title=邮件服务设置 | ||||||
| smtp_host=SMTP 主机 | smtp_host=SMTP 主机 | ||||||
|  | smtp_from=邮件来自 | ||||||
|  | smtp_from_helper=邮件来自地址,遵循 RFC 5322 标准。可以是一个单纯的邮箱地址或使用 "Name" <email@example.com> 的格式。 | ||||||
| mailer_user=发送邮箱 | mailer_user=发送邮箱 | ||||||
| mailer_password=发送邮箱密码 | mailer_password=发送邮箱密码 | ||||||
| register_confirm=启用注册邮箱确认 | register_confirm=启用注册邮箱确认 | ||||||
|  |  | ||||||
|  | @ -28,6 +28,7 @@ type InstallForm struct { | ||||||
| 	AppUrl       string `binding:"Required"` | 	AppUrl       string `binding:"Required"` | ||||||
| 
 | 
 | ||||||
| 	SMTPHost        string `form:"smtp_host"` | 	SMTPHost        string `form:"smtp_host"` | ||||||
|  | 	SMTPFrom        string `form:"smtp_from"` | ||||||
| 	SMTPEmail       string `form:"smtp_user" binding:"OmitEmpty;Email;MaxSize(50)" locale:"install.mailer_user"` | 	SMTPEmail       string `form:"smtp_user" binding:"OmitEmpty;Email;MaxSize(50)" locale:"install.mailer_user"` | ||||||
| 	SMTPPasswd      string `form:"smtp_passwd"` | 	SMTPPasswd      string `form:"smtp_passwd"` | ||||||
| 	RegisterConfirm bool | 	RegisterConfirm bool | ||||||
|  |  | ||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -124,6 +124,7 @@ func Install(ctx *middleware.Context) { | ||||||
| 	// E-mail service settings
 | 	// E-mail service settings
 | ||||||
| 	if setting.MailService != nil { | 	if setting.MailService != nil { | ||||||
| 		form.SMTPHost = setting.MailService.Host | 		form.SMTPHost = setting.MailService.Host | ||||||
|  | 		form.SMTPFrom = setting.MailService.From | ||||||
| 		form.SMTPEmail = setting.MailService.User | 		form.SMTPEmail = setting.MailService.User | ||||||
| 	} | 	} | ||||||
| 	form.RegisterConfirm = setting.Service.RegisterEmailConfirm | 	form.RegisterConfirm = setting.Service.RegisterEmailConfirm | ||||||
|  | @ -245,6 +246,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) { | ||||||
| 	if len(strings.TrimSpace(form.SMTPHost)) > 0 { | 	if len(strings.TrimSpace(form.SMTPHost)) > 0 { | ||||||
| 		cfg.Section("mailer").Key("ENABLED").SetValue("true") | 		cfg.Section("mailer").Key("ENABLED").SetValue("true") | ||||||
| 		cfg.Section("mailer").Key("HOST").SetValue(form.SMTPHost) | 		cfg.Section("mailer").Key("HOST").SetValue(form.SMTPHost) | ||||||
|  | 		cfg.Section("mailer").Key("FROM").SetValue(form.SMTPFrom) | ||||||
| 		cfg.Section("mailer").Key("USER").SetValue(form.SMTPEmail) | 		cfg.Section("mailer").Key("USER").SetValue(form.SMTPEmail) | ||||||
| 		cfg.Section("mailer").Key("PASSWD").SetValue(form.SMTPPasswd) | 		cfg.Section("mailer").Key("PASSWD").SetValue(form.SMTPPasswd) | ||||||
| 	} else { | 	} else { | ||||||
|  |  | ||||||
|  | @ -119,6 +119,11 @@ | ||||||
|                 <label for="smtp_host">{{.i18n.Tr "install.smtp_host"}}</label> |                 <label for="smtp_host">{{.i18n.Tr "install.smtp_host"}}</label> | ||||||
|                 <input id="smtp_host" name="smtp_host" value="{{.smtp_host}}"> |                 <input id="smtp_host" name="smtp_host" value="{{.smtp_host}}"> | ||||||
|               </div> |               </div> | ||||||
|  |               <div class="inline field {{if .Err_SMTPFrom}}error{{end}}"> | ||||||
|  |                 <label for="smtp_from">{{.i18n.Tr "install.smtp_from"}}</label> | ||||||
|  |                 <input id="smtp_from" name="smtp_from" value="{{.smtp_from}}"> | ||||||
|  |                 <span class="help">{{.i18n.Tr "install.smtp_from_helper"}}</span> | ||||||
|  |               </div> | ||||||
|               <div class="inline field {{if .Err_SMTPEmail}}error{{end}}"> |               <div class="inline field {{if .Err_SMTPEmail}}error{{end}}"> | ||||||
|                 <label for="smtp_user">{{.i18n.Tr "install.mailer_user"}}</label> |                 <label for="smtp_user">{{.i18n.Tr "install.mailer_user"}}</label> | ||||||
|                 <input id="smtp_user" name="smtp_user" value="{{.smtp_user}}"> |                 <input id="smtp_user" name="smtp_user" value="{{.smtp_user}}"> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue