161 Commits

Author SHA1 Message Date
Alexander Klimov
febb2d1ae2 ProgrammingError: extend IcingaException
refs #6931
2014-08-26 11:15:19 +02:00
Johannes Meyer
4ddc0e718b Report the default language also as being available for setting up the locale
fixes #6905
2014-08-14 10:48:52 +02:00
Johannes Meyer
3105c2059e Remove license headers from all files
refs #6309
2014-07-15 13:43:52 +02:00
Johannes Meyer
b3cb29d804 Make Icinga\Util\Tranlsator not only return locale codes with encodings
refs #6602
2014-07-07 09:09:22 +02:00
Johannes Meyer
9c1ee57628 Icinga\Util\File: throw an ErrorException with file and linenumber details 2014-06-27 09:54:17 +02:00
Johannes Meyer
3b191d36c4 Let Icinga\Util\File extend from SplFileObject
We should extend SplFileObject as it provides already some of the
functionality Icinga\Util\File had and adds even more on top of that.
2014-06-26 15:57:14 +02:00
Johannes Meyer
461b050718 Add locale negotiation to Icinga\Util\Translator
Translator::getPreferredLocaleCode($header) can now be used with the
HTTP "Accept-Language" header to return the best matching locale using
the user's preferations reported by the browser and our available locale
stack. Additionally Translator::getLocale and Translator::getLanguage were
replaced by Translator::splitLocaleCode to provide a more flexible
implemenation in order to identify specific parts of a particular locale or
the current one.

refs #6074
2014-06-25 12:15:41 +02:00
Thomas Gelf
fac3c9f3a6 Util\Translator: fix language list
Reverted former redundant patch, got confused by legacy web modules
been translated with earlier versions. They had a different directory
structure and registered erraneous domain directories.

This patch fixes the list, does an additional safety check (dirname must
end with .UTF-8) and strips .UTF-8 from the locale name. Former regex
matched always and therefore blacklisted every translation.
2014-06-25 11:43:15 +02:00
Thomas Gelf
20cdb6e0b8 Revert "Util\Translator: show correct language list"
This reverts commit b7521f48b960d27c1600aab5e79cf90d34ef8b68.
2014-06-25 11:37:37 +02:00
Thomas Gelf
b7521f48b9 Util\Translator: show correct language list
List was showing useless stuff such as LC_MESSAGES and no language
but the default one. We should have a look whether LC_MESSAGES is
really needed, it looks so ugly.
2014-06-25 10:31:03 +02:00
Johannes Meyer
c563479888 Use Icinga\Util\File instead of fopen 2014-06-23 15:02:06 +02:00
Johannes Meyer
2862c5667c Make Icinga\Util\File an object
Was a class with just one static function beforehand and is now a fully
object oriented alternative for how files and pipes can be handled.
PHP warnings emitted by fopen, fwrite, fread and chmod are catched
and thrown as exceptions.
2014-06-23 15:02:06 +02:00
Thomas Gelf
262dcff3a5 Util\Translator: tell us current locale and lang 2014-06-20 13:12:23 +02:00
Johannes Meyer
405266e000 Drop Icinga\Util\Process in favour of an upcoming stronger implementation 2014-06-13 11:59:13 +02:00
Johannes Meyer
b935cb34fb Add clicommands to run unit- and style-tests
refs #6092
2014-06-13 09:27:27 +02:00
Johannes Meyer
851977cbeb Revert "Add clicommands to run unit- and style-tests"
This reverts commit 0805d73e34d3692ffb77a74c31bd04fbdb67ba27.
2014-06-13 09:14:22 +02:00
Johannes Meyer
0805d73e34 Add clicommands to run unit- and style-tests
refs #6092
2014-06-12 16:29:07 +02:00
Johannes Meyer
159d765f14 Fix that calling ActionController::translate() throws an exception
Translating strings must not throw an exception
even if the given domain is not valid.

fixes #6432
2014-06-11 13:39:22 +02:00
Gunnar Beutner
a66a1a4729 Refactor the timeSincePrefix and timeUntilPrefix functions
Instead of having two separate functions to get the prefix
and the formatted time interval the new functions return
both the prefix and the time interval.

refs #5981
2014-05-29 13:03:10 +02:00
Gunnar Beutner
d01a98b7e6 Fix some of the time-related grammar mistakes
This updates some of the messages to use "For"
instead of "Since" where appropriate.

fixes #5981
2014-05-29 11:30:08 +02:00
Johannes Meyer
2f911f75a1 Fix division by zero in Icinga\Util\Format
refs #6125
2014-05-06 08:32:42 +02:00
Johannes Meyer
0627d954ac Fix usages of Icinga\Module\Monitoring\Plugin\*
refs #5973
2014-05-05 16:16:45 +02:00
Johannes Meyer
98ca15d1fb Mark less important or non-testable code as skipped for code coverage
refs #6011
2014-04-28 14:06:41 +02:00
Johannes Meyer
e10193f570 Add test for Icinga\Util\DateTimeFactory
refs #6011
2014-04-28 14:06:39 +02:00
Johannes Meyer
891d36dbd7 Make DateTimeFactory expecting a string instead of a DateTimeZone 2014-04-28 14:06:39 +02:00
Johannes Meyer
1db9b1ede4 Move non-factory functions from DateTimeFactory to Icinga\Util\Format 2014-04-28 14:06:39 +02:00
Johannes Meyer
e27e538bd9 Add test for Icinga\Util\Translator
refs #6011
2014-04-28 14:06:39 +02:00
Johannes Meyer
ea44ae3693 Improve failure handling when setting the locale 2014-04-04 15:34:46 +02:00
Johannes Meyer
ae2d61682f Fix how the timeline processes dates
refs #4190
2014-04-02 10:53:39 +02:00
Johannes Meyer
c19791fdd7 Fix brightness calculation in Icinga\Utils\Color 2014-04-01 11:46:44 +02:00
Johannes Meyer
f5e4331d71 Add timeline view script and styles
refs #4190
2014-04-01 11:46:43 +02:00
Thomas Gelf
ee01b28646 Replace tabs with whitespaces 2014-03-09 21:16:56 +01:00
Thomas Gelf
7449f2565a Make timeUntil behave like timeSince 2014-03-09 21:12:24 +01:00
Michael Friedrich
df0dbaad5c Fix null value in timestamp format. 2014-03-09 20:53:38 +01:00
Matthias Jentsch
819e7e9806 Implement Widget to display problems as matrix over time
refs #5703
2014-03-05 20:19:09 +01:00
Thomas Gelf
57caacb93f Merge branch 'feature/fanzzzy-5481' into feature/master-1
Conflicts:
	application/controllers/AuthenticationController.php
	application/controllers/ErrorController.php
	application/views/scripts/authentication/login.phtml
	library/Icinga/Application/ApplicationBootstrap.php
	library/Icinga/Web/Controller/ActionController.php
	library/Icinga/Web/Hook.php
	library/Icinga/Web/Widget/Dashboard.php
2014-03-04 09:42:25 +00:00
Eric Lippmann
7bf888a554 Vagrant: Add monitoring module config 2014-03-03 18:16:07 +01:00
Thomas Gelf
a79df3943a Formatter should fail for invalid data 2014-02-21 14:04:40 +00:00
Eric Lippmann
08d7edebfc Decouple (automatic) preferences storage from user preferences (WIP)
DbStore, persisting preferences and tests not yet reworked.
2014-02-14 17:28:11 +01:00
Marius Hein
8a604f1c2c Implement structures for permissions, restrictions and membership
refs #4624
2014-02-12 17:03:18 +01:00
Johannes Meyer
56abc53a2b Properly fix the default locale issue 2014-02-03 12:22:13 +01:00
Johannes Meyer
3aee13cd9b Fix that en_US is used as default locale
Using this locale is not an issue, but it might not be available in a user's environment
2014-02-03 11:05:28 +01:00
Johannes Meyer
85639a3990 Add language selection to general config and preference forms
refs #5533
2014-01-30 13:17:15 +01:00
Johannes Meyer
bd34669357 Refactor i18n implementation
One can now use $this->translate(msg) in a view or controller without the
need to pass the module domain (web&cli). Forms still need to be built
with _t(msg) and _mt(dom, msg).

refs #5533
2014-01-29 16:25:08 +01:00
Eric Lippmann
ca1d50ae53 Rename Icinga 2 Web to Icinga Web 2 2013-10-23 15:11:06 +02:00
Eric Lippmann
092c5780ea CS: Fix violations for overdue files
refs #4586
2013-09-04 11:21:12 +02:00
Johannes Meyer
368bd3c9c7 Refactor datetime validation
The DateTimePicker form element needs to know from now on,
how user input can be formatted when validating.

refs #4581
2013-09-03 09:27:02 +02:00
Matthias Jentsch
e6c57f029d Fix code styling to comply with coding standard
refs #4503
2013-08-15 14:58:08 +02:00
Matthias Jentsch
7f30b587be Change the StoreFactory to work with the DbAdapterFactory and fix code styling
Change the StoreFactory configuration to reference to a resource instead of
defining the whole database. Additionally fix docstrings, fix imports and fix
function calls to comply to coding style standards.

refs #4503
2013-08-15 14:16:34 +02:00
Eric Lippmann
4585bf2555 CC: Add missing docstrings to DateTimeFactory and DateTimePicker
refs #4440
2013-08-12 17:27:23 +02:00