Patch #44065
closedRemove unused i18n keys
Description
The attached patches remove the following unused i18n keys.
| key | added in / original usage | became unused in / verification |
|---|---|---|
| description_choose_project | r7693: Hidden label for the membership project selector in groups/_memberships and users/_memberships | r13498: membership UI was moved to principal_memberships; the selector label was removed |
| description_filter | r7678: Hidden label for the query filter operator selector in queries/_filters | r10162: filter row rendering moved to JavaScript; the label was removed |
| error_not_allowed_to_log_time_for_other_users | r17755: 403 error message in TimelogController#authorize_logging_time_for_other_users | r19676: controller-side 403 handling was replaced by model validation |
| label_add_another_file | r1180: "Add another file" link in attachments/_form | r10977: AJAX/multiple upload replaced the link |
| label_change_view_all | r54: "View all changes" link in issues/show.rhtml | r613: IssuesController#history was removed, so the link disappeared |
| label_current_version | r323: "Current version" link in wiki/show.html.erb | r17510: the link was removed because it duplicated the breadcrumb |
| label_date_from | r572: "From" label in the time report/date range UI | r2587: replaced by label_date_from_to |
| label_date_range | r1173: Fieldset legend in timelog/_date_range | r10967: time entries moved to TimeEntryQuery; the date range fieldset was removed |
| label_date_to | r572: Old date range text | r2587: replaced by label_date_from_to |
| label_last_changes | r54: "last N changes" text in issues/show.rhtml | r613: issue history switched to full display, removing the limited-count text |
| |
|
app/assets/javascripts/jstoolbar/lang/*.yml |
| |
|
|
| text_plugin_assets_writable | r2218: Plugin assets writable check in the admin info checklist | r22627: plugin asset mirroring and the checklist item were removed |
| text_select_project_modules | r1143: Fieldset legend in projects/settings/_modules | r16892: the Modules tab/partial was removed and module selection moved into the project form |
Files
Updated by Go MAEDA 23 days ago
- File 0011-Remove-unused-i18n-key-label_public_projects.patch 0011-Remove-unused-i18n-key-label_public_projects.patch added
- File 0012-Remove-unused-i18n-key-text_plugin_assets_writable.patch 0012-Remove-unused-i18n-key-text_plugin_assets_writable.patch added
- File 0013-Remove-unused-i18n-key-text_select_project_modules.patch 0013-Remove-unused-i18n-key-text_select_project_modules.patch added
Updated by Go MAEDA 16 days ago
- Description updated (diff)
- Status changed from Resolved to Closed
I removed 13 i18n keys listed in the description, excluding label_preview and label_public_projects.
Although label_preview and label_public_projects are not currently used, I kept them because they are very generic labels and may be used again in the future.
Updated by Go MAEDA 16 days ago
- File remove-unused-plural2-and-plural5.patch remove-unused-plural2-and-plural5.patch added
- Status changed from Closed to Reopened
The *_plural2 and *_plural5 keys that remain in az.yml and ru.yml are no longer referenced, so they can be removed.
The keys to remove are:
- label_closed_issues_plural2
- label_closed_issues_plural5
- label_comment_plural2
- label_comment_plural5
- label_open_issues_plural2
- label_open_issues_plural5
- label_project_plural2
- label_project_plural5
These were pluralization keys used by the rule-based lookup in GLoc, the internationalization library that Redmine used in the past. Before the migration to Rails I18n, calls such as lwr(:label_comment, count) dynamically resolved keys like label_comment_plural2 or label_comment_plural5 according to the locale-specific rule.
However, in r2493, which is included in Redmine 0.9.0, the Rails 2.2 branch was merged. At that point, the GLoc-based lwr(...) calls were replaced with Rails I18n-based l(..., :count => ...) calls. These *_plural2 and *_plural5 keys have not been used since then.
Rails I18n uses pluralization hashes such as one, few, many, and other. However, label_closed_issues_plural, label_comment_plural, label_open_issues_plural, and label_project_plural are currently referenced as normal labels without count, so they are not used for pluralization selection. Therefore, there is no need to convert them to pluralization hashes. We can simply remove the unused *_plural2 and *_plural5 keys.