feat: multi language support (#254)
* feat: multitranslational support * - completion of settings page - completion of sidebar * sidebar rerendering bug fix * completion of the lesson navigation & materials page * completion of the course navigation * completion of requested languages * - Implementation of Language Picker - Rename Bug Fixes * checkpoint save * - addition of the language picker to the onboarding. - addition of the language switcher for the lesson notes. * merge completion * initialization of the new branch * add transition.svelte file * lesson note bug fix * feat: add translation migration * completion of translation * fix height issue of dropdown * refactoring * fix: improve code with LOCALE from db * finally get it fully functional * connect with AI * backward compatibility for lesson note * preserve old content, when generating AI content * undo translations in upgrade modal * fix duplicate key issue from codacy trigger --------- Co-authored-by: Rotimi Best <best@classroomio.com>
This commit is contained in:
co-authored by
Rotimi Best
parent
ff7d2cee35
commit
d75e2f258e
@@ -5,6 +5,7 @@
|
||||
|
||||
import { SNACKBAR_SEVERITY } from './constants';
|
||||
import { snackbarStore, snackbarStoreInitialState } from './store';
|
||||
import { t } from '$lib/utils/functions/translations';
|
||||
|
||||
let timeoutId: NodeJS.Timeout | undefined;
|
||||
let kind: 'error' | 'info' | 'info-square' | 'success' | 'warning' | 'warning-alt' = 'info';
|
||||
@@ -41,8 +42,8 @@
|
||||
$snackbarStore.severity === SNACKBAR_SEVERITY.SUCCESS
|
||||
? 'success'
|
||||
: $snackbarStore.severity === SNACKBAR_SEVERITY.ERROR
|
||||
? 'error'
|
||||
: 'info';
|
||||
? 'error'
|
||||
: 'info';
|
||||
</script>
|
||||
|
||||
{#if $snackbarStore.open}
|
||||
@@ -51,7 +52,7 @@
|
||||
<InlineNotification
|
||||
{kind}
|
||||
title={capitalizeFirstLetter(kind || '')}
|
||||
subtitle={$snackbarStore.message}
|
||||
subtitle={$t($snackbarStore.message)}
|
||||
on:close={(e) => {
|
||||
e.preventDefault();
|
||||
handleClose();
|
||||
|
||||
@@ -12,7 +12,7 @@ export const snackbarStoreInitialState = {
|
||||
export const snackbarStore = writable({ ...snackbarStoreInitialState });
|
||||
|
||||
export const snackbar = {
|
||||
success(message = 'Success') {
|
||||
success(message = 'snackbar.success') {
|
||||
snackbarStore.update((store) => {
|
||||
store.open = true;
|
||||
store.message = message;
|
||||
@@ -21,7 +21,7 @@ export const snackbar = {
|
||||
return store;
|
||||
});
|
||||
},
|
||||
error(message = 'Something went wrong - Please try later') {
|
||||
error(message = 'snackbar.something') {
|
||||
snackbarStore.update((store) => {
|
||||
store.open = true;
|
||||
store.message = message;
|
||||
@@ -30,7 +30,7 @@ export const snackbar = {
|
||||
return store;
|
||||
});
|
||||
},
|
||||
info(message = 'Update') {
|
||||
info(message = 'snackbar.updates') {
|
||||
snackbarStore.update((store) => {
|
||||
store.open = true;
|
||||
store.message = message;
|
||||
|
||||
Reference in New Issue
Block a user