Commit Graph

51 Commits

Author SHA1 Message Date
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
c4cdc9ce87 ENHANCEMENT Made _t() global function in Core.php an alias for the new i18n::_t() method
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64493 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-17 15:40:59 +00:00
Sam Minnee
6fe79bc1c6 BUGFIX: Fix issue with language files not being included
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64471 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 23:39:19 +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
Ingo Schommer
ec591fc1fe MINOR Documentation in i18n class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64079 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 17:36:31 +00:00
Ingo Schommer
17ba4ded80 ENHANCEMENT Replaced hardcoded "en_US" references in i18n class with $default_locale
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 16:13:56 +00:00
Ingo Schommer
69dab4f551 MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63568 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-03 00:47:35 +00:00
Ingo Schommer
cb2919f56d ENHANCEMENT Added Maori to i18n::$common_languages
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60645 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-13 22:09:06 +00:00
Ingo Schommer
60860cc1b9 MINOR Unified @package PHPdoc (added where missing, removed duplicates)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@56212 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-06-15 13:33:53 +00:00
Ingo Schommer
74cef69ae1 BUGFIX fixed php notice
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52178 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-04-06 03:31:11 +00:00
Sam Minnee
3d83f43eff Fixed i18n bug on safe mode
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@51503 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-03-20 03:00:49 +00:00
Ingo Schommer
ed520fe9df fixed PHP notices
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50831 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-03-11 00:39:44 +00:00
Matt Peel
7d13ba7fb8 Reverted geoffm's accidental commit to /open
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50107 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-25 02:10:37 +00:00
Geoff Munn
bf3c09bec6 First post
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50105 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-25 01:06:39 +00:00
Sam Minnee
4c8e1b8b39 fixed i18n::get_owner_module() calls on classes with _s
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@49141 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-06 23:06:02 +00:00
Sam Minnee
ebc50a85c7 rbarreiros: 019 - Lost Locale when translatable string not found
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47850 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-10 22:33:18 +00:00
Andrew O'Neil
e72c08d986 Don't fail in i18n::include_by_class if the module isn't translatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47847 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-10 21:48:03 +00:00
Sam Minnee
2619c6fac1 Error checking in i18n::include_by_class shouldn't complain if mysite/lang doesn't exist - only if a module doesn't have internationalisation options.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47834 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-10 03:34:46 +00:00
Ingo Schommer
f2d38ee016 added lc_XX locale for LOLCAT
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47806 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-10 01:34:56 +00:00
Sam Minnee
b1d2e3906b API Documentation updates
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47766 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-09 04:18:36 +00:00
Sam Minnee
d27937f448 Updated API documentation package tags
Fixed some whitespace

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47725 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-08 06:37:50 +00:00
Ingo Schommer
817f7604c6 #2069 Locale file /lang/en_US.php should exist (Windows)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47580 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-03 00:38:30 +00:00
Ingo Schommer
0ef3c8441b added esperanto locale
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47365 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-12-19 21:15:18 +00:00
Ingo Schommer
0bf681d99c fixed spelling of language
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46481 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-12-08 00:58:09 +00:00
Ingo Schommer
f46b875dba member profile: sorting by title
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46480 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-12-08 00:16:08 +00:00
Ingo Schommer
cf1dbb8014 formatting for CLI
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44598 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-11-11 22:44:40 +00:00
Ingo Schommer
a3793afb22 formatting for CLI
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44597 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-11-11 22:43:30 +00:00
Ingo Schommer
dd71c53a4d allowing textcollector for non-admins in CLI-mode (needed for auto-updating)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44574 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-11-11 02:54:36 +00:00
Ingo Schommer
3e36baa6d8 FEATURE Using consistent umask static Filesystem::$folder_create_mask for mkdir()-calls
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43870 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-25 23:07:24 +00:00
Ingo Schommer
a68a8e5c39 BUGFIX filepath-security in textcollector()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43840 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-25 02:36:27 +00:00
Ingo Schommer
d85bf0b73e BUGFIX fixed visibility on i18n::default_locale()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43758 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-24 00:29:49 +00:00
Ingo Schommer
a645869bc3 ENHANCEMENT More robust path-extraction of module-names
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43692 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-23 01:56:03 +00:00
Ingo Schommer
ac60800802 #1510 GSOC #133 (i18n::enable instead of Translatable::enable)
(merged patch from bfojcapell)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43663 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-22 01:58:43 +00:00
Ingo Schommer
57c8e06435 #1476 Patch for ticket #128 and a few other changes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43662 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-22 01:51:02 +00:00
Ingo Schommer
3a7727d853 BUGFIX include_by_class() now detects modules with non-standard paths (e.g. /sapphire/security/Member.php)
ENHANCEMENT Added documentation

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43658 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-21 19:31:30 +00:00
Ingo Schommer
bbe86015d7 ENHANCEMENT Added proxy-functions for Translatable to provide a consistent interface for developers
ENHANCEMENT Explicit attribute-visibility
ENHANCEMENT Empty $current_locale by default, get_locale() falls back to $default_locale (avoid duplication)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43657 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-21 00:50:31 +00:00
Ingo Schommer
ac8950e696 ENHANCEMENT replacing static references with "self::"
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43655 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-21 00:39:14 +00:00
Ingo Schommer
af68f3f298 FEATURE Sapphire files are now also scanned for _t calls
ENHANCEMENT Revised locale list
ENHANCEMENT Updated en_US generated files (and created for sapphire)
BUGFIX Fixed some _t() calls in the cms module

(merged from patch #1476 by bfojcapell)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43654 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-20 23:49:14 +00:00
Andrew O'Neil
a0563eaba4 GSOC #99
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43204 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-10-08 21:55:15 +00:00
Ingo Schommer
77cebb3352 added get_existing_translations(), adapted to coding conventions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42725 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-27 20:47:16 +00:00
Ingo Schommer
eb45e6ec6d added $default_locale and get_translatable_modules()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42578 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-25 22:14:48 +00:00
Ingo Schommer
ff9a292d51 Added the correct English name of some rare languages (merged from branches/gsoc)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42575 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-25 21:57:23 +00:00
Ingo Schommer
a0723f23f9 Use the standard _manifest_exclude rather than a specific solution (merged from branches/gsoc)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42574 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-25 21:56:45 +00:00
Ingo Schommer
852d09d5f3 fixed wrong usage of type-casting which caused apache to segfault
changed die() to user_error()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42162 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-16 20:54:31 +00:00
Ingo Schommer
8038a60842 bfojcapell: Removed unused function
(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42145 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-16 16:56:28 +00:00
Ingo Schommer
54b5eee2cf bfojcapell: Changes include:
-Lists of locales and languages (added) 
-Text_collector renamed to textcollector (coding conventions) 
-Elijah's patch for ticket #71 
-New functions to simplify interaction with language lists 
-Removelang functionality to completely delete an existing language in sitetree 
(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42120 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-16 16:16:58 +00:00
Ingo Schommer
408c8d63d5 bfojcapell: better i18n support and more flexibility allowed in templates. Also fixed some possible warnings in 2.02rc1 if more than one language file is found with the same name. ManifestBuilder? now skips language files - they cannot be autoloaded and they are already loaded on demand, so no need to be in the manifest
(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41913 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-15 20:06:42 +00:00
Ingo Schommer
0872f87358 bfojcapell: Renaming of functions and new function prototype of the translator function
(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41835 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-15 00:21:51 +00:00
Ingo Schommer
e25d8bab65 bfojcapell: Added i18n api comments
(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41832 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-15 00:17:37 +00:00
Ingo Schommer
7e9623f4ac bfojcapell: Added security check, only admins can use text collector
(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41830 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-09-15 00:16:41 +00:00