Skip to content

Commit a274887

Browse files
[UPDT]recruitment translations
1 parent 905bb1b commit a274887

File tree

8 files changed

+101
-69
lines changed

8 files changed

+101
-69
lines changed

recruitment/forms.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,10 @@ class QuestionForm(ModelForm):
470470
recruitment = forms.ModelMultipleChoiceField(
471471
queryset=Recruitment.objects.filter(is_active=True),
472472
required=False,
473-
label="Recruitment",
473+
label=_("Recruitment"),
474474
)
475475
job_positions = forms.ModelMultipleChoiceField(
476-
queryset=JobPosition.objects.all(), required=False, label="Job Positions"
476+
queryset=JobPosition.objects.all(), required=False, label=_("Job Positions")
477477
)
478478

479479
class Meta:
@@ -487,6 +487,12 @@ class Meta:
487487
"recruitment_ids",
488488
"job_position_ids",
489489
]
490+
labels = {
491+
"question":_("Question"),
492+
"sequence":_("Sequence"),
493+
"type":_("Type"),
494+
"options":_("Options"),
495+
}
490496

491497
def as_p(self, *args, **kwargs):
492498
"""

recruitment/models.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -310,16 +310,16 @@ class RecruitmentSurvey(models.Model):
310310
"""
311311

312312
question_types = [
313-
("checkbox", "Yes/No"),
314-
("options", "Choices"),
315-
("multiple", "Multiple Choice"),
316-
("text", "Text"),
317-
("number", "Number"),
318-
("percentage", "Percentage"),
319-
("date", "Date"),
320-
("textarea", "Textarea"),
321-
("file", "File Upload"),
322-
("rating", "Rating"),
313+
("checkbox", _("Yes/No")),
314+
("options", _("Choices")),
315+
("multiple", _("Multiple Choice")),
316+
("text", _("Text")),
317+
("number", _("Number")),
318+
("percentage", _("Percentage")),
319+
("date", _("Date")),
320+
("textarea", _("Textarea")),
321+
("file", _("File Upload")),
322+
("rating", _("Rating")),
323323
]
324324
question = models.TextField(null=False)
325325
recruitment_ids = models.ManyToManyField(Recruitment, verbose_name="Recruitment")
@@ -330,7 +330,7 @@ class RecruitmentSurvey(models.Model):
330330
choices=question_types,
331331
)
332332
options = models.TextField(
333-
null=True, default="", help_text="Separate choices by ', '"
333+
null=True, default="", help_text=_("Separate choices by ', '")
334334
)
335335

336336
def __str__(self) -> str:

recruitment/templates/dashboard/dashboard.html

+12-12
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="col-12 col-sm-12 col-md-6 col-lg-4">
1010
<div class="oh-card-dashboard oh-card-dashboard--warning">
1111
<div class="oh-card-dashboard__header">
12-
<span class="oh-card-dashboard__title">Openings</span>
12+
<span class="oh-card-dashboard__title">{% trans "Openings" %}</span>
1313
</div>
1414
<div class="oh-card-dashboard__body">
1515
<div class="oh-card-dashboard__counts">
@@ -26,7 +26,7 @@
2626
<div class="col-12 col-sm-12 col-md-6 col-lg-4 ">
2727
<div class="oh-card-dashboard oh-card-dashboard--danger">
2828
<div class="oh-card-dashboard__header">
29-
<span class="oh-card-dashboard__title">Total Applicants</span>
29+
<span class="oh-card-dashboard__title">{% trans "Total Applicants" %}</span>
3030
</div>
3131
<div class="oh-card-dashboard__body">
3232
<div class="oh-card-dashboard__counts">
@@ -46,7 +46,7 @@
4646
class="oh-card-dashboard oh-card-dashboard oh-card-dashboard--success"
4747
>
4848
<div class="oh-card-dashboard__header">
49-
<span class="oh-card-dashboard__title">Hired Candidates</span>
49+
<span class="oh-card-dashboard__title">{% trans "Hired Candidates" %}</span>
5050
</div>
5151
<div class="oh-card-dashboard__body">
5252
<div class="oh-card-dashboard__counts">
@@ -74,7 +74,7 @@
7474
<div class="col-12 col-sm-12 col-md-6 col-lg-12 mt-4">
7575
<div class="oh-card-dashboard oh-card-dashboard--neutral">
7676
<div class="oh-card-dashboard__header">
77-
<span class="oh-card-dashboard__title">Conversion Rate</span>
77+
<span class="oh-card-dashboard__title">{% trans "Conversion Rate" %}</span>
7878
</div>
7979
<div class="oh-card-dashboard__body">
8080
<div class="oh-card-dashboard__counts">
@@ -90,7 +90,7 @@
9090
<div class="col-12 col-sm-12 col-md-6 col-lg-12 mt-4">
9191
<div class="oh-card-dashboard oh-card-dashboard--success">
9292
<div class="oh-card-dashboard__header">
93-
<span class="oh-card-dashboard__title">Offer Acceptance Rate (OAR)</span>
93+
<span class="oh-card-dashboard__title">{% trans "Offer Acceptance Rate (OAR)" %}</span>
9494
</div>
9595
<div class="oh-card-dashboard__body">
9696
<div class="oh-card-dashboard__counts">
@@ -110,7 +110,7 @@
110110
<div class="oh-card-dashboard--moveable mt-4">
111111
<div class="oh-card-dashboard oh-card-dashboard--no-scale oh-card-dashboard--transparent">
112112
<div class="oh-card-dashboard__header oh-card-dashboard__header--divider">
113-
<span class="oh-card-dashboard__title">Open Positions By Department</span>
113+
<span class="oh-card-dashboard__title">{% trans "Open Positions By Department" %}</span>
114114
</div>
115115
<div class="oh-card-dashboard__body" style="width:400px; height:260px">
116116
<canvas id="vacancy" style="margin:0 auto;"></canvas>
@@ -120,8 +120,8 @@
120120

121121
<div class="oh-card-dashboard oh-card-dashboard--no-scale oh-card-dashboard--transparent mt-4 ms-4" style="height:94%;">
122122
<div class="oh-card-dashboard__header oh-card-dashboard__header--divider">
123-
<span class="oh-card-dashboard__title">Candidate on Onboard</span>
124-
<span class="oh-card-dashboard__title float-end"><a href="{% url 'onboarding-view' %}" style="text-decoration:none; color:orange;">view all</a></span>
123+
<span class="oh-card-dashboard__title">{% trans "Candidate on Onboard" %}</span>
124+
<span class="oh-card-dashboard__title float-end"><a href="{% url 'onboarding-view' %}" style="text-decoration:none; color:orange;">{% trans "View all" %}</a></span>
125125
</div>
126126
<div class="oh-card-dashboard__body">
127127
<ul class="oh-card-dashboard__user-list">
@@ -159,7 +159,7 @@
159159
<div
160160
class="oh-card-dashboard__header oh-card-dashboard__header--divider"
161161
>
162-
<span class="oh-card-dashboard__title">Candidates Per Stage</span>
162+
<span class="oh-card-dashboard__title">{% trans "Candidates Per Stage" %}</span>
163163
<span class="oh-card-dashboard__title float-end" id="chart1"><ion-icon name="caret-forward"></ion-icon></span>
164164
</div>
165165
<div class="oh-card-dashboard__body">
@@ -176,7 +176,7 @@
176176
>
177177
<div class="oh-card-dashboard__header oh-card-dashboard__header--divider">
178178

179-
<span class="oh-card-dashboard__title">Joinings Per Month</span>
179+
<span class="oh-card-dashboard__title">{% trans "Joinings Per Month" %}</span>
180180
<span class="oh-card-dashboard__title float-end" id="chart2"><ion-icon name="caret-forward"></ion-icon></span>
181181

182182
<select class="oh-card-dashboard__body float-end me-3" id="year">
@@ -197,7 +197,7 @@
197197
<div style="width: 75%; height: 100%; overflow: hidden;">
198198
<div>
199199
<div class="oh-card-dashboard__header mt-4">
200-
<span class="oh-card-dashboard__title">Current Hiring Pipeline</span>
200+
<span class="oh-card-dashboard__title">{% trans "Current Hiring Pipeline" %}</span>
201201
</div>
202202
<div class="oh-sticky-table float-start ms-0">
203203
<div class="oh-sticky-table__table">
@@ -231,7 +231,7 @@
231231

232232
<div style="width: 60%; height: 100%; overflow: hidden;">
233233
<div class="oh-card-dashboard__header mt-4 ms-4">
234-
<span class="oh-card-dashboard__title">Ongoing Recruitments & Hiring Managers</span>
234+
<span class="oh-card-dashboard__title">{% trans "Ongoing Recruitments & Hiring Managers" %}</span>
235235
</div>
236236
<div class="oh-sticky-table float-start ms-4">
237237
<div class="oh-sticky-table__table">

recruitment/templates/pipeline/pipeline.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
<div class="oh-sticky-table__th oh-table-config__th">
153153
<span> {% trans "Contact" %} </span>
154154
</div>
155-
<div class="oh-sticky-table__th oh-table-config__th">Stage</div>
155+
<div class="oh-sticky-table__th oh-table-config__th">{% trans "Stage" %}</div>
156156
<div class="oh-sticky-table__th oh-table-config__th" style="width: 200px;" ></div>
157157
</div>
158158
</div>
@@ -222,7 +222,7 @@
222222
<button
223223
type="button"
224224
hx-get='{% url "send-mail" cand.id %}'
225-
title="Send Mail"
225+
title="{% trans "Send Mail" %}"
226226
hx-target="#mail-content"
227227
hx-swap="innerHTML"
228228
class="oh-btn oh-btn--light"
@@ -235,7 +235,7 @@
235235
<button
236236
type="button"
237237
hx-get='{% url "add-note" cand.id %}'
238-
title="Add note"
238+
title="{% trans "Add Note" %}"
239239
hx-target="#remark-content"
240240
hx-swap="innerHTML"
241241
class="oh-btn oh-btn--light"
@@ -248,7 +248,7 @@
248248
<button
249249
type="button"
250250
hx-get='{% url "view-note" cand.id %}'
251-
title="View Note"
251+
title="{% trans "View Note" %}"
252252
hx-target="#activitySidebar"
253253
hx-swap="innerHTML"
254254
data-target="#activitySidebar"
@@ -263,7 +263,7 @@
263263
class="oh-btn oh-btn--light"
264264
href="/media/{{cand.resume}}"
265265
target="_blank"
266-
title="Resume"
266+
title="{% trans "Resume" %}"
267267
rel="noopener noreferrer"
268268
style="flex: 1 0 auto; width:20px;height: 40.68px; padding: 0;"
269269
><ion-icon name="document-outline"></ion-icon

recruitment/templates/survey/filter.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<form hx-get="{% url 'rec-filter-survey' %}" hx-target="#view-container">
33
<div class="oh-dropdown__filter-body">
44
<div class="oh-accordion">
5-
<div class="oh-accordion-header">{% trans "Surevey Filter" %}</div>
5+
<div class="oh-accordion-header">{% trans "Survey Filter" %}</div>
66
<div class="oh-accordion-body">
77
<div class="row">
88
<div class="col-sm-12 col-md-12 col-lg-12">

recruitment/templates/survey/view-question-templates.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ <h2 class="oh-modal__dialog-title" id="addEmployeeModalLabel">
6464
<section class="oh-wrapper oh-main__topbar" x-data="{searchShow: false}">
6565
<div class="oh-main__titlebar oh-main__titlebar--left">
6666
<h1 class="oh-main__titlebar-title fw-bold">
67-
{% trans "Surevey Templates" %}
67+
{% trans "Survey Templates" %}
6868
</h1>
6969
<a
7070
class="oh-main__titlebar-search-toggle"
@@ -91,7 +91,7 @@ <h1 class="oh-main__titlebar-title fw-bold">
9191
type="text"
9292
class="oh-input oh-input__icon"
9393
aria-label="Search Input"
94-
placeholder="Search"
94+
placeholder="{% trans 'Search' %}"
9595
hx-get="{% url 'rec-filter-survey' %}"
9696
hx-target="#view-container"
9797
name="question"

0 commit comments

Comments
 (0)