From 06864f2269c856788cbea6713aa2d6139ff3fdfa Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 8 Jul 2013 12:53:17 +0200 Subject: [PATCH 1/5] Transifex translation support --- .tx/config | 8 ++++++++ README.md | 16 +++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .tx/config diff --git a/.tx/config b/.tx/config new file mode 100644 index 0000000..3c25a77 --- /dev/null +++ b/.tx/config @@ -0,0 +1,8 @@ +[main] +host = https://www.transifex.com + +[silverstripe-dms.master] +file_filter = lang/.yml +source_file = lang/en.yml +source_lang = en +type = YML \ No newline at end of file diff --git a/README.md b/README.md index 931633c..36c053e 100644 --- a/README.md +++ b/README.md @@ -115,4 +115,18 @@ Note: Both operations copy the existing file. // Removing tags is abstracted as well $doc->removeTag('category', 'keyboard'); $doc->removeTag('category', 'input device'); - $doc->removeAllTags(); \ No newline at end of file + $doc->removeAllTags(); + +## Contributing + +### Translations + +Translations of the natural language strings are managed through a +third party translation interface, transifex.com. +Newly added strings will be periodically uploaded there for translation, +and any new translations will be merged back to the project source code. + +Please use [https://www.transifex.com/projects/p/silverstripe-dms/](https://www.transifex.com/projects/p/silverstripe-dms/) to contribute translations, +rather than sending pull requests with YAML files. + +See the ["i18n" topic](http://doc.silverstripe.org/framework/en/trunk/topics/i18n) on doc.silverstripe.org for more details. \ No newline at end of file From 57885d97bf51f2c1207df5a67138346ce3a2cc1e Mon Sep 17 00:00:00 2001 From: Stephen Shkardoon Date: Wed, 10 Jul 2013 15:06:02 +1200 Subject: [PATCH 2/5] Create 1.0 branch for 3.0.x compatability --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 22a0d4f..a81e350 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Adds a Document Management System to SilverStripe ", "type": "silverstripe-module", "keywords": ["silverstripe", "dms", "document", "document management system"], - "license": "BSD-3-Clause", + "license": "BSD-3-Clause", "authors": [ { "name": "Julian Seidenberg", @@ -12,7 +12,7 @@ ], "require": { - "silverstripe/framework": "3.*", - "silverstripe/cms": "3.*" + "silverstripe/framework": "3.0.*", + "silverstripe/cms": "3.0.*" } } From 88896712ffc2a962b8d7a71850ae78c0f64d29ac Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 7 Feb 2014 13:20:14 +1300 Subject: [PATCH 3/5] Only test against supported core releases --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 88df8fe..ac664dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,6 @@ php: env: - DB=MYSQL CORE_RELEASE=3.0 - - DB=MYSQL CORE_RELEASE=3.1 - - DB=PGSQL CORE_RELEASE=master matrix: include: @@ -20,4 +18,4 @@ before_script: - cd ~/builds/ss script: - - phpunit dms/tests/ \ No newline at end of file + - phpunit dms/tests/ From e862e02cf18810010a52b81333f1fff3f6e861ec Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 7 Feb 2014 13:28:04 +1300 Subject: [PATCH 4/5] Only test 5.4 on 3.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ac664dd..4e063e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ env: matrix: include: - php: 5.4 - env: DB=MYSQL CORE_RELEASE=master + env: DB=MYSQL CORE_RELEASE=3.0 before_script: - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support From ec0ecdda6df4edef3d63bbfa9cf7650c36cc12d0 Mon Sep 17 00:00:00 2001 From: Florian Thoma Date: Tue, 22 Jul 2014 13:07:57 +1000 Subject: [PATCH 5/5] fix front end sorting of documents fixes #44 for 1.0 branch --- code/DMSDocument.php | 2 +- code/DMSSiteTreeExtension.php | 4 ++-- templates/Includes/Documents.ss | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/DMSDocument.php b/code/DMSDocument.php index 35e3e32..0dedfaa 100755 --- a/code/DMSDocument.php +++ b/code/DMSDocument.php @@ -31,7 +31,7 @@ class DMSDocument extends DataObject implements DMSDocumentInterface { 'FilenameWithoutID'=>'Filename', 'LastChanged'=>'LastChanged' ); - + static $singular_name = 'Document'; static $plural_name = 'Documents'; diff --git a/code/DMSSiteTreeExtension.php b/code/DMSSiteTreeExtension.php index 237aba7..4398429 100644 --- a/code/DMSSiteTreeExtension.php +++ b/code/DMSSiteTreeExtension.php @@ -113,9 +113,9 @@ class DMSSiteTreeExtension extends DataExtension { } /** - * Overloaded to enforce sorting + * Enforce sorting for frontend */ - function Documents() { + function PageDocuments() { return $this->owner->getManyManyComponents('Documents')->sort('DocumentSort'); } diff --git a/templates/Includes/Documents.ss b/templates/Includes/Documents.ss index 06b2cae..17cf8da 100644 --- a/templates/Includes/Documents.ss +++ b/templates/Includes/Documents.ss @@ -1,4 +1,4 @@ -<% if Documents %> +<% if PageDocuments %>

Documents:

- <% loop Documents %><% include Document %><% end_loop %> + <% loop PageDocuments %><% include Document %><% end_loop %> <% end_if %> \ No newline at end of file