Skip to content

Commit

Permalink
convert "Add Projects" translation to reusable label
Browse files Browse the repository at this point in the history
  • Loading branch information
akabiru committed Jul 4, 2024
1 parent 9965dc2 commit 84160c6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def render?
private

def title
I18n.t("projects.settings.project_custom_fields.new_project_mapping_form.add_projects")
I18n.t(:label_add_projects)
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def initialize(project_mapping:, project_custom_field:)
private

def title
I18n.t("projects.settings.project_custom_fields.new_project_mapping_form.add_projects")
I18n.t(:label_add_projects)
end

def cancel_button_text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ See COPYRIGHT and LICENSE files for more details.
data: { controller: "async-dialog" }
)) do |button|
button.with_leading_visual_icon(icon: 'op-include-projects')
I18n.t("projects.settings.project_custom_fields.new_project_mapping_form.add_projects")
I18n.t(:label_add_projects)
end
end
end unless @custom_field.required?
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ Project attributes and sections are defined in the <a href=%{admin_settings_url}
heading: Required in all projects
description: This project attribute is activated in all projects since the "Required in all projects" option is checked. It cannot be deactivated for individual projects.
new_project_mapping_form:
add_projects: Add projects
include_sub_projects: Include sub-projects
types:
no_results_title_text: There are currently no types available.
Expand Down Expand Up @@ -1920,6 +1919,7 @@ Project attributes and sections are defined in the <a href=%{admin_settings_url}
label_add_another_file: "Add another file"
label_add_columns: "Add selected columns"
label_add_note: "Add a note"
label_add_projects: "Add projects"
label_add_related_work_packages: "Add related work packages"
label_add_subtask: "Add subtask"
label_added: "added"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ See COPYRIGHT and LICENSE files for more details.
data: { controller: "async-dialog" }
)) do |button|
button.with_leading_visual_icon(icon: 'op-include-projects')
I18n.t("projects.settings.project_custom_fields.new_project_mapping_form.add_projects")
I18n.t(:label_add_projects)
end
end
end
Expand Down

0 comments on commit 84160c6

Please sign in to comment.