Skip to content

Commit 84c9727

Browse files
committed
Internal: Rename setLocale to setTranslatableLocale across entities and update usage - refs BT#22627
1 parent 78d53bf commit 84c9727

File tree

7 files changed

+7
-22
lines changed

7 files changed

+7
-22
lines changed

public/main/extrafield/translate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
$form = new FormValidator('translate', 'POST', $currentUrl);
3434
$form->addHidden('id', $fieldId);
3535

36-
$extraField->setLocale(Container::getParameter('locale'));
36+
$extraField->setTranslatableLocale(Container::getParameter('locale'));
3737
$em->refresh($extraField);
3838

3939
$form->addHeader($extraField->getDisplayText());

public/main/extrafield/translate_option.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/** @var ExtraFieldOptions|null $extraFieldOption */
2525
$extraFieldOption = $extraFieldOptionsRepo->find($fieldId);
2626

27-
$extraFieldOption->setLocale(Container::getParameter('locale'));
27+
$extraFieldOption->setTranslatableLocale(Container::getParameter('locale'));
2828
$em->refresh($extraFieldOption);
2929

3030
if (null === $extraFieldOption) {

public/main/skills/skill_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
$em = Database::getManager();
3333
$skill = $em->find(Skill::class, $skillId);
34-
$skill->setLocale(Container::getParameter('locale'));
34+
$skill->setTranslatableLocale(Container::getParameter('locale'));
3535
$em->refresh($skill);
3636

3737
if (empty($skillInfo)) {

public/main/skills/skill_translate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
$translateUrl = api_get_self().'?'.http_build_query(['skill' => $skill->getId(), 'action' => $action]);
5454

55-
$skill->setLocale($defaultLocale);
55+
$skill->setTranslatableLocale($defaultLocale);
5656
$em->refresh($skill);
5757

5858
$defaults = [

src/CoreBundle/Entity/ExtraField.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,7 @@ public function setAutoRemove(bool $autoRemove): self
382382
return $this;
383383
}
384384

385-
public function getLocale(): string
386-
{
387-
return $this->locale;
388-
}
389-
390-
public function setLocale(string $locale): self
385+
public function setTranslatableLocale(string $locale): static
391386
{
392387
$this->locale = $locale;
393388

src/CoreBundle/Entity/ExtraFieldOptions.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,7 @@ public function setPriorityMessage(string $priorityMessage): self
131131
return $this;
132132
}
133133

134-
public function getLocale(): string
135-
{
136-
return $this->locale;
137-
}
138-
139-
public function setLocale(string $locale): self
134+
public function setTranslatableLocale(string $locale): self
140135
{
141136
$this->locale = $locale;
142137

src/CoreBundle/Entity/Skill.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -448,12 +448,7 @@ public function addToCourse(SkillRelCourse $item): void
448448
$this->courses[] = $item;
449449
}
450450

451-
public function getLocale(): string
452-
{
453-
return $this->locale;
454-
}
455-
456-
public function setLocale(string $locale): self
451+
public function setTranslatableLocale(string $locale): self
457452
{
458453
$this->locale = $locale;
459454

0 commit comments

Comments
 (0)