Commit Graph

24 Commits

Author SHA1 Message Date
Ingo Schommer
e8c8c9472a MINOR Don't add closing PHP tags in i18nTextCollector->writeMasterStringFile() (thanks Fred Condo)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115097 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-16 01:27:19 +00:00
Ingo Schommer
ab92919b27 ENHANCEMENT Allowing i18nTextCollector to discover entities in templates stored in themes/ directory (thanks nlou)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@113918 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-18 19:00:13 +00:00
Ingo Schommer
4f798d4d12 MINOR Removed duplicated code in i18nTextCollector, more defensive checks for get_owner_module() (from r104992)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112419 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 01:19:58 +00:00
Ingo Schommer
abb04b2ea4 BUGFIX Fixed newlines working properly across different platforms - Windows, for example, won't work properly with just \n so use PHP_EOL for a cross-platform solution
MINOR Fixed appropriate failing tests to use PHP_EOL (from r92220)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92460 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 01:43:54 +00:00
Tom Rix
94b0ab581e MINOR reverted changes to i18nTextCollector, and updated documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@91211 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-10 21:50:27 +00:00
Tom Rix
05261244b7 MINOR removed concurrent editing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@91198 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-10 21:14:08 +00:00
Sam Minnee
5a9ca7d682 BUGFIX: More fixes to i18n text collection with escaping of quotes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81420 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 02:37:01 +00:00
Sam Minnee
8ee9373807 ENHANCEMENT: Allow string concatenation in default text in _t() calls
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81409 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 01:02:43 +00:00
Sean Harvey
75ba6a1ab9 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77764 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 06:59:21 +00:00
Andrew O'Neil
635e2c3df6 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72453 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 03:44:11 +00:00
Andrew O'Neil
60f75c5ca4 Merged changes from 2.3 branch
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71172 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-01 23:49:53 +00:00
Ingo Schommer
085346f0e0 MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69704 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-05 06:19:48 +00:00
Ingo Schommer
4f23d59636 git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65064 467b73ca-7a2a-4603-9d3b-597d59a354a9 2008-11-02 00:29:11 +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
4e567adec9 ENHANCEMENT Using eval() in textcollector to test for valid PHP syntax
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65054 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 19:05:16 +00:00
Ingo Schommer
cc9cf5be06 MINOR rearranged methods in i18nTextCollector
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65052 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 18:56:39 +00:00
Ingo Schommer
bfb7a0d863 BUGFIX Different class_implements() usage without instanciating the class in i18nTextCollector - not all classes are instanciatable without arguments. This raises the minimum requirement for text collection to PHP 5.1+
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65030 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 14:49:37 +00:00
Ingo Schommer
4ecb895b0a ENHANCEMENT Added i18nEntityProvider interface (see comments in #1625) incl. unit tests
MINOR documentation for i18nTextCollector

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65022 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-01 13:26:08 +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
a86e42e5ed MINOR Temporarily disabled Debug::message() calls in i18nTextCollector as they're disturbing unit test output and we currently dont have context switches for this
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64560 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-20 12:39:49 +00:00
Ingo Schommer
69d370dfd7 MINOR Adjusted i18nTextCollector to use DataObject->i18nCollectStatics()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64559 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-20 12:38:29 +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
Ingo Schommer
5f70af6d38 ENHANCEMENT Moving i18n->textcollector() and related methods to new class i18nTextCollector and i18nTextCollectorTask - enabling running textcollector through CLI, refactored to instance methods for better testability
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64447 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 20:42:41 +00:00