mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 17:07:07 +01:00
Merge pull request #2950 from SillyTavern/moment-locales
Localize chat timestamps
This commit is contained in:
commit
704bb9dc0f
@ -6636,7 +6636,7 @@
|
|||||||
<script src="lib/popper.js"></script>
|
<script src="lib/popper.js"></script>
|
||||||
<script src="lib/purify.min.js"></script>
|
<script src="lib/purify.min.js"></script>
|
||||||
<script src="lib/highlight.min.js"></script>
|
<script src="lib/highlight.min.js"></script>
|
||||||
<script src="lib/moment.min.js"></script>
|
<script src="lib/moment-with-locales.min.js"></script>
|
||||||
<script src="lib/cropper.min.js"></script>
|
<script src="lib/cropper.min.js"></script>
|
||||||
<script src="lib/jquery-cropper.min.js"></script>
|
<script src="lib/jquery-cropper.min.js"></script>
|
||||||
<script src="lib/toastr.min.js"></script>
|
<script src="lib/toastr.min.js"></script>
|
||||||
|
2
public/lib/moment-with-locales.min.js
vendored
Normal file
2
public/lib/moment-with-locales.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/lib/moment-with-locales.min.js.map
Normal file
1
public/lib/moment-with-locales.min.js.map
Normal file
File diff suppressed because one or more lines are too long
2
public/lib/moment.min.js
vendored
2
public/lib/moment.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -215,6 +215,7 @@ function addLanguagesToDropdown() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function initLocales() {
|
export async function initLocales() {
|
||||||
|
moment.locale(localeFile);
|
||||||
langs = await fetch('/locales/lang.json').then(response => response.json());
|
langs = await fetch('/locales/lang.json').then(response => response.json());
|
||||||
localeData = await getLocaleData(localeFile);
|
localeData = await getLocaleData(localeFile);
|
||||||
applyLocale();
|
applyLocale();
|
||||||
|
Loading…
Reference in New Issue
Block a user