Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-1746

zabbix maintenance period entry needs to be localized

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.0.6
    • Frontend (F)
    • server: Red Hat Enterprise Linux 6.x x86_64, php 5.3.3

      The current maintenance page in the front-end is error-prone for some non-European cultures, because the day and month are reversed from what we expect. This can cause people to enter incorrect maintenance periods.

      Americans and perhaps other cultures use a different date-entry format than Europeans. We use MM / DD / YYYY, rather than DD / MM /YYYY. Because the Zabbix maintenance pages are not localized and there's no legend/label indicating the order for month and day, it's very likely that people may enter the wrong value in the wrong box, leading to a maintenance period that's not what they were expecting. For example, an American that doesn't use the calendar widget to select the date may accidentally enter 05 / 07 / 2013 thinking that's May 7th, when it's actually July 5th.

      I found the include/view/configuration.maintenance.edit.php file and I was able to switch the order for our interface. That's just a first step.

      What I think should actually happen is that

      1) the value for Language (from the user's profile) should be queried. If it's set to "English (US)" (and perhaps any other language settings where the localization for the date entry is also switched from the Zabbix default), then the boxes are displayed in the MM / DD / YYYY order.
      2) a new row should be added that contains a legend (labels) above the "Active Since", "Active Till", and any "Date" fields for new maintenance periods. The row should contain either "MM / DD / YYYY" or "DD / MM / YYYY", as a hint for the user so that they know what order the fields are in.

      If you could give me hints for how to look up the user's profile Language setting and what's involved in adding a new (I know addRow is
      called, but I tried just adding a call to $maintenanceFormList->addRow() with the headers for _('MM'), _('DD'), etc., and it did not display, so I'm guessing that there needs to be code added to the top level maintenance.php too – it's that code I'm uncertain of), I would be happy to provide a patch.

      Note: one alternative to what I'm suggesting would be to switch the maintenance entry to use YYYY / MM / DD for all users. That seems to be something that is less confusing for some cultures, and it's what's proscribed by ISO 8601.

      As I said, if you can help point me in the right direction, I would be willing to try my hand at contributing a patch.

            Unassigned Unassigned
            tim.mooney Tim Mooney
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: