プロジェクト

全般

プロフィール

Vote #75651

完了

Extraction of list of available locales is probe to bad gems

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

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

0%

予定工数:
category_id:
37
version_id:
81
issue_org_id:
18110
author_id:
10982
assigned_to_id:
1
comments:
5
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

I added a plugin to my Redmine which indirectly depended on @kaminari@ gem who contains a badly named @kaminari.yml@ locale file: https://github.com/amatsuda/kaminari/tree/master/config/locales. Hence a second "English" named language with a key of @kaminari@ is added to list of Redmine languages.


journals

Ebrahim Mohammadi wrote:
> Hence a second "English" named language with a key of @kaminari@ is added to list of Redmine languages.

Which list contains this second "English" language ? Can you provide a screenshot or something and a way to reproduce this problem, thanks.

--------------------------------------------------------------------------------
Dropdown list of Redmine languages is shown in these two locations both of which are affected:

* My Account -> Language
* Administration -> Settings -> Display -> Default language

Non-tested steps to reproduce:

* Add @kaminari@ to Gemfile of Redmine as dependency
* @bundle update@
* @rails server@
* See any of two affected lists of Redmine languages
--------------------------------------------------------------------------------
Ebrahim Mohammadi wrote:

> Non-tested steps to reproduce:
>
> * Add @kaminari@ to Gemfile of Redmine as dependency
> * @bundle update@
> * @rails server@
> * See any of two affected lists of Redmine languages

I tried this already but was not able to reproduce.
--------------------------------------------------------------------------------
I think @kaminari@ has to be loaded in Redmine in order to add its locale path to @::I18n.load_path@ which is used in @Redmine::I18n::Backend.available_locales@ in @lib/redmine/i18n.rb@.
--------------------------------------------------------------------------------
I was able to reproduce and it's fixed in r13450 (make sure to clear your cache).
Locales without the :general_lang_name locale are now ignored.
--------------------------------------------------------------------------------

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

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

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

いいね!0
いいね!0