Commit Graph

13 Commits

Author SHA1 Message Date
Ingo Schommer
d26f08b481 MINOR merged branches/2.3 into trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@67465 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-12-04 22:38:32 +00:00
Andrew O'Neil
a6ea78a230 Change back to english on teardown
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65673 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-12 03:11:57 +00:00
Ingo Schommer
728e691a1a BUGFIX Added SSViwer support for i18n namespaces in templates with <% _t('MyNamespace.MyEntity', ... %>, to work around magically added namespaces from the parsed template file. Those auto-namespaces were logically not working in includes, as the parsing context is always the including template. Legacy support for auto-namespaces is still present due to its high usage.
ENHANCEMENT Added unit tests for i18n template parsing

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65361 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-06 02:50:14 +00:00
Ingo Schommer
eb4c950655 BUGFIX Reverted auto-detection of i18n statics like $db in DataObject through provideI18nEntities() - was getting too complicated with decorated properties. Overload DataObject->fieldLabels() or DataObjectDecorator->updateFieldLabels() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65071 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 20:01:49 +00:00
Ingo Schommer
5c4403d57e BUGFIX Dont instanciate abstract classes in i18nTextCollector
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65062 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 00:26:34 +00:00
Ingo Schommer
d102a902b9 BUGFIX Collecting i18n entities for decorators separately from the decorated classes, as decorated properties like $db have to be stored in the module of the decorated, not in the module of the decorated class.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65057 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 23:16:45 +00:00
Ingo Schommer
c9da559151 ENHANCEMENT More solid fulltext checks against master language tables in i18nTextCollectorTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65055 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 22:47:02 +00:00
Ingo Schommer
4f1d3913e1 ENHANCEMENT Added unit tests for i18nTextCollector handling of newlines in entity values
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65051 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 18:55:27 +00:00
Ingo Schommer
ff7a63cc37 MINOR Moved i18n tests into sapphire/tests/i18n subfolder
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65025 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 13:45:04 +00:00
Ingo Schommer
de7ed1aa3a BUGFIX Changed i18nTextCollectorTest to only trigger _t() calls in instance methods (they don't fully work in __construct()). Manually adding ClassInfo state for the fakewebroot needed to test textcollection - ManifestBuilder/ClassInfo currently don't support setting of other webroots, or flexible inclusion/exclusion of certain subfolders which would be necessary to do this without hacks.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65023 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 13:40:00 +00:00
Ingo Schommer
84db28eb10 FEATURE Collect i18n Entities from dynamic PHP code - useful to translate statics. Added DataObject->provideI18nEntities() and i18nTextCollector->collectFromEntityProviders(). See #1625
FEATURE Making DataObject attributes translatable through i18n class, e.g. $db and all relation statics. Use DataObject->fieldLabels() to access translated attributes.
ENHANCEMENT Ignoring entity-names with $ signs (most likely dynamic properties) in i18nTextCollector->collectFromCode()


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64881 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-29 21:07:17 +00:00
Ingo Schommer
12f2457677 BUGFIX Fixed distribution of textcollector files to modules (was collecting all entities into all modules before) - added unit tests
ENHANCEMENT Using ksort() in textcollector to get alphabetized language master files (=easier to compare and debug)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64494 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-17 17:44:14 +00:00
Ingo Schommer
874aaf1d27 ENHANCEMENT Refactored i18nTextCollector and added unit tests
FEATURE Support for i18n entity namespaces in templates

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64492 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-17 15:21:33 +00:00