Alexander A. Klimov
474803fee4
Change all license headers to only reflect a file's year of creation
...
refs #11000
2016-02-08 15:41:00 +01:00
Eric Lippmann
b043317fd4
PHP7: Fix Only variables should be passed by reference exception in Translator
...
refs #10251
2016-01-27 16:46:54 +01:00
Eric Lippmann
4a5d2784fb
Normalize languages for negotiation to lowercase
...
refs #7818
2015-08-31 16:45:14 +02:00
Eric Lippmann
38ef8c7f11
lib: Fix PHPDoc of Translator::splitLocaleCode()
2015-08-31 09:08:31 +02:00
Paul Richards
e8cdcce61d
Fix PHP warning on Windows due to LC_MESSAGES not defined
...
Signed-off-by: Alexander A. Klimov <alexander.klimov@netways.de>
with the following changes:
Don't define LC_MESSAGES globally as only 2 methods would need that
Use LC_ALL rather than 6
fixes #8912
2015-06-12 13:49:38 +02:00
Alexander A. Klimov
b58ffbe034
Revert "Translator: fall back to LC_ALL if LC_MESSAGES is not defined"
...
This reverts commit 9fe2d4928d
.
2015-06-12 13:29:31 +02:00
Alexander A. Klimov
9fe2d4928d
Translator: fall back to LC_ALL if LC_MESSAGES is not defined
...
fixes #8912
2015-06-12 12:28:30 +02:00
Alexander A. Klimov
0bce5e83ad
Revert "Fix PHP warning on windows due to LC_MESSAGES not defined."
...
This reverts commit 5b18ff7965
.
2015-06-12 10:38:25 +02:00
Paul Richards
5b18ff7965
Fix PHP warning on windows due to LC_MESSAGES not defined.
...
fixes #8912
2015-06-11 17:28:50 +02:00
Eric Lippmann
6bae2e0a53
Note that our license is GPL v2 or any later version in our license header instead of pointing to the license's URL
2015-02-04 10:52:27 +01:00
Eric Lippmann
5b4fab0750
Add license header
...
This time without syntax errors hopefully :)
2015-02-03 16:27:59 +01:00
Eric Lippmann
5fa2e3cfdc
Revert "Add license header"
...
This reverts commit 338d067aba
.
2015-02-03 16:16:26 +01:00
Eric Lippmann
338d067aba
Add license header
...
fixes #7788
2015-02-03 15:51:04 +01:00
Johannes Meyer
e5d2d4cec2
Add module-aware Form::translate and Form::translatePlural
...
refs #7551
2014-12-19 11:29:24 +01:00
Thomas Gelf
d253e1e5b0
Util\Translator: available locales should be sorted
2014-11-11 19:45:56 +01:00
Alexander Fuhr
dacbd329dd
Translator: Implement domain fallback for translate and translatePlural
2014-09-29 15:56:48 +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
Alexander Klimov
45638b218c
Throw IcingaException rather than Exception
...
fixes #7014
2014-08-27 16:03:15 +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
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
Thomas Gelf
262dcff3a5
Util\Translator: tell us current locale and lang
2014-06-20 13:12:23 +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
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
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