fix: 🌐 update crud actions translations
This commit is contained in:
parent
fb57db6a4c
commit
346c47cce5
8 changed files with 36 additions and 36 deletions
|
|
@ -14,6 +14,7 @@ return [
|
|||
"yes_delete" => "Yes, delete",
|
||||
"yes_update" => "Yes, update",
|
||||
"yes_restore" => "Yes, restore",
|
||||
"yes_archive" => "Yes, archive",
|
||||
"no_cancel" => "No, cancel",
|
||||
"yes" => "Yes",
|
||||
"no" => "No",
|
||||
|
|
@ -90,4 +91,5 @@ return [
|
|||
"unsupported_type" => "Unsupported type:",
|
||||
"missing_translations" => "The translation of the :field for the language :locales is missing.|The translation
|
||||
of the :field for :locales languages are missing.",
|
||||
"archives" => "archives",
|
||||
];
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
return [
|
||||
"actions" => [
|
||||
"list" => "list",
|
||||
"creation" => "creation",
|
||||
"visualization" => "visualization",
|
||||
"duplication" => "duplication",
|
||||
"edition" => "edition",
|
||||
"suppression" => "suppression",
|
||||
"archivation" => "archivation",
|
||||
"restoration" => "restoration",
|
||||
"save" => "save",
|
||||
"list" => "list",
|
||||
"create" => "create",
|
||||
"visualize" => "visualize",
|
||||
"duplicate" => "duplicate",
|
||||
"edit" => "edit",
|
||||
"delete" => "delete",
|
||||
"archive" => "archive",
|
||||
"restore" => "restore",
|
||||
"save" => "save",
|
||||
],
|
||||
|
||||
"helpers" => [
|
||||
|
|
@ -19,9 +19,7 @@ return [
|
|||
"visualization_model" => "Visualization :model",
|
||||
"duplication_model" => "Duplication :model",
|
||||
"edition_model" => "Edition :model",
|
||||
"suppression_model" => "Suppression :model",
|
||||
"archivation_model" => "Archivation :model",
|
||||
"restoration_model" => "Restoration :model",
|
||||
"archives_model" => "Archives :model",
|
||||
"save_model" => "Save :model",
|
||||
"no_results" => "No results for :model",
|
||||
"publish" => "Published",
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ return [
|
|||
"yes_delete" => "Oui, supprimer",
|
||||
"yes_update" => "Oui, mettre à jour",
|
||||
"yes_restore" => "Oui, restorer",
|
||||
"yes_archive" => "Oui, archiver",
|
||||
"no_cancel" => "Non, annuler",
|
||||
"yes" => "Oui",
|
||||
"no" => "Non",
|
||||
|
|
@ -90,4 +91,5 @@ return [
|
|||
"unsupported_type" => "Type non supporté:",
|
||||
"missing_translations" => "La traduction du champs :field pour la langue :locales est manquante.|La traduction
|
||||
du champs :field pour les langues :locales sont manquantes.",
|
||||
"archives" => "archives",
|
||||
];
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
return [
|
||||
"actions" => [
|
||||
"list" => "liste",
|
||||
"creation" => "création",
|
||||
"visualization" => "visualisation",
|
||||
"duplication" => "duplication",
|
||||
"edition" => "édition",
|
||||
"suppression" => "suppression",
|
||||
"archivation" => "archivation",
|
||||
"restoration" => "restoration",
|
||||
"save" => "sauvegarder",
|
||||
"list" => "lister",
|
||||
"create" => "créer",
|
||||
"visualize" => "visualiser",
|
||||
"duplicate" => "dupliquer",
|
||||
"edit" => "éditer",
|
||||
"delete" => "supprimer",
|
||||
"archive" => "archiver",
|
||||
"restore" => "restorer",
|
||||
"save" => "sauvegarder",
|
||||
],
|
||||
|
||||
"helpers" => [
|
||||
|
|
@ -19,9 +19,7 @@ return [
|
|||
"visualization_model" => "Visualisation :model",
|
||||
"duplication_model" => "Duplication :model",
|
||||
"edition_model" => "Édition :model",
|
||||
"suppression_model" => "Suppression :model",
|
||||
"archivation_model" => "Archivation :model",
|
||||
"restoration_model" => "Restoration :model",
|
||||
"archives_model" => "Archives :model",
|
||||
"save_model" => "Sauvegarder :model",
|
||||
"no_results" => "Aucun résultat pour :model",
|
||||
"publish" => "Publié",
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ export default function AppSidebar() {
|
|||
key="trash"
|
||||
route={route(`back.${model}.trash`)}
|
||||
icon={Views.ARCHIVATION.icon}
|
||||
trans={str(useTrans(`crud.actions.${Views.ARCHIVATION.label}`)).ucFirst().value()}
|
||||
trans={str(useTrans("back.archives")).ucFirst().value()}
|
||||
/>
|
||||
),
|
||||
]})
|
||||
|
|
@ -142,7 +142,7 @@ export default function AppSidebar() {
|
|||
key="trash"
|
||||
route={route(`back.${model}.trash`)}
|
||||
icon={Views.ARCHIVATION.icon}
|
||||
trans={str(useTrans(`crud.actions.${Views.ARCHIVATION.label}`)).ucFirst().value()}
|
||||
trans={str(useTrans("back.archives")).ucFirst().value()}
|
||||
/>
|
||||
),
|
||||
]})
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ export default function ModelActions({
|
|||
const isRestoreAction = action.label === Views.RESTORATION.label;
|
||||
const isArchiveAction = action.label === Views.ARCHIVATION.label;
|
||||
const btnVariantType = isRestoreAction ? "ghost" : "destructive";
|
||||
const btnConfirm = useTrans(isRestoreAction ? "back.yes_restore" : "back.yes_delete");
|
||||
const btnConfirm = useTrans(isRestoreAction ? "back.yes_restore" : isArchiveAction ? "back.yes_archive" : "back.yes_delete");
|
||||
const btnDesc = useTrans(isRestoreAction ? "back.restore_data" : isArchiveAction ? "back.trash_data" : "back.lost_data");
|
||||
return (
|
||||
<Dialog>
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ export default function Dashboard({
|
|||
];
|
||||
|
||||
const transModel = useTrans("models.classes.dynamic-page", { choice: 2 });
|
||||
const transArchiveTitle = useTrans("crud.helpers.archivation_model", { params: { model: transModel }})
|
||||
const transArchiveTitle = useTrans("crud.helpers.archives_model", { params: { model: transModel }})
|
||||
const transTitle = str(isArchiveRoute ? transArchiveTitle : transModel).ucFirst().value();
|
||||
|
||||
const beforeNode = () => {
|
||||
|
|
|
|||
|
|
@ -26,49 +26,49 @@ export function cn(...inputs: ClassValue[]): string {
|
|||
*/
|
||||
export const Views = {
|
||||
CREATION: {
|
||||
label: "creation",
|
||||
label: "create",
|
||||
value: "create",
|
||||
policy: "create",
|
||||
icon: Plus,
|
||||
},
|
||||
VISUALIZATION: {
|
||||
label: "visualization",
|
||||
label: "visualize",
|
||||
value: "show",
|
||||
policy: "view",
|
||||
icon: Eye,
|
||||
},
|
||||
EDITION: {
|
||||
label: "edition",
|
||||
label: "edit",
|
||||
value: "edit",
|
||||
policy: "update",
|
||||
icon: Pencil,
|
||||
},
|
||||
DUPLICATION: {
|
||||
label: "duplication",
|
||||
label: "duplicate",
|
||||
value: "duplicate",
|
||||
policy: "duplicate",
|
||||
icon: Copy,
|
||||
},
|
||||
ARCHIVATION: {
|
||||
label: "archivation",
|
||||
label: "archive",
|
||||
value: "destroy",
|
||||
policy: "delete",
|
||||
icon: Archive,
|
||||
},
|
||||
RESTORATION: {
|
||||
label: "restoration",
|
||||
label: "restore",
|
||||
value: "restore",
|
||||
policy: "restore",
|
||||
icon: ArchiveRestore,
|
||||
},
|
||||
DELETION: {
|
||||
label: "suppression",
|
||||
label: "delete",
|
||||
value: "destroy",
|
||||
policy: "delete",
|
||||
icon: Trash2,
|
||||
},
|
||||
FORCEDELETION: {
|
||||
label: "suppression",
|
||||
label: "delete",
|
||||
value: "forceDestroy",
|
||||
policy: "forceDelete",
|
||||
icon: Trash2,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue