Skip to content

Commit 5b1b561

Browse files
authored
Merge pull request #3438 from manyfold3d/file-pattern-translations
Add translations for bulk file renaming fields
2 parents b3ccb85 + 20efc1c commit 5b1b561

File tree

8 files changed

+35
-10
lines changed

8 files changed

+35
-10
lines changed

app/helpers/application_helper.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def card(style, title = nil, options = {}, &content)
8484
def text_input_row(form, name, options = {})
8585
content_tag :div, class: "row mb-3 input-group" do
8686
safe_join [
87-
form.label(name, class: "col-auto col-form-label"),
87+
form.label(name, options[:label], class: "col-auto col-form-label"),
8888
content_tag(:div, class: "col p-0") do
8989
safe_join [
9090
form.text_field(name, {class: "form-control"}.merge(options)),
@@ -99,7 +99,7 @@ def text_input_row(form, name, options = {})
9999
def password_input_row(form, name, options = {})
100100
content_tag :div, class: "row mb-3 input-group" do
101101
safe_join [
102-
form.label(name, class: "col-auto col-form-label"),
102+
form.label(name, options[:label], class: "col-auto col-form-label"),
103103
content_tag(:div, class: "col p-0") do
104104
safe_join [
105105
form.password_field(name, {class: "form-control"}.merge(options)),
@@ -114,7 +114,7 @@ def password_input_row(form, name, options = {})
114114
def rich_text_input_row(form, name, options = {})
115115
content_tag :div, class: "row mb-3 input-group" do
116116
safe_join [
117-
form.label(name, class: "col-auto col-form-label"),
117+
form.label(name, options[:label], class: "col-auto col-form-label"),
118118
content_tag(:div, class: "col p-0") do
119119
safe_join [
120120
form.text_area(name, class: "form-control col-auto"),
@@ -129,7 +129,7 @@ def rich_text_input_row(form, name, options = {})
129129
def checkbox_input_row(form, name, options = {})
130130
content_tag :div, class: "row mb-3 input-group" do
131131
safe_join [
132-
form.label(name, class: "col-sm-2 col-form-label"),
132+
form.label(name, options[:label], class: "col-sm-2 col-form-label"),
133133
content_tag(:div, class: "col-sm-10") do
134134
content_tag(:div, class: "form-switch") do
135135
safe_join [

app/views/model_files/bulk_edit.html.erb

+13-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,19 @@
2828

2929
<p class="lead"><%= t ".form_subtitle" %></p>
3030

31-
<%= text_input_row form, :pattern %>
32-
<%= text_input_row form, :replacement %>
33-
34-
<%= checkbox_input_row form, :printed %>
35-
<%= checkbox_input_row form, :presupported %>
36-
<%= checkbox_input_row form, :y_up %>
31+
<div class="row mb-3">
32+
<div class="col col-auto mt-2">
33+
<%= t(".rename") %>
34+
</div>
35+
<div class="col border p-3">
36+
<%= text_input_row form, :pattern, label: t(".pattern") %>
37+
<%= text_input_row form, :replacement, label: t(".replacement") %>
38+
</div>
39+
</div>
40+
41+
<%= checkbox_input_row form, :printed, label: ModelFile.human_attribute_name(:printed) %>
42+
<%= checkbox_input_row form, :presupported, label: ModelFile.human_attribute_name(:presupported) %>
43+
<%= checkbox_input_row form, :y_up, label: ModelFile.human_attribute_name(:y_up) %>
3744

3845
<%= form.submit translate(".submit"), class: "btn btn-primary" %>
3946
<%= form.submit translate(".split"), name: "split", class: "btn btn-warning" %>

config/locales/model_files/de.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ de:
44
bulk_edit:
55
description: 'Wähle die zu ändernden Dateien aus:'
66
form_subtitle: 'Wähle die Änderungen aus, die du vornehmen möchtest:'
7+
pattern:
8+
rename:
9+
replacement:
710
select: Datei '%{name}' auswählen
811
select_all: Alle Dateien auswählen
912
split: Ausgewählte Dateien in ein neues Modell aufteilen

config/locales/model_files/en.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ en:
44
bulk_edit:
55
description: 'Select files to change:'
66
form_subtitle: 'Select changes to make:'
7+
pattern: Find
8+
rename: Rename files
9+
replacement: Replace with
710
select: Select file '%{name}'
811
select_all: Select all files
912
split: Split selected files into new model

config/locales/model_files/es.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ es:
44
bulk_edit:
55
description: 'Seleccione los archivos que desea modificar:'
66
form_subtitle: 'Seleccione los cambios a realizar:'
7+
pattern:
8+
rename:
9+
replacement:
710
select: Seleccionar fichero '%{name}'
811
select_all: Seleccionar todos los archivos
912
split: Dividir los archivos seleccionados en un nuevo modelo

config/locales/model_files/fr.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ fr:
44
bulk_edit:
55
description: 'Sélectionnez les fichiers à modifier :'
66
form_subtitle: 'Sélectionnez les modifications à apporter :'
7+
pattern:
8+
rename:
9+
replacement:
710
select: Sélectionner le fichier '%{name}'
811
select_all: Sélectionner tous les fichiers
912
split: Éclater les fichiers sélectionnés en un nouveau modèle

config/locales/model_files/nl.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ nl:
44
bulk_edit:
55
description: 'Selecteer bestanden om te wijzigen:'
66
form_subtitle: 'Selecteer aan te brengen wijzigingen:'
7+
pattern:
8+
rename:
9+
replacement:
710
select: Selecteer bestand '%{name}'
811
select_all: Selecteer alle bestanden
912
split: Splits geselecteerde bestanden in nieuw model

config/locales/model_files/pl.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ pl:
44
bulk_edit:
55
description: 'Wybierz pliki do zmiany:'
66
form_subtitle: 'Wybierz zmiany do wprowadzenia:'
7+
pattern:
8+
rename:
9+
replacement:
710
select: Zaznacz plik '%{name}'
811
select_all: Zaznacz wszystkie pliki
912
split: Rozdziel wybrane pliki na nowy model

0 commit comments

Comments
 (0)