Commit Graph

77 Commits

Author SHA1 Message Date
Ingo Schommer
c11b3918fc Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	admin/css/screen.css
	admin/scss/_style.scss
	core/PaginatedList.php
	email/Mailer.php
2013-01-21 11:14:57 +01:00
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
8ec3641e60 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	admin/javascript/LeftAndMain.FieldHelp.js
	lang/en.yml
	model/URLSegmentFilter.php
2012-12-21 15:04:17 +01: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
Ingo Schommer
d918c26782 Allow recursive includes in i18nTextCollector (fixes #8133) 2012-12-20 12:46:57 +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
c55c7c33f8 Merge branch '3.0'
Conflicts:
	admin/code/CMSProfileController.php
	composer.json
	tests/model/DataObjectTest.php
2012-11-22 23:51:28 +01:00
Sean Harvey
f41650c64f Remove deprecated i18n::include_locale_file()
Use Zend_Translate instead.
2012-11-15 14:43:16 +13: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
Damian Mooyman
0d7816b55d BUG Fixed issue with Deprecation failing to extract the module from a stacktrace, especially on non-unix systems
API Added Convert::nl2os function to normalise end of line characters across systems with tests
BUG Fixed i18n unit tests in non-unix systems constantly failing
BUG Fixed problems with HTMLCleaner tests failing in non-unix systems
2012-10-17 11:57:16 +13: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
ec17d368be BUG Fix PHPUnit autoloading problems in text collector 2012-08-09 12:47:12 +02:00
Ingo Schommer
186d95c84b Argument optional in collectFromEntityProviders() 2012-08-09 10:59:15 +02:00
Ingo Schommer
9b15bac8f3 Parameter omission in i18nTextCollector 2012-08-06 14:17:43 +02:00
Ingo Schommer
1db830771d BUG Class autoloading in i18nTextCollector
The collector didn't find classes marked as entity providers
unless they were already loaded as a sideeffect of the preceding
execution path. Since we want to introspect the whole codebase,
autoloading is mandatory here.
2012-08-06 14:02:47 +02:00
Hamish Friedlander
b25b45aab4 BUG Fix i18nTextCollector restriction to specific modules
i18nTextCollector takes an argument to restrict text collection to specific modules.
This used to restrict by limiting the modules scanned by the text collector. But
modules can actually provide translations for other modules (see for e.g.
CMSMenu#provideI18nEntities)

This patch changes the text collector to scan all modules, and then apply the restriction
to the output
2012-07-25 11:39:39 +12:00
Ingo Schommer
498a3fdf49 BUG Fixed i18n text collection in templates
- Non-greedy regex matching to collect more than
one entity per template...
- Regex failed to collect sprintf() properly
2012-07-18 14:58:53 +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
3a7128d00c MINOR Fixed phpdocs 2012-06-20 23:59:16 +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
Russell Michell
88a222fff3 MINOR: Updated inline phpdoc while investigating trac/4113 2012-05-18 18:00:03 +12:00
Ingo Schommer
f7e19ca680 BUGFIX i18nTextCollector finds templates recursively, not only in <module>/templates folder. Added master language entities which were previously overlooked due to this bug. 2012-05-03 17:45:25 +02: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
0597e914ff MINOR Don't fail text collection for modules without any matching PHP files (only _config.php) 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
f47cf33d71 MINOR Fixed i18nTextCollector module disambiguation, was looking at wrong array key (shifted one due to removed priority setting) 2012-04-27 10:11:38 +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
Ingo Schommer
f8719e56a1 Merge pull request #337 from sminnee/fix-4911
BUGFIX: Fixed inconsistency in common_languages reference to Portuguese ...
2012-04-18 00:36:14 -07:00
Julian Seidenberg
7710cf59c7 MINOR: updating the documentation 2012-04-18 18:14:03 +12:00
Julian Seidenberg
90ae0ed18d BUGFIX: reverting back to Ingo's text collector from code, but using the parser to get from templates. Adding special case for _t functions in code that have an array in them. Fixing unit tests for all this. 2012-04-18 17:35:32 +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
Julian Seidenberg
c314d0b659 API-CHANGE: i18nTextCollector can now extract the new translatable entities (<%t) from templates and populate them in language tables (uses PEG parser) 2012-04-18 17:35:30 +12:00
Andrew O'Neil
fb3b03f38b MINOR: Remove support for PHP <5.3.2 2012-04-18 11:01:03 +12:00
Sam Minnee
5e5c5defa2 BUGFIX: Fixed inconsistency in common_languages reference to Portuguese (#4911) 2012-04-18 11:00:38 +12:00
Sam Minnee
cc7a012139 BUGFIX: Use the copy of symfony-yaml bundled with Zend_Translate to prevent class conflicts. Remove now-unnecessary symonfy-yaml thirdparty lib. 2012-04-18 09:34:57 +12:00
Ingo Schommer
7ce1572d38 MINOR Stability fixes on new tokenizer implementation of i18nTextCollector, allowing to specify writer and locale arguments on task execution 2012-04-16 12:25:49 +02:00
Sean Harvey
6ca7294c65 BUGFIX Fixed broken path, should be RailsYAML not RailsYaml 2012-04-16 14:04:41 +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