Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
7f2b9a0
Special keys cases
Valc Jan 21, 2015
b6b924c
Special keys cases
Valc Jan 21, 2015
2d30447
Special keys cases
Valc Jan 21, 2015
e5394c3
Special keys cases
Valc Jan 21, 2015
2a44dd0
Special keys cases
Valc Jan 21, 2015
4748c1a
Special keys cases
Valc Jan 21, 2015
fd71127
Special keys cases
Valc Jan 21, 2015
ad0e11e
Special keys cases
Valc Jan 21, 2015
caa9e94
xml fields
Valc Jan 22, 2015
e8f4b86
New language strings
Valc Jan 22, 2015
ccbabe2
status fix
Valc Jan 22, 2015
a794cb3
Add blocked string
Valc Jan 22, 2015
ff152c4
Adding keys
Valc Jan 22, 2015
8c460b1
Keys
Valc Jan 22, 2015
0e03e7f
krys
Valc Jan 22, 2015
8d3930f
Adding keys to keep or to delete code
Valc Jan 22, 2015
c301948
Languages fixes
Valc Jan 22, 2015
9b3cc41
Blocked keys changes
Valc Jan 24, 2015
e807b3c
Fix protected keys when are extra.
Valc Jan 24, 2015
4ed08b1
Allowed groups fix
Valc Jan 24, 2015
ce88914
Updating path to codemirror js and css
Valc Jan 25, 2015
11aee41
Language string change
Valc Jan 25, 2015
6208c2f
Format style fix
Valc Jan 25, 2015
0a341e0
Format style fix
Valc Jan 25, 2015
b22ce4a
Format style fix
Valc Jan 25, 2015
29050e3
Format style fix
Valc Jan 25, 2015
74ba35b
Format style fix
Valc Jan 25, 2015
6956838
Format style fix
Valc Jan 25, 2015
31cbf0e
Format style fix
Valc Jan 25, 2015
d036448
Format style fix
Valc Jan 25, 2015
0c59aea
Format style fix
Valc Jan 25, 2015
c5c699b
Raw edit mode fix.
Valc Jan 25, 2015
df16a35
Deleting protected keys code from there due is not required.
Valc Jan 25, 2015
1e6445c
Format Style
Valc Jan 25, 2015
524fa54
Merge pull request #1 from joomla-projects/develop
Jan 25, 2015
87a0bc3
Deleting default samples from untranslatable field
Valc Jan 25, 2015
683002d
Addind samples to language strings
Valc Jan 25, 2015
be18c10
Adding samples to language strings
Valc Jan 25, 2015
d28fde2
Deleting samples from defaul params
Valc Jan 25, 2015
4598d05
Correcting format and strings in #256
infograf768 Jan 26, 2015
1d2cdf8
More CS
infograf768 Jan 26, 2015
7f6b17e
Merge branch 'valc_keys' of git://github.com/infograf768/com_localise…
Valc Jan 26, 2015
71dcd5f
Merge branch 'infograf768-valc_keys' into valc-keys
Valc Jan 26, 2015
26d1b97
Fields name correction
Valc Jan 26, 2015
9c84e50
Delete unecesary code and asign blocked strings from the item.
Valc Jan 26, 2015
74fee40
Blocked keys revised by 'isbloked' attribute.
Valc Jan 26, 2015
397a864
Get special keys cases changes
Valc Jan 26, 2015
802bda0
Deleting duplicated code.
Valc Jan 26, 2015
cbd77d1
Rename variables
Valc Jan 26, 2015
4960cd0
Rename variables
Valc Jan 26, 2015
981ad36
Deleting duplicated code
Valc Jan 26, 2015
b42bf38
Renaming variables
Valc Jan 26, 2015
dfe639d
Renaming variables
Valc Jan 26, 2015
3a6a5c0
Setting is blocked to 1 or 0
Valc Jan 27, 2015
1539e72
Deleting duplicated code
Valc Jan 27, 2015
ed1bd55
Delete unused variable
Valc Jan 27, 2015
b01f944
Format test
Valc Jan 27, 2015
168d3a8
Format test
Valc Jan 27, 2015
778540e
Format test
Valc Jan 27, 2015
6107aad
Delete spaces
Valc Jan 27, 2015
6ba427b
Deleting unecesary reasigned variables.
Valc Jan 27, 2015
e4b2b5e
Deleting unnecesary variable
Valc Jan 27, 2015
b357e10
Solving issue market as duplicated code
Valc Jan 27, 2015
2a8f370
Deleting unused variable
Valc Jan 27, 2015
1a2c43c
Update translation.php
infograf768 Jan 27, 2015
ec0b728
fix icon in the toolbar for the language view
zero-24 Jan 27, 2015
af38be3
same for this file
zero-24 Jan 27, 2015
3d121e9
install don't exists fallback to default
zero-24 Jan 27, 2015
601fe85
Test to solve duplicated code message in travis
Valc Jan 28, 2015
c322b69
Merge branch 'develop' of git://github.com/joomla-projects/com_locali…
Valc Jan 28, 2015
aa5c5c8
Merge branch 'develop' of git://github.com/joomla-projects/com_locali…
Valc Jan 28, 2015
ad264a2
Merge branch 'joomla-projects-develop' into valc-keys
Valc Jan 28, 2015
7790879
Simplify some code
elkuku Jan 29, 2015
d94a815
Add variable
Valc Jan 29, 2015
8c2f821
Merge pull request #262 from elkuku/simplify
wilsonge Jan 29, 2015
9eae6f3
Merge pull request #261 from zero-24/patch-1
infograf768 Jan 29, 2015
eb11bc1
Revert "Add variable"
Valc Jan 29, 2015
ce155ae
Merge pull request #4 from joomla-projects/develop
Jan 29, 2015
30ccd70
Initialise vars
Valc Jan 29, 2015
7f2112f
Travis test
Valc Jan 29, 2015
28da82d
Reduce code lines
Valc Jan 29, 2015
239e607
Reduce code lines
Valc Jan 29, 2015
f1e867f
Travis test
Valc Jan 29, 2015
1832f49
Format style
Valc Jan 29, 2015
1d565fb
Travis test
Valc Jan 29, 2015
1b2a4ef
Travis test
Valc Jan 29, 2015
e29c76f
Format style
Valc Jan 29, 2015
8b1b09b
Format style
Valc Jan 29, 2015
f0c46a9
Travis test
Valc Jan 29, 2015
13246f1
Travis test
Valc Jan 29, 2015
7a1c006
delete htmlspecialchars_decode due now no samples about untranslatabl…
Valc Jan 31, 2015
32c726a
Merge branch 'develop' of git://github.com/joomla-projects/com_locali…
Valc Feb 1, 2015
360e076
Merge pull request #7 from joomla-projects/develop
Feb 2, 2015
6a6ce29
Merge branch 'develop' of git://github.com/joomla-projects/com_locali…
Valc Feb 6, 2015
48fb66a
Uptate to special keys changes
Valc Feb 6, 2015
36a24e6
Return to main dev
Valc Feb 6, 2015
1142540
chmod
Valc Feb 6, 2015
04447e7
Merge pull request #10 from joomla-projects/develop
Feb 8, 2015
7c1acbf
Add filter field
Valc Feb 8, 2015
48169a9
declare filter fields
Valc Feb 8, 2015
3fdc797
Initialise filters vars
Valc Feb 8, 2015
2836eba
Add filtered values to the item
Valc Feb 8, 2015
983717e
Get keys to filter
Valc Feb 8, 2015
eb98f48
Travis issue
Valc Feb 8, 2015
21c650b
Detremine if is translation and get posted filter
Valc Feb 8, 2015
bdde50a
Filtring within few section in acordion
Valc Feb 8, 2015
501ea37
Filtring within default section
Valc Feb 8, 2015
c5d6464
Add keystatus field file
Valc Feb 8, 2015
e589232
css
Valc Feb 8, 2015
43eb3b9
catch and handle empty filter
Valc Feb 8, 2015
8c55708
Set string tab as default when filter is aplied
Valc Feb 8, 2015
c566909
Move filer location down of legend.
Valc Feb 8, 2015
a07b8cc
Adding language strings
Valc Feb 8, 2015
a666154
Revert "Travis issue"
Valc Feb 8, 2015
003866a
Merge pull request #12 from joomla-projects/develop
Feb 9, 2015
f2c4e5e
Update translation.php
infograf768 Feb 9, 2015
6f808a1
A bit of code style cleaning
infograf768 Feb 9, 2015
97b1eca
Using existing strings and changing to JText::_
infograf768 Feb 9, 2015
cde3bbb
Using global key
infograf768 Feb 9, 2015
1b657fa
deleting redundant strings
infograf768 Feb 9, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions component/admin/models/fields/keystatus.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php
/**
* @package Com_Localise
* @subpackage models
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

JFormHelper::loadFieldClass('list');

/**
* Form Field State class.
*
* @package Extensions.Components
* @subpackage Localise
*
* @since 1.0
*/
class JFormFieldKeystatus extends JFormFieldList
{
/**
* The field type.
*
* @var string
*/
protected $type = 'Keystatus';

/**
* Method to get the field input.
*
* @return string The field input.
*/
protected function getOptions()
{
$attributes = '';

if ($v = (string) $this->element['onchange'])
{
$attributes .= ' onchange="' . $v . '"';
}

$attributes .= ' class="filter-select"';
$options = array();

foreach ($this->element->children() as $option)
{
$options[] = JHtml::_('select.option', '', JText::_(trim($option)),
array('option.attr' => 'attributes', 'attr' => 'class="filter-select"')
);
}

$options[] = JHtml::_('select.option', 'allkeys', JText::_('JALL'),
array('option.attr' => 'attributes', 'attr' => 'class="allkeys"')
);

$options[] = JHtml::_('select.option', 'translatedkeys', JText::_('COM_LOCALISE_TEXT_TRANSLATION_TRANSLATED'),
array('option.attr' => 'attributes', 'attr' => 'class="translated"')
);
$options[] = JHtml::_('select.option', 'untranslatedkeys', JText::_('COM_LOCALISE_TEXT_TRANSLATION_UNTRANSLATED'),
array('option.attr' => 'attributes', 'attr' => 'class="untranslated"')
);
$options[] = JHtml::_('select.option', 'unchangedkeys', JText::_('COM_LOCALISE_TEXT_TRANSLATION_UNCHANGED'),
array('option.attr' => 'attributes', 'attr' => 'class="unchanged"')
);

return $options;
}
}
14 changes: 14 additions & 0 deletions component/admin/models/forms/translation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@
name="svn"
type="hidden" />
</fieldset>
<fields name="select">
<fieldset name="select">
<field
id="keystatus"
name="keystatus"
type="keystatus"
default=""
class="filter-select"
hidden="true"
onchange="this.form.submit()">
<option value="">JOPTION_SELECT_PUBLISHED</option>
</field>
</fieldset>
</fields>
<fieldset
label="COM_LOCALISE_FIELDSET_TRANSLATION_LEGEND"
description="COM_LOCALISE_FIELDSET_TRANSLATION_LEGEND_DESC"
Expand Down
33 changes: 32 additions & 1 deletion component/admin/models/translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class LocaliseModelTranslation extends JModelAdmin

protected $contents;

protected $filter_fields = array('translatedkeys', 'untranslatedkeys', 'unchangedkeys');

/**
* Method to auto-populate the model state.
*
Expand Down Expand Up @@ -169,6 +171,14 @@ public function getItem($pk = null)
? $this->getState('translation.path')
: $this->getState('translation.refpath');

$this->setState('translation.translatedkeys', array());
$this->setState('translation.untranslatedkeys', array());
$this->setState('translation.unchangedkeys', array());

$translatedkeys = $this->getState('translation.translatedkeys');
$untranslatedkeys = $this->getState('translation.untranslatedkeys');
$unchangedkeys = $this->getState('translation.unchangedkeys');

$this->item = new JObject(
array
(
Expand All @@ -183,6 +193,9 @@ public function getItem($pk = null)
'additionalcopyright' => array(),
'license' => '',
'exists' => JFile::exists($this->getState('translation.path')),
'translatedkeys' => (array) $translatedkeys,
'untranslatedkeys' => (array) $untranslatedkeys,
'unchangedkeys' => (array) $unchangedkeys,
'translated' => 0,
'unchanged' => 0,
'extra' => 0,
Expand Down Expand Up @@ -401,18 +414,36 @@ public function getItem($pk = null)

if (!empty($sections['keys']) && array_key_exists($key, $sections['keys']) && $sections['keys'][$key] != '')
{
if ($sections['keys'][$key] != $string || $this->getState('translation.path') == $this->getState('translation.refpath'))
if ($sections['keys'][$key] != $string)
{
$this->item->translated++;
$translatedkeys[] = $key;
}
elseif ($this->getState('translation.path') == $this->getState('translation.refpath'))
{
$this->item->translated++;
}
else
{
$this->item->unchanged++;
$unchangedkeys[] = $key;
}
}
elseif (!array_key_exists($key, $sections['keys']))
{
$untranslatedkeys[] = $key;
}
}
}

$this->item->translatedkeys = $translatedkeys;
$this->item->untranslatedkeys = $untranslatedkeys;
$this->item->unchangedkeys = $unchangedkeys;

$this->setState('translation.translatedkeys', $translatedkeys);
$this->setState('translation.untranslatedkeys', $untranslatedkeys);
$this->setState('translation.unchangedkeys', $unchangedkeys);

if (!empty($sections['keys']))
{
foreach ($sections['keys'] as $key => $string)
Expand Down
Loading