Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added notification for trans updates and added missing TR key #593

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions agate-ui/src/components/SystemCustomTranslations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import { DefaultAlignment } from 'src/components/models';
import { translationAsMap, mapAsTranslation } from 'src/utils/translations';
import ConfirmDialog from 'src/components/ConfirmDialog.vue';
import SystemCustomTranslationsDialog from 'src/components/SystemCustomTranslationsDialog.vue';
import { notifyError, notifySuccess } from 'src/utils/notify';

const systemStore = useSystemStore();
const { t } = useI18n();
Expand Down Expand Up @@ -118,6 +119,9 @@ function save() {
selectedTranslations.value.splice(0);
systemStore.updateTranslation(mapAsTranslation(allTranslations.value)).then(() => {
systemStore.init();
notifySuccess(t('system.translations.updated'));
}).catch(() => {
notifyError(t('system.translations.update_failed'));
});
}

Expand Down
6 changes: 6 additions & 0 deletions agate-ui/src/i18n/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ export default {
PENDING: 'User is pending approval.',
},
update_password: 'Update password',
password_updated: 'Password updated',
password_update_failed: 'Failed to update password',
attributes: {
title: 'User Attributes',
hint: 'Additional user information.',
Expand Down Expand Up @@ -244,13 +246,17 @@ export default {
signup_whitelist: 'Signup whitelist',
sso_domain_hint: 'Single sign-on domain.',
sso_domain: 'SSO Domain',
updated: 'Settings updated',
update_failed: 'Failed to update settings',
translations: {
title: 'Custom Translations',
hint: 'Override the default translations or add new ones.',
name_exists: 'Translation key already exists',
name_hint: "Use '.' for grouping (e.g., 'address.street', 'address.city')",
add: 'Add Translation',
remove_confirm: 'Please confirm the removal of the translation | Please confirm the removal of the {count} translations',
updated: 'Translation updated successfully',
update_failed: 'Failed to update translation',
},
otp_strategies: {
NONE: 'None',
Expand Down
6 changes: 6 additions & 0 deletions agate-ui/src/i18n/fr/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ export default {
PENDING: "Usager en attente d'approbation.",
},
update_password: 'Mettre à jour le mot de passe',
password_updated: 'Mot de passe mis à jour',
password_update_failed: "Échec de la mise à jour du mot de passe",
attributes: {
title: 'Attributs utilisateur',
hint: "Informations additionnelles sur l'usager.",
Expand Down Expand Up @@ -244,13 +246,17 @@ export default {
signup_whitelist: "Liste blanche d'inscription",
sso_domain_hint: 'Domaine de connexion unique.',
sso_domain: 'Domaine SSO',
updated: 'Paramètres mis à jour',
update_failed: 'Échec de la mise à jour des paramètres',
translations: {
title: 'Traductions personnalisés',
hint: 'Remplacer les traductions par défaut ou en ajouter de nouvelles',
name_exists: 'La clé de traduction existe déjà',
name_hint: "Utiliser '.' pour le regroupement (ex. : 'adresse.rue', 'adresse.ville')",
add: 'Ajouter une traduction',
remove_confirm: 'Veuillez confirmer la suppression de la traduction | Veuillez confirmer la suppression des {count} traductions',
updated: 'Traductions mises à jour',
update_failed: 'Échec de la mise à jour des traductions',
},
otp_strategies: {
NONE: 'Aucun',
Expand Down