Commit Graph

48 Commits

Author SHA1 Message Date
Ingo Schommer
317495f8ef Merge pull request #1035 from zoao/3.0
tinymce language portuguese is not working
2013-01-11 07:11:54 -08:00
Ingo Schommer
e66408b0a7 Merge pull request #1044 from uniun/3.0
BUG Hardcoded project name in include_by_locale()
2013-01-11 06:46:20 -08:00
Ingo Schommer
f0f83b26a8 BUG Graceful handling of sprintf with too few params in i18n::_t()
Originally discovered as a problem with the 'GridFieldDetailForm.Saved' in nl.yml
2012-12-21 11:46:39 +01:00
uniun
55b611d99d BUG Hardcoded project name in include_by_locale()
include_by_locale() should not use hardcoded default project name 'mysite' (fixes #7969).
2012-12-14 18:20:18 +02:00
João Martins
bdc17198e8 tinymce language portuguese is not working 2012-12-14 00:47:32 +00:00
Ingo Schommer
06ad5f5c69 Added Simplifie Chinese to i18n::$common_locales
See https://github.com/silverstripe/silverstripe-translatable/issues/66
2012-11-09 10:13:01 +01:00
Sam Minnee
1f7fc1f76a FIX Remove instances of lines longer than 120c
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit.  This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Ingo Schommer
ec89832b93 Registering Te Reo support in i18n 2012-08-13 00:15:36 +02:00
Ingo Schommer
395580bdd6 BUG Locale-isolated i18n/Zend cache
In certain cases (e.g. with the mi_NZ locale),
the i18n system would regard a langage as already
loaded if it was restored from a cached, but empty
translation list (through Zend_Translate).
This was due to the cache key being generated
based solely on the content, rather than taking
other options like the locale into account.
2012-08-12 22:11:55 +02:00
Ingo Schommer
2bd9852ae9 Fixed spelling of "Maori" in lang selection 2012-07-16 11:21:05 +02:00
Ingo Schommer
712f28bc78 Scoped deprecation messages (fixes #7645) 2012-07-13 11:37:35 +02:00
Ingo Schommer
acfc658b4e BUGFIX Fail silently in _t() legacy mode when using sprintf(), to avoid outdated translations breaking with a fatal error (e.g. CMSMain.ACCESS changed from two to one usage of {title}, which isn't changed yet in most languages). Slight performance overhead, but acceptable since its legacy usage only 2012-06-04 11:40:55 +02:00
Sam Minnee
db79739023 BUGFIX: Fixed inconsistencies in en vs. en_US handling in i18n 2012-05-28 14:10:58 +12:00
Sean Harvey
77dbceee35 BUGFIX i18n::include_by_locale() doesn't include a fallback language, _t() instead will include the language if it's not available.
This fixes en_GB translations not being picked up. i18n::get_translators() will always have a fallback of "en" language without the
region, and "en_US" as the locale.
2012-05-23 11:48:37 +12:00
Ingo Schommer
431b9589b6 BUGFIX Fixed arguments in global _t() function, added check for $returnValue fallback that its not the injection array as second parameter 2012-05-01 22:17:01 +02:00
Ingo Schommer
e949b6f2b0 ENHANCEMENT Backwards compatible $priority parameter for i18n::_t(): Allow numeric arrays as parameters, as well as %s style replacements with a named parameter map (easier transition to new system with existing translation strings) 2012-05-01 22:17:00 +02:00
Ingo Schommer
98c2517b80 MINOR Fixed i18n:;get_owner_module(), broken by changed manifest returns (paths with leading slash) 2012-04-27 10:11:06 +02:00
Andrew O'Neil
a37370343e BUGFIX: Fix ?flush=1 not flushing en_US language 2012-04-23 14:51:12 +12:00
Ingo Schommer
a44916dc19 API CHANGE Don't use $tinymce_lang lookup in i18n::get_lang_from_locale(), as it mixes locales with langs and hence breaks language fallbacks in _t() (e.g. "pt_BR" returns "pt_br", rather than "pt") 2012-04-18 13:20:23 +02:00
Ingo Schommer
c2797f3ffa Merge pull request #342 from silverstripe-big-o/sapphire
---

This is the new _t syntax. All i18n unit tests pass.
2012-04-18 10:16:23 +02:00
Julian Seidenberg
7710cf59c7 MINOR: updating the documentation 2012-04-18 18:14:03 +12:00
Julian Seidenberg
0da62b9552 BUGFIX: fixing i18n _t function breaking out of when correct translation found 2012-04-18 17:35:32 +12:00
Julian Seidenberg
65e3651ff4 API-CHANGE: new translatable syntax _t function 2012-04-18 17:35:31 +12:00
Sam Minnee
5e5c5defa2 BUGFIX: Fixed inconsistency in common_languages reference to Portuguese (#4911) 2012-04-18 11:00:38 +12:00
Ingo Schommer
6e13512200 MINOR Fixed up some language mappings in i18n (slightly different locales exported from getlocalization.com) 2012-04-15 20:54:24 +02:00
Ingo Schommer
d3b63dae0c MINOR Allowing to flush translation cache through ?flush=1 2012-04-15 18:46:04 +02:00
Ingo Schommer
d57e864110 MINOR Fixed tests related to i18nLegacyAdapter changes 2012-04-15 18:46:02 +02:00
Ingo Schommer
fca2c205b7 API CHANGE Removed $priority arguments from _t(), use module priorities instead.
ENHANCEMENT Refactored i18nTextCollector collection logic alongside $priority removal, from regex to (slightly more maintainable) PHP tokenizer. Using var_export() for generating PHP, which auto-escapes strings more robustly.
ENHANCEMENT Refactored i18nTextCollector into pluggable writers (in preparation of new YML output format)
2012-04-15 17:17:17 +02:00
Ingo Schommer
d44f6b3e1f MINOR Removed deprecated usage of $priority argument in _t() calls 2012-04-15 17:17:17 +02:00
Ingo Schommer
3002598a5e MINOR Hardcoding correct module priorities in i18n.php 2012-04-15 17:17:16 +02:00
Ingo Schommer
95cdbe9d2c MINOR Avoid duplicate var declaration in i18n::_t() 2012-04-15 17:17:16 +02:00
Ingo Schommer
27ec83ce40 MINOR i18n::_t() getter performance optimisation (saves 10% on default CMS execution!) 2012-04-15 17:17:16 +02:00
Ingo Schommer
03de6e5e5f MINOR Removed i18nSSLegacyTranslator from default setup for performance reasons, document how to re-apply it 2012-04-15 17:17:16 +02:00
Ingo Schommer
652f0ec007 MINOR Infinite cache 2012-04-15 17:17:16 +02:00
Ingo Schommer
796975f53b MINOR Don't set locale on adapter in i18n::_t() for performance reasons, we're passing it with each individual translate() call anyway 2012-04-15 17:17:16 +02:00
Ingo Schommer
190c758639 MINOR Reverting to use directory scanning rather than Zend_Translate() in i18n::get_existing_languages(), as the only way to determine this information from Zend is loading all locales (which is way too slow e.g. for loading a language drop down in the member profile) 2012-04-15 17:17:15 +02:00
Ingo Schommer
0e0e5dd07a BUGFIX Ensuring that every locale (and its lang part) are registered as languages in i18n::include_by_locale() to avoid expensive re-parsing on subsequent i18n::_t() calls to the same locale 2012-04-15 17:17:15 +02:00
Ingo Schommer
bd23a07bba API CHANGE Using Zend_Translate with YAML translation files, replacing the $lang global and PHP files in the /lang folders. 2012-04-15 17:17:15 +02:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Simon Welsh
3a6341a251 API-CHANGE sapphire folder can now be renamed. 2012-04-15 10:50:19 +12:00
Sam Minnee
767aef9794 BUGFIX: Don't call strpos() with an empty delimiter, mb_strpos() is more strict about this (#6751) 2012-03-24 11:14:20 +13:00
Simon Elvery
ac8a05f188 BUG FIX: Make sure the translation function doesn't try to include missing locale files over and over again. 2012-03-21 12:47:22 +10:00
Hamish Friedlander
374ed19406 API CHANGE: Change variable expose method in TemplateGlobalProvider and TemplateIteratorProvider to (a) not clash with each other and, (b) be less generic 2012-03-06 09:31:57 +13:00
Hamish Friedlander
fb246bdd08 APICHANGE: Rename getExposedVariables to match coding conventions 2012-03-06 09:31:56 +13:00
Hamish Friedlander
927dbbe717 API-CHANGE: Global template variables can now be called directly using SSViewer_DataPresenter instead of needing to inherit off ViewableData 2012-03-06 09:11:46 +13:00
Fred Condo
d370423825 Clean up trailing ?> per coding standard
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00
Ingo Schommer
9b29616710 API CHANGE Rearranged files in sapphire to reflect core dependencies more accurately, and have the tests/ folder mirror its folder structure 2011-03-31 09:56:21 +13:00