Skip to content

Commit

Permalink
Merge pull request #6 from creative-commoners/pulls/2.0/convert-to-ss4
Browse files Browse the repository at this point in the history
Pulls/2.0/convert to ss4
  • Loading branch information
robbieaverill committed Dec 19, 2017
2 parents c84c437 + 786260a commit 54ac69d
Show file tree
Hide file tree
Showing 30 changed files with 483 additions and 333 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/.gitignore export-ignore
/.travis.yml export-ignore
/.scrutinizer.yml export-ignore
/codecov.yml export-ignore
Empty file added .gitignore
Empty file.
8 changes: 7 additions & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
inherit: true

build:
nodes:
analysis:
tests:
override: [php-scrutinizer-run]

checks:
php:
code_rating: true
duplication: true

filter:
paths: [code/*, tests/*]
paths: [src/*, tests/*]
39 changes: 21 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
# See https://github.com/silverstripe/silverstripe-travis-support for setup details

sudo: false

language: php

php:
- 5.4
- 5.5

env:
- DB=MYSQL CORE_RELEASE=3.4
global:
- COMPOSER_ROOT_VERSION=2.0.x-dev

matrix:
include:
- php: 5.6
env: DB=PGSQL CORE_RELEASE=3.5
env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1
- php: 7.0
env: DB=PGSQL CORE_RELEASE=3
env: DB=MYSQL PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL CORE_RELEASE=3.6
env: DB=PGSQL PHPUNIT_COVERAGE_TEST=1
- php: 7.2
env: DB=MYSQL PHPUNIT_TEST=1

before_script:
- composer self-update || true
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
- cd ~/builds/ss
- composer install
# Init PHP
- phpenv rehash
- phpenv config-rm xdebug.ini

# Install composer dependencies
- composer validate
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql 2.0.x-dev; fi
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile

script:
- vendor/bin/phpunit documentconverter/tests
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/ *.php; fi

after_success:
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi
6 changes: 6 additions & 0 deletions .upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mappings:
DocumentConverterDecorator: SilverStripe\DocumentConverter\ConvertsDocumentsExtension
DocumentImportField: SilverStripe\DocumentConverter\DocumentConversionField
DocumentImportIFrameField_Importer: SilverStripe\DocumentConverter\DocumentConverter
DocumentImportInnerField: SilverStripe\DocumentConverter\DocumentImporterField
DocumentConverterTest: SilverStripe\DocumentConverter\Tests\DocumentConverterTest
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
# SilverStripe Document Converter

[![Build Status](https://travis-ci.org/creative-commoners/silverstripe-documentconverter.svg?branch=master)](https://travis-ci.org/creative-commoners/silverstripe-documentconverter)
[![Build Status](http://img.shields.io/travis/silverstripe/silverstripe-documentconverter.svg?style=flat)](https://travis-ci.org/silverstripe/silverstripe-documentconverter)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/silverstripe/silverstripe-documentconverter/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-documentconverter/?branch=master)
[![codecov](https://codecov.io/gh/silverstripe/silverstripe-documentconverter/branch/master/graph/badge.svg)](https://codecov.io/gh/silverstripe/silverstripe-documentconverter)

See [docs/en/index.md](docs/en/index.md).
## Overview

[Changelog](CHANGELOG.md)
The module creates an RSS feed on each page with their change history, as well as one for the entire site.

## Requirements

* SilverStripe CMS ^4

**Note:** For a SilverStripe 3.x compatible version, please use [the 1.x release line](https://github.com/silverstripe/silverstripe-documentconverter/tree/1.0).

## Installation

Install with [composer](https://getcomposer.org/) by running `composer require silverstripe/documentconverter` in the root of your SilverStripe project.

## User Guide

For usage instructions see [user manual](docs/en/index.md).

### 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-documentconverter](https://www.transifex.com/projects/p/silverstripe-documentconverter) to contribute translations, rather than sending pull requests with YAML files.
15 changes: 0 additions & 15 deletions changelog.md

This file was deleted.

1 change: 1 addition & 0 deletions code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When having discussions about this module in issues or pull request please adhere to the [SilverStripe Community Code of Conduct](https://docs.silverstripe.org/en/contributing/code_of_conduct).
88 changes: 0 additions & 88 deletions code/DocumentImportField.php

This file was deleted.

1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
comment: false
39 changes: 25 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
{
"name": "silverstripe/documentconverter",
"description": "Imports OpenOffice-compatible files (doc, docx, etc) into SilverStripe pages and content.",
"type": "silverstripe-module",
"name": "silverstripe/documentconverter",
"description": "Imports OpenOffice-compatible files (doc, docx, etc) into SilverStripe pages and content.",
"type": "silverstripe-vendormodule",
"license": "BSD-3-Clause",
"keywords": [
"silverstripe",
"cwp"
],
"require": {
"silverstripe/cms": "^4",
"silverstripe/framework": "^4"
"keywords": ["silverstripe", "cwp"],
"require": {
"silverstripe/cms": "^4"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3.0"
},
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
"autoload": {
"psr-4": {
"SilverStripe\\DocumentConverter\\": "src/",
"SilverStripe\\DocumentConverter\\Tests\\": "tests/"
}
}
},
"extra": {
"expose": [
"javascript"
],
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
File renamed without changes.
8 changes: 4 additions & 4 deletions lang/ar.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ar:
DocumentConverter:
SilverStripe\DocumentConverter\DocumentConverter:
PROCESSFAILED: 'لم يتم التمكن من معالجة الوثيقة, من فضلك قم بمراجعة أنك قمت برفع الملف بصيغة .دى أو سى أو صيغة .دى أو سى إكس.'
SERVERUNREACHABLE: 'لم يتم التواصل مع سيرفر تحويل الوثائق. من فضلك حاول مرة أخرى لاحقا أو اتصل بمشرف النظام الخاص بك.'
DocumentConverterDecorator:
SilverStripe\DocumentConverter\ConvertsDocumentsExtension:
ImportTab: استيراد
DocumentImportField:
SilverStripe\DocumentConverter\DocumentConversionField:
ChooseFolder: 'اختر مجلد لحفظ هذا الملف'
EachH1: 'لكل عنوان واحد'
EachH2: 'لكل عنوان اثنين'
Expand All @@ -14,7 +14,7 @@ ar:
KeepSource: 'احتفظ بالملف الأصلي. وقم بإضافة رابط له في جدول المحتويات، إذا أمكن ذلك.'
SplitHeader: 'تقسيم المستند إلى صفحات'
publishPages: 'نشر الصفحات المُعدلة (لا يُوصى به إلا إذا كنت متأكد من ناتج التحويل)'
FileIFrameField:
SilverStripe\DocumentConverter\DocumentImporterField:
ATTACHONCESAVED2: 'يمكن إرفاق الملفات عند حفظ السجل للمرة الأولى.'
UploadField:
ATTACHFILE: 'إرفاق ملف'
Expand Down
4 changes: 2 additions & 2 deletions lang/de.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
de:
DocumentConverterDecorator:
SilverStripe\DocumentConverter\ConvertsDocumentsExtension:
ImportTab: Importieren
DocumentImportField:
SilverStripe\DocumentConverter\DocumentConversionField:
ChooseFolder: 'Wählen Sie einen Ordner zum Speichern dieser Datei aus'
EachH1: 'für jede Überschrift 1'
EachH2: 'für jede Überschrift 2'
Expand Down
8 changes: 4 additions & 4 deletions lang/en.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
en:
DocumentConverter:
SilverStripe\DocumentConverter\DocumentConverter:
PROCESSFAILED: 'Could not process document, please double-check you uploaded a .doc or .docx format.'
SERVERUNREACHABLE: 'Could not contact document conversion server. Please try again later or contact your system administrator.'
DocumentConverterDecorator:
SilverStripe\DocumentConverter\ConvertsDocumentsExtension:
ImportTab: Import
DocumentImportField:
SilverStripe\DocumentConverter\DocumentConversionField:
ChooseFolder: 'Choose a folder to save this file'
EachH1: 'for each heading 1'
EachH2: 'for each heading 2'
Expand All @@ -15,7 +15,7 @@ en:
'No': 'no'
SplitHeader: 'Split document into pages'
publishPages: 'Publish modified pages (not recommended unless you are sure about the conversion outcome)'
FileIFrameField:
SilverStripe\DocumentConverter\DocumentImporterField:
ATTACHONCESAVED2: 'Files can be attached once you have saved the record for the first time.'
UploadField:
ATTACHFILE: 'Attach a file'
Expand Down
8 changes: 4 additions & 4 deletions lang/eo.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
eo:
DocumentConverter:
SilverStripe\DocumentConverter\DocumentConverter:
PROCESSFAILED: 'Ne povis trakti dokumenton. Bonvole kontrolu ke vi alŝutis en formato .doc aŭ .docx.'
SERVERUNREACHABLE: 'Ne povis kontakti servilon por konverti dokumenton. Bonvole reprovu postiome aŭ kontaktu vian administranton.'
DocumentConverterDecorator:
SilverStripe\DocumentConverter\ConvertsDocumentsExtension:
ImportTab: Importi
DocumentImportField:
SilverStripe\DocumentConverter\DocumentConversionField:
ChooseFolder: 'Elektu dosierujon en kiu konservi la dosieron'
EachH1: 'por ĉiu titolo 1'
EachH2: 'por ĉiu titolo 2'
Expand All @@ -15,7 +15,7 @@ eo:
'No': ne
SplitHeader: 'Dividi dokumenton en paĝojn'
publishPages: 'Publikigi ŝanĝitajn paĝojn (ne rekomendinde krom se vi certas pri la rezulto de konverto)'
FileIFrameField:
SilverStripe\DocumentConverter\DocumentImporterField:
ATTACHONCESAVED2: 'Kiam vi unuafoje estos konservinta la rikordon vi povos alligi dosierojn.'
UploadField:
ATTACHFILE: 'Alligi dosieron'
Expand Down
6 changes: 3 additions & 3 deletions lang/fa_IR.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fa_IR:
DocumentConverterDecorator:
ImportTab: 'وارد کردن'
DocumentImportField:
SilverStripe\DocumentConverter\ConvertsDocumentsExtension:
ImportTab: وارد کردن
SilverStripe\DocumentConverter\DocumentConversionField:
ChooseFolder: 'یک پوشه برای ذخیره این فایل را انتخاب کنید'
UploadField:
ATTACHFILE: 'یک فایل ضمیمه کنید'
Expand Down
8 changes: 4 additions & 4 deletions lang/fi.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
fi:
DocumentConverter:
SilverStripe\DocumentConverter\DocumentConverter:
PROCESSFAILED: 'Dokumenttia ei voitu prosessoida, ole hyvä ja tarkista että siirtämäsi dokumentit olivat varmasti .doc tai .docx muodossa.'
SERVERUNREACHABLE: 'Muunnospalvelimeen ei saatu yhteyttä. Ole hyvä ja yritä myöhemmin uudelleen tai ota yhteyttä järjestelmän ylläpitäjään.'
DocumentConverterDecorator:
SilverStripe\DocumentConverter\ConvertsDocumentsExtension:
ImportTab: Tuo
DocumentImportField:
SilverStripe\DocumentConverter\DocumentConversionField:
ChooseFolder: 'Valitse kansio, jonne tiedosto tallennetaan'
EachH1: 'jokaiselle otsikko 1'
EachH2: 'jokaiselle otsikko 2'
Expand All @@ -15,7 +15,7 @@ fi:
'No': ei
SplitHeader: 'Jaa dokumentti sivuiksi'
publishPages: 'Julkaise muokatut sivut (ei suositella, jollet ole varma muunnoksen lopputulemasta)'
FileIFrameField:
SilverStripe\DocumentConverter\DocumentImporterField:
ATTACHONCESAVED2: 'Tiedostot voidaan liittää, kun olet tallentanut ensin tietueen.'
UploadField:
ATTACHFILE: 'Liitä tiedosto'
Expand Down
4 changes: 2 additions & 2 deletions lang/id.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id:
DocumentConverterDecorator:
SilverStripe\DocumentConverter\ConvertsDocumentsExtension:
ImportTab: Impor
DocumentImportField:
SilverStripe\DocumentConverter\DocumentConversionField:
ChooseFolder: 'Pilih sebuah map untuk menyimpan berkas ini'
UploadField:
FROMCOMPUTER: 'Dari komputermu'
Expand Down
Loading

0 comments on commit 54ac69d

Please sign in to comment.