From 699d174c8cd3dd88265826a6b69c7fae3b62e0a8 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 21 Mar 2019 16:07:03 +0000 Subject: [PATCH] Dutch translation improved. --- WEB-INF/lib/ttFileHelper.class.php | 1 - WEB-INF/resources/nl.lang.php | 48 ++++++++++++++---------------- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 21 +++++++++++++ 4 files changed, 44 insertions(+), 28 deletions(-) diff --git a/WEB-INF/lib/ttFileHelper.class.php b/WEB-INF/lib/ttFileHelper.class.php index 441b8f40..a45326cb 100644 --- a/WEB-INF/lib/ttFileHelper.class.php +++ b/WEB-INF/lib/ttFileHelper.class.php @@ -130,7 +130,6 @@ class ttFileHelper { 'file_name' => urlencode($fields['file_name']), 'description' => urlencode($fields['description']), // TODO: add file content here, too. Will this work for large files? - // ); // url-ify the data for the POST. diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index e56846c7..a56ee3fc 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -51,8 +51,7 @@ $i18n_key_words = array( 'menu.time' => 'Tijden', 'menu.expenses' => 'Kosten', 'menu.reports' => 'Rapporten', -// TODO: translate the following. See https://www.anuko.com/time_tracker/what_is/timesheets.htm -// 'menu.timesheets' => 'Timesheets', +'menu.timesheets' => 'Tijdenoverzichten', 'menu.charts' => 'Grafieken', 'menu.projects' => 'Projecten', 'menu.tasks' => 'Taken', @@ -234,9 +233,12 @@ $i18n_key_words = array( 'label.work_units_short' => 'Eenheid', 'label.totals_only' => 'Alleen totalen', 'label.quota' => 'Maanddoel', -// TODO: translate the following. See https://www.anuko.com/time_tracker/what_is/timesheets.htm -// 'label.timesheet' => 'Timesheet', -// 'label.submitted' => 'Submitted', +'label.timesheet' => 'Tijdenoverzicht', +// TODO: translate the following. "Submitted" here means that a timesheet was submitted (sent) +// to manager(s) for an approval. It is also a column name on the timesheets.php page, +// so it needs to be short. A problem with "Reactie ontvangen" is that Google auto-translates +// it as "Response received", which seems wrong, and is alsoo too long. +// 'label.submitted' => 'Reactie ontvangen', 'label.approved' => 'Goedgekeurd', 'label.approval' => 'Rapport goedkeuring', 'label.mark_approved' => 'Markeer goegkeuring', @@ -270,9 +272,8 @@ $i18n_key_words = array( 'title.reports' => 'Rapporten', 'title.report' => 'Rapport', 'title.send_report' => 'Rapport aan het versturen', -// TODO: translate the following. See https://www.anuko.com/time_tracker/what_is/timesheets.htm -// 'title.timesheets' => 'Timesheets', -// 'title.timesheet' => 'Timesheet', +'title.timesheets' => 'Tijdenoverzichten', +'title.timesheet' => 'Tijdenoverzicht', 'title.invoice' => 'Factuur', 'title.send_invoice' => 'Factuur verzenden', 'title.charts' => 'Grafieken', @@ -306,10 +307,9 @@ $i18n_key_words = array( 'title.add_notification' => 'Notificatie toevoegen', 'title.edit_notification' => 'Notificatie bewerken', 'title.delete_notification' => 'Notificatie verwijderen', -// TODO: translate the following. See https://www.anuko.com/time_tracker/what_is/timesheets.htm -// 'title.add_timesheet' => 'Adding Timesheet', -// 'title.edit_timesheet' => 'Editing Timesheet', -// 'title.delete_timesheet' => 'Deleting Timesheet', +'title.add_timesheet' => 'Tijdenoverzicht toevoegen', +'title.edit_timesheet' => 'Tijdenoverzicht bewerken', +'title.delete_timesheet' => 'Tijdenoverzicht verwijderen', 'title.monthly_quotas' => 'Doelen per maand', 'title.export' => 'Exporteer groepsgegevens', 'title.import' => 'Importeer groepsgegevens', @@ -355,8 +355,7 @@ $i18n_key_words = array( 'dropdown.clients' => 'klanten', 'dropdown.select' => '--- kies ---', 'dropdown.select_invoice' => '--- kies factuur ---', -// TODO: translate the following. See https://www.anuko.com/time_tracker/what_is/timesheets.htm -// 'dropdown.select_timesheet' => '--- select timesheet ---', +'dropdown.select_timesheet' => '--- kies tijdenoverzicht ---', 'dropdown.status_active' => 'actief', 'dropdown.status_inactive' => 'inactief', 'dropdown.delete' => 'verwijderen', @@ -423,13 +422,11 @@ $i18n_key_words = array( // (after generating a report at https://timetracker.anuko.com/reports.php). 'form.report.export' => 'Exporteer', 'form.report.assign_to_invoice' => 'Voeg toe aan factuur', -// TODO: translate the following. See https://www.anuko.com/time_tracker/what_is/timesheets.htm -// 'form.report.assign_to_timesheet' => 'Assign to timesheet', +'form.report.assign_to_timesheet' => 'Wijs toe aan tijdenoverzicht', // Timesheets form. See example at https://timetracker.anuko.com/timesheets.php -// TODO: translate the following. See https://www.anuko.com/time_tracker/what_is/timesheets.htm -// 'form.timesheets.active_timesheets' => 'Active Timesheets', -// 'form.timesheets.inactive_timesheets' => 'Inactive Timesheets', +'form.timesheets.active_timesheets' => 'Actieve tijdenoverzichten', +'form.timesheets.inactive_timesheets' => 'Inactieve tijdenoverzichten', // Templates form. See example at https://timetracker.anuko.com/templates.php 'form.templates.active_templates' => 'Actieve sjablonen', @@ -568,11 +565,10 @@ $i18n_key_words = array( 'role.admin.description' => 'Time Tracker beheerder.', // Timesheet View form. See example at https://timetracker.anuko.com/timesheet_view.php. -// TODO: translate the following. See https://www.anuko.com/time_tracker/what_is/timesheets.htm -// 'form.timesheet_view.submit_subject' => 'Timesheet approval request', -// 'form.timesheet_view.submit_body' => "A new timesheet requires approval.

User: %s.", -// 'form.timesheet_view.approve_subject' => 'Timesheet approved', -// 'form.timesheet_view.approve_body' => "Your timesheet %s was approved.

%s", -// 'form.timesheet_view.disapprove_subject' => 'Timesheet not approved', -// 'form.timesheet_view.disapprove_body' => "Your timesheet %s was not approved.

%s", +'form.timesheet_view.submit_subject' => 'Verzoek goedkeuring tijdenoverzicht', +'form.timesheet_view.submit_body' => "Een nieuw tijdenoverzicht vereist goedkeuring.

User: %s.", +'form.timesheet_view.approve_subject' => 'Tijdenoverzicht goedgekeurd', +'form.timesheet_view.approve_body' => "Jouw tijdenoverzicht %s is goedgekeurd.

%s", +'form.timesheet_view.disapprove_subject' => 'Tijdenoverzicht afgekeurd', +'form.timesheet_view.disapprove_body' => "Jouw tijdenoverzicht %s is afgekeurd.

%s", ); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 8814c7bb..19de9b60 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.61.4882 | Copyright © Anuko | +  Anuko Time Tracker 1.18.61.4884 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 063f2022..007e5160 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -47,6 +47,25 @@ function ttExecute($sql) { print "Successful update.
\n"; } +// ttGenerateKeys - generates keys for groups that do not have them. +function ttGenerateKeys() { + $mdb2 = getConnection(); + $sql = "select id from tt_groups where group_key is null and status = 1"; + $res = $mdb2->query($sql); + if (is_a($res, 'PEAR_Error')) die($res->getMessage()); + + $numGroups = 0; + while ($val = $res->fetchRow()) { + $group_id = $val['id']; + $group_key = $mdb2->quote(ttRandomString()); + $sql = "update tt_groups set group_key = $group_key where id = $group_id"; + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) die($affected->getMessage()); + $numGroups++; + } + print "
Generated keys for $numGroups groups.
\n"; +} + if ($request->isGet()) { echo('

Environment Checks

'); @@ -1133,6 +1152,8 @@ if ($_POST) { ttExecute("UPDATE `tt_site_config` SET param_value = '1.18.60', modified = now() where param_name = 'version_db' and param_value = '1.18.59'"); ttExecute("ALTER TABLE `tt_groups` ADD `group_key` varchar(32) AFTER `org_id`"); ttExecute("UPDATE `tt_site_config` SET param_value = '1.18.61', modified = now() where param_name = 'version_db' and param_value = '1.18.60'"); + + ttGenerateKeys(); } if ($_POST["cleanup"]) { -- 2.20.1