Skip to content

Commit

Permalink
Fix: Translations in controller
Browse files Browse the repository at this point in the history
Fix: Translations in controller
  • Loading branch information
sebastianthulin authored Oct 19, 2023
2 parents f25480e + a746f65 commit acafbb8
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 42 deletions.
Binary file modified languages/job-listings-sv_SE.mo
Binary file not shown.
76 changes: 43 additions & 33 deletions languages/job-listings-sv_SE.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Job Listings\n"
"POT-Creation-Date: 2023-09-20 16:17+0200\n"
"PO-Revision-Date: 2023-09-20 16:17+0200\n"
"POT-Creation-Date: 2023-10-16 18:08+0200\n"
"PO-Revision-Date: 2023-10-16 18:08+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: sv\n"
Expand Down Expand Up @@ -72,55 +72,83 @@ msgstr "Källor"
msgid "Source"
msgstr "Källa"

#: source/php/Controller.php:87
#: source/php/Controller.php:62
msgid "Apply now"
msgstr "Ansök"

#: source/php/Controller.php:63
msgid "Apply here"
msgstr "Ansök här"

#: source/php/Controller.php:64
msgid "Contact"
msgstr "Kontakt"

#: source/php/Controller.php:65
msgid "Information"
msgstr "Information"

#: source/php/Controller.php:66
msgid "Log in"
msgstr "Logga in"

#: source/php/Controller.php:67
msgid "Days left"
msgstr "Dagar Kvar"

#: source/php/Controller.php:68
msgid "The application period has ended"
msgstr "Ansökningstiden har gått ut"

#: source/php/Controller.php:97
msgid "Deadline for applications:"
msgstr "Sista ansökningsdatum:"

#: source/php/Controller.php:92
#: source/php/Controller.php:102
msgid "Reference:"
msgstr "Referens:"

#: source/php/Controller.php:97
#: source/php/Controller.php:107
msgid "Published:"
msgstr "Publicerad:"

#: source/php/Controller.php:102
#: source/php/Controller.php:112
msgid "Number of positions:"
msgstr "Antal tjänster:"

#: source/php/Controller.php:107
#: source/php/Controller.php:117
msgid "Experience:"
msgstr "Erfarenhet:"

#: source/php/Controller.php:112
#: source/php/Controller.php:122
msgid "Employment type:"
msgstr "Anställningsform:"

#: source/php/Controller.php:117
#: source/php/Controller.php:127
msgid "Extent:"
msgstr "Omfattning:"

#: source/php/Controller.php:122
#: source/php/Controller.php:132
msgid "Location:"
msgstr "Ort:"

#: source/php/Controller.php:127
#: source/php/Controller.php:137
msgid "Company:"
msgstr "Förvaltning:"

#: source/php/Controller.php:183
#: source/php/Controller.php:193
msgid "Position"
msgstr "Tjänst"

#: source/php/Controller.php:184
#: source/php/Controller.php:194
msgid "Published"
msgstr "Publicerad"

#: source/php/Controller.php:185
#: source/php/Controller.php:195
msgid "Apply by"
msgstr "Ansök senast"

#: source/php/Controller.php:186
#: source/php/Controller.php:196
msgid "Category"
msgstr "Kategori"

Expand Down Expand Up @@ -250,24 +278,6 @@ msgstr ""
#~ msgid "The application period for this reqruitment has ended."
#~ msgstr "Ansökningsperioden för den här rekryteringen har passerat."

#~ msgid "Apply now"
#~ msgstr "Ansök"

#~ msgid "days left"
#~ msgstr "dagar kvar"

#~ msgid "Contact"
#~ msgstr "Kontakt"

#~ msgid "The application period has ended"
#~ msgstr "Ansökningstiden har gått ut"

#~ msgid "Apply here"
#~ msgstr "Ansök här"

#~ msgid "Log in"
#~ msgstr "Logga in"

#~ msgid "Close"
#~ msgstr "Stäng"

Expand Down
10 changes: 10 additions & 0 deletions source/php/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ public function singleViewData($data)
$data['sourceSystem'] = $this->getSourceSystem();
$data['preparedListData'] = $this->prepareData($data);

$data['lang'] = (object) [
'applyNow' => __('Apply now', 'job-listings'),
'applyHere' => __('Apply here', 'job-listings'),
'contact' => __('Contact', 'job-listings'),
'information' => __('Information', 'job-listings'),
'login' => __('Log in', 'job-listings'),
'daysLeft' => __('Days left', 'job-listings'),
'periodEnded' => __('The application period has ended', 'job-listings'),
];

return $data;
}

Expand Down
17 changes: 8 additions & 9 deletions views/single-job-listing.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
@typography(["element" => "h1"])
{{the_title() }}
@endtypography

@if(!$isExpired)
@if($applyLink === '#job-listings-modal')
@button([
'text' => __('Apply now', 'job-listings'),
'text' => $lang->applyNow,
'color' => 'primary',
'style' => 'filled',
'id' => 'job-listings-apply',
Expand All @@ -47,7 +46,7 @@
@endbutton
@else
@button([
'text' => __('Apply now', 'job-listings'),
'text' => $lang->applyNow,
'color' => 'primary',
'style' => 'filled',
'href' => $applyLink,
Expand Down Expand Up @@ -97,7 +96,7 @@
'element' => "h2",
'variant' => "h2"
])
{{__('Information', 'job-listings')}}
{{ $lang->information }}
@endtypography

<div class="o-grid-12">
Expand All @@ -120,7 +119,7 @@
'element' => "h2",
'variant' => "h2"
])
{{__('Contact', 'job-listings')}}
{{ $lang->contact }}
@endtypography

@foreach($preparedListData['contacts'] as $contact)
Expand Down Expand Up @@ -205,7 +204,7 @@
<div class="o-grid-12">

@button([
'text' => __('The application period has ended', 'job-listings'),
'text' => $lang->periodEnded,
'style' => 'filled',
'attributeList' => ['disabled' => 'true']
Expand All @@ -218,7 +217,7 @@
@if($applyLink === '#job-listings-modal')
<div class="o-grid-12">
@button([
'text' => __('Apply here','job-listings') . " (" . $daysLeft . " " . __('days left','job-listings') . ")",
'text' => $lang->applyHere . " (" . $daysLeft . " " . $lang->daysLeft . ")",
'color' => 'primary',
'style' => 'filled',
'id' => 'job-listings-apply',
Expand All @@ -233,7 +232,7 @@
@else
<div class="o-grid-12">
@button([
'text' => __('Apply here','job-listings') . " (" . $daysLeft . " " . __('days left','job-listings') . ")",
'text' => $lang->applyHere . " (" . $daysLeft . " " . $lang->daysLeft . ")",
'color' => 'primary',
'style' => 'filled',
'href' => $applyLink,
Expand All @@ -249,7 +248,7 @@
@button([
'icon' => 'assignment_ind',
'reversePositions' => true,
'text' => __('Log in'),
'text' => $lang->login,
'style' => 'filled',
'id' => 'job-listings-login',
'attributeList' => [
Expand Down

0 comments on commit acafbb8

Please sign in to comment.