Commit Graph

76 Commits

Author SHA1 Message Date
Thomas Gelf d253e1e5b0 Util\Translator: available locales should be sorted 2014-11-11 19:45:56 +01:00
Eric Lippmann a2772a17a7 File: Fix ErrorException::__construct()'s parameters 2014-10-16 15:47:50 +02:00
Alexander Klimov 1a2d15b638 Drop Icinga\Util\Enumerate 2014-10-02 13:59:54 +02:00
Alexander Klimov 081d8eecfc Implement abstract class EnumeratingFilterIterator 2014-10-02 13:59:51 +02:00
Eric Lippmann 1c7eb0d59a lib: Introduce function `String::cname()' 2014-09-30 22:34:58 +02:00
Alexander Fuhr dacbd329dd Translator: Implement domain fallback for translate and translatePlural 2014-09-29 15:56:48 +02:00
Eric Lippmann c51b05296e Merge branch 'master' into bugfix/commands-6593 2014-09-19 13:18:47 +02:00
Alexander Fuhr b38ef9c0bd Implement plural and context based translation functionality
refs #6982
2014-09-16 15:19:23 +02:00
Alexander Fuhr e2b5e05f21 Implement plural translation (testing) 2014-09-15 14:11:42 +02:00
Alexander Fuhr 583fd46f15 Experimental Plural Translation Implementation
Personal BACKUP
2014-09-11 18:04:10 +02:00
Eric Lippmann 0e7ca591ec Merge branch 'master' into bugfix/commands-6593
Conflicts:
	application/forms/Preference/GeneralForm.php
	application/views/helpers/FormDateTime.php
	modules/monitoring/application/forms/Command/CommandForm.php
2014-09-08 10:16:05 +02:00
Marius Hein a300877878 Time detection: Add receiever to bootstrap method
refs #6078
2014-09-05 15:24:13 +02:00
Alexander Klimov 982cda6805 Implement Icinga\Util\Enumerate 2014-09-05 13:49:27 +02:00
Eric Lippmann 774db9a7c8 lib: Add function `isUnixTimestamp' to the `DateTimeFactory'
Before, the `DateTimeValidator' defined this function.

refs #6593
2014-09-03 14:37:33 +02:00
Alexander Klimov 45638b218c Throw IcingaException rather than Exception
fixes #7014
2014-08-27 16:03:15 +02:00
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 b7521f48b9.
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 0805d73e34.
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