Skip to content
This repository
Browse code

Updating path handling inside i18n. Removes the extra DS that was app…

…ended to some paths. Fixes #126
  • Loading branch information...
commit 5f49a0f25c67df77bea7728a67e3a76679c76e15 1 parent dc220bb
Mark Story authored September 30, 2009
9  cake/libs/i18n.php
@@ -263,7 +263,7 @@ function __bindTextDomain($domain) {
263 263
 				$plugin = Inflector::underscore($plugin);
264 264
 				if ($plugin === $domain) {
265 265
 					foreach ($pluginPaths as $pluginPath) {
266  
-						$searchPaths[] = $pluginPath . DS . $plugin . DS . 'locale';
  266
+						$searchPaths[] = $pluginPath . $plugin . DS . 'locale' . DS;
267 267
 					}
268 268
 					$searchPaths = array_reverse($searchPaths);
269 269
 					break;
@@ -271,12 +271,15 @@ function __bindTextDomain($domain) {
271 271
 			}
272 272
 		}
273 273
 
  274
+
274 275
 		foreach ($searchPaths as $directory) {
  276
+
275 277
 			foreach ($this->l10n->languagePath as $lang) {
276  
-				$file = $directory . DS . $lang . DS . $this->category . DS . $domain;
  278
+				$file = $directory . $lang . DS . $this->category . DS . $domain;
277 279
 
278 280
 				if ($core) {
279  
-					$app = $directory . DS . $lang . DS . $this->category . DS . 'core';
  281
+					$app = $directory . $lang . DS . $this->category . DS . 'core';
  282
+
280 283
 					if (file_exists($fn = "$app.mo")) {
281 284
 						$this->__loadMo($fn, $domain);
282 285
 						$this->__noLocale = false;
4  cake/tests/cases/libs/i18n.test.php
@@ -43,10 +43,10 @@ function setUp() {
43 43
 		Configure::write('__objects', array());
44 44
 
45 45
 		$this->_localePaths = Configure::read('localePaths');
46  
-		Configure::write('localePaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale'));
  46
+		Configure::write('localePaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS));
47 47
 
48 48
 		$this->_pluginPaths = Configure::read('pluginPaths');
49  
-		Configure::write('pluginPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins'));
  49
+		Configure::write('pluginPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS));
50 50
 
51 51
 	}
52 52
 /**

0 notes on commit 5f49a0f

Please sign in to comment.
Something went wrong with that request. Please try again.