プロジェクト

全般

プロフィール

Vote #81444

未完了

Hard-coded error messages in IssueStatus

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Confirmed
優先度:
通常
担当者:
-
カテゴリ:
I18n_37
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
37
version_id:
0
issue_org_id:
35248
author_id:
351215
assigned_to_id:
0
comments:
4
status_id:
9
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Confirmed]

説明

Untranslated hard-coded string exists in source:trunk/app/models/issue_status.rb@20897#L113

def check_integrity
  if Issue.where(:status_id => id).any?
    raise "This status is used by some issues"
  elsif Tracker.where(:default_status_id => id).any?
    raise "This status is used as the default status by some trackers"
  end
end

journals

Also in:
<pre>
models/role.rb:301: raise "Cannot delete role" if members.any?
models/role.rb:302: raise "Cannot delete builtin role" if builtin?
models/role.rb:311: raise "Unable to create the #{name} role (#{role.errors.full_messages.join(',')})." if role.new_record?
models/setting.rb:330: raise "There's no setting named #{name}" unless available_settings.has_key?(name)
models/tracker.rb:147: raise "Cannot delete tracker" if Issue.where(:tracker_id => self.id).any?
models/query.rb:1096: raise "Unknown #{queried_class.name} association #{assoc}" unless customized_class
models/query.rb:1310: raise "Unknown query operator #{operator}"
models/enumeration.rb:135: raise "Cannot delete enumeration" if self.in_use?
</pre>
--------------------------------------------------------------------------------
The descriptions of those raised exceptions generally do not show up in the user interface. They are either handled by higher layers of the code (which may then render an appropriate translated error message in the response to the user) or if unhandled result in a 500 error which also doesn't show any further information to the user.

Generally, those exception descriptions only turn up in the application logs (e..g @logs/production.log@. Here, it is entirely fine to only use english messages (given that the entire code and database scheme uses english).

With that being said, if you can reproduce a case where those error messages do show up in the user interface unchanged, this might be considered for a fix.
--------------------------------------------------------------------------------
Thank you for your reply, Holger.
This error is shown to the user when he/she try to delete a status that has been used in some issues. something like:
Unable to delete issue status (*This status is used by some issues*)

I reproduce the scenario and check the Redmine log. There wasn't this error in the log.
--------------------------------------------------------------------------------
Kam Nazir wrote:
> This error is shown to the user when he/she try to delete a status that has been used in some issues. something like:
> Unable to delete issue status (*This status is used by some issues*)

Confirmed the issue. In the screenshot below, you can see an untranslated English sentence in a Japanese error message.

!{width: 635px; border: 1px solid grey;}.Screenshot_2021-05-18.png!
--------------------------------------------------------------------------------

Admin Redmine さんが約2年前に更新

  • カテゴリI18n_37 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0