feat: Implement internationalization for task management components
- Added translation support for task-related strings in ProjectTaskForm and ProjectTasksSection components. - Integrated translation for navigation items in the Navigation component. - Created ProjectCalendarWidget component with Polish translations for project statuses and deadlines. - Developed Tooltip component for enhanced user experience with tooltips. - Established a field change history logging system in the database with associated queries. - Enhanced task update logging to include translated status and priority changes. - Introduced server-side translations for system messages to improve localization.
This commit is contained in:
109
src/lib/i18n.js
109
src/lib/i18n.js
@@ -12,6 +12,7 @@ const translations = {
|
||||
navigation: {
|
||||
dashboard: "Panel główny",
|
||||
projects: "Projekty",
|
||||
calendar: "Kalendarz",
|
||||
taskTemplates: "Szablony zadań",
|
||||
projectTasks: "Zadania projektów",
|
||||
contracts: "Umowy",
|
||||
@@ -62,7 +63,14 @@ const translations = {
|
||||
addNote: "Dodaj notatkę",
|
||||
addNoteSuccess: "Notatka została dodana",
|
||||
addNoteError: "Nie udało się zapisać notatki",
|
||||
addNotePlaceholder: "Dodaj nową notatkę..."
|
||||
addNotePlaceholder: "Dodaj nową notatkę...",
|
||||
status: "Status",
|
||||
type: "Typ",
|
||||
actions: "Akcje",
|
||||
view: "Wyświetl",
|
||||
clearSearch: "Wyczyść wyszukiwanie",
|
||||
clearAllFilters: "Wyczyść wszystkie filtry",
|
||||
sortBy: "Sortuj według"
|
||||
},
|
||||
|
||||
// Dashboard
|
||||
@@ -127,9 +135,10 @@ const translations = {
|
||||
city: "Miasto",
|
||||
address: "Adres",
|
||||
plot: "Działka",
|
||||
district: "Dzielnica",
|
||||
unit: "Jednostka",
|
||||
district: "Jednostka ewidencyjna",
|
||||
unit: "Obręb",
|
||||
finishDate: "Data zakończenia",
|
||||
type: "Typ",
|
||||
contact: "Kontakt",
|
||||
coordinates: "Współrzędne",
|
||||
notes: "Notatki",
|
||||
@@ -144,19 +153,44 @@ const translations = {
|
||||
searchPlaceholder: "Szukaj projektów po nazwie, mieście lub adresie...",
|
||||
noProjects: "Brak projektów",
|
||||
noProjectsMessage: "Rozpocznij od utworzenia swojego pierwszego projektu.",
|
||||
notFinished: "Nie zakończone",
|
||||
projects: "projektów",
|
||||
mapView: "Widok mapy",
|
||||
createFirstProject: "Utwórz pierwszy projekt",
|
||||
noMatchingResults: "Brak projektów pasujących do kryteriów wyszukiwania. Spróbuj zmienić wyszukiwane frazy.",
|
||||
showingResults: "Wyświetlono {shown} z {total} projektów",
|
||||
deleteConfirm: "Czy na pewno chcesz usunąć ten projekt?",
|
||||
deleteSuccess: "Projekt został pomyślnie usunięty",
|
||||
createSuccess: "Projekt został pomyślnie utworzony",
|
||||
updateSuccess: "Projekt został pomyślnie zaktualizowany",
|
||||
saveError: "Nie udało się zapisać projektu",
|
||||
enterProjectName: "Wprowadź nazwę projektu",
|
||||
enterCity: "Wprowadź miasto",
|
||||
enterAddress: "Wprowadź adres",
|
||||
enterPlotNumber: "Wprowadź numer działki",
|
||||
enterDistrict: "Wprowadź dzielnicę",
|
||||
enterUnit: "Wprowadź jednostkę",
|
||||
enterDistrict: "Wprowadź jednostkę ewidencyjną",
|
||||
enterUnit: "Wprowadź obręb",
|
||||
enterContactDetails: "Wprowadź dane kontaktowe",
|
||||
coordinatesPlaceholder: "np. 49.622958,20.629562",
|
||||
enterNotes: "Wprowadź notatki..."
|
||||
enterNotes: "Wprowadź notatki...",
|
||||
createProject: "Utwórz projekt",
|
||||
updateProject: "Aktualizuj projekt",
|
||||
creating: "Tworzenie...",
|
||||
updating: "Aktualizowanie...",
|
||||
projectDetails: "Szczegóły projektu",
|
||||
editProjectDetails: "Edytuj szczegóły projektu",
|
||||
contract: "Umowa",
|
||||
selectContract: "Wybierz umowę",
|
||||
investmentNumber: "Numer inwestycji",
|
||||
enterInvestmentNumber: "Wprowadź numer inwestycji",
|
||||
enterWP: "Wprowadź WP",
|
||||
placeholders: {
|
||||
contact: "Wprowadź dane kontaktowe",
|
||||
coordinates: "np. 49.622958,20.629562",
|
||||
notes: "Wprowadź notatki...",
|
||||
investmentNumber: "Wprowadź numer inwestycji",
|
||||
wp: "Wprowadź WP"
|
||||
}
|
||||
},
|
||||
|
||||
// Contracts
|
||||
@@ -240,6 +274,19 @@ const translations = {
|
||||
actions: "Działania",
|
||||
urgent: "Pilne",
|
||||
updateTask: "Aktualizuj zadanie",
|
||||
taskType: "Typ zadania",
|
||||
fromTemplate: "Z szablonu",
|
||||
customTask: "Zadanie niestandardowe",
|
||||
selectTemplate: "Wybierz szablon zadania",
|
||||
chooseTemplate: "Wybierz szablon zadania...",
|
||||
enterTaskName: "Wprowadź nazwę zadania...",
|
||||
enterDescription: "Wprowadź opis zadania (opcjonalnie)...",
|
||||
addTask: "Dodaj zadanie",
|
||||
adding: "Dodawanie...",
|
||||
addTaskError: "Nie udało się dodać zadania do projektu",
|
||||
notes: "notatki",
|
||||
deleteNote: "Usuń notatkę",
|
||||
deleteError: "Błąd usuwania zadania",
|
||||
notStarted: "Nie rozpoczęte",
|
||||
days: "dni"
|
||||
},
|
||||
@@ -454,7 +501,14 @@ const translations = {
|
||||
addNote: "Add Note",
|
||||
addNoteSuccess: "Note added",
|
||||
addNoteError: "Failed to save note",
|
||||
addNotePlaceholder: "Add a new note..."
|
||||
addNotePlaceholder: "Add a new note...",
|
||||
status: "Status",
|
||||
type: "Type",
|
||||
actions: "Actions",
|
||||
view: "View",
|
||||
clearSearch: "Clear search",
|
||||
clearAllFilters: "Clear all filters",
|
||||
sortBy: "Sort by"
|
||||
},
|
||||
|
||||
dashboard: {
|
||||
@@ -517,6 +571,7 @@ const translations = {
|
||||
district: "District",
|
||||
unit: "Unit",
|
||||
finishDate: "Finish Date",
|
||||
type: "Type",
|
||||
contact: "Contact",
|
||||
coordinates: "Coordinates",
|
||||
notes: "Notes",
|
||||
@@ -531,10 +586,17 @@ const translations = {
|
||||
searchPlaceholder: "Search projects by name, city or address...",
|
||||
noProjects: "No projects",
|
||||
noProjectsMessage: "Get started by creating your first project.",
|
||||
notFinished: "Not finished",
|
||||
projects: "projects",
|
||||
mapView: "Map View",
|
||||
createFirstProject: "Create first project",
|
||||
noMatchingResults: "No projects match the search criteria. Try changing your search terms.",
|
||||
showingResults: "Showing {shown} of {total} projects",
|
||||
deleteConfirm: "Are you sure you want to delete this project?",
|
||||
deleteSuccess: "Project deleted successfully",
|
||||
createSuccess: "Project created successfully",
|
||||
updateSuccess: "Project updated successfully",
|
||||
saveError: "Failed to save project",
|
||||
enterProjectName: "Enter project name",
|
||||
enterCity: "Enter city",
|
||||
enterAddress: "Enter address",
|
||||
@@ -543,7 +605,25 @@ const translations = {
|
||||
enterUnit: "Enter unit",
|
||||
enterContactDetails: "Enter contact details",
|
||||
coordinatesPlaceholder: "e.g., 49.622958,20.629562",
|
||||
enterNotes: "Enter notes..."
|
||||
enterNotes: "Enter notes...",
|
||||
createProject: "Create Project",
|
||||
updateProject: "Update Project",
|
||||
creating: "Creating...",
|
||||
updating: "Updating...",
|
||||
projectDetails: "Project Details",
|
||||
editProjectDetails: "Edit Project Details",
|
||||
contract: "Contract",
|
||||
selectContract: "Select Contract",
|
||||
investmentNumber: "Investment Number",
|
||||
enterInvestmentNumber: "Enter investment number",
|
||||
enterWP: "Enter WP",
|
||||
placeholders: {
|
||||
contact: "Enter contact details",
|
||||
coordinates: "e.g., 49.622958,20.629562",
|
||||
notes: "Enter notes...",
|
||||
investmentNumber: "Enter investment number",
|
||||
wp: "Enter WP"
|
||||
}
|
||||
},
|
||||
|
||||
contracts: {
|
||||
@@ -625,6 +705,19 @@ const translations = {
|
||||
actions: "Actions",
|
||||
urgent: "Urgent",
|
||||
updateTask: "Update Task",
|
||||
taskType: "Task Type",
|
||||
fromTemplate: "From Template",
|
||||
customTask: "Custom Task",
|
||||
selectTemplate: "Select Task Template",
|
||||
chooseTemplate: "Choose a task template...",
|
||||
enterTaskName: "Enter custom task name...",
|
||||
enterDescription: "Enter task description (optional)...",
|
||||
addTask: "Add Task",
|
||||
adding: "Adding...",
|
||||
addTaskError: "Failed to add task to project",
|
||||
notes: "notes",
|
||||
deleteNote: "Delete note",
|
||||
deleteError: "Error deleting task",
|
||||
notStarted: "Not started",
|
||||
days: "days"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user