From 9c63e2a87e68a43b5fd3b5f1b2ddf0853c13cf62 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 18 Jul 2015 13:02:28 +0800 Subject: [PATCH 1/3] =?UTF-8?q?1=E3=80=81=E7=89=88=E6=9C=AC=E5=BA=93?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=90=E5=91=98=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E7=BB=9F=E8=AE=A1=202=E3=80=81=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=BA=93=E6=88=90=E5=91=98=E8=BF=87=E5=A4=9A=E6=8B=A5=E6=8C=A4?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 15 ++++++++--- config/locales/zh.yml | 30 +++++++++++----------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 607c9b5db..b335e1830 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -250,6 +250,14 @@ update return -1 end end + + if params[:to] == 'gitlab' + g = Gitlab.client + g.post('/session', body: {email: User.current.mail, password: User.current.hashed_password}) + redirect_to "http://192.168.41.130:3000/gitlab-org/gitlab-shell/tree/master" + return + end + #if( !User.current.member_of?(@project) || @project.hidden_repo) @repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty? @@ -540,11 +548,12 @@ update :stack => :side, :scale_integers => true, :step_x_labels => 2, - :show_data_values => false, + :show_data_values => true, :graph_title => l(:label_commits_per_month), :show_graph_title => true ) + # 具状图 graph.add_data( :data => commits_by_month[0..11].reverse, :title => l(:label_revision_plural) @@ -560,7 +569,7 @@ update def graph_commits_per_author(repository) commits_by_author = Changeset.count(:all, :group => :committer, :conditions => ["repository_id = ?", repository.id]) - commits_by_author.to_a.sort! {|x, y| x.last <=> y.last} + commits_by_author = commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}.last(25) changes_by_author = Change.count(:all, :group => :committer, :include => :changeset, :conditions => ["#{Changeset.table_name}.repository_id = ?", repository.id]) h = changes_by_author.inject({}) {|o, i| o[i.first] = i.last; o} @@ -582,7 +591,7 @@ update :fields => fields, :stack => :side, :scale_integers => true, - :show_data_values => false, + :show_data_values => true, :rotate_y_labels => false, :graph_title => l(:label_commits_per_author), :show_graph_title => true diff --git a/config/locales/zh.yml b/config/locales/zh.yml index ac8ab40a9..7eaa33938 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -265,9 +265,9 @@ zh: permission_view_gantt: 查看甘特图 permission_view_calendar: 查看日历 permission_view_issue_watchers: 查看跟踪者列表 - - - + + + permission_add_issue_watchers: 添加跟踪者 permission_delete_issue_watchers: 删除跟踪者 permission_log_time: 登记工时 @@ -636,7 +636,7 @@ zh: label_comment_add: 添加评论 label_comment_added: 评论已添加 label_comment_delete: 删除评论 - + @@ -1200,9 +1200,9 @@ zh: label_post_on: 发表了 label_post_on_issue: 发表了问题 - - + + label_updated_time_on: " 更新于 %{value} " label_call_list: 需求列表 @@ -1513,9 +1513,9 @@ zh: label_news_number: 新闻的数量 label_wiki_number: wiki的数量 label_wiki_mail_notification: 发布了wiki - - - + + + # redmine活跃度评分 label_message_number: 留言的数量 # delete label_activity_number: 个人动态数量 # delete @@ -1525,14 +1525,14 @@ zh: label_wiki_number: wiki的数量 # delete - + label_activities: 个人动态 label_issue_message_number: 对issue的留言数量 label_code_submit_number: 代码提交次数 label_topic_number: 讨论区发言数量 - + label_join_contest: 加入竞赛 label_exit_contest: 退出竞赛 label_participator: 参与者 @@ -1627,7 +1627,7 @@ zh: label_bid_contest_show_course_name: 课程名称 label_bid_contest_show_teacher_name: 教师 label_contest_list: 竞赛列表 - + label_bids_task_list: 作业列表 @@ -1958,9 +1958,9 @@ zh: label_poll_republish_success: 取消成功 label_answer_total: 总计: label_join_project: 加入项目 - - - + + + # # # 项目企业模块 From 2e78ea3d58e6b0abc2fb1561aaf4a91f989ba9a2 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 18 Jul 2015 13:09:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8C=89=E6=9C=88=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=AF=8F=E6=9C=88=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=87=8F=EF=BC=88=E4=BB=A5=E5=89=8D=E6=98=AF?= =?UTF-8?q?ASCII=E7=A0=81=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/zh.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 12797ea1f..595286f45 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -7,6 +7,26 @@ zh: direction: ltr jquery: locale: "zh-CN" + date: + formats: + # Use the strftime parameters for formats. + # When no format has been given, it uses default. + # You can provide other formats here if you like! + default: "%Y-%m-%d" + short: "%b%d日" + long: "%Y年%b%d日" + + day_names: [星期天, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六] + abbr_day_names: [日, 一, 二, 三, 四, 五, 六] + + # Don't forget the nil at the beginning; there's no such thing as a 0th month + month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月] + abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月] + # Used in date_select and datime_select. + order: + - :year + - :month + - :day notice_account_updated: 帐号更新成功 notice_account_wrong_password: 密码错误 From 54b1070d330708d11025f8fa94792dca3253694a Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 18 Jul 2015 13:16:47 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E6=8C=89?= =?UTF-8?q?=E6=9C=88=E3=80=81=E7=94=A8=E6=88=B7=E6=8F=90=E4=BA=A4=E9=97=B4?= =?UTF-8?q?=E8=B7=9D=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/stats.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/repositories/stats.html.erb b/app/views/repositories/stats.html.erb index 5fd791810..7e558119f 100644 --- a/app/views/repositories/stats.html.erb +++ b/app/views/repositories/stats.html.erb @@ -4,7 +4,7 @@

<%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %>

-

+

<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %>

<%= link_to l(:button_back), :action => 'show', :id => @project %>