Commit graph

79 commits

Author SHA1 Message Date
DarkAngelBGE
e6e0d852a2 deleting cake folder from svn
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7061 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-30 10:59:16 +00:00
phpnut
10d555d5e2 "Adding additional tests for I18n class.
Removed unused code from the class.
Fixed use of invalid translations in a po file"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6907 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-17 06:05:08 +00:00
phpnut
638b06ff85 "Adding test coverage for I18n class.
Adding ability to change translations on the fly
	Example: Configure::write('Config.language', 'locale');
Same setting can be used to define you own locale
	Example: Configure::write('Config.language', 'somename');
Added ability to set additional directory paths for locale directory
	Example: Configure::write('Locale.path', DS . 'directory'. DS . 'locale');
Fixed merging of core translations, if present."

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6905 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-17 00:48:34 +00:00
phpnut
c9a6fa7f9f "Fixes #4420, i18n does not parse .mo files on 64bit Mac"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6622 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-04-02 18:36:19 +00:00
phpnut
cb53dc61b0 "Closes #2897, Built-in file validation.
Implemented Validation::extension(); and Vaidation::range();
Updated copyright notices in all files"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6296 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-01-01 22:18:17 +00:00
phpnut
2a310b36e3 "Fixes #3729, I18n::_ _loadMo() magicDb recognition fails on 64bit systems (And some older versions of PHP5)"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6149 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-12-14 05:40:00 +00:00
phpnut
de8e7d8b01 "Closes #1854, Core.po not loaded when using /app/locale/..../default.po
Closes #3539
Fixes #3611, Cannot redeclare loadmodels
Fixes #3622, loadControllers() and loadModels() look in wrong folders for AppController resp. AppModel
Added trigger_error to all deprecated functions in basics.php
Refactored I18n class to remove debug_backtrace() usage in basics.php, all translations should be placed in a default.po or .mo file from this point forward.
_ _d() function should be used if domain specific translations are used.
Core translations can be placed in app/locales/{lang}/LC_MESSAGES/core.po or .mo these will now be merged with the specified language strings from default.po will replace the core message strings
All translations are now cached to improve performance.
"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6065 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-23 08:16:23 +00:00
phpnut
c000940e36 Closes #2119 Only define clone() in PHP4 when it hasn't been already defined.
Closes #2213, Support multiple plugin paths.
Closes #2234, filepaths to behavior classes should be cached in class.paths.php also
Closes #2345, ability to group components into subfolders
Closes #2645, Improvement to basic.php for class loading.
Fixes #3526, Cache::write, when using just the config name, it fails.
Fixes #3559, loading plugin model as assoc don't work.
Closes #3567 Controller Folders (Note this does not need routing to work, but controller names can not conflict with others in the same application so naming must still be unique)
Fixes #3579, email.php component: Parse error with php 4.

Adding new class and file importer.
Updated most of the core to use the importer.
Added ClassRegsitry::init() that will create and instance of an object and store it in the registry.
Deprecated most of the load functions in basics.php
Plugin model loading now forces using the dot notation, to use models within a plugin, all the model associations must be in the PluginName.Model syntax, if this is not used, the plugin will look for the models in the main app/models directory first, if not found then it will search the plugin directories recursively until it finds a model.
	var $belongsTo = array('SomeModel'); will look for some_model.php in the app/models
	var $belongsTo = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
	var $belongsTo = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php
	
The controllers of the plugin will still look for the default models inside the plugin if var $uses is not set:
	var $uses = array('SomeModel'); will look for some_model.php in the app/models
	var $uses = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
	var $uses = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php

All of the above will work between plugins and main app
These changes also allow placing model and controllers is sub directories
Removed old class.paths.php file generation 

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6001 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-16 09:35:19 +00:00
gwoo
6dc81ef856 updating i18n functions, fixes #3451
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5881 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-24 01:25:21 +00:00
mariano.iglesias
896f62544b Changing @return int to @return integer and @param bool to @param boolean
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5860 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 16:54:36 +00:00
phpnut
160cd28440 Correcting @return int
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5858 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 16:11:12 +00:00
phpnut
53b4a4b9f3 Improved performance when .mo is read in I18n::__loadMo()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5855 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 16:03:15 +00:00
mariano.iglesias
897825d596 Adding documentation to classes belonging to Cake console.
Standarizing on datatypes used in phpdocblocs and removing unneeded @return types

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5851 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 05:52:20 +00:00
phpnut
b584fe28c0 Fixes #3424, Scaffold add no longer working, produces "Invalid Id" error message
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5832 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-21 17:37:25 +00:00
phpnut
bd3e702d77 changed i18n schema to use only one db table for translations
changed fieldname 'row_id' to 'foreign_key'
now allows fallbacks for not-existing translations by setting model's locale to array of locales
model used for hasMany associations and for saving/deleting of translation records is configurable by Model::$translateModel property, db field 'i18n.field' is  configurable by property $displayField of this custom model, instance of this model is obtainable by $this->ModelName->translateModel()
Added tests for translate behavior.
Added i18n shell script
Correcting translation function calls in various files

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5669 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-09-18 04:16:04 +00:00
phpnut
dac1bd0913 Correcting code structure to standards
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5315 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-06-20 07:51:52 +00:00
phpnut
23dfd90b29 Correcting code structure to standards
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5313 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-06-20 06:15:35 +00:00
mariano.iglesias
d3af5f253b Adding comments to code
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5147 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-05-21 19:38:39 +00:00
phpnut
3b90fdbe2e Adding fix for Ticket #2235
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4657 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-03-23 09:09:28 +00:00
phpnut
a8a91e35be Correcting all headers in the files
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4407 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-02-02 10:39:45 +00:00
phpnut
8b79b227cc Fixing an error in I18n class that would sometimes show up when using Scaffolded methods
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4227 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-12-28 16:51:12 +00:00
phpnut
762e9ed90c Adding fix for I18n when $domain is specified using any of the _ _d*() functions
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4207 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-12-25 19:38:28 +00:00
phpnut
3eac55449e Adding function to basics.php to allow specifying a catalog to use for translation.
This should be used when LC_MESSAGES does not contain the translation strings.
Added doc comments to I18n and I10n classes.
Refactored I18n class

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4188 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-12-25 04:42:47 +00:00
phpnut
5e7db7d91a Adding check to I18n class for found language in the first pass of a translation method call. This speeds up the translations since the language detection in I10n class is not called on each string.
Added additional check for language in I10n::__setLanguage();

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4172 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-12-23 23:59:57 +00:00
phpnut
de3098855b Changing Session check in I18n class to use the same name as Configure::write().
Changed I10n class to attempt setting language based on DEFAULT_LANGUAGE if it is set and the auto detection of the HTTP_ACCEPT_LANGUAGE fails to find a match

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4171 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-12-23 23:35:59 +00:00
phpnut
d23de28349 Adding doc comments to translation functions in basics.php
Refactoring I18n class to use one locale directory for an application.
Translations will be located in app/locales/[LANGUAGE]/LC_MESSAGES/[CONTROLLER].mo or [CONTROLLER].po
If not found app/locales/[LANGUAGE]/LC_MESSAGES/default.mo or default.po
All core translations will be located in cake/locales/[LANGUAGE]/LC_MESSAGES/

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4122 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-12-22 20:04:15 +00:00
phpnut
90a78232ed Changed Configure::read() so it would return null if key is not set.
Refactored I18n and I10n classes.
Removing languages that are not found in browsers

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4117 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-12-21 22:05:42 +00:00
phpnut
78df4e3549 Cleaning up I10n and I18n classes
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4116 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-12-21 09:17:32 +00:00
phpnut
0801dce999 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3092 3807eeeb-6ff5-0310-8944-8be069107fe0 2006-06-14 19:06:14 +00:00