Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Clean up locales/en.yml

Mir Bhatia79c43edcca63
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 3f65aea7565..1bc43e71f6a 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -543,8 +543,6 @@ en:
identifier: "Identifier"
latest_activity_at: "Latest activity at"
parent: "Subproject of"
- parent_without_of: "Subproject"
- parent_no_longer: "No longer subproject of"
public_value:
title: "Visibility"
true: "public"
@@ -988,6 +986,11 @@ en:
created_on: "created on %{datetime}"
updated_by_on: "updated by %{user} on %{datetime}"
updated_on: "updated on %{datetime}"
+ parent_without_of: "Subproject"
+ parent_no_longer: "No longer subproject of"
+ text_journal_changed_html: "%{label} changed from %{old} %{linebreak}to %{new}"
+ text_journal_deleted: "%{label} %{old}"
+ text_journal_of: "%{label} %{value}"
filter:
changeset: "Changesets"
message: "Forums"
@@ -2841,14 +2844,11 @@ en:
text_work_packages_ref_in_commit_messages: "Referencing and fixing work packages in commit messages"
text_journal_added: "%{label} %{value} added"
text_journal_changed_html: "%{label} changed from %{old} %{linebreak}<strong>to</strong> %{new}"
- text_journal_changed_html_project_activity: "%{label} changed from %{old} %{linebreak}to %{new}"
text_journal_changed_plain: "%{label} changed from %{old} %{linebreak}to %{new}"
text_journal_changed_no_detail: "%{label} updated"
text_journal_changed_with_diff: "%{label} changed (%{link})"
text_journal_deleted: "%{label} deleted (%{old})"
- text_journal_deleted_custom_subproject: "%{label} %{old}"
text_journal_deleted_with_diff: "%{label} deleted (%{link})"
- text_journal_of: "%{label} %{value}"
text_journal_set_to: "%{label} set to %{value}"
text_journal_set_with_diff: "%{label} set (%{link})"
text_journal_label_value: "%{label} %{value}"
diff --git a/lib/open_project/journal_formatter/subproject_named_association.rb b/lib/open_project/journal_formatter/subproject_named_association.rb
index 911ba86f60d..f9984ab011e 100644
--- a/lib/open_project/journal_formatter/subproject_named_association.rb
+++ b/lib/open_project/journal_formatter/subproject_named_association.rb
@@ -32,9 +32,9 @@ class OpenProject::JournalFormatter::SubprojectNamedAssociation < JournalFormatt
label = if values.first.nil?
label(key)
elsif values.last.nil?
- I18n.t("activerecord.attributes.project.parent_no_longer")
+ I18n.t("activity.item.parent_no_longer")
else
- I18n.t("activerecord.attributes.project.parent_without_of")
+ I18n.t("activity.item.parent_without_of")
end
old_value, value = *format_values(values, key, cache:)
@@ -52,13 +52,13 @@ class OpenProject::JournalFormatter::SubprojectNamedAssociation < JournalFormatt
end
def render_ternary_detail_text(label, value, old_value, options)
- return I18n.t(:text_journal_deleted_custom_subproject, label:, old: old_value) if value.blank?
- return I18n.t(:text_journal_of, label:, value:) if old_value.blank?
+ return I18n.t("activity.item.text_journal_deleted", label:, old: old_value) if value.blank?
+ return I18n.t("activity.item.text_journal_of", label:, value:) if old_value.blank?
linebreak = should_linebreak?(old_value.to_s, value.to_s)
if options[:html]
- I18n.t(:text_journal_changed_html_project_activity,
+ I18n.t("activity.item.text_journal_changed_html",
label:,
linebreak: linebreak ? "<br/>".html_safe : '',
old: old_value,
diff --git a/lib/open_project/journal_formatter/subproject_plaintext.rb b/lib/open_project/journal_formatter/subproject_plaintext.rb
index 8fd60313079..278d241a4d5 100644
--- a/lib/open_project/journal_formatter/subproject_plaintext.rb
+++ b/lib/open_project/journal_formatter/subproject_plaintext.rb
@@ -35,7 +35,7 @@ class OpenProject::JournalFormatter::SubprojectPlaintext < JournalFormatter::Bas
linebreak = should_linebreak?(old_value.to_s, value.to_s)
if options[:html]
- I18n.t(:text_journal_changed_html_project_activity,
+ I18n.t("activity.item.text_journal_changed_html",
label:,
linebreak: linebreak ? "<br/>".html_safe : '',
old: old_value,