From: Nik Okuntseff Date: Fri, 16 Feb 2018 14:56:38 +0000 (+0000) Subject: Minor improvements in Italian translation. X-Git-Tag: timetracker_1.19-1~1117 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d952547e1d6e9f22fffd5cd76e2015d60045889f;p=timetracker.git Minor improvements in Italian translation. --- diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 697d541f..60d08726 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -59,6 +59,7 @@ class ttUser { var $lock_spec = null; // Cron specification for record locking. var $workday_minutes = 480; // Number of work minutes in a regular day. var $rights = 0; // A mask of user rights. + var $rights_array = array(); // An array of user rights, planned replacement of array mask. // Constructor. function __construct($login, $id = null) { @@ -130,8 +131,15 @@ class ttUser { // Set user rights. if ($this->role == ROLE_USER) { $this->rights = right_data_entry|right_view_charts|right_view_reports; + // TODO: get customized rights from the database instead. + $this->rights_array[] = "data_entry"; // Right to enter time and expense records into Time Tracker. + $this->rights_array[] = "view_own_reports"; // Right to view own reports (for a specific user). + $this->rights_array[] = "view_own_charts"; // Right to view own charts (for a specific user). } elseif ($this->role == ROLE_CLIENT) { $this->rights = right_view_reports|right_view_invoices; // TODO: how about right_view_charts, too? + $this->rights_array[] = "view_client_reports"; // Right to view reports for a specific client. + $this->rights_array[] = "view_client_charts"; // Right to view charts for a specific client. + $this->rights_array[] = "view_client_invoices"; // Right to view invoices for a specific client. } elseif ($this->role == ROLE_COMANAGER) { $this->rights = right_data_entry|right_view_charts|right_view_reports|right_view_invoices|right_manage_team; } elseif ($this->role == ROLE_MANAGER) { @@ -140,6 +148,32 @@ class ttUser { $this->rights = right_administer_site; } +/* +// TODO: redesign of user rights and roles is currently ongoing. +// As we run our of bits for sure at some point, rights should be strings instead, +// for example: "data_entry". +// Also, we need rights editor page and team-customized roles. +// Move this stuff from here to ttUser class. +// +// User access rights - bits that collectively define an access mask to the system (a role). +// We'll have some bits here (1,2, etc...) reserved for future use. +define('right_data_entry', 4); // Right to enter work hours and expenses. +define('right_view_charts', 8); // Right to view charts. +define('right_view_reports', 16); // Right to view reports. +define('right_view_invoices', 32); // Right to view invoices. +define('right_manage_team', 64); // Right to manage team. Note that this is not full access to team. +define('right_assign_roles', 128); // Right to assign user roles. +define('right_export_team', 256); // Right to export team data to a file. +define('right_administer_site', 1024); // Admin account right to manage the application as a whole. + +// User roles. +define('ROLE_USER', 4); // Regular user. +define('ROLE_CLIENT', 16); // Client (to view reports and invoices). +define('ROLE_COMANAGER', 68); // Team co-manager. Can do many things but not as much as team manager. +define('ROLE_MANAGER', 324); // Team manager. Can do everything for a team. +define('ROLE_SITE_ADMIN', 1024); // Site administrator. +*/ + // Adjust punch_in_mode for managers as they are allowed to overwrite start and end times. if ($this->canManageTeam()) $this->punch_in_mode = 0; } diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index 96dd9191..83045b57 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -56,7 +56,7 @@ $i18n_key_words = array( 'menu.tasks' => 'Compiti', 'menu.users' => 'Utenti', 'menu.teams' => 'Gruppi', -'menu.export' => 'Esportazione', // TODO: is this correct? Also, I auto-translated some other terms in menu section. Check for accuracy. +'menu.export' => 'Esportazione', 'menu.clients' => 'Clienti', 'menu.options' => 'Opzioni', @@ -75,14 +75,14 @@ $i18n_key_words = array( 'error.not_equal' => 'Il campo "{0}" non è uguale al campo "{1}".', 'error.interval' => 'Il campo "{0}" deve essere maggiore di "{1}".', 'error.project' => 'Seleziona il progetto.', -'error.task' => 'Seleziona compito.', // TODO: is this correct? +'error.task' => 'Seleziona compito.', 'error.client' => 'Seleziona il cliente.', 'error.report' => 'Seleziona rapporto.', 'error.record' => 'Seleziona record.', 'error.auth' => 'Login o password errati.', 'error.user_exists' => 'Esiste già un utente con questo username.', 'error.project_exists' => 'Esiste già un progetto con questo nome.', -'error.task_exists' => 'Esiste già un compito con questo nome.', // TODO: is this correct? "un compito"? +'error.task_exists' => 'Esiste già un compito con questo nome.', 'error.client_exists' => 'Esiste già un cliente con questo nome.', 'error.invoice_exists' => 'Esiste già una fattura con questo numero.', 'error.no_invoiceable_items' => 'Non ci sono voci fatturabili.', @@ -184,7 +184,7 @@ $i18n_key_words = array( 'label.client_address' => 'Indirizzo cliente', 'label.or' => 'o', 'label.error' => 'Errore', -'label.ldap_hint' => 'Digita il tuo Login Windows e la tua password nei campi qui sotto.', // TODO: il tuo and then la tua? Improve? +'label.ldap_hint' => 'Digita il tuo Login Windows e la tua password nei campi qui sotto.', 'label.required_fields' => '* campi obbligatori', 'label.on_behalf' => 'a favore di', 'label.role_manager' => '(manager)', @@ -198,11 +198,11 @@ $i18n_key_words = array( 'label.custom_fields' => 'Campi personalizzati', 'label.monthly_quotas' => 'Quote mensili', 'label.type' => 'Tipo', -'label.type_dropdown' => 'scelta multipla', // TODO: translation looks incorrect, a dropdown control is a single choice. +'label.type_dropdown' => 'menu a tendina', 'label.type_text' => 'testo', 'label.required' => 'Obbligatorio', 'label.fav_report' => 'Rapporto preferito', -// 'label.cron_schedule' => 'Cron schedule', // TODO: how about "Programma cron" here? +'label.cron_schedule' => 'Cron programmata', 'label.what_is_it' => 'Cosa è?', 'label.expense' => 'Spesa', 'label.quantity' => 'Quantità', @@ -245,7 +245,7 @@ $i18n_key_words = array( 'title.edit_project' => 'Modifica progetto', 'title.delete_project' => 'Elimina progetto', 'title.tasks' => 'Compiti', -'title.add_task' => 'Aggiungi compito', // TODO: is this correct? +'title.add_task' => 'Aggiungi compito', 'title.edit_task' => 'Modifica compito', 'title.delete_task' => 'Eliminazione compito', 'title.users' => 'Utenti', @@ -422,8 +422,7 @@ $i18n_key_words = array( // Profile form. See example at https://timetracker.anuko.com/profile_edit.php. 'form.profile.12_hours' => '12 ore', 'form.profile.24_hours' => '24 ore', -// // TODO: translate the following. -// 'form.profile.show_holidays' => 'Show holidays', +'form.profile.show_holidays' => 'Mostra vacanze', 'form.profile.tracking_mode' => 'Modalità di registrazione', 'form.profile.mode_time' => 'tempo', 'form.profile.mode_projects' => 'progetti', @@ -437,8 +436,7 @@ $i18n_key_words = array( // 'form.profile.allow_overlap' => 'Allow overlap', // 'form.profile.future_entries' => 'Future entries', 'form.profile.uncompleted_indicators' => 'Indicatori incompleti', -// TODO: translate the following. If the translation is the same word, indicate so. Plugini, perhaps? -// 'form.profile.plugins' => 'Plugins', +'form.profile.plugins' => 'Plugin', // Mail form. See example at https://timetracker.anuko.com/report_send.php when emailing a report. 'form.mail.from' => 'Da', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 4558949f..2eaf9b3d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.21.3996 | Copyright © Anuko | +  Anuko Time Tracker 1.17.21.3997 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/initialize.php b/initialize.php index f309ee6a..5d721b80 100644 --- a/initialize.php +++ b/initialize.php @@ -125,6 +125,12 @@ define('TYPE_ALL', 0); // Time record can be specified with either duration or s define('TYPE_START_FINISH', 1); // Time record has start and finish times. define('TYPE_DURATION', 2); // Time record has only duration, no start and finish times. +// TODO: redesign of user rights and roles is currently ongoing. +// As we run our of bits for sure at some point, rights should be strings instead, +// for example: "data_entry". +// Also, we need rights editor page and team-customized roles. +// Move this stuff from here to ttUser class. +// // User access rights - bits that collectively define an access mask to the system (a role). // We'll have some bits here (1,2, etc...) reserved for future use. define('right_data_entry', 4); // Right to enter work hours and expenses.