diff --git a/dev/install/install.php5 b/dev/install/install.php5
index 9ab3d6b01..eb1698ff0 100644
--- a/dev/install/install.php5
+++ b/dev/install/install.php5
@@ -94,7 +94,6 @@ $locales = array(
'it_IT' => 'Italian (Italy)',
'ja_JP' => 'Japanese (Japan)',
'km_KH' => 'Khmer (Cambodia)',
- 'lc_XX' => 'LOLCAT',
'lv_LV' => 'Latvian (Latvia)',
'lt_LT' => 'Lithuanian (Lithuania)',
'ms_MY' => 'Malay (Malaysia)',
@@ -1316,7 +1315,14 @@ TEXT;
+
+
+
+
+
+
+
diff --git a/docs/en/misc/contributing/translation.md b/docs/en/misc/contributing/translation.md
index 4ad8900e2..48c3fb92b 100644
--- a/docs/en/misc/contributing/translation.md
+++ b/docs/en/misc/contributing/translation.md
@@ -14,6 +14,11 @@ We provide a GUI for translations through [getlocalization.com](http://getlocali
For all modules listed there, we automatically import new master strings as they get committed to the various codebases, so you're always translating on the latest and greatest version.
+Since getlocalization doesn't allow you to download your own work,
+we've created a simple downloader for this purpose at [http://translate.silverstripe.org/download.php](http://translate.silverstripe.org/download.php)
+([sample download of de.yml](http://translate.silverstripe.org/download.php?project=silverstripe_cms&locale=de)).
+Requests count against our own API user on getlocalization.com, so please use the script responsibly.
+
## FAQ
### How do I translate a module not listed on getlocalization?
@@ -123,4 +128,4 @@ you have specific comments on a translation.
* [i18n](/topics/i18n): Developer-level documentation of Silverstripe's i18n capabilities
* [translation-process](../translation-process): Information about managing translations for the core team and/or module maintainers.
* [translatable](https://github.com/silverstripe/silverstripe-translatable): DataObject-interface powering the website-content translations
- * ["Translatable ModelAdmin" module](http://silverstripe.org/translatablemodeladmin-module/): An extension which allows translations of DataObjects inside ModelAdmin
\ No newline at end of file
+ * ["Translatable ModelAdmin" module](http://silverstripe.org/translatablemodeladmin-module/): An extension which allows translations of DataObjects inside ModelAdmin
diff --git a/docs/en/topics/form-validation.md b/docs/en/topics/form-validation.md
index ef84c3e0a..e4e5b57e2 100644
--- a/docs/en/topics/form-validation.md
+++ b/docs/en/topics/form-validation.md
@@ -25,7 +25,7 @@ when the form is submitted.
new RequiredFields(array('MyRequiredField'))
);
// Optional: Add a CSS class for custom styling
- $form->dataFieldByName('MyRequiredField)->addExtraClass('required');
+ $form->dataFieldByName('MyRequiredField')->addExtraClass('required');
return $form;
}
@@ -141,4 +141,4 @@ errors.
## Related
- * Model Validation with [api:DataObject->validate()]
\ No newline at end of file
+ * Model Validation with [api:DataObject->validate()]
diff --git a/forms/gridfield/GridFieldFilterHeader.php b/forms/gridfield/GridFieldFilterHeader.php
index 7e4f5f3e9..27650347d 100644
--- a/forms/gridfield/GridFieldFilterHeader.php
+++ b/forms/gridfield/GridFieldFilterHeader.php
@@ -92,13 +92,13 @@ class GridFieldFilterHeader implements GridField_HTMLProvider, GridField_DataMan
}
$filterArguments = $state->Columns->toArray();
- $dataListClone = null;
+ $dataListClone = clone($dataList);
foreach($filterArguments as $columnName => $value ) {
if($dataList->canFilterBy($columnName) && $value) {
- $dataListClone = $dataList->filter($columnName.':PartialMatch', $value);
+ $dataListClone = $dataListClone->filter($columnName.':PartialMatch', $value);
}
}
- return ($dataListClone) ? $dataListClone : $dataList;
+ return $dataListClone;
}
public function getHTMLFragments($gridField) {
diff --git a/i18n/i18nTextCollector.php b/i18n/i18nTextCollector.php
index 3af422154..cd61929c4 100644
--- a/i18n/i18nTextCollector.php
+++ b/i18n/i18nTextCollector.php
@@ -170,7 +170,7 @@ class i18nTextCollector extends Object {
$fileList = $this->getFilesRecursive("$this->basePath/$module/code");
} else if($module == FRAMEWORK_DIR || substr($module, 0, 7) == 'themes/') {
// framework doesn't have the usual module structure, so we'll scan all subfolders
- $fileList = $this->getFilesRecursive("$this->basePath/$module");
+ $fileList = $this->getFilesRecursive("$this->basePath/$module", null, null, '/\/(tests|dev)$/');
}
foreach($fileList as $filePath) {
// exclude ss-templates, they're scanned separately
@@ -183,8 +183,7 @@ class i18nTextCollector extends Object {
// Search for calls in template files if these exists
if(is_dir("$this->basePath/$module/")) {
- $dummy = array();
- $fileList = $this->getFilesRecursive("$this->basePath/$module/", $dummy, 'ss');
+ $fileList = $this->getFilesRecursive("$this->basePath/$module/", null, 'ss');
foreach($fileList as $index => $filePath) {
$content = file_get_contents($filePath);
// templates use their filename as a namespace
@@ -401,25 +400,30 @@ class i18nTextCollector extends Object {
* @param string $folder base directory to scan (will scan recursively)
* @param array $fileList Array to which potential files will be appended
* @param string $type Optional, "php" or "ss"
+ * @param string $folderExclude Regular expression matching folder names to exclude
* @return array $fileList An array of files
*/
- protected function getFilesRecursive($folder, &$fileList = null, $type = null) {
+ protected function getFilesRecursive($folder, $fileList = null, $type = null, $folderExclude = null) {
+ if(!$folderExclude) $folderExclude = '/\/(tests)$/';
if(!$fileList) $fileList = array();
$items = scandir($folder);
$isValidFolder = (
!in_array('_manifest_exclude', $items)
- && !preg_match('/\/tests$/', $folder)
+ && !preg_match($folderExclude, $folder)
);
if($items && $isValidFolder) foreach($items as $item) {
if(substr($item,0,1) == '.') continue;
if(substr($item,-4) == '.php' && (!$type || $type == 'php')) {
$fileList[substr($item,0,-4)] = "$folder/$item";
- }
- else if(substr($item,-3) == '.ss' && (!$type || $type == 'ss')) {
+ } else if(substr($item,-3) == '.ss' && (!$type || $type == 'ss')) {
$fileList[$item] = "$folder/$item";
+ } else if(is_dir("$folder/$item")) {
+ $fileList = array_merge(
+ $fileList,
+ $this->getFilesRecursive("$folder/$item", $fileList, $type, $folderExclude)
+ );
}
- else if(is_dir("$folder/$item")) $this->getFilesRecursive("$folder/$item", $fileList, $type);
}
return $fileList;
}
diff --git a/javascript/DateField.js b/javascript/DateField.js
index ed1df3f95..13d901d54 100644
--- a/javascript/DateField.js
+++ b/javascript/DateField.js
@@ -26,11 +26,11 @@
}
});
- $('.field.date input.text,.fieldholder-small input.text.date').live('click', function() {
+ $(document).on("click", "field.date input.text,.fieldholder-small input.text.date", function() {
$(this).ssDatepicker();
if($(this).data('datepicker')) {
$(this).datepicker('show');
}
});
-}(jQuery));
\ No newline at end of file
+}(jQuery));
diff --git a/javascript/HtmlEditorField.js b/javascript/HtmlEditorField.js
index e8e361f8f..38269ac38 100644
--- a/javascript/HtmlEditorField.js
+++ b/javascript/HtmlEditorField.js
@@ -488,7 +488,8 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
/* NOP */
},
resetFields: function() {
- /* NOP */
+ // Flush the tree drop down fields, as their content might get changed in other parts of the CMS, ie in Files and images
+ this.find('.tree-holder').empty();
}
});
diff --git a/lang/lc_XX.yml b/lang/lc_XX.yml
deleted file mode 100644
index b4d7793ae..000000000
--- a/lang/lc_XX.yml
+++ /dev/null
@@ -1,134 +0,0 @@
-lc_XX:
- BasicAuth:
- ENTERINFO: "PLZ ENTR UR USERNAYM N A PASWORD."
- ERRORNOTADMIN: "DAT USR IZ NOT AN ADMINISTRATOR."
- ERRORNOTREC: "DAT USERNAYM / PASWORD ISNT RECOGNISD SUZ 2 HEAR"
- ChangePasswordEmail.ss:
- CHANGEPASSWORDTEXT1: "U CHANGD UR PASWORD 4"
- CHANGEPASSWORDTEXT2: "U CAN NAO USE TEH FOLLOWIN CREDENSHALS 2 LOG IN:"
- HELLO: "OHI! HOWRU2DAI?"
- ComplexTableField.ss:
- ADDITEM: "ADD"
- SORTASC: "SORT ASCENDIN"
- SORTDESC: "SORT DESCENDIN"
- ComplexTableField_popup.ss:
- NEXT: "NEXT (GOGOGO)"
- PREVIOUS: "PREVIOUZ"
- Date:
- DAY: "DAI"
- DAYS: "DAIZ"
- HOUR: "HOUR"
- HOURS: "HOURZ"
- MIN: "MIN"
- MINS: "MINZ"
- MONTH: "MONTH"
- MONTHS: "MONTHX"
- SEC: "SEC"
- SECS: "SECZ"
- YEAR: "YEAR"
- YEARS: "YEARZ"
- DateField:
- DropdownField:
- CHOOSE: "(pik)"
- EmailField:
- VALIDATION: "PLZ ENTR AN EMAIL ADDRES."
- ForgotPasswordEmail.ss:
- HELLO: "OHI! HOWRU2DAI?"
- Form:
- FIELDISREQUIRED: "%s IS REQUIRED"
- VALIDATIONCREDITNUMBER: "PLZ ENSURE U HAS ENTERD TEH %s CREDIT CARD NUMBR RITE CUZ WE NEED UR MONEY RITE NOW."
- VALIDATIONFAILED: "VALIDASHUN FAILD1!!1!!!!!!1 WAT NOW?"
- VALIDATIONNOTUNIQUE: "TEH VALUE ENTERD R NOT UNIQUE"
- VALIDATIONPASSWORDSDONTMATCH: "SRY BOSS, PASWORDZ DOAN MATCH"
- VALIDATIONPASSWORDSNOTEMPTY: "PASWORDZ CANT BE EMPTY DOOD"
- VALIDATIONSTRONGPASSWORD: "PASWORDZ MUST HAS AT LEAST WAN DIGIT AN WAN ALFANUMERIC CHARACTR."
- VALIDCURRENCY: "PLZ ENTR VALID CURRENCY. CUD U?"
- HtmlEditorField:
- BUTTONINSERTLINK: "INSERT LINK"
- BUTTONREMOVELINK: "REMOOV LINK"
- CSSCLASS: "ALIGNMENT / STYLE"
- CSSCLASSCENTER: "SENTERD, ON ITZ OWN."
- CSSCLASSLEFT: "ON TEH LEFT, WIF TEXT WRAPPIN AROUND."
- CSSCLASSRIGHT: "ON TEH RITE, WIF TEXT WRAPPIN AROUND."
- EMAIL: "EMAIL ADDRESZ"
- FILE: "FIEL"
- FOLDER: "TEH FOLDER"
- IMAGE: "INSERT PIKSHUR"
- IMAGEDIMENSIONS: "DIMENSHUNZ"
- IMAGEHEIGHTPX: "HEIGHT"
- IMAGEWIDTHPX: "WIDTH"
- LINK: "INSERT/EDIT LINK 4 HIGHLIGHTD TEXT"
- LINKDESCR: "LINK DESCRIPSHUN"
- LINKEMAIL: "EMAIL ADDRESZ"
- LINKEXTERNAL: "ANODER WEBSIET"
- LINKFILE: "DOWNLOAD FIEL"
- LINKINTERNAL: "PAEG ON DIS SIET"
- LINKOPENNEWWIN: "OPEN LINK IN NEW WINDOW?"
- LINKTO: "LINK 2"
- PAGE: "PAEG"
- URL: "URL N STUFF"
- Image_iframe.ss:
- TITLE: "PIKSHUR UPLOADIN IFRAME"
- Member:
- ADDRESS: "ADDRESZ"
- BUTTONCHANGEPASSWORD: "CHANGE PASWORD"
- BUTTONLOGIN: "LOG IN"
- BUTTONLOGINOTHER: "LOG IN AS SOMEONE ELSE"
- BUTTONLOSTPASSWORD: "I HAS LOST MAH PASWORD"
- CONFIRMNEWPASSWORD: "CUD U CONFIRM NEW PASWORD PLZ"
- CONFIRMPASSWORD: "CONFIRM PASWORD"
- CONTACTINFO: "SUM CONTACT STUFF"
- EMAIL: "EMAIL"
- EMAILSIGNUPINTRO1: "TEH LOLCAT SEZ OMG BIGTHX 2 U N U R A NEW MEMBR 4 NOW N UR DETAILZ R LISTD BELOW FOR THAT IF U WANTZ THEM IN SUM TIME"
- EMAILSIGNUPINTRO2: "U CAN LOGIN TO TEH WEBSITE USINS TEH CREDENTIALZ LISTED BELOW"
- EMAILSIGNUPSUBJECT: "TEH LOLCAT TANX U 4 SIGNINS UP"
- ERRORNEWPASSWORD: "UR HAS ENTERD UR NEW PASWORD DIFFERENTLY, PLZ TRY AGAIN, K?"
- ERRORPASSWORDNOTMATCH: "UR CURRENT PASWORD DOEZ NOT MATCH, PLZ TRY AGAIN, K?"
- ERRORWRONGCRED: "DAT IS NOT SEEMZ 2 BE TEH RITE E-MAIL ADDRES OR PASWORD. PLZ TRY AGAIN, K?"
- FIRSTNAME: "FURST NAYM"
- GREETING: "WELKUM"
- INTERFACELANG: "INTRFACELANGUEEG"
- LOGGEDINAS: "URE LOGGD IN AS %s."
- MOBILE: "MOBAIL"
- NAME: "NAYM"
- NEWPASSWORD: "NEW PASWORD"
- PASSWORD: "PASWORD"
- PHONE: "FONE"
- REMEMBERME: "REMEMBR ME NEXT TIME, K?"
- SUBJECTPASSWORDCHANGED: "UR PASWORD HAS BEEN CHANGD"
- SUBJECTPASSWORDRESET: "YORE PASWORD RESET LINK"
- SURNAME: "SHURNAYM"
- VALIDATIONMEMBEREXISTS: "THAR ALREADY EXISTZ MEMBR WIF DIS EMAILZ"
- WELCOMEBACK: "WELCUM BACK, %s"
- YOUROLDPASSWORD: "UR OLD PASWORD"
- MemberAuthenticator:
- TITLE: "E-MAIL N PASWORD"
- NumericField:
- VALIDATION: "'%s' IZ NOT NUMBR, ONLY NUMBERS CAN BE ACCEPTD 4 DIS FIELD"
- PhoneNumberField:
- VALIDATION: "PLZ ENTR VALID FONE NUMBR WE WUNT DISTURB 2 MUCH JUS A BIT"
- Security:
- ALREADYLOGGEDIN: "U SHALL NOT PASS!! IF U HAS ANOTHR AKOWNT DAT CAN ACCES DAT PAEG, U CAN LOG IN BELOW."
- BUTTONSEND: "SEND ME TEH PASWORD RESETZ LINK"
- CHANGEPASSWORDBELOW: "U CAN CHANGE UR PASWORD BELOW"
- CHANGEPASSWORDHEADER: "CHANGE UR PASWORD"
- ENTERNEWPASSWORD: "PLEEZ ENTR NEW PASSWORD. KTHX."
- ERRORPASSWORDPERMISSION: "U MUST BE LOGGD IN IN ORDR 2 CHANGE UR PASWORD!"
- LOGGEDOUT: "U HAS BEEN LOGGD OUT. IF U WUD LIEK 2 LOG IN AGAIN, ENTR UR CREDENTIALS BELOW."
- NOTEPAGESECURED: "TEH PAGE IZ SECURD. ENTR UR CREDENSHALS BELOW AN WE WILL SEND U RITE ALONG."
- NOTERESETPASSWORD: "ENTR UR E-MAIL ADDRES AN WE R GONA SEND U LINK WIF WHICH U CAN RESET UR PASWORD"
- PASSWORDSENTHEADER: "I R SENT TEH PASWORD RESET LINK TO '%s'"
- PASSWORDSENTTEXT: "THXALOT! I R SENT TEH PASWORD RESET LINK TO '%s'"
- SimpleImageField:
- NOUPLOAD: "DEREZ NO PIKSHUR UPLOADED"
- SiteTree:
- TABMAIN: "MAIN"
- TableField:
- ISREQUIRED: "IN %s '%s' IS KINDA REQUIRED"
- TableField.ss:
- ToggleCompositeField.ss:
- HIDE: "HAYD"
- SHOW: "SHOW"
- ToggleField:
- LESS: "lesz"
- MORE: "mur"
diff --git a/model/DataQuery.php b/model/DataQuery.php
index 65460bd95..b32a50cac 100644
--- a/model/DataQuery.php
+++ b/model/DataQuery.php
@@ -282,12 +282,12 @@ class DataQuery {
} else {
$qualCol = "\"$parts[0]\"";
}
-
- // remove original sort
- unset($orderby[$k]);
- // add new columns sort
- $orderby[$qualCol] = $dir;
-
+
+ // remove original sort
+ unset($orderby[$k]);
+ // add new columns sort
+ $orderby[$qualCol] = $dir;
+
// To-do: Remove this if block once SQLQuery::$select has been refactored to store getSelect()
// format internally; then this check can be part of selectField()
$selects = $query->getSelect();
diff --git a/model/Versioned.php b/model/Versioned.php
index e816f2d08..88f4a20da 100644
--- a/model/Versioned.php
+++ b/model/Versioned.php
@@ -1244,7 +1244,7 @@ class Versioned_Version extends ViewableData {
else $component = $component->relation($relation);
} else {
$component = $component->$relation();
- }
+}
}
}
diff --git a/model/fieldtypes/Date.php b/model/fieldtypes/Date.php
index 6357d2011..f9cb4c3f1 100644
--- a/model/fieldtypes/Date.php
+++ b/model/fieldtypes/Date.php
@@ -148,8 +148,7 @@ class Date extends DBField {
*/
public function FormatI18N($formattingString) {
if($this->value) {
- $fecfrm = strftime($formattingString, strtotime($this->value));
- return utf8_encode($fecfrm);
+ return strftime($formattingString, strtotime($this->value));
}
}
diff --git a/model/fieldtypes/HTMLText.php b/model/fieldtypes/HTMLText.php
index ec041dfc0..3f2e96554 100644
--- a/model/fieldtypes/HTMLText.php
+++ b/model/fieldtypes/HTMLText.php
@@ -163,7 +163,7 @@ class HTMLText extends Text {
}
// If it's got a content tag
- if(preg_match('/<(img|embed|object|iframe)[^>]*>/i', $this->value)) {
+ if(preg_match('/<(img|embed|object|iframe|meta|source)[^>]*>/i', $this->value)) {
return true;
}
diff --git a/tests/control/DirectorTest.php b/tests/control/DirectorTest.php
index bffe804c6..d3d4b5164 100644
--- a/tests/control/DirectorTest.php
+++ b/tests/control/DirectorTest.php
@@ -243,7 +243,7 @@ class DirectorTest extends SapphireTest {
}
public function testForceSSLAlternateDomain() {
- Director::setBaseURL('/');
+ Config::inst()->update('Director', 'alternate_base_url', '/');
$_SERVER['REQUEST_URI'] = Director::baseURL() . 'admin';
$output = Director::forceSSL(array('/^admin/'), 'secure.mysite.com');
$this->assertEquals($output, 'https://secure.mysite.com/admin');
diff --git a/tests/forms/RequirementsTest.php b/tests/forms/RequirementsTest.php
index e264e85a3..003728455 100644
--- a/tests/forms/RequirementsTest.php
+++ b/tests/forms/RequirementsTest.php
@@ -254,7 +254,7 @@ class RequirementsTest extends SapphireTest {
$backend->delete_combined_files('RequirementsTest_bc.js');
$html = $backend->includeInHTML(false, self::$html_template);
-
+
/* Javascript has correct path */
$this->assertTrue((bool)preg_match('/src=".*\/RequirementsTest_a\.js\?m=\d\d+&test=1&test=2&test=3/', $html),
'javascript has correct path');