-
Notifications
You must be signed in to change notification settings - Fork 17
@nicolnx improved and zh.yml translation file #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
archonwang
wants to merge
5
commits into
TravisSpangle:master
Choose a base branch
from
archonwang:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9c59f43
follow time tracking users permissions to show only allowed time entries
820ad44
also follow time tracking users permissions in floating reports
3dffa74
Merge remote-tracking branch 'upstream/master'
6e6a491
fix user spent time display according to role permissions
7e0efcb
added Simplified Chinese translation file
archonwang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
|
||
app/views/issues/show.html.erb | ||
|
||
.idea | ||
|
||
#ignore vim files | ||
*.swp | ||
*.swo | ||
*.swo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
zh: | ||
plugin_spent_time_in_issue: | ||
timeEntries: 工时记录 | ||
spentOn: 工时发生日期 | ||
max_display: 显示最大记录数 | ||
time_format: 工时显示格式 | ||
time_format_decimal: 小时-含小数 (如:1.5 ) | ||
time_format_human: 自适应格式 ( 如:1小时 ) | ||
datetime: | ||
hours: | ||
one: 1 小时 | ||
other: "%{hours} 小时" | ||
minutes: | ||
one: 1 分钟 | ||
other: "%{minutes} 分钟" | ||
user: 用户 | ||
hours: 工时 | ||
comments: 备注 | ||
display_cols: 显示列 | ||
activity: 活动 | ||
seeAllCount: "( 查看所有 %{count} 个工时记录 )" | ||
error: "系统错误" | ||
error_description: "该插件不能向问题写入信息。" | ||
error_from_file: "请复制并重命名文件:" | ||
error_to_file: "至文件:" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
module TimeEntriesPatch | ||
module IssuesControllerPatch | ||
|
||
def self.included(base) | ||
base.class_eval do | ||
|
||
def show_with_plugin | ||
@journals = @issue.journals.includes(:user, :details). | ||
references(:user, :details). | ||
reorder(:created_on, :id).to_a | ||
@journals.each_with_index { |j, i| j.indice = i+1 } | ||
@journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project) | ||
Journal.preload_journals_details_custom_fields(@journals) | ||
@journals.select! { |journal| journal.notes? || journal.visible_details.any? } | ||
@journals.reverse! if User.current.wants_comments_in_reverse_order? | ||
|
||
@changesets = @issue.changesets.visible.preload(:repository, :user).to_a | ||
@changesets.reverse! if User.current.wants_comments_in_reverse_order? | ||
|
||
@relations = @issue.relations.select { |r| r.other_issue(@issue) && r.other_issue(@issue).visible? } | ||
@allowed_statuses = @issue.new_statuses_allowed_to(User.current) | ||
@priorities = IssuePriority.active | ||
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project) | ||
@relation = IssueRelation.new | ||
|
||
@time_query = TimeEntryQuery.build_from_params(params) | ||
scope = time_entry_scope(). | ||
includes(:project, :user, :issue). | ||
preload(:issue => [:project, :tracker, :status, :assigned_to, :priority]) | ||
@total_hours = scope.sum(:hours).to_f | ||
@time_entries = scope | ||
|
||
respond_to do |format| | ||
format.html { | ||
retrieve_previous_and_next_issue_ids | ||
render :template => 'issues/show' | ||
} | ||
format.api | ||
format.atom { render :template => 'journals/index', :layout => false, :content_type => 'application/atom+xml' } | ||
format.pdf { | ||
send_file_headers! :type => 'application/pdf', :filename => "#{@project.identifier}-#{@issue.id}.pdf" | ||
} | ||
end | ||
end | ||
|
||
alias_method_chain :show, :plugin | ||
|
||
private | ||
|
||
def time_entry_scope(options={}) | ||
scope = @time_query.results_scope(options) | ||
if @issue | ||
scope = scope.on_issue(@issue) | ||
end | ||
scope | ||
end | ||
|
||
end | ||
end | ||
end | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in your global environment, not in a project's gitignore. Not everyone uses RubyMine.