mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Merge branch 'dev' of github.com:gogits/gogs into dev
Conflicts: conf/app.ini
This commit is contained in:
		| @@ -5,12 +5,12 @@ Gogs(Go Git Service) is a painless self-hosted Git Service written in Go. | |||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| ##### Current version: 0.5.0 Beta | ##### Current version: 0.5.2 Beta | ||||||
|  |  | ||||||
| ### NOTICES | ### NOTICES | ||||||
|  |  | ||||||
| - Due to testing purpose, data of [try.gogits.org](http://try.gogits.org) has been reset in **June 21, 2014** and will reset multiple times after. Please do **NOT** put your important data on the site. | - Due to testing purpose, data of [try.gogs.io](https://try.gogs.io) has been reset in **June 21, 2014** and will reset multiple times after. Please do **NOT** put your important data on the site. | ||||||
| - Demo site [try.gogits.org](http://try.gogits.org) is running under `dev` branch. | - Demo site [try.gogs.io](https://try.gogs.io) is running under `dev` branch. | ||||||
|  |  | ||||||
| #### Other language version | #### Other language version | ||||||
|  |  | ||||||
| @@ -24,7 +24,7 @@ The goal of this project is to make the easiest, fastest and most painless way t | |||||||
|  |  | ||||||
| - Please see [Documentation](http://gogs.io/docs/intro/) for project design, known issues, and change log. | - Please see [Documentation](http://gogs.io/docs/intro/) for project design, known issues, and change log. | ||||||
| - See [Trello Board](https://trello.com/b/uxAoeLUl/gogs-go-git-service) to follow the develop team. | - See [Trello Board](https://trello.com/b/uxAoeLUl/gogs-go-git-service) to follow the develop team. | ||||||
| - Try it before anything? Do it [online](http://try.gogits.org/Unknown/gogs) or go down to **Installation -> Install from binary** section! | - Try it before anything? Do it [online](https://try.gogs.io/Unknown/gogs) or go down to **Installation -> Install from binary** section! | ||||||
| - Having troubles? Get help from [Troubleshooting](http://gogs.io/docs/intro/troubleshooting.md). | - Having troubles? Get help from [Troubleshooting](http://gogs.io/docs/intro/troubleshooting.md). | ||||||
|  |  | ||||||
| ## Features | ## Features | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ Gogs(Go Git Service) 是一个基于 Go 语言的自助 Git 服务。 | |||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| ##### 当前版本:0.5.0 Beta | ##### 当前版本:0.5.2 Beta | ||||||
|  |  | ||||||
| ## 开发目的 | ## 开发目的 | ||||||
|  |  | ||||||
| @@ -15,7 +15,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自 | |||||||
|  |  | ||||||
| - 有关项目设计、已知问题和变更日志,请通过  [使用手册](http://gogs.io/docs/intro/) 查看。 | - 有关项目设计、已知问题和变更日志,请通过  [使用手册](http://gogs.io/docs/intro/) 查看。 | ||||||
| - 您可以到 [Trello Board](https://trello.com/b/uxAoeLUl/gogs-go-git-service) 跟随开发团队的脚步。 | - 您可以到 [Trello Board](https://trello.com/b/uxAoeLUl/gogs-go-git-service) 跟随开发团队的脚步。 | ||||||
| - 想要先睹为快?通过 [在线体验](http://try.gogits.org/Unknown/gogs) 或查看 **安装部署 -> 二进制安装** 小节。 | - 想要先睹为快?通过 [在线体验](https://try.gogs.io/Unknown/gogs) 或查看 **安装部署 -> 二进制安装** 小节。 | ||||||
| - 使用过程中遇到问题?尝试从 [故障排查](http://gogs.io/docs/intro/troubleshooting.md) 页面获取帮助。 | - 使用过程中遇到问题?尝试从 [故障排查](http://gogs.io/docs/intro/troubleshooting.md) 页面获取帮助。 | ||||||
|  |  | ||||||
| ## 功能特性 | ## 功能特性 | ||||||
|   | |||||||
							
								
								
									
										13
									
								
								cmd/web.go
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								cmd/web.go
									
									
									
									
									
								
							| @@ -64,7 +64,8 @@ func newMacaron() *macaron.Macaron { | |||||||
| 	m := macaron.New() | 	m := macaron.New() | ||||||
| 	m.Use(macaron.Logger()) | 	m.Use(macaron.Logger()) | ||||||
| 	m.Use(macaron.Recovery()) | 	m.Use(macaron.Recovery()) | ||||||
| 	m.Use(macaron.Static("public", | 	m.Use(macaron.Static( | ||||||
|  | 		path.Join(setting.StaticRootPath, "public"), | ||||||
| 		macaron.StaticOptions{ | 		macaron.StaticOptions{ | ||||||
| 			SkipLogging: !setting.DisableRouterLog, | 			SkipLogging: !setting.DisableRouterLog, | ||||||
| 		}, | 		}, | ||||||
| @@ -124,7 +125,7 @@ func runWeb(*cli.Context) { | |||||||
|  |  | ||||||
| 	// Routers. | 	// Routers. | ||||||
| 	m.Get("/", ignSignIn, routers.Home) | 	m.Get("/", ignSignIn, routers.Home) | ||||||
| 	m.Get("/explore", routers.Explore) | 	m.Get("/explore", ignSignIn, routers.Explore) | ||||||
| 	m.Get("/install", bindIgnErr(auth.InstallForm{}), routers.Install) | 	m.Get("/install", bindIgnErr(auth.InstallForm{}), routers.Install) | ||||||
| 	m.Post("/install", bindIgnErr(auth.InstallForm{}), routers.InstallPost) | 	m.Post("/install", bindIgnErr(auth.InstallForm{}), routers.InstallPost) | ||||||
| 	m.Group("", func(r *macaron.Router) { | 	m.Group("", func(r *macaron.Router) { | ||||||
| @@ -355,11 +356,9 @@ func runWeb(*cli.Context) { | |||||||
| 	}, ignSignIn, middleware.RepoAssignment(true, true)) | 	}, ignSignIn, middleware.RepoAssignment(true, true)) | ||||||
|  |  | ||||||
| 	m.Group("/:username", func(r *macaron.Router) { | 	m.Group("/:username", func(r *macaron.Router) { | ||||||
| 		r.Get("/:reponame", middleware.RepoAssignment(true, true, true), repo.Home) | 		r.Get("/:reponame", ignSignIn, middleware.RepoAssignment(true, true, true), repo.Home) | ||||||
| 		m.Group("/:reponame", func(r *macaron.Router) { | 		r.Any("/:reponame/*", ignSignInAndCsrf, repo.Http) | ||||||
| 			r.Any("/*", repo.Http) | 	}) | ||||||
| 		}) |  | ||||||
| 	}, ignSignInAndCsrf) |  | ||||||
|  |  | ||||||
| 	// Not found handler. | 	// Not found handler. | ||||||
| 	m.NotFound(routers.NotFound) | 	m.NotFound(routers.NotFound) | ||||||
|   | |||||||
| @@ -253,8 +253,8 @@ DRIVER = | |||||||
| CONN = | CONN = | ||||||
|  |  | ||||||
| [i18n] | [i18n] | ||||||
| LANGS = en-US,zh-CN,de-DE | LANGS = en-US,zh-CN,de-DE,fr-CA | ||||||
| NAMES = English,简体中文,Deutsch | NAMES = English,简体中文,Deutsch,Français | ||||||
|  |  | ||||||
| [git] | [git] | ||||||
| MAX_GITDIFF_LINES = 10000 | MAX_GITDIFF_LINES = 10000 | ||||||
							
								
								
									
										516
									
								
								conf/locale/locale_fr-CA.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										516
									
								
								conf/locale/locale_fr-CA.ini
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,516 @@ | |||||||
|  | app_desc = Un service Git écrit en Go auto-hébergé | ||||||
|  |  | ||||||
|  | home = Accueil | ||||||
|  | dashboard = Tableau de bord | ||||||
|  | explore = Explorer | ||||||
|  | help = Aide | ||||||
|  | sign_in = Connexion | ||||||
|  | social_sign_in = Authentification via Internet: 2ème étape <small>associé le compte</small> | ||||||
|  | sign_out = Déconnexion | ||||||
|  | sign_up = Créer un compte | ||||||
|  | register = S'inscrire | ||||||
|  | website = Site web | ||||||
|  | version = Version | ||||||
|  | page = Page | ||||||
|  | template = Gabarit | ||||||
|  | language = Langage | ||||||
|  |  | ||||||
|  | username = Usager | ||||||
|  | email = Courriel | ||||||
|  | password = Mot de passe | ||||||
|  | re_type = Saisir à nouveau | ||||||
|  | captcha = Captcha | ||||||
|  |  | ||||||
|  | repository = Dépôt | ||||||
|  | organization = Organisation | ||||||
|  | mirror = Mirroir | ||||||
|  | new_repo = Nouveau dépôt | ||||||
|  | new_migrate = Nouvelle migration | ||||||
|  | new_org = Nouvel organisation | ||||||
|  | manage_org = Gestion des organisations | ||||||
|  | admin_panel = Gestion | ||||||
|  | account_settings = Profil usager | ||||||
|  | settings = Configuration | ||||||
|  |  | ||||||
|  | news_feed = Fil de nouvelles | ||||||
|  | pull_requests = Demandes de fusion (pull requests) | ||||||
|  | issues = Suivi de problèmes | ||||||
|  |  | ||||||
|  | cancel = Annuler | ||||||
|  |  | ||||||
|  | [home] | ||||||
|  | uname_holder = Nom d'usager ou courriel | ||||||
|  | password_holder = Mot de passe | ||||||
|  | switch_dashboard_context = Changer de tableau de bord | ||||||
|  | my_repos = Mes dépôts | ||||||
|  | collaborative_repos = Dépôts partagés | ||||||
|  | my_orgs = Mes organisations | ||||||
|  | my_mirrors = Mes mirroirs | ||||||
|  |  | ||||||
|  | [auth] | ||||||
|  | create_new_account = Créer un nouveau compte | ||||||
|  | register_hepler_msg = Déjà inscrits? Connectez-vous maintenant! | ||||||
|  | social_register_hepler_msg = Déjà inscrits? Branchez-vous! | ||||||
|  | disable_register_prompt = Désolé, l'auto-inscription n'est pas activée. Contactez l'admnistrateur du site. | ||||||
|  | disable_register_mail = Désolé, la confirmation d'inscription par courriel est désactivée. Contactez l'administrateur du site. | ||||||
|  | remember_me = Se souvenir de moi | ||||||
|  | forgot_password= Mot de passe oublié | ||||||
|  | forget_password = Mot de passe oublié? | ||||||
|  | sign_up_now = Besoin d'un compte? Inscrivez-vous maintenant. | ||||||
|  | confirmation_mail_sent_prompt = Un courriel de confirmation à été envoyé à <b>%s</b>, consultez vos courriels d'ici %d heures pour terminer l'inscription. | ||||||
|  | sign_in_email = Connexion avec votre courriel | ||||||
|  | active_your_account = Activez votre compte | ||||||
|  | resent_limit_prompt = Désolé vous demandez trop souvent un courriel de confirmation. S.v.p. patientez 3 minutes. | ||||||
|  | has_unconfirmed_mail = Bonjour %s, votre adresse courriel n'est pas vérifiée(<b>%s</b>). Si vous n'avez pas reçu de courriel de confirmation ou si vous avez besoin d'en envoyer un maintenant, appuyez sur le bouton ci-dessous. | ||||||
|  | resend_mail = Appuyez ici pour envoyer de nouveau un courriel de confirmation. | ||||||
|  | email_not_associate = Ce courriel ne correspond à aucun compte. | ||||||
|  | send_reset_mail = Appuyez ici pour (ré)envoyer un courriel pour réinitialiser le mot de passe. | ||||||
|  | reset_password = Réinitialiser votre mot de passe | ||||||
|  | invalid_code = Désolé, ce code de confirmation est périmé ou non-valide. | ||||||
|  | reset_password_helper = Appuyez ici pour réinitialiser votre mot de passe | ||||||
|  | password_too_short = La longueur du mot de passe doit être d'au moins 6 caractères. | ||||||
|  |  | ||||||
|  | [form] | ||||||
|  | UserName = Nom d'usager | ||||||
|  | RepoName = Nom du dépôt | ||||||
|  | Email = Adresse de courriel | ||||||
|  | Password = Mot de passe | ||||||
|  | Retype = Mot de passe (confirmation) | ||||||
|  | SSHTitle = Nom de la clé SSH | ||||||
|  | HttpsUrl = URL HTTPS | ||||||
|  | PayloadUrl = URL cible | ||||||
|  | TeamName = Nom de l'équipe | ||||||
|  | AuthName = Nom d'usager | ||||||
|  |  | ||||||
|  | require_error = ` ne peut être vide.` | ||||||
|  | alpha_dash_error = ` doit être composé de caractères alpha-numériques et/ou d'un tiret(-_).` | ||||||
|  | alpha_dash_dot_error = ` doit être composé de caractères alpha-numérique, un point(.) et/ou tiret(-_).` | ||||||
|  | min_size_error = ` doit être composé d'au moins %s caractères.` | ||||||
|  | max_size_error = ` doit être conposé d'au plus %s caractères.` | ||||||
|  | email_error = ` n'est pas une adresse de courriel bien formée.` | ||||||
|  | url_error = ` n'est pas un URL valide.` | ||||||
|  | unknown_error = Erreur inconnue: | ||||||
|  | captcha_incorrect = Le captcha ne concorde pas. | ||||||
|  | password_not_match = Les deux mots de passe diffèrent. | ||||||
|  |  | ||||||
|  | username_been_taken = `Nom d'usager dèjà utilisé.` | ||||||
|  | repo_name_been_taken = Nom de dépôt déjà utilisé. | ||||||
|  | org_name_been_taken = Nom d'organisation déjà utilisé. | ||||||
|  | team_name_been_taken = Nom d'équipe déjà utilisé. | ||||||
|  | email_been_used = Adresse de courriel déjà utilisée. | ||||||
|  | ssh_key_been_used = Nom de clé publique déjà utilisé. | ||||||
|  | illegal_username = Votre nom d'usager contient des caractères interdits. | ||||||
|  | illegal_repo_name = Le nom du dépôt contient des caractères interdits. | ||||||
|  | illegal_org_name = Le nom de l'organisation contient des caractères interdits. | ||||||
|  | illegal_team_name = Le nom de l'équipe contient des caractères interdits. | ||||||
|  | username_password_incorrect = Nom d'usager ou mot de passe erroné. | ||||||
|  | enterred_invalid_repo_name = Nom de dépôt inexistant. | ||||||
|  | enterred_invalid_owner_name = Responsable de dépôt inexistant. | ||||||
|  | enterred_invalid_password = Mot de passe erroné. | ||||||
|  | user_not_exist = Nom d'usager inexistant. | ||||||
|  | last_org_owner = Ceci est le dernier responsable du dépôt. Il doit y avoir obligatoirement au moins un usager responsable. | ||||||
|  |  | ||||||
|  | invalid_ssh_key = Désolé, impossible de vérifier votre clé SSH: % | ||||||
|  | auth_failed = Erreur d'authentification : %v | ||||||
|  |  | ||||||
|  | still_own_repo = Votre compte est responsable d'au moins un dépôt. Vous devez soit détruire ces dépôts, soit transférer la responsabilité à un autre usager. | ||||||
|  | org_still_own_repo = Cette organisation est responsable d'au moins un dépôt. Vous devez soit détruire ces dépôts, soit transférer la responsabilité à un autre usager ou organisation. | ||||||
|  |  | ||||||
|  | still_own_user = Cette authentification est utilisée par un usager. | ||||||
|  |  | ||||||
|  | [settings] | ||||||
|  | profile = Profil | ||||||
|  | password = Mot de passe | ||||||
|  | ssh_keys = Clés SSH | ||||||
|  | social = Comptes Internet | ||||||
|  | orgs = Organisations | ||||||
|  | delete = Supprimer votre compte | ||||||
|  |  | ||||||
|  | public_profile = Profil public | ||||||
|  | profile_desc = Votre adresse de courriel est publique et sera utilisée pour les avis produits par le site. | ||||||
|  | full_name = Nom complet | ||||||
|  | website = Site web | ||||||
|  | location = Endroit | ||||||
|  | update_profile = Mettre à jour le profil | ||||||
|  | update_profile_success = Mise à jour du profil réussie. | ||||||
|  |  | ||||||
|  | change_password = Changer le mot de passe | ||||||
|  | old_password = Mot de passe actuel | ||||||
|  | new_password = Nouveau mot de passe | ||||||
|  | password_incorrect = Mot de passe actuel erroné. | ||||||
|  | change_password_success = Modification du mot de passe effectuée. Vous pouvez dorénavant vous connecter avec le nouveau mot de passe. | ||||||
|  |  | ||||||
|  | manage_ssh_keys = Gestion des clés SSH | ||||||
|  | add_key = Ajouter une clé | ||||||
|  | ssh_desc = Voici la liste de clés SSH associées à votre profil. Retirez les clés que vous ne reconnaissez pas. | ||||||
|  | ssh_helper = <strong>Beson d'aide?</strong> Consultez le guide au <a href="https://help.github.com/articles/generating-ssh-keys">generating SSH keys</a> ou vérifiez <a href="https://help.github.com/ssh-issues/">les problèmes SSH fréquents</a>. | ||||||
|  | add_new_key = Ajouter une clé SSH | ||||||
|  | key_name = Nom de la clé | ||||||
|  | key_content = Contenu | ||||||
|  | add_key_success = Clé SSH ajoutée! | ||||||
|  | delete_key = Détruire | ||||||
|  | add_on = Ajoutée le | ||||||
|  | last_used = Dernière utilisation le | ||||||
|  | no_activity = Pas d'activité récente | ||||||
|  |  | ||||||
|  | manage_social = Gestion des comptes Internets associés | ||||||
|  | social_desc = Ceci est une liste de comptes Internet associés. Retirez les comptes que vous ne reconnaissez pas. | ||||||
|  | unbind = Désassocier | ||||||
|  | unbind_success = Compte Internet déassocié. | ||||||
|  |  | ||||||
|  | delete_account = Detruire votre compte | ||||||
|  | delete_prompt = Cette opération détruira votre compte et <strong>ne pourra être annulée</strong>! | ||||||
|  | confirm_delete_account = Confirmez la suppression | ||||||
|  |  | ||||||
|  | [repo] | ||||||
|  | owner = Responsable | ||||||
|  | repo_name = Nom du dépôt | ||||||
|  | repo_name_helper = Les bons noms de dépôts sont courts, mémorables et <strong>uniques</strong>. | ||||||
|  | visibility = Visibilité | ||||||
|  | visiblity_helper = Ce dépôt est <span class="label label-red label-radius">privé</span> | ||||||
|  | repo_desc = Description | ||||||
|  | repo_lang = Langue | ||||||
|  | repo_lang_helper = Choisir un fichier .gitignore | ||||||
|  | license = License | ||||||
|  | license_helper = Choisir un fichier de licence | ||||||
|  | init_readme = Initialiser le dépôt avec un fichier README.md | ||||||
|  | create_repo = Créer le dépôt | ||||||
|  | default_branch = Branche par défaut | ||||||
|  | mirror_interval = Intervale de synchronisation (heures) | ||||||
|  | goget_meta = Métadonnées Go-Get | ||||||
|  | goget_meta_helper = Ce dépôt sera <span class="label label-blue label-radius">Go-Getable</span> | ||||||
|  |  | ||||||
|  | need_auth = Authorisation requise | ||||||
|  | migrate_type = Type de migration | ||||||
|  | migrate_type_helper = Ce dépôt sera un <span class="label label-blue label-radius">mirroir</span> | ||||||
|  | migrate_repo = Migrer le dépôt | ||||||
|  |  | ||||||
|  | copy_link = Copier | ||||||
|  | clone_helper = Besoin d'aide pour cloner? Obtenez de l' <a target="_blank" href="http://git-scm.com/book/fr/Les-bases-de-Git-Démarrer-un-dépôt-Git">aide</a>! | ||||||
|  | unwatch = Ne plus suivre | ||||||
|  | watch = Suivre | ||||||
|  | unstar = Retirer étoile | ||||||
|  | star = Étoile | ||||||
|  | fork = Fork | ||||||
|  |  | ||||||
|  | quick_guide = Guide rapide | ||||||
|  | clone_this_repo = Cloner ce dépôt | ||||||
|  | create_new_repo_command = Créer un nouveau dépôt à la ligne de commande | ||||||
|  | push_exist_repo = Pousser un dépôt existant depuis la ligne de commande | ||||||
|  |  | ||||||
|  | settings = Réglages | ||||||
|  | settings.options = Réglages de base | ||||||
|  | settings.collaboration = Collaboration | ||||||
|  | settings.hooks = Webhooks | ||||||
|  | settings.deploy_keys = Clé de déploiement | ||||||
|  | settings.basic_settings = réglages de base | ||||||
|  | settings.danger_zone = Danger! | ||||||
|  | settings.site = Site officiel | ||||||
|  | settings.update_settings = Réglage des mises à jour | ||||||
|  | settings.transfer = Transférer la responsabilité | ||||||
|  | settings.transfer_desc = Transférer ce dépôt à un autre usager ou organisation si vous en avez la responsabilité. | ||||||
|  | settings.delete = Détruire ce dépôt | ||||||
|  | settings.delete_desc = La destruction est irrémédiable, impossible d'annuler. Soyez sûr de votre décision. | ||||||
|  | settings.update_settings_success = Réglages modifiés | ||||||
|  | settings.transfer_owner = Nouveau responsable | ||||||
|  | settings.make_transfer = Faire le transfert | ||||||
|  | settings.confirm_delete = Confirmer la destruction | ||||||
|  | settings.add_collaborator = Ajouter un nouveau collaborateur | ||||||
|  | settings.add_collaborator_success = Nouveau collaborateur ajouté. | ||||||
|  | settings.remove_collaborator_success = Collaborateur supprimé. | ||||||
|  | settings.add_webhook = Ajouter un Webhook | ||||||
|  | settings.hooks_desc = Les Webhooks permettent à des services externes d'être avertis de certains changements sur Gogs. Lorque qu'un changement se produit, Gogs envoie une requête POST à chacun des URLs spécifiés. Plus d'info disponible sur notre <a target="_blank" href="http://gogs.io/docs/features/webhook.html">guide Webhooks'</a>. | ||||||
|  | settings.remove_hook_success = Webhook supprimé. | ||||||
|  | settings.add_webhook_desc = Gogs envoiera un POST à l'URL ci-dessous avec le détail de l'événement souscrit. Vous pouvez aussi spécifier dans quel format vous désirez recevoir les données (JSON,<code>x-www-form-urlencoded</code>, <em>etc</em>). Plus d'info disponible sur notre <a target="_blank" href="http://gogs.io/docs/features/webhook.html">guide Webhooks'</a>. | ||||||
|  | settings.payload_url = URL cible | ||||||
|  | settings.content_type = Content Type | ||||||
|  | settings.secret = Secret | ||||||
|  | settings.event_desc = Quels changements déclencheront le webhook? | ||||||
|  | settings.event_push_only = Uniquement les <code>push</code>. | ||||||
|  | settings.active = Activé | ||||||
|  | settings.active_helper = Gogs fournira le détail de l'événement lorsque ce webhook sera déclenché. | ||||||
|  | settings.add_hook_success = Nouveau webhook ajouté. | ||||||
|  | settings.update_webhook = Mettre à jour le webhook | ||||||
|  | settings.update_hook_success = Webhook mis à jour. | ||||||
|  | settings.delete_webhook = Détruire le webhook | ||||||
|  | settings.recent_deliveries = Livraisons récentes | ||||||
|  | settings.hook_type = Type de déclencheur | ||||||
|  | settings.add_slack_hook_desc = Ajouter la compatibilité <a href="http://slack.com">Slack</a> à ce dépôt. | ||||||
|  | settings.slack_token = Jeton (token) | ||||||
|  | settings.slack_domain = Domaine | ||||||
|  | settings.slack_channel = Canal | ||||||
|  |  | ||||||
|  | [org] | ||||||
|  | org_name_holder = Nom de l'organisation | ||||||
|  | org_name_helper = Les bons noms d'organisations sont courts, mémorables et uniques | ||||||
|  | org_email_helper = Le courriel de l'organisation recevra toutes les notifications et les confirmations. | ||||||
|  | create_org = Créer une organisation | ||||||
|  | repo_updated = Changement effectué | ||||||
|  | people = Personne | ||||||
|  | invite_someone = Inviter quelqu'un | ||||||
|  | teams = Équipes | ||||||
|  | lower_members = Membres | ||||||
|  | lower_repositories = Dépôts | ||||||
|  | create_new_team = Créer une nouvelle équipe | ||||||
|  | org_desc = Description | ||||||
|  | team_name = Nom de l'équipe | ||||||
|  | team_desc = Description | ||||||
|  | team_name_helper = Le nom qui sera utilisé pour mentionner cette équipe dans les conversations. | ||||||
|  | team_desc_helper = Quel est la raison d'être de cette équipe? | ||||||
|  | team_permission_desc = Quel niveau de permission attribuer à cette équipe? | ||||||
|  |  | ||||||
|  | settings = Réglages | ||||||
|  | settings.options = Paramètres | ||||||
|  | settings.full_name = Nom complet | ||||||
|  | settings.website = Site web | ||||||
|  | settings.location = Endroit | ||||||
|  | settings.update_settings = Mettre à jour les paramètres | ||||||
|  | settings.update_setting_success = Paramètres mis à jour. | ||||||
|  | settings.delete = Détruire l'organisation | ||||||
|  | settings.delete_account = Détruire cette organisation | ||||||
|  | settings.delete_prompt = La destruction de l'organisation est irrémédiable, impossible d'annuler. Soyez sûr de votre décision. | ||||||
|  | settings.confirm_delete_account = Confirmer la destruction | ||||||
|  |  | ||||||
|  | members.public = Publique | ||||||
|  | members.public_helper = Rendre privé | ||||||
|  | members.private = Privé | ||||||
|  | members.private_helper = Rendre publique | ||||||
|  | members.owner = Responsable | ||||||
|  | members.member = Membre | ||||||
|  | members.conceal = Caché | ||||||
|  | members.remove = Retirer | ||||||
|  | members.leave = Quitter | ||||||
|  | members.invite_desc = Commencez à saisir un nom d'usager pour l'inviter à %s: | ||||||
|  | members.invite_now = Inviter | ||||||
|  |  | ||||||
|  | teams.join = Rejoindre | ||||||
|  | teams.leave = Quitter | ||||||
|  | teams.read_access = Droits de lecture | ||||||
|  | teams.read_access_helper = Cette équipe pourra voir et cloner ses dépôts. | ||||||
|  | teams.write_access = Droits d'écriture | ||||||
|  | teams.write_access_helper = Cette équipe pourra voir et cloner ses dépôts ainsi que pousser vers ceux-ci. | ||||||
|  | teams.admin_access = Droits de gestion | ||||||
|  | teams.admin_access_helper = En plus des droits d'écriture, cette équipe pourra gérer les collaborateurs. | ||||||
|  | teams.no_desc = Cette équipe ne posséde pas de description | ||||||
|  | teams.settings = Réglages | ||||||
|  | teams.owners_permission_desc = Les responsables ont accès à <strong>tous</strong> les dépôts et en possédent les droits de gestion. | ||||||
|  | teams.members = Membre de l'équipe | ||||||
|  | teams.update_settings = Mettre à jour | ||||||
|  | teams.delete_team = Détruire cette équipe | ||||||
|  | teams.add_team_member = Ajouter un membre à l'équipe | ||||||
|  | teams.delete_team_success = Équipe détruite | ||||||
|  | teams.read_permission_desc = La participation à cette équipe confère les droits de lecture. Ses membres peuvent voir et cloner ses dépôts. | ||||||
|  | teams.write_permission_desc = La participation à cette équipe confère les droits d'écriture en plus des droits de lecture. Ses membres peuvent pousser vers les dépôts de l'équipe. | ||||||
|  | teams.admin_permission_desc = La participation à cette équire confère les droits de gestion. Ses membres peuvent voir, cloner, pousser et gérer les collaborateurs des dépôts. | ||||||
|  | teams.repositories = Dépôts de l'équipe | ||||||
|  | teams.add_team_repository = Ajouer un dépôt à l'équipe | ||||||
|  | teams.remove_repo = Enlever | ||||||
|  |  | ||||||
|  | [admin] | ||||||
|  | dashboard = Tableau de bord | ||||||
|  | users = Usagers | ||||||
|  | organizations = Organisations | ||||||
|  | repositories = Dépôts | ||||||
|  | authentication = Sources d'authentifications | ||||||
|  | config = Configuration | ||||||
|  | monitor = Monitoring | ||||||
|  | prev = Préc. | ||||||
|  | next = Suiv. | ||||||
|  |  | ||||||
|  | dashboard.statistic = Statistiques | ||||||
|  | dashboard.operations = Opérations | ||||||
|  | dashboard.system_status = État du monitoring système | ||||||
|  | dashboard.statistic_info = La BD Gogs compte <b>%d</b> usagers, <b>%d</b> organisations, <b>%d</b> clé SSH, <b>%d</b> dépôts, <b>%d</b> suivis, <b>%d</b> étoiles, <b>%d</b> actions, <b>%d</b> accès, <b>%d</b> tickets, <b>%d</b> commentaires, <b>%d</b> comptes Internet, <b>%d</b> suivis, <b>%d</b> mirroirs, <b>%d</b> publications, <b>%d</b> sources d'authentification, <b>%d</b> webhooks, <b>%d</b> jalons, <b>%d</b> tags, <b>%d</b> tâches hook, <b>%d</b> équipes, <b>%d</b> tâches de mise à jours, <b>%d</b> fichiers joints. | ||||||
|  | dashboard.operation_name = Nom de l'opération | ||||||
|  | dashboard.operation_switch = Commande | ||||||
|  | dashboard.operation_run = Lancer | ||||||
|  | dashboard.clean_unbind_oauth = Nettoyer les OAuths orphelins | ||||||
|  | dashboard.delete_inactivate_accounts = Détruire les comptes inactifs | ||||||
|  | dashboard.server_uptime = Démarré depuis | ||||||
|  | dashboard.current_goroutine = Nombre de Goroutines | ||||||
|  | dashboard.current_memory_usage = Usage mémoire actuel | ||||||
|  | dashboard.total_memory_allocated = Mémoire allouée totale | ||||||
|  | dashboard.memory_obtained = Memoire obtenue | ||||||
|  | dashboard.pointer_lookup_times = Accès pointeur | ||||||
|  | dashboard.memory_allocate_times = Allocation mémoire | ||||||
|  | dashboard.memory_free_times = Désallocation mémoire | ||||||
|  | dashboard.current_heap_usage = Taille du heap actuelle | ||||||
|  | dashboard.heap_memory_obtained = Mémoire heap obtenue | ||||||
|  | dashboard.heap_memory_idle = Mémoire heap inactive | ||||||
|  | dashboard.heap_memory_in_use = Mémoire heap utilisée | ||||||
|  | dashboard.heap_memory_released = Mémoire heap relachée | ||||||
|  | dashboard.heap_objects = Objets dans le heap | ||||||
|  | dashboard.bootstrap_stack_usage = Bootstrap Stack Usage | ||||||
|  | dashboard.stack_memory_obtained = Stack Memory Obtained | ||||||
|  | dashboard.mspan_structures_usage = MSpan Structures Usage | ||||||
|  | dashboard.mspan_structures_obtained = MSpan Structures Obtained | ||||||
|  | dashboard.mcache_structures_usage = MCache Structures Usage | ||||||
|  | dashboard.mcache_structures_obtained = MCache Structures Obtained | ||||||
|  | dashboard.profiling_bucket_hash_table_obtained = Profiling Bucket Hash Table Obtained | ||||||
|  | dashboard.gc_metadata_obtained = GC Metadada Obtained | ||||||
|  | dashboard.other_system_allocation_obtained = Other System Allocation Obtained | ||||||
|  | dashboard.next_gc_recycle = Next GC Recycle | ||||||
|  | dashboard.last_gc_time = Since Last GC Time | ||||||
|  | dashboard.total_gc_time = Total GC Pause | ||||||
|  | dashboard.total_gc_pause = Total GC Pause | ||||||
|  | dashboard.last_gc_pause = Last GC Pause | ||||||
|  | dashboard.gc_times = GC Times | ||||||
|  |  | ||||||
|  | users.user_manage_panel = Gestion des usager | ||||||
|  | users.new_account = Creér un nouveau compte | ||||||
|  | users.name = Nom | ||||||
|  | users.activated = Activé | ||||||
|  | users.admin = Gestionnaire | ||||||
|  | users.repos = Dépôts | ||||||
|  | users.created = Créé | ||||||
|  | users.edit = Editer | ||||||
|  | users.auth_source = Source d'authentification | ||||||
|  | users.local = Locale | ||||||
|  | users.auth_login_name = Identifiant d'authentification | ||||||
|  | users.update_profile_success = Compte crée. | ||||||
|  | users.edit_account = Éditer compte | ||||||
|  | users.is_activated = Ce compte est activé | ||||||
|  | users.is_admin = Ce compte a les droits de gestionnaire | ||||||
|  | users.update_profile = Mettre à jour le compte | ||||||
|  | users.delete_account = Détruire ce compte | ||||||
|  | users.still_own_repo = Ce compte est responsables d'un dépôt. I faut détruire le dépôt ou transférer la responsabilité avant de détruire ce compte. | ||||||
|  |  | ||||||
|  | orgs.org_manage_panel = Gestion des organisations | ||||||
|  | orgs.name = Nom | ||||||
|  | orgs.teams = Équipes | ||||||
|  | orgs.members = Membres | ||||||
|  |  | ||||||
|  | repos.repo_manage_panel = Gestion des dépôts | ||||||
|  | repos.owner = Responsable | ||||||
|  | repos.name = Nom | ||||||
|  | repos.private = Privé | ||||||
|  | repos.watches = Suivis | ||||||
|  | repos.stars = Étoiles | ||||||
|  | repos.issues = Ticket | ||||||
|  |  | ||||||
|  | auths.auth_manage_panel = Gestion des sources d'authentification | ||||||
|  | auths.new = Ajouter une nouvelle source d'authentification | ||||||
|  | auths.name = Nom | ||||||
|  | auths.type = Type | ||||||
|  | auths.enabled = Activé | ||||||
|  | auths.updated = Mis à jour | ||||||
|  | auths.auth_type = Type d'authentification | ||||||
|  | auths.auth_name = Nom de l'authentification | ||||||
|  | auths.domain = Domaine | ||||||
|  | auths.host = Serveur | ||||||
|  | auths.port = Port | ||||||
|  | auths.base_dn = DN de base | ||||||
|  | auths.attributes = Attributs de recherche | ||||||
|  | auths.filter = Filtre de recherche | ||||||
|  | auths.ms_ad_sa = Microsoft Active Directory | ||||||
|  | auths.smtp_auth = Authentification SMTP | ||||||
|  | auths.smtphost = Serveur SMTP | ||||||
|  | auths.smtpport = Port SMTP | ||||||
|  | auths.enable_tls = Chiffrement TLS | ||||||
|  | auths.enable_auto_register = Activer auto-abonnement | ||||||
|  | auths.tips = Trucs | ||||||
|  | auths.edit = Éditer réglages d'authentification | ||||||
|  | auths.activated =  Source d'authentification activée | ||||||
|  | auths.update_success = Réglages mis à jour. | ||||||
|  | auths.update = Mettre à jour réglages | ||||||
|  | auths.delete = Détruire cette source | ||||||
|  |  | ||||||
|  | config.server_config = Configuration du serveur | ||||||
|  | config.app_name = Nom de l'applicaiton | ||||||
|  | config.app_ver = Version de l'application | ||||||
|  | config.app_url = URL de l'application | ||||||
|  | config.domain = Domaine | ||||||
|  | config.offline_mode = Mode hors-ligne | ||||||
|  | config.disable_router_log = Journal du routeur désactivé | ||||||
|  | config.run_user = Éxécuté en tant que | ||||||
|  | config.run_mode = Mode de fonctionnement | ||||||
|  | config.repo_root_path = Dossier contenant les dépôts | ||||||
|  | config.static_file_root_path = Dossier contenant les fichiers statiques | ||||||
|  | config.log_file_root_path = Dossier contenant les journaux | ||||||
|  | config.script_type = Type de script | ||||||
|  | config.reverse_auth_user = Usager d'authentification inversée | ||||||
|  | config.db_config = Configuration de la BD | ||||||
|  | config.db_type = Type | ||||||
|  | config.db_host = Serveur | ||||||
|  | config.db_name = Nom | ||||||
|  | config.db_user = Usager | ||||||
|  | config.db_ssl_mode = Mode SSL | ||||||
|  | config.db_ssl_mode_helper = (pour "postgres" seulement) | ||||||
|  | config.db_path = Path | ||||||
|  | config.db_path_helper = (pour "sqlite3" seulement) | ||||||
|  | config.service_config = Configuration du service | ||||||
|  | config.register_email_confirm = Confirmation d'abonnement par courriel | ||||||
|  | config.disable_register = Auto-inscription désactivée | ||||||
|  | config.require_sign_in_view = Connexion requise pour visualiser | ||||||
|  | config.mail_notify = Notifications par courriel | ||||||
|  | config.enable_cache_avatar = Cache avatar activée | ||||||
|  | config.active_code_lives = Jeton d'activation | ||||||
|  | config.reset_password_code_lives = Jeton de modification mot-de-passe | ||||||
|  | config.webhook_config = Configuration Webhook | ||||||
|  | config.task_interval = Intervalle | ||||||
|  | config.deliver_timeout = Expiration des appels | ||||||
|  | config.mailer_config = Configuration expédition de courriels | ||||||
|  | config.mailer_enabled = Activé | ||||||
|  | config.mailer_name = Nom | ||||||
|  | config.mailer_host = Serveur | ||||||
|  | config.mailer_user = Usager | ||||||
|  | config.oauth_config = Configuration OAuth | ||||||
|  | config.oauth_enabled = Activé | ||||||
|  | config.cache_config = Configuration du cache | ||||||
|  | config.cache_adapter = Mécanisme de cache | ||||||
|  | config.cache_interval = Intervalle | ||||||
|  | config.cache_conn = Chaîne de connexion | ||||||
|  | config.session_config = Configuration des session | ||||||
|  | config.session_provider = Mécanisme | ||||||
|  | config.provider_config = Configuration du mécanisme | ||||||
|  | config.cookie_name = Nom du fichier témoin | ||||||
|  | config.enable_set_cookie = Fichier témoin actvité | ||||||
|  | config.gc_interval_time = Intervalle GC | ||||||
|  | config.session_life_time = Durée de la session | ||||||
|  | config.https_only = HTTPS exigé | ||||||
|  | config.cookie_life_time = Expiration du fichier témoin | ||||||
|  | config.session_hash_function = Fonction de hashage ID de session | ||||||
|  | config.session_hash_key = Clé de hashage ID de session | ||||||
|  | config.picture_config = Configuration des avatars | ||||||
|  | config.picture_service = Service image | ||||||
|  | config.disable_gravatar = Désactivé Gravatar | ||||||
|  | config.log_config = Configuration du journal | ||||||
|  | config.log_mode = Mode de journal | ||||||
|  |  | ||||||
|  | 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 | ||||||
|  |  | ||||||
|  | [action] | ||||||
|  | create_repo = a créé le dépôt <a href="/%s">%s</a> | ||||||
|  | commit_repo = a poussé sur <a href="/%s/src/%s">%s</a> à <a href="/%s">%s</a> | ||||||
|  | create_issue = a ouvert le ticket <a href="/%s/issues/%s">%s#%s</a> | ||||||
|  | comment_issue = a commenté sur le ticket <a href="/%s/issues/%s">%s#%s</a> | ||||||
|  |  | ||||||
|  | [tool] | ||||||
|  | ago = auparavant | ||||||
|  | from_now = depuis | ||||||
|  | now = maintenant | ||||||
|  | 1s = 1 seconde %s | ||||||
|  | 1m = 1 minute %s | ||||||
|  | 1h = 1 heure %s | ||||||
|  | 1d = 1 jour %s | ||||||
|  | 1w = 1 semaine %s | ||||||
|  | 1mon = 1 mos %s | ||||||
|  | 1y = 1 an %s | ||||||
|  | seconds = %d secondes %s | ||||||
|  | minutes = %d minutes %s | ||||||
|  | hours = %d heures %s | ||||||
|  | days = %d jours %s | ||||||
|  | weeks = %d semaines %s | ||||||
|  | months = %d mois %s | ||||||
|  | years = %d années %s | ||||||
|  | raw_seconds = secondes | ||||||
|  | raw_minutes = minutes | ||||||
							
								
								
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							| @@ -17,7 +17,7 @@ import ( | |||||||
| 	"github.com/gogits/gogs/modules/setting" | 	"github.com/gogits/gogs/modules/setting" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| const APP_VER = "0.5.0.0913 Beta" | const APP_VER = "0.5.2.0916 Beta" | ||||||
|  |  | ||||||
| func init() { | func init() { | ||||||
| 	runtime.GOMAXPROCS(runtime.NumCPU()) | 	runtime.GOMAXPROCS(runtime.NumCPU()) | ||||||
|   | |||||||
| @@ -22,6 +22,7 @@ import ( | |||||||
|  |  | ||||||
| 	"github.com/gogits/gogs/modules/log" | 	"github.com/gogits/gogs/modules/log" | ||||||
| 	"github.com/gogits/gogs/modules/process" | 	"github.com/gogits/gogs/modules/process" | ||||||
|  | 	"github.com/gogits/gogs/modules/setting" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| const ( | const ( | ||||||
| @@ -119,23 +120,30 @@ func CheckPublicKeyString(content string) (bool, error) { | |||||||
| 	tmpFile.WriteString(content) | 	tmpFile.WriteString(content) | ||||||
| 	tmpFile.Close() | 	tmpFile.Close() | ||||||
|  |  | ||||||
| 	// … see if ssh-keygen recognizes its contents | 	// Check if ssh-keygen recognizes its contents. | ||||||
| 	stdout, stderr, err := process.Exec("CheckPublicKeyString", "ssh-keygen", "-l", "-f", tmpPath) | 	stdout, stderr, err := process.Exec("CheckPublicKeyString", "ssh-keygen", "-l", "-f", tmpPath) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return false, errors.New("ssh-keygen -l -f: " + stderr) | 		return false, errors.New("ssh-keygen -l -f: " + stderr) | ||||||
| 	} else if len(stdout) < 2 { | 	} else if len(stdout) < 2 { | ||||||
| 		return false, errors.New("ssh-keygen returned not enough output to evaluate the key") | 		return false, errors.New("ssh-keygen returned not enough output to evaluate the key") | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	// The ssh-keygen in Windows does not print key type, so no need go further. | ||||||
|  | 	if setting.IsWindows { | ||||||
|  | 		return true, nil | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	sshKeygenOutput := strings.Split(stdout, " ") | 	sshKeygenOutput := strings.Split(stdout, " ") | ||||||
| 	if len(sshKeygenOutput) < 4 { | 	if len(sshKeygenOutput) < 4 { | ||||||
| 		return false, errors.New("Not enough fields returned by ssh-keygen -l -f") | 		return false, errors.New("Not enough fields returned by ssh-keygen -l -f") | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	// Check if key type and key size match. | ||||||
| 	keySize, err := com.StrTo(sshKeygenOutput[0]).Int() | 	keySize, err := com.StrTo(sshKeygenOutput[0]).Int() | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return false, errors.New("Cannot get key size of the given key") | 		return false, errors.New("Cannot get key size of the given key") | ||||||
| 	} | 	} | ||||||
| 	keyType := strings.TrimSpace(sshKeygenOutput[len(sshKeygenOutput)-1]) | 	keyType := strings.TrimSpace(sshKeygenOutput[len(sshKeygenOutput)-1]) | ||||||
|  |  | ||||||
| 	if minimumKeySize := MinimumKeySize[keyType]; minimumKeySize == 0 { | 	if minimumKeySize := MinimumKeySize[keyType]; minimumKeySize == 0 { | ||||||
| 		return false, errors.New("Sorry, unrecognized public key type") | 		return false, errors.New("Sorry, unrecognized public key type") | ||||||
| 	} else if keySize < minimumKeySize { | 	} else if keySize < minimumKeySize { | ||||||
| @@ -160,10 +168,14 @@ func saveAuthorizedKeyFile(key *PublicKey) error { | |||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| 	if finfo.Mode().Perm() > 0600 { |  | ||||||
| 		log.Error(4, "authorized_keys file has unusual permission flags: %s - setting to -rw-------", finfo.Mode().Perm().String()) | 	// FIXME: following command does not support in Windows. | ||||||
| 		if err = f.Chmod(0600); err != nil { | 	if !setting.IsWindows { | ||||||
| 			return err | 		if finfo.Mode().Perm() > 0600 { | ||||||
|  | 			log.Error(4, "authorized_keys file has unusual permission flags: %s - setting to -rw-------", finfo.Mode().Perm().String()) | ||||||
|  | 			if err = f.Chmod(0600); err != nil { | ||||||
|  | 				return err | ||||||
|  | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -95,8 +95,13 @@ func NewRepoContext() { | |||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		log.Fatal(4, "Fail to get Git version: %v", err) | 		log.Fatal(4, "Fail to get Git version: %v", err) | ||||||
| 	} | 	} | ||||||
| 	if ver.Major < 2 && ver.Minor < 8 { |  | ||||||
| 		log.Fatal(4, "Gogs requires Git version greater or equal to 1.8.0") | 	reqVer, err := git.ParseVersion("1.7.1") | ||||||
|  | 	if err != nil { | ||||||
|  | 		log.Fatal(4, "Fail to parse required Git version: %v", err) | ||||||
|  | 	} | ||||||
|  | 	if ver.LessThan(reqVer) { | ||||||
|  | 		log.Fatal(4, "Gogs requires Git version greater or equal to 1.7.1") | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// Check if server has basic git setting and set if not. | 	// Check if server has basic git setting and set if not. | ||||||
|   | |||||||
| @@ -137,6 +137,14 @@ func (repo *Repository) GetCommit(commitId string) (*Commit, error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| func (repo *Repository) commitsCount(id sha1) (int, error) { | func (repo *Repository) commitsCount(id sha1) (int, error) { | ||||||
|  | 	if gitVer.LessThan(MustParseVersion("1.8.0")) { | ||||||
|  | 		stdout, stderr, err := com.ExecCmdDirBytes(repo.Path, "git", "log", "--pretty=format:''", id.String()) | ||||||
|  | 		if err != nil { | ||||||
|  | 			return 0, errors.New(string(stderr)) | ||||||
|  | 		} | ||||||
|  | 		return len(bytes.Split(stdout, []byte("\n"))), nil | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	stdout, stderr, err := com.ExecCmdDir(repo.Path, "git", "rev-list", "--count", id.String()) | 	stdout, stderr, err := com.ExecCmdDir(repo.Path, "git", "rev-list", "--count", id.String()) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return 0, errors.New(stderr) | 		return 0, errors.New(stderr) | ||||||
|   | |||||||
| @@ -11,33 +11,85 @@ import ( | |||||||
| 	"github.com/Unknwon/com" | 	"github.com/Unknwon/com" | ||||||
| ) | ) | ||||||
|  |  | ||||||
|  | var ( | ||||||
|  | 	// Cached Git version. | ||||||
|  | 	gitVer *Version | ||||||
|  | ) | ||||||
|  |  | ||||||
| // Version represents version of Git. | // Version represents version of Git. | ||||||
| type Version struct { | type Version struct { | ||||||
| 	Major, Minor, Patch int | 	Major, Minor, Patch int | ||||||
| } | } | ||||||
|  |  | ||||||
| // GetVersion returns current Git version installed. | func ParseVersion(verStr string) (*Version, error) { | ||||||
| func GetVersion() (Version, error) { | 	infos := strings.Split(verStr, ".") | ||||||
| 	stdout, stderr, err := com.ExecCmd("git", "version") |  | ||||||
| 	if err != nil { |  | ||||||
| 		return Version{}, errors.New(stderr) |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	infos := strings.Split(stdout, " ") |  | ||||||
| 	if len(infos) < 3 { | 	if len(infos) < 3 { | ||||||
| 		return Version{}, errors.New("not enough output") | 		return nil, errors.New("incorrect version input") | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	v := Version{} | 	v := &Version{} | ||||||
| 	for i, s := range strings.Split(strings.TrimSpace(infos[2]), ".") { | 	for i, s := range infos { | ||||||
| 		switch i { | 		switch i { | ||||||
| 		case 0: | 		case 0: | ||||||
| 			v.Major, _ = com.StrTo(s).Int() | 			v.Major, _ = com.StrTo(s).Int() | ||||||
| 		case 1: | 		case 1: | ||||||
| 			v.Minor, _ = com.StrTo(s).Int() | 			v.Minor, _ = com.StrTo(s).Int() | ||||||
| 		case 2: | 		case 2: | ||||||
| 			v.Patch, _ = com.StrTo(s).Int() | 			v.Patch, _ = com.StrTo(strings.TrimSpace(s)).Int() | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	return v, nil | 	return v, nil | ||||||
| } | } | ||||||
|  |  | ||||||
|  | func MustParseVersion(verStr string) *Version { | ||||||
|  | 	v, _ := ParseVersion(verStr) | ||||||
|  | 	return v | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // Compare compares two versions, | ||||||
|  | // it returns 1 if original is greater, -1 if original is smaller, 0 if equal. | ||||||
|  | func (v *Version) Compare(that *Version) int { | ||||||
|  | 	if v.Major > that.Major { | ||||||
|  | 		return 1 | ||||||
|  | 	} else if v.Major < that.Major { | ||||||
|  | 		return -1 | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	if v.Minor > that.Minor { | ||||||
|  | 		return 1 | ||||||
|  | 	} else if v.Minor < that.Minor { | ||||||
|  | 		return -1 | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	if v.Patch > that.Patch { | ||||||
|  | 		return 1 | ||||||
|  | 	} else if v.Patch < that.Patch { | ||||||
|  | 		return -1 | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	return 0 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | func (v *Version) LessThan(that *Version) bool { | ||||||
|  | 	return v.Compare(that) < 0 | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // GetVersion returns current Git version installed. | ||||||
|  | func GetVersion() (*Version, error) { | ||||||
|  | 	if gitVer != nil { | ||||||
|  | 		return gitVer, nil | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	stdout, stderr, err := com.ExecCmd("git", "version") | ||||||
|  | 	if err != nil { | ||||||
|  | 		return nil, errors.New(stderr) | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	infos := strings.Split(stdout, " ") | ||||||
|  | 	if len(infos) < 3 { | ||||||
|  | 		return nil, errors.New("not enough output") | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	gitVer, err = ParseVersion(infos[2]) | ||||||
|  | 	return gitVer, err | ||||||
|  | } | ||||||
|   | |||||||
| @@ -10,6 +10,7 @@ import ( | |||||||
| 	"os/exec" | 	"os/exec" | ||||||
| 	"path" | 	"path" | ||||||
| 	"path/filepath" | 	"path/filepath" | ||||||
|  | 	"runtime" | ||||||
| 	"strings" | 	"strings" | ||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| @@ -99,12 +100,14 @@ var ( | |||||||
| 	CustomPath   string // Custom directory path. | 	CustomPath   string // Custom directory path. | ||||||
| 	ProdMode     bool | 	ProdMode     bool | ||||||
| 	RunUser      string | 	RunUser      string | ||||||
|  | 	IsWindows    bool | ||||||
|  |  | ||||||
| 	// I18n settings. | 	// I18n settings. | ||||||
| 	Langs, Names []string | 	Langs, Names []string | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func init() { | func init() { | ||||||
|  | 	IsWindows = runtime.GOOS == "windows" | ||||||
| 	log.NewLogger(0, "console", `{"level": 0}`) | 	log.NewLogger(0, "console", `{"level": 0}`) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -686,7 +686,7 @@ ol.linenums { | |||||||
|   width: auto; |   width: auto; | ||||||
| } | } | ||||||
| /* | /* | ||||||
| The dashboard page style |     The dashboard page style | ||||||
| */ | */ | ||||||
| #dashboard-header { | #dashboard-header { | ||||||
|   border-bottom: 1px solid #d6d6d6; |   border-bottom: 1px solid #d6d6d6; | ||||||
| @@ -1032,7 +1032,7 @@ The register and sign-in page style | |||||||
| } | } | ||||||
| #repo-clone-url { | #repo-clone-url { | ||||||
|   border-right: none; |   border-right: none; | ||||||
|   width: 200px; |   width: 190px; | ||||||
|   border-left: none; |   border-left: none; | ||||||
| } | } | ||||||
| #repo-clone-help { | #repo-clone-help { | ||||||
|   | |||||||
| @@ -1,9 +1,7 @@ | |||||||
| @import "../ui/var"; | @import "../ui/var"; | ||||||
|  |  | ||||||
| /* | /* | ||||||
| The dashboard page style |     The dashboard page style | ||||||
| */ | */ | ||||||
|  |  | ||||||
| @dashboardHeaderBorderColor: #D6D6D6; | @dashboardHeaderBorderColor: #D6D6D6; | ||||||
| @dashboardHeaderLinkColor: #444; | @dashboardHeaderLinkColor: #444; | ||||||
| @dashboardHeaderLinkHoverColor: #D9453D; | @dashboardHeaderLinkHoverColor: #D9453D; | ||||||
|   | |||||||
| @@ -95,7 +95,7 @@ background-color: @repoHeaderBgColor; | |||||||
| } | } | ||||||
| #repo-clone-url { | #repo-clone-url { | ||||||
| 	border-right: none; | 	border-right: none; | ||||||
| 	width: 200px; | 	width: 190px; | ||||||
| 	border-left: none; | 	border-left: none; | ||||||
| } | } | ||||||
| #repo-clone-help { | #repo-clone-help { | ||||||
|   | |||||||
| @@ -280,7 +280,7 @@ func SignUpPost(ctx *middleware.Context, cpt *captcha.Captcha, form auth.Registe | |||||||
| 		ctx.Data["IsSendRegisterMail"] = true | 		ctx.Data["IsSendRegisterMail"] = true | ||||||
| 		ctx.Data["Email"] = u.Email | 		ctx.Data["Email"] = u.Email | ||||||
| 		ctx.Data["Hours"] = setting.Service.ActiveCodeLives / 60 | 		ctx.Data["Hours"] = setting.Service.ActiveCodeLives / 60 | ||||||
| 		ctx.HTML(200, "user/activate") | 		ctx.HTML(200, ACTIVATE) | ||||||
|  |  | ||||||
| 		if err := ctx.Cache.Put("MailResendLimit_"+u.LowerName, u.LowerName, 180); err != nil { | 		if err := ctx.Cache.Put("MailResendLimit_"+u.LowerName, u.LowerName, 180); err != nil { | ||||||
| 			log.Error(4, "Set cache(MailResendLimit) fail: %v", err) | 			log.Error(4, "Set cache(MailResendLimit) fail: %v", err) | ||||||
|   | |||||||
| @@ -94,7 +94,7 @@ func Dashboard(ctx *middleware.Context) { | |||||||
| 	feeds := make([]*models.Action, 0, len(actions)) | 	feeds := make([]*models.Action, 0, len(actions)) | ||||||
| 	for _, act := range actions { | 	for _, act := range actions { | ||||||
| 		if act.IsPrivate { | 		if act.IsPrivate { | ||||||
| 			if has, _ := models.HasAccess(ctxUser.Name, act.RepoUserName+"/"+act.RepoName, | 			if has, _ := models.HasAccess(ctx.User.Name, act.RepoUserName+"/"+act.RepoName, | ||||||
| 				models.READABLE); !has { | 				models.READABLE); !has { | ||||||
| 				continue | 				continue | ||||||
| 			} | 			} | ||||||
|   | |||||||
							
								
								
									
										18
									
								
								scripts/systemd/gogs.service
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								scripts/systemd/gogs.service
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | [Unit] | ||||||
|  | Description=Gogs (Go Git Service) server | ||||||
|  | After=syslog.target | ||||||
|  | After=network.target | ||||||
|  | #After=mysqld.service | ||||||
|  | #After=postgresql.service | ||||||
|  | #After=memcached.service | ||||||
|  | #After=redis.service | ||||||
|  |  | ||||||
|  | [Service] | ||||||
|  | Type=simple | ||||||
|  | User=git | ||||||
|  | Group=git | ||||||
|  | ExecStart=/home/git/gogs/gogs/start.sh | ||||||
|  | WorkingDirectory=/home/git/gogs | ||||||
|  |  | ||||||
|  | [Install] | ||||||
|  | WantedBy=multi-user.target | ||||||
| @@ -1 +1 @@ | |||||||
| 0.5.0.0913 Beta | 0.5.2.0916 Beta | ||||||
| @@ -29,7 +29,7 @@ | |||||||
|                     <p class="info"> |                     <p class="info"> | ||||||
|                         <span class="author"><img class="avatar" src="{{.Publisher.AvatarLink}}" alt="" width="20">   |                         <span class="author"><img class="avatar" src="{{.Publisher.AvatarLink}}" alt="" width="20">   | ||||||
|                         <a href="/user/{{.Publisher.Name}}">{{.Publisher.Name}}</a></span> |                         <a href="/user/{{.Publisher.Name}}">{{.Publisher.Name}}</a></span> | ||||||
|                         {{if .Created}}<span class="time">{{TimeSince .Created}}</span>{{end}} |                         {{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}} | ||||||
|                         <span class="ahead"><strong>{{.NumCommitsBehind}}</strong> commits to {{.Target}} since this release</span> |                         <span class="ahead"><strong>{{.NumCommitsBehind}}</strong> commits to {{.Target}} since this release</span> | ||||||
|                     </p> |                     </p> | ||||||
|                     <div class="markdown desc"> |                     <div class="markdown desc"> | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|                 <div class="avatar left"> |                 <div class="avatar left"> | ||||||
|                     <img class="avatar-30" src="{{AvatarLink .GetActEmail}}" alt=""> |                     <img class="avatar-30" src="{{AvatarLink .GetActEmail}}" alt=""> | ||||||
|                 </div> |                 </div> | ||||||
|                 <div class="content left {{if eq .GetOpType 5}}push-news{{end}}"> |                 <div class="content left {{if eq .GetOpType 5}}push-news{{end}} grid-4-5"> | ||||||
|                     <p class="text-bold"> |                     <p class="text-bold"> | ||||||
|                         <a href="/{{.GetActUserName}}">{{.GetActUserName}}</a> |                         <a href="/{{.GetActUserName}}">{{.GetActUserName}}</a> | ||||||
|                         {{if eq .GetOpType 1}} |                         {{if eq .GetOpType 1}} | ||||||
| @@ -30,7 +30,7 @@ | |||||||
|                             {{ $push := ActionContent2Commits .}} |                             {{ $push := ActionContent2Commits .}} | ||||||
|                             {{ $repoLink := .GetRepoLink}} |                             {{ $repoLink := .GetRepoLink}} | ||||||
|                             {{range $push.Commits}} |                             {{range $push.Commits}} | ||||||
|                             <li><img class="avatar-16" src="{{AvatarLink .AuthorEmail}}?s=16"> <a href="/{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> {{.Message}}</li> |                             <li><img class="avatar-16" src="{{AvatarLink .AuthorEmail}}?s=16"> <a href="/{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> <span class="text-truncate grid-4-5">{{.Message}}</span></li> | ||||||
|                             {{end}} |                             {{end}} | ||||||
|                         </ul> |                         </ul> | ||||||
|                     </div> |                     </div> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user