Skip to content

Commit

Permalink
Merge pull request #13410 from eduardoj/clarify_localization
Browse files Browse the repository at this point in the history
Substitute l with I18n.l to make it clearer ...
  • Loading branch information
Dany Marcoux committed Nov 21, 2022
2 parents 423f006 + d28fe51 commit f8c098e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/api/app/views/webui/comment/_content.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
%p
= link_to(comment.user, user_path(comment.user))
wrote
= link_to("#comment-#{comment.id}", title: l(comment.created_at.utc), name: "comment-#{comment.id}") do
= link_to("#comment-#{comment.id}", title: I18n.l(comment.created_at.utc), name: "comment-#{comment.id}") do
#{time_ago_in_words(comment.created_at)} ago
= render_as_markdown(comment)
= render partial: 'webui/comment/reply', locals: { comment: comment, level: 0, commentable: commentable }
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/webui/request/_request_history.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
%p
= link_to(user, user_path(user))
created request
= link_to('#request-creation', title: l(bs_request.created_at.utc), name: 'request-creation') do
= link_to('#request-creation', title: I18n.l(bs_request.created_at.utc), name: 'request-creation') do
#{time_ago_in_words(bs_request.created_at)} ago

= render partial: 'webui/shared/collapsible_text', locals: { text: bs_request.description }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
= link_to(element.user_action, request_show_path(element.description_extension))
- else
= element.user_action
= link_to("#status-history-#{element.id}", title: l(element.created_at.utc), name: "status-history-#{element.id}") do
= link_to("#status-history-#{element.id}", title: I18n.l(element.created_at.utc), name: "status-history-#{element.id}") do
#{time_ago_in_words(element.created_at)} ago

= render partial: 'webui/shared/collapsible_text', locals: { text: element.comment }
2 changes: 1 addition & 1 deletion src/api/app/views/webui/request/_requests_small.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
by
= user_with_realname_and_icon(req.creator, short: true)
= surround '(', ')' do
%u{ title: l(req.created_at.utc) }
%u{ title: I18n.l(req.created_at.utc) }
#{time_ago_in_words(req.created_at)} ago
4 changes: 2 additions & 2 deletions src/api/app/views/webui/request/_show_side_links.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
%i.fas.fa-exclamation-circle.text-danger
- if BsRequest::FINAL_REQUEST_STATES.include?(bs_request.state)
Auto-accept was set to
%span.fuzzy-time{ title: "#{l bs_request.accept_at}" }
%span.fuzzy-time{ title: "#{I18n.l bs_request.accept_at}" }
= succeed '.' do
= l bs_request.accept_at, format: :only_date
= I18n.l bs_request.accept_at, format: :only_date
- elsif bs_request.accept_at.past?
This request will be automatically accepted when it enters the 'new' state.
- else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
%i.fas.fa-code-commit.text-dark
= link_to(realname_with_login(creator), user_path(creator))
created this request
= link_to('#request-creation', title: l(bs_request.created_at.utc), name: 'request-creation') do
= link_to('#request-creation', title: I18n.l(bs_request.created_at.utc), name: 'request-creation') do
#{time_ago_in_words(bs_request.created_at)} ago
- if bs_request.superseding.any?
superseding
Expand Down

0 comments on commit f8c098e

Please sign in to comment.