Skip to content

Commit

Permalink
pkp/pkp-lib#5169 Various cleanup/release prep
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Jan 25, 2020
1 parent ffb7f59 commit 53a0801
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 60 deletions.
4 changes: 2 additions & 2 deletions CustomLocaleHandler.inc.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @file plugins/generic/customLocale/CustomLocaleHandler.inc.php
* @file CustomLocaleHandler.inc.php
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class CustomLocaleHandler
Expand Down
4 changes: 2 additions & 2 deletions CustomLocalePlugin.inc.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @file plugins/generic/customLocale/CustomLocalePlugin.inc.php
* @file CustomLocalePlugin.inc.php
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class CustomLocalePlugin
Expand Down
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
- Custom Locale Plugin
- Version: 1.0
- Author: Carola Fanselow
- Version: 1.0.1
- Author: Carola Fanselow (updates by Alec Smecher)

About
-----
This plugin allows to customize locales via the OMP GUI. The default locales are replaced but not overwritten and can easily be restored. A simple documentation can be printed that lists all changes made to the locales. The locales can be customized in the tab 'locale' in management > settings > website. There is a search function for files and for locale keys within the files. The documentation can be printed in the plugin's settings section.
This plugin allows to customize locales via the OMP GUI. The default locales
are replaced but not overwritten and can easily be restored. A simple
documentation can be printed that lists all changes made to the locales. The
locales can be customized in the tab 'locale' in management > settings >
website. There is a search function for files and for locale keys within the
files. The documentation can be printed in the plugin's settings section.

License
-------
Copyright (c) 2016 Language Science Press
Copyright (c) 2016-2020 Language Science Press

This plugin is licensed under the GNU General Public License v2.

Upgrading From A Previous Version
---------------------------------
Starting with OJS/OMP 3.2, the locale file format has changed from XML to PO.
Existing users of this plugin MUST convert their files when migrating from
a release older than OJS/OMP 3.2 that uses this plugin.

This process is described at:
https://github.com/pkp/pkp-lib/issues/5169

System Requirements
-------------------
This plugin is compatible with...
- (TBD)
This plugin is compatible with OJS 3.2 and OMP 3.2.

Installation
------------
Expand Down
24 changes: 12 additions & 12 deletions classes/CustomLocale.inc.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @file plugins/generic/customLocale/classes/CustomLocale.inc.php
* @file classes/CustomLocale.inc.php
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class CustomLocale
Expand All @@ -13,40 +13,40 @@ class CustomLocale extends DataObject {
//
// Get/set methods
//
function getKey(){
function getKey() {
return $this->getData('key');
}

function setKey($key) {
return $this->setData('key', $key);
$this->setData('key', $key);
}

function getLocale(){
function getLocale() {
return $this->getData('locale');
}

function setLocale($locale) {
return $this->setData('locale', $locale);
$this->setData('locale', $locale);
}

function getContextId(){
function getContextId() {
return $this->getData('contextId');
}

function setContextId($contextId) {
return $this->setData('contextId', $contextId);
$this->setData('contextId', $contextId);
}

function setFileTitle($title) {
return $this->setData('filetitle', $title);
$this->setData('filetitle', $title);
}

function getFileTitle() {
return $this->getData('filetitle');
}

function setTitle($title, $locale) {
return $this->setData('title', $title, $locale);
$this->setData('title', $title, $locale);
}

function getTitle($locale) {
Expand All @@ -62,15 +62,15 @@ function getPath() {
}

function setPath($path) {
return $this->setData('path', $path);
$this->setData('path', $path);
}

function getFilePath() {
return $this->getData('filepath');
}

function setFilePath($filepath) {
return $this->setData('filepath', $filepath);
$this->setData('filepath', $filepath);
}
}

5 changes: 2 additions & 3 deletions controllers/grid/CustomLocaleAction.inc.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?php

/**
* @file plugins/generic/customLocale/controllers/grid/CustomLocaleAction.inc.php
* @file controllers/grid/CustomLocaleAction.inc.php
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class CustomLocaleAction
*/


class CustomLocaleAction {
/**
* Get a list of locale files.
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/CustomLocaleGridCellProvider.inc.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @file plugins/generic/customLocale/controllers/grid/CustomLocaleGridCellProvider.inc.php
* @file controllers/grid/CustomLocaleGridCellProvider.inc.php
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class CustomLocaleGridCellProvider
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/CustomLocaleGridHandler.inc.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @file plugins/generic/customLocale/controllers/grid/CustomLocaleGridHandler.inc.php
* @file controllers/grid/CustomLocaleGridHandler.inc.php
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class CustomLocaleGridHandler
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/form/CustomLocaleForm.inc.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @file plugins/generic/customLocale/controllers/grid/form/CustomLocaleForm.inc.php
* @file controllers/grid/form/CustomLocaleForm.inc.php
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class CustomLocaleForm
Expand Down
4 changes: 2 additions & 2 deletions controllers/grid/form/LocaleFileForm.inc.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @file plugins/generic/customLocale/controllers/grid/form/LocaleFileForm.inc.php
* @file controllers/grid/form/LocaleFileForm.inc.php
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class LocaleFileForm
Expand Down
15 changes: 7 additions & 8 deletions css/customLocale.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

/*
* plugins/generic/customLocale/css/customLocale.css
*
* Copyright (c) 2016 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
*/
/**
* css/customLocale.css
*
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
*/

.highlight {
background-color: #A9E2F3;
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* @file plugins/generic/customLocale/index.php
* @file index.php
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @brief Wrapper for custom locale plugin.
Expand Down
16 changes: 8 additions & 8 deletions pluginDocumentation_customLocale.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Key data
============

- name of the plugin: Custom Locale Plugin
- author: Carola Fanselow
- current version: 1.0.0.0
- tested on OMP version: 1.2.0
- github link: https://github.com/langsci/customLocale.git
- author: Carola Fanselow (updates by Alec Smecher)
- current version: 1.0.1.0
- see .travis.yml for compatibility information
- github link: https://github.com/asmecher/customLocale.git
- community plugin: yes
- date: 2016/05/21
- date: 2020/01/24

Description
============
Expand All @@ -24,7 +24,7 @@ Hooks

PKPLocale::registerLocaleFile
LoadComponentHandler
Templates::Management::Settings::website
Template::Settings::website
LoadHandler

New pages
Expand All @@ -50,7 +50,7 @@ Database access, server access
- nonrecurring server access: no
- recurring server access: yes

creating, reading from and writing to files in public/contexts/%contextId%
creating, reading from and writing to files in [files_dir]/[presses|journals]/%contextId%/customLocale

Classes, plugins, external software
-----------------------
Expand Down Expand Up @@ -89,7 +89,7 @@ Classes, plugins, external software
Metrics
--------
- number of files: 19
- lines of code: 1668
- lines of code: 1k LOC

Settings
--------
Expand Down
4 changes: 2 additions & 2 deletions templates/customLocaleGridFilter.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{**
* plugins/generic/customLocale/templates/customLocaleGridFilter.tpl
* templates/customLocaleGridFilter.tpl
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
*}
Expand Down
4 changes: 2 additions & 2 deletions templates/localeFile.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{**
* plugins/generic/customLocale/templates/localeFile.tpl
* templates/localeFile.tpl
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
*}
Expand Down
10 changes: 5 additions & 5 deletions version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!DOCTYPE version SYSTEM "../../../lib/pkp/dtd/pluginVersion.dtd">

<!--
* plugins/generic/customLocale/version.xml
* version.xml
*
* Copyright (c) 2016 Language Science Press
* Copyright (c) 2016-2020 Language Science Press
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Plugin version information.
-->
-->
<version>
<application>customLocale</application>
<type>plugins.generic</type>
<release>1.0.0.0</release>
<date>2015-09-25</date>
<release>1.0.1.0</release>
<date>2020-01-24</date>
<lazy-load>1</lazy-load>
<class>CustomLocalePlugin</class>
</version>

0 comments on commit 53a0801

Please sign in to comment.