<script>
import { marked } from 'marked';
import { selectedDate } from './calendarStore';
- import { getTranslate } from '@tolgee/svelte';
+ import { getTranslate, getTolgee } from '@tolgee/svelte';
import { onMount } from 'svelte';
const { t } = getTranslate();
+ const tolgee = getTolgee(['language']);
marked.use({
breaks: true,
log?.year,
log?.month - 1,
log?.day
- ).toLocaleDateString('locale', {
+ ).toLocaleDateString($tolgee.getLanguage(), {
weekday: 'long',
day: '2-digit',
month: '2-digit',
import { fly } from 'svelte/transition';
import * as bootstrap from 'bootstrap';
import { offcanvasIsOpen, sameDate, isAuthenticated } from '$lib/helpers.js';
- import { getTranslate } from '@tolgee/svelte';
+ import { getTranslate, getTolgee } from '@tolgee/svelte';
const { t } = getTranslate();
+ const tolgee = getTolgee(['language']);
let { bookmarkDay } = $props();
});
let months = Array.from({ length: 12 }, (_, i) =>
- new Date(2000, i).toLocaleString('default', { month: 'long' })
+ new Date(2000, i).toLocaleString($tolgee.getLanguage(), { month: 'long' })
);
const onMonthSelect = (event) => {
<button type="button" class="btn btnLeftRight" onclick={() => changeMonth(-1)}><</button>
<div class="date-selectors">
<select
- value={new Date(2000, $cal.currentMonth).toLocaleString('default', { month: 'long' })}
+ value={new Date(2000, $cal.currentMonth).toLocaleString($tolgee.getLanguage(), {
+ month: 'long'
+ })}
onchange={onMonthSelect}
>
{#each months as month}
color: white;
padding: 8px 16px;
font-size: 16px;
+ border-top-left-radius: 8px;
+ border-top-right-radius: 8px;
}
.calendar-container {
position: relative;
cursor: pointer;
padding: 2px 12px;
border-radius: 4px;
- max-width: 100px;
+ max-width: 150px;
+ min-width: 100px;
text-align: center;
text-align-last: center;
-webkit-appearance: none;
import { API_URL } from '$lib/APIurl.js';
import axios from 'axios';
import { cal } from '$lib/calendarStore.js';
- import { getTranslate } from '@tolgee/svelte';
+ import { getTranslate, getTolgee } from '@tolgee/svelte';
const { t } = getTranslate();
+ const tolgee = getTolgee(['language']);
let oc;
>
<div class="search-result-content">
<div class="date">
- {new Date(result.year, result.month - 1, result.day).toLocaleDateString('locale', {
- day: '2-digit',
- month: '2-digit',
- year: 'numeric'
- })}
+ {new Date(result.year, result.month - 1, result.day).toLocaleDateString(
+ $tolgee.getLanguage(),
+ {
+ day: '2-digit',
+ month: '2-digit',
+ year: 'numeric'
+ }
+ )}
</div>
<!-- <div class="search-separator"></div> -->
<div class="text">
background-color: #eee;
}
+ :global(.popover-body) {
+ overflow-y: auto;
+ max-height: 550px;
+ }
+
.searchTagDropdown {
position: absolute;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
const fmtDate = (d) =>
- d.toLocaleDateString(undefined, {
+ d.toLocaleDateString($tolgee.getLanguage(), {
weekday: 'long',
year: 'numeric',
month: '2-digit',
import { insertTemplate } from '$lib/templateStore';
import ALookBack from '$lib/ALookBack.svelte';
import { marked } from 'marked';
- import { T, getTranslate } from '@tolgee/svelte';
+ import { getTranslate, getTolgee } from '@tolgee/svelte';
const { t } = getTranslate();
+ const tolgee = getTolgee(['language']);
axios.interceptors.request.use((config) => {
config.withCredentials = true;
let timezone = $settings.useBrowserTimezone
? Intl.DateTimeFormat().resolvedOptions().timeZone
: $settings.timezone;
- let date_written = new Date().toLocaleString('de-DE', {
+ let date_written = new Date().toLocaleString($tolgee.getLanguage(), {
timeZone: timezone,
year: 'numeric',
month: '2-digit',
<div class="flex-fill textAreaDate">
{new Date(
Date.UTC($selectedDate.year, $selectedDate.month - 1, $selectedDate.day)
- ).toLocaleDateString('locale', { weekday: 'long', timeZone: 'UTC' })}<br />
+ ).toLocaleDateString($tolgee.getLanguage(), { weekday: 'long', timeZone: 'UTC' })}<br />
{new Date(
Date.UTC($selectedDate.year, $selectedDate.month - 1, $selectedDate.day)
- ).toLocaleDateString('locale', {
+ ).toLocaleDateString($tolgee.getLanguage(), {
day: '2-digit',
month: '2-digit',
year: 'numeric',
+++ /dev/null
-<div class="row" style="height: 100%; overflow: hidden;">
- <div class="col-4" style="height: 100%; overflow-y: auto;">
- <p class="my-4 focus-ring" contenteditable="true">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- </div>
- <div class="col-8">
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- <p class="my-4">huhu</p>
- </div>
-</div>