Skip to content

Commit

Permalink
Merge pull request #535 from AOEpeople/feature-266721-language-storage
Browse files Browse the repository at this point in the history
Feature #518 - 266721 language storage
  • Loading branch information
calypsivano authored Nov 26, 2024
2 parents 7ab6543 + 19da80a commit 2696ed6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ParticipantList
protected $profiles;

/**
* @param \App\Mealz\MealBundle\Entity\Participant[] $participations
* @param Participant[] $participations
*/
public function __construct(array $participations)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Mealz/MealBundle/Repository/BaseRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(EntityManagerInterface $entityManager, string $entit
$this->entityClass = $entityClass;
$this->entityManager = $entityManager;

/** @psalm-var objectRepository<T> */
/** @psalm-var ObjectRepository<T> */
$this->objectRepository = $this->entityManager->getRepository($this->entityClass);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Mealz/MealBundle/Service/SlotService.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private function getOpenMealDaysWithSlots(DateTime $stateDate, DateTime $endDate
*
* The return results are indexed by a composite key comprised of concatenated date and slot-ID.
*
* @psalm-return \Closure(DateTime, Slot):int
* @psalm-return Closure(DateTime, Slot):int
*/
private function getBookedSlotCountProvider(DateTime $startDate, DateTime $endDate): Closure
{
Expand Down
11 changes: 8 additions & 3 deletions src/Resources/src/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,19 @@

<script setup lang="ts">
import Icons from '@/components/misc/Icons.vue';
import { ref } from 'vue';
import { onMounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
const { t, locale } = useI18n();
const changeLocale = () => {
function changeLocale() {
locale.value = locale.value.substring(0, 2) === 'en' ? 'de' : 'en';
};
localStorage.Lang = locale.value;
}
onMounted(() => {
if (typeof localStorage.Lang !== 'undefined' && localStorage.Lang !== null) locale.value = localStorage.Lang;
});
const year = ref(new Date().getFullYear());
</script>
Expand Down

0 comments on commit 2696ed6

Please sign in to comment.