プロジェクト

全般

プロフィール

Vote #78220

完了

redmine/i18n.rb - languages_lookup class variable is rebuilt every time

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

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

0%

予定工数:
category_id:
37
version_id:
119
issue_org_id:
25014
author_id:
40856
assigned_to_id:
1
comments:
2
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

the @@@languages_lookup@ variable in @redmine/i18n.rb@ appears to be intended as a cache but is assigned to a new value everytime @find_language@ is called.

Attached patch fixes this by using @||=@ instead of @=@.


journals

Since @find_language@ method is called on every request, I think caching values is reasonable.
Setting target version to 3.4.0.
--------------------------------------------------------------------------------
Committed, thanks for the fix.
--------------------------------------------------------------------------------

Admin Redmine さんが4年以上前に更新

  • カテゴリI18n_37 にセット
  • 対象バージョン3.4.0_119 にセット

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

いいね!0
いいね!0