repo_name
stringlengths 4
116
| path
stringlengths 4
379
| size
stringlengths 1
7
| content
stringlengths 3
1.05M
| license
stringclasses 15
values |
---|---|---|---|---|
Telemedellin/fonvalmed | wp-admin/edit-tag-form.php | 7802 | <?php
/**
* Edit tag form for inclusion in administration panels.
*
* @package WordPress
* @subpackage Administration
*/
// don't load directly
if ( !defined('ABSPATH') )
die('-1');
if ( empty($tag_ID) ) { ?>
<div id="message" class="updated notice is-dismissible"><p><strong><?php _e( 'You did not select an item for editing.' ); ?></strong></p></div>
<?php
return;
}
// Back compat hooks
if ( 'category' == $taxonomy ) {
/**
* Fires before the Edit Category form.
*
* @since 2.1.0
* @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead.
*
* @param object $tag Current category term object.
*/
do_action( 'edit_category_form_pre', $tag );
} elseif ( 'link_category' == $taxonomy ) {
/**
* Fires before the Edit Link Category form.
*
* @since 2.3.0
* @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead.
*
* @param object $tag Current link category term object.
*/
do_action( 'edit_link_category_form_pre', $tag );
} else {
/**
* Fires before the Edit Tag form.
*
* @since 2.5.0
* @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead.
*
* @param object $tag Current tag term object.
*/
do_action( 'edit_tag_form_pre', $tag );
}
/**
* Fires before the Edit Term form for all taxonomies.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to
* the taxonomy slug.
*
* @since 3.0.0
*
* @param object $tag Current taxonomy term object.
* @param string $taxonomy Current $taxonomy slug.
*/
do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
<div class="wrap">
<h2><?php echo $tax->labels->edit_item; ?></h2>
<div id="ajax-response"></div>
<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"
<?php
/**
* Fires inside the Edit Term form tag.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to
* the taxonomy slug.
*
* @since 3.7.0
*/
do_action( "{$taxonomy}_term_edit_form_tag" );
?>>
<input type="hidden" name="action" value="editedtag" />
<input type="hidden" name="tag_ID" value="<?php echo esc_attr($tag->term_id) ?>" />
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy) ?>" />
<?php wp_original_referer_field(true, 'previous'); wp_nonce_field('update-tag_' . $tag_ID); ?>
<table class="form-table">
<tr class="form-field form-required term-name-wrap">
<th scope="row"><label for="name"><?php _ex( 'Name', 'term name' ); ?></label></th>
<td><input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo esc_attr($tag->name); ?>" size="40" aria-required="true" />
<p class="description"><?php _e('The name is how it appears on your site.'); ?></p></td>
</tr>
<?php if ( !global_terms_enabled() ) { ?>
<tr class="form-field term-slug-wrap">
<th scope="row"><label for="slug"><?php _e( 'Slug' ); ?></label></th>
<?php
/**
* Filter the editable slug.
*
* Note: This is a multi-use hook in that it is leveraged both for editable
* post URIs and term slugs.
*
* @since 2.6.0
*
* @param string $slug The editable slug. Will be either a term slug or post URI depending
* upon the context in which it is evaluated.
*/
$slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug ) : '';
?>
<td><input name="slug" id="slug" type="text" value="<?php echo esc_attr( $slug ); ?>" size="40" />
<p class="description"><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td>
</tr>
<?php } ?>
<?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
<tr class="form-field term-parent-wrap">
<th scope="row"><label for="parent"><?php _ex( 'Parent', 'term parent' ); ?></label></th>
<td>
<?php
$dropdown_args = array(
'hide_empty' => 0,
'hide_if_empty' => false,
'taxonomy' => $taxonomy,
'name' => 'parent',
'orderby' => 'name',
'selected' => $tag->parent,
'exclude_tree' => $tag->term_id,
'hierarchical' => true,
'show_option_none' => __( 'None' ),
);
/** This filter is documented in wp-admin/edit-tags.php */
$dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'edit' );
wp_dropdown_categories( $dropdown_args ); ?>
<?php if ( 'category' == $taxonomy ) : ?>
<p class="description"><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></p>
<?php endif; ?>
</td>
</tr>
<?php endif; // is_taxonomy_hierarchical() ?>
<tr class="form-field term-description-wrap">
<th scope="row"><label for="description"><?php _e( 'Description' ); ?></label></th>
<td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo $tag->description; // textarea_escaped ?></textarea>
<p class="description"><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p></td>
</tr>
<?php
// Back compat hooks
if ( 'category' == $taxonomy ) {
/**
* Fires after the Edit Category form fields are displayed.
*
* @since 2.9.0
* @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead.
*
* @param object $tag Current category term object.
*/
do_action( 'edit_category_form_fields', $tag );
} elseif ( 'link_category' == $taxonomy ) {
/**
* Fires after the Edit Link Category form fields are displayed.
*
* @since 2.9.0
* @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead.
*
* @param object $tag Current link category term object.
*/
do_action( 'edit_link_category_form_fields', $tag );
} else {
/**
* Fires after the Edit Tag form fields are displayed.
*
* @since 2.9.0
* @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead.
*
* @param object $tag Current tag term object.
*/
do_action( 'edit_tag_form_fields', $tag );
}
/**
* Fires after the Edit Term form fields are displayed.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to
* the taxonomy slug.
*
* @since 3.0.0
*
* @param object $tag Current taxonomy term object.
* @param string $taxonomy Current taxonomy slug.
*/
do_action( "{$taxonomy}_edit_form_fields", $tag, $taxonomy );
?>
</table>
<?php
// Back compat hooks
if ( 'category' == $taxonomy ) {
/** This action is documented in wp-admin/edit-tags.php */
do_action( 'edit_category_form', $tag );
} elseif ( 'link_category' == $taxonomy ) {
/** This action is documented in wp-admin/edit-tags.php */
do_action( 'edit_link_category_form', $tag );
} else {
/**
* Fires at the end of the Edit Term form.
*
* @since 2.5.0
* @deprecated 3.0.0 Use {$taxonomy}_edit_form instead.
*
* @param object $tag Current taxonomy term object.
*/
do_action( 'edit_tag_form', $tag );
}
/**
* Fires at the end of the Edit Term form for all taxonomies.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* @since 3.0.0
*
* @param object $tag Current taxonomy term object.
* @param string $taxonomy Current taxonomy slug.
*/
do_action( "{$taxonomy}_edit_form", $tag, $taxonomy );
submit_button( __('Update') );
?>
</form>
</div>
<?php if ($_GET['taxonomy'] == 'nombre'): ?>
<script>
jQuery('#slug').parent().parent().css('display','none');
jQuery('#description').parent().parent().css('display','none');
</script>
<?php endif; ?>
<?php if ( ! wp_is_mobile() ) : ?>
<script type="text/javascript">
try{document.forms.edittag.name.focus();}catch(e){}
</script>
<?php endif;
| gpl-2.0 |
Yogu/site-manager | src/tasks/backup.js | 7353 | var Task = require('../task.js');
var fs = require('q-io/fs');
var ShellTask = require('./shell.js');
var Q = require('q');
var hooks = require('../hooks.js');
var yaml = require('js-yaml');
require('colors');
/**
* Makes a backup of this site
*/
function BackupTask(site, message, options) {
Task.call(this);
this.site = site;
this.name = 'Backup (' + message + ')';
this.message = message;
this.options = options || {};
}
BackupTask.prototype = Object.create(Task.prototype);
BackupTask.prototype.perform = function*() {
var site = this.site;
var dataPath = fs.join(site.path, 'data');
if (!(yield fs.exists(dataPath + '/.git')))
yield this.runNested(new InitDataDirectoryTask(site));
yield hooks.call('beforeBackup', this, site);
// store info
this.doLog('Writing backup.yaml...');
var info = {
revision: site.revision
};
yield fs.write(dataPath + '/backup.yaml', yaml.safeDump(info));
this.doLog('Committing backup...');
this.cd(dataPath);
yield this.exec('git add -A');
yield this.exec('git commit --allow-empty -m ' + ShellTask.escape(this.message));
yield pushIfRemoteExists(this, site.siteManager.backupRepoPath, "refs/heads/" + site.name);
var revision = (yield this.execQuietly("git rev-parse HEAD")).stdout.trim();
this.doLog('Backup succeeded'.green);
this.doLog('backup id: ' + revision);
yield this.runNestedQuietly(site.loadTask());
site.emit('backup');
return revision;
};
/**
* Restores a backup
* @param revision the revision of the backup to restore
* @option backup set to false to skip the backup before restore
*/
function RestoreTask(site, revision, options) {
Task.call(this);
this.site = site;
this.name = 'Restore backup ' + revision;
this.revision = revision;
this.options = options || {};
}
RestoreTask.prototype = Object.create(Task.prototype);
RestoreTask.prototype.perform = function*() {
var site = this.site;
var dataPath = fs.join(site.path, 'data');
if (!(yield fs.exists(dataPath + '/.git')))
yield this.runNested(new InitDataDirectoryTask(site));
this.cd(dataPath);
// To be safe, backup first
if (this.options.backup !== false) {
yield this.runNested(new BackupTask(site, 'pre-restore ' + this.revision));
} else {
this.doLog('Skipping pre-restore backup');
}
// Add a tag so that the old revision can be reached (version-sort lists test.10 after test.9)
var lastTag = (yield this.execQuietly('git tag -l "' + site.name + '.*" | sort --version-sort | tail -n 1')).stdout.trim();
var lastTagNumber = 0;
if (lastTag) {
var lastTagNumber = parseInt(lastTag.substr(lastTag.indexOf('.') + 1));
if (isNaN(lastTagNumber))
lastTagNumber = 0;
}
var tagName = site.name + '.' + (lastTagNumber + 1);
yield this.execQuietly('git tag ' + tagName);
yield pushIfRemoteExists(this, site.siteManager.backupRepoPath, "refs/tags/" + tagName);
this.doLog('Restoring data directory...');
yield this.exec('git reset --hard ' + ShellTask.escape(this.revision));
this.doLog('Restoring repository...');
var info = yaml.safeLoad(yield fs.read(dataPath + '/backup.yaml'))
this.cd(site.path);
yield this.exec('git reset --hard ' + ShellTask.escape(info.revision));
yield hooks.call('afterRestore', this, site);
yield hooks.call('afterCheckout', this, site);
this.doLog('Backup restored'.green);
yield this.runNestedQuietly(site.loadTask());
site.emit('restore');
};
function InitDataDirectoryTask(site) {
Task.call(this);
this.name = 'Initialize data directory for ' + site.name;
this.site = site;
}
InitDataDirectoryTask.prototype = Object.create(Task.prototype);
InitDataDirectoryTask.prototype.perform = function*() {
var site = this.site;
var dataPath = fs.join(site.path, 'data');
this.cd(site.path);
this.doLog('data does not exist or is not a git repository, initializing it...'.yellow.bold);
yield this.exec('git init data');
this.cd(dataPath);
// switch to the correct branch, but leave that branch empty (do not derive from master)
yield this.exec('git symbolic-ref HEAD ' + ShellTask.escape("refs/heads/" + site.name));
// symlink, many things, similar to git-new-workdir, but so that it works with a bare
// root repo
var symlinks = [ 'logs/refs/', 'objects/', 'packed-refs', 'refs/' ];
var backupRepoPath = site.siteManager.backupRepoPath;
if (!(yield fs.exists(fs.join(dataPath, '.git/logs'))))
yield fs.makeDirectory(fs.join(dataPath, '.git/logs'));
for (var i = 0; i < symlinks.length; i++) {
var name = symlinks[i];
var linkPath = fs.join(dataPath, '.git', name);
var relativeBackupRepoPath = yield fs.relative(fs.directory(linkPath), backupRepoPath)
var targetPath = fs.join(relativeBackupRepoPath, name);
if (yield fs.exists(linkPath))
yield fs.removeTree(linkPath);
var isDir = name[name.length - 1] == '/';
yield fs.symbolicLink(linkPath, targetPath, isDir ? 'file' : 'directory');
}
};
exports.getBackups = Q.async(function*(site) {
if (!(yield fs.exists(site.path + '/data/.git')))
return []; // no data, so no backups
var currentBackupRevision = yield exports.getCurrentBackupRevision(site);
if (!currentBackupRevision)
return [];
var result = yield ShellTask.exec('git log --tags="' + site.name + '.*" --graph ' +
'--pretty=format:"%x09%H%x09%at%x09%P%x09%s" ' + site.name /* match the branch */,
site.path + '/data');
return result.stdout.split('\n').map(function(line) {
var parts = line.split(/\t/);
if (parts.length <= 1) {
if (line != '')
return {
type: 'guide',
prefix: line
};
else
return null;
}
return {
type: 'backup',
prefix: parts[0],
revision: parts[1],
time: new Date(parts[2] * 1000),
parentRevision: parts[3],
message: parts[4],
isCurrent: parts[1] == currentBackupRevision
};
})
.filter(function(v) { return v; }); // remove null entries
});
exports.getCurrentBackupRevision = Q.async(function*(site) {
try {
var result = yield ShellTask.exec('git rev-parse ' + ShellTask.escape('refs/heads/' + site.name),
site.path + '/data');
return result.stdout.trim();
} catch(err) {
if (typeof err == 'object' && err.code == 128)
return null; // the branch does not exist (e.g. unborn)
throw err;
}
});
exports.getBackup = Q.async(function*(site, revision) {
if (!(yield fs.exists(site.path + '/data/.git')))
return []; // no data, so no backups
var dataPath = site.path + '/data';
var result = yield ShellTask.exec('git log -n 1 ' +
'--pretty=format:"%x09%H%x09%at%x09%P%x09%s" ' + ShellTask.escape(revision),
dataPath);
var lines = result.stdout.split('\n').filter(function(line) { return line.trim(); });
if (!lines.length)
return null; // not found
var parts = lines[0].split(/\t/);
var backup = {
revision: parts[1],
time: new Date(parts[2] * 1000),
parentRevision: parts[3],
message: parts[4]
};
result = yield ShellTask.exec("git show " + ShellTask.escape(revision + ':backup.yaml'), dataPath);
var info = yaml.safeLoad(result.stdout);
backup.siteRevision = info.revision;
return backup;
});
var pushIfRemoteExists = Q.async(function*(task, path, committish) {
// force push because when restoring, the branch is reset
yield task.exec("if [ `git remote | wc -l` -gt 0 ] ; then git push origin -f " + committish + ":" + committish + " ; fi", path);
});
exports.BackupTask = BackupTask;
exports.RestoreTask = RestoreTask;
| gpl-2.0 |
concord-consortium/mw | src/org/concord/mw3d/ModelState.java | 13756 | /*
* Copyright (C) 2006 The Concord Consortium, Inc.,
* 25 Love Lane, Concord, MA 01742
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* END LICENSE */
package org.concord.mw3d;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.concord.modeler.draw.FillMode;
import org.concord.modeler.process.Loadable;
import org.concord.modeler.process.TaskState;
import org.concord.mw3d.models.ABond;
import org.concord.mw3d.models.ABondState;
import org.concord.mw3d.models.CuboidObstacle;
import org.concord.mw3d.models.CuboidObstacleState;
import org.concord.mw3d.models.CylinderObstacle;
import org.concord.mw3d.models.CylinderObstacleState;
import org.concord.mw3d.models.HeatBath;
import org.concord.mw3d.models.Obstacle;
import org.concord.mw3d.models.ObstacleState;
import org.concord.mw3d.models.RBond;
import org.concord.mw3d.models.RBondState;
import org.concord.mw3d.models.TBond;
import org.concord.mw3d.models.TBondState;
public class ModelState implements Serializable {
private float timestep = 0.5f;
private float length = 100;
private float width = 50;
private float height = 50;
private boolean showClock = true;
private boolean showGlassSimulationBox = true;
private boolean fullSizeUnbondedAtoms;
private boolean showAtomIndex;
private boolean showCharge;
private boolean showVdwLines;
private float vdwLinesRatio = MolecularView.DEFAULT_VDW_LINE_RATIO;
private boolean keShading;
private boolean showAxes = true;
private byte axisStyle = (byte) 1;
private boolean navigationMode;
private boolean perspectiveDepth = true;
private boolean showEnergizer;
private byte moleculeStyle = MolecularView.SPACE_FILLING;
private short velocityVectorScalingFactor = 1000;
private int cameraAtom = -1;
private int zDepthMagnification = 5;
private List<TaskState> tasks;
private int frameInterval = 200;
private int viewRefreshInterval = 50;
private String rotation;
private String cameraPosition;
private String velocitySelection;
private String trajectorySelection;
private String unmovableSelection;
private String invisibleSelection;
private String translucentSelection;
private String initScript;
private FillMode fillMode = FillMode.getNoFillMode();
private HeatBath heatBath;
private List drawList;
private List<ObstacleState> obstacles;
private List<RBondState> rbonds;
private List<ABondState> abonds;
private List<TBondState> tbonds;
private float gravitationalAcceleration;
private float[] gFieldDirection;
private float bFieldIntensity;
private float[] bFieldDirection;
private float eFieldIntensity;
private float[] eFieldDirection;
private float x1Mass = 20.0f;
private float x2Mass = 40.0f;
private float x3Mass = 60.0f;
private float x4Mass = 80.0f;
private float x1Sigma = 2.0f;
private float x2Sigma = 4.0f;
private float x3Sigma = 6.0f;
private float x4Sigma = 8.0f;
private float x1Epsilon = 0.01f;
private float x2Epsilon = 0.01f;
private float x3Epsilon = 0.01f;
private float x4Epsilon = 0.01f;
private int x1Argb = 0xffffffff;
private int x2Argb = 0xff00ff00;
private int x3Argb = 0xff0000ff;
private int x4Argb = 0xffff00ff;
private String xyzFileName;
public ModelState() {
tasks = new ArrayList<TaskState>();
}
public void setFrameInterval(int i) {
frameInterval = i;
}
public int getFrameInterval() {
return frameInterval;
}
public void setViewRefreshInterval(int i) {
viewRefreshInterval = i;
}
public int getViewRefreshInterval() {
return viewRefreshInterval;
}
public void setXyzFileName(String s) {
xyzFileName = s;
}
public String getXyzFileName() {
return xyzFileName;
}
public List<TaskState> getTasks() {
return tasks;
}
public void setTasks(List<TaskState> tasks) {
this.tasks = tasks;
}
public void addTasks(List<Loadable> list) {
if (list == null || list.isEmpty())
return;
for (Loadable l : list) {
tasks.add(new TaskState(l));
}
}
public void setX1Mass(float x1Mass) {
this.x1Mass = x1Mass;
}
public float getX1Mass() {
return x1Mass;
}
public void setX2Mass(float x2Mass) {
this.x2Mass = x2Mass;
}
public float getX2Mass() {
return x2Mass;
}
public void setX3Mass(float x3Mass) {
this.x3Mass = x3Mass;
}
public float getX3Mass() {
return x3Mass;
}
public void setX4Mass(float x4Mass) {
this.x4Mass = x4Mass;
}
public float getX4Mass() {
return x4Mass;
}
public void setX1Sigma(float x1Sigma) {
this.x1Sigma = x1Sigma;
}
public float getX1Sigma() {
return x1Sigma;
}
public void setX2Sigma(float x2Sigma) {
this.x2Sigma = x2Sigma;
}
public float getX2Sigma() {
return x2Sigma;
}
public void setX3Sigma(float x3Sigma) {
this.x3Sigma = x3Sigma;
}
public float getX3Sigma() {
return x3Sigma;
}
public void setX4Sigma(float x4Sigma) {
this.x4Sigma = x4Sigma;
}
public float getX4Sigma() {
return x4Sigma;
}
public void setX1Epsilon(float x1Epsilon) {
this.x1Epsilon = x1Epsilon;
}
public float getX1Epsilon() {
return x1Epsilon;
}
public void setX2Epsilon(float x2Epsilon) {
this.x2Epsilon = x2Epsilon;
}
public float getX2Epsilon() {
return x2Epsilon;
}
public void setX3Epsilon(float x3Epsilon) {
this.x3Epsilon = x3Epsilon;
}
public float getX3Epsilon() {
return x3Epsilon;
}
public void setX4Epsilon(float x4Epsilon) {
this.x4Epsilon = x4Epsilon;
}
public float getX4Epsilon() {
return x4Epsilon;
}
public void setX1Argb(int x1Argb) {
this.x1Argb = x1Argb;
}
public int getX1Argb() {
return x1Argb;
}
public void setX2Argb(int x2Argb) {
this.x2Argb = x2Argb;
}
public int getX2Argb() {
return x2Argb;
}
public void setX3Argb(int x3Argb) {
this.x3Argb = x3Argb;
}
public int getX3Argb() {
return x3Argb;
}
public void setX4Argb(int x4Argb) {
this.x4Argb = x4Argb;
}
public int getX4Argb() {
return x4Argb;
}
public void setInitScript(String s) {
initScript = s;
}
public String getInitScript() {
return initScript;
}
public void setZDepthMagnification(int i) {
zDepthMagnification = i;
}
public int getZDepthMagnification() {
return zDepthMagnification;
}
public void setCameraAtom(int i) {
cameraAtom = i;
}
public int getCameraAtom() {
return cameraAtom;
}
public void setNavigationMode(boolean b) {
navigationMode = b;
}
public boolean getNavigationMode() {
return navigationMode;
}
public void setCameraPosition(String s) {
cameraPosition = s;
}
public String getCameraPosition() {
return cameraPosition;
}
public void setTimeStep(float timestep) {
this.timestep = timestep;
}
public float getTimeStep() {
return timestep;
}
public void setRBonds(List<RBondState> rbonds) {
this.rbonds = rbonds;
}
public List<RBondState> getRBonds() {
return rbonds;
}
public void addRBond(RBond rbond) {
if (rbonds == null)
rbonds = new ArrayList<RBondState>();
rbonds.add(new RBondState(rbond));
}
public void setABonds(List<ABondState> abonds) {
this.abonds = abonds;
}
public List<ABondState> getABonds() {
return abonds;
}
public void addABond(ABond abond) {
if (abonds == null)
abonds = new ArrayList<ABondState>();
abonds.add(new ABondState(abond));
}
public void setTBonds(List<TBondState> tbonds) {
this.tbonds = tbonds;
}
public List<TBondState> getTBonds() {
return tbonds;
}
public void addTBond(TBond tbond) {
if (tbonds == null)
tbonds = new ArrayList<TBondState>();
tbonds.add(new TBondState(tbond));
}
public void setObstacles(List<ObstacleState> o) {
obstacles = o;
}
public List<ObstacleState> getObstacles() {
return obstacles;
}
public void addObstacle(Obstacle o) {
if (obstacles == null)
obstacles = new ArrayList<ObstacleState>();
if (o instanceof CuboidObstacle) {
CuboidObstacle c = (CuboidObstacle) o;
CuboidObstacleState s = new CuboidObstacleState();
s.setCenter(c.getCenter());
s.setCorner(c.getCorner());
s.setColor(c.getColor().getRGB());
s.setTranslucent(c.isTranslucent());
obstacles.add(s);
}
else if (o instanceof CylinderObstacle) {
CylinderObstacle c = (CylinderObstacle) o;
CylinderObstacleState s = new CylinderObstacleState();
s.setCenter(c.getCenter());
s.setAxis(c.getAxis());
s.setHeight(c.getHeight());
s.setRadius(c.getRadius());
s.setColor(c.getColor().getRGB());
s.setTranslucent(c.isTranslucent());
obstacles.add(s);
}
}
public void setHeatBath(HeatBath heatBath) {
this.heatBath = heatBath;
}
public HeatBath getHeatBath() {
return heatBath;
}
public void setLength(float length) {
this.length = length;
}
public float getLength() {
return length;
}
public void setWidth(float width) {
this.width = width;
}
public float getWidth() {
return width;
}
public void setHeight(float height) {
this.height = height;
}
public float getHeight() {
return height;
}
public void setFillMode(FillMode fillMode) {
this.fillMode = fillMode;
}
public FillMode getFillMode() {
return fillMode;
}
public void setPerspectiveDepth(boolean b) {
perspectiveDepth = b;
}
public boolean getPerspectiveDepth() {
return perspectiveDepth;
}
public void setRotation(String s) {
rotation = s;
}
public String getRotation() {
return rotation;
}
public void setMoleculeStyle(byte style) {
moleculeStyle = style;
}
public byte getMoleculeStyle() {
return moleculeStyle;
}
public void setShowGlassSimulationBox(boolean b) {
showGlassSimulationBox = b;
}
public boolean getShowGlassSimulationBox() {
return showGlassSimulationBox;
}
public void setShowClock(boolean b) {
showClock = b;
}
public boolean getShowClock() {
return showClock;
}
public void setShowAxes(boolean b) {
showAxes = b;
}
public boolean getShowAxes() {
return showAxes;
}
public void setAxisStyle(byte style) {
axisStyle = style;
}
public byte getAxisStyle() {
return axisStyle;
}
public void setKeShading(boolean b) {
keShading = b;
}
public boolean getKeShading() {
return keShading;
}
public void setFullSizeUnbondedAtoms(boolean b) {
fullSizeUnbondedAtoms = b;
}
public boolean getFullSizeUnbondedAtoms() {
return fullSizeUnbondedAtoms;
}
public void setShowVdwLines(boolean b) {
showVdwLines = b;
}
public boolean getShowVdwLines() {
return showVdwLines;
}
public void setVdwLinesRatio(float ratio) {
vdwLinesRatio = ratio;
}
public float getVdwLinesRatio() {
return vdwLinesRatio;
}
public void setVelocityVectorScalingFactor(short factor) {
velocityVectorScalingFactor = factor;
}
public short getVelocityVectorScalingFactor() {
return velocityVectorScalingFactor;
}
public void setShowCharge(boolean b) {
showCharge = b;
}
public boolean getShowCharge() {
return showCharge;
}
public void setShowAtomIndex(boolean b) {
showAtomIndex = b;
}
public boolean getShowAtomIndex() {
return showAtomIndex;
}
public void setShowEnergizer(boolean b) {
showEnergizer = b;
}
public boolean getShowEnergizer() {
return showEnergizer;
}
public void setTranslucentSelection(String s) {
translucentSelection = s;
}
public String getTranslucentSelection() {
return translucentSelection;
}
public void setVelocitySelection(String s) {
velocitySelection = s;
}
public String getVelocitySelection() {
return velocitySelection;
}
public void setUnmovableSelection(String s) {
unmovableSelection = s;
}
public String getUnmovableSelection() {
return unmovableSelection;
}
public void setInvisibleSelection(String s) {
invisibleSelection = s;
}
public String getInvisibleSelection() {
return invisibleSelection;
}
public void setTrajectorySelection(String s) {
trajectorySelection = s;
}
public String getTrajectorySelection() {
return trajectorySelection;
}
public void setDrawList(List drawList) {
this.drawList = drawList;
}
public List getDrawList() {
return drawList;
}
public void setGravitationalAcceleration(float gravitationalAcceleration) {
this.gravitationalAcceleration = gravitationalAcceleration;
}
public float getGravitationalAcceleration() {
return gravitationalAcceleration;
}
public void setGFieldDirection(float[] gFieldDirection) {
this.gFieldDirection = gFieldDirection;
}
public float[] getGFieldDirection() {
return gFieldDirection;
}
public void setBFieldIntensity(float bFieldIntensity) {
this.bFieldIntensity = bFieldIntensity;
}
public float getBFieldIntensity() {
return bFieldIntensity;
}
public void setBFieldDirection(float[] bFieldDirection) {
this.bFieldDirection = bFieldDirection;
}
public float[] getBFieldDirection() {
return bFieldDirection;
}
public void setEFieldIntensity(float eFieldIntensity) {
this.eFieldIntensity = eFieldIntensity;
}
public float getEFieldIntensity() {
return eFieldIntensity;
}
public void setEFieldDirection(float[] eFieldDirection) {
this.eFieldDirection = eFieldDirection;
}
public float[] getEFieldDirection() {
return eFieldDirection;
}
} | gpl-2.0 |
Jane-Wu/zs | modules/feeds/src/Plugin/QueueWorker/FeedQueueWorkerBase.php | 1963 | <?php
namespace Drupal\feeds\Plugin\QueueWorker;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Queue\QueueFactory;
use Drupal\Core\Queue\QueueWorkerBase;
use Drupal\feeds\Event\EventDispatcherTrait;
use Drupal\feeds\Exception\EmptyFeedException;
use Drupal\feeds\FeedInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Base class for Feed queue workers.
*/
abstract class FeedQueueWorkerBase extends QueueWorkerBase implements ContainerFactoryPluginInterface {
use EventDispatcherTrait;
/**
* The queue factory.
*
* @var \Drupal\Core\Queue\QueueFactory
*/
protected $queueFactory;
/**
* Constructs a FeedQueueWorkerBase object.
*
* @param array $configuration
* A configuration array containing information about the plugin instance.
* @param string $plugin_id
* The plugin_id for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
*/
public function __construct(array $configuration, $plugin_id, array $plugin_definition, QueueFactory $queue_factory, EventDispatcherInterface $event_dispatcher) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->queueFactory = $queue_factory;
$this->setEventDispatcher($event_dispatcher);
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static(
$configuration,
$plugin_id,
$plugin_definition,
$container->get('queue'),
$container->get('event_dispatcher')
);
}
/**
* Handles an import exception.
*/
protected function handleException(FeedInterface $feed, \Exception $exception) {
$feed->finishImport();
if (!$exception instanceof EmptyFeedException) {
throw $exception;
}
}
}
| gpl-2.0 |
loadedcommerce/loaded7-addons-free | templates/leisure-old/templates/default/javascript/account/address_book.js.php | 1182 | <?php
/*
$Id: address_book.js.php v1.0 2013-01-01 datazen $
LoadedCommerce, Innovative eCommerce Solutions
http://www.loadedcommerce.com
Copyright (c) 2013 Loaded Commerce, LLC
@author LoadedCommerce Team
@copyright (c) 2013 LoadedCommerce Team
@license http://loadedcommerce.com/license.html
@function The lC_Default class manages default template functions
*/
?>
<script>
function validateForm() {
var fnameMin = '<?php echo ACCOUNT_FIRST_NAME; ?>';
var lnameMin = '<?php echo ACCOUNT_LAST_NAME; ?>';
jQuery.validator.messages.required = "";
var bValid = $("#address_book").validate({
rules: {
firstname: { minlength: fnameMin, required: true },
lastname: { minlength: lnameMin, required: true },
street_address: { required: true },
city: { required: true },
},
invalidHandler: function(e, validator) {
var errors = validator.numberOfInvalids();
if (errors) {
$("#errDiv").show().delay(5000).fadeOut('slow');
} else {
$("#errDiv").hide();
}
return false;
}
}).form();
if (bValid) {
$('#address_book').submit();
}
return false;
}
</script> | gpl-2.0 |
nv1r/icinga2 | test/base-shellescape.cpp | 2257 | /******************************************************************************
* Icinga 2 *
* Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org) *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software Foundation *
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/
#include "base/utility.h"
#include <boost/test/unit_test.hpp>
#include <iostream>
using namespace icinga;
BOOST_AUTO_TEST_SUITE(base_shellescape)
BOOST_AUTO_TEST_CASE(escape_basic)
{
#ifdef _WIN32
BOOST_CHECK(Utility::EscapeShellCmd("%PATH%") == "^%PATH^%");
#else /* _WIN32 */
BOOST_CHECK(Utility::EscapeShellCmd("$PATH") == "\\$PATH");
BOOST_CHECK(Utility::EscapeShellCmd("\\$PATH") == "\\\\\\$PATH");
#endif /* _WIN32 */
}
BOOST_AUTO_TEST_CASE(escape_quoted)
{
#ifdef _WIN32
BOOST_CHECK(Utility::EscapeShellCmd("'hello'") == "^'hello^'");
BOOST_CHECK(Utility::EscapeShellCmd("\"hello\"") == "^\"hello^\"");
#else /* _WIN32 */
BOOST_CHECK(Utility::EscapeShellCmd("'hello'") == "'hello'");
BOOST_CHECK(Utility::EscapeShellCmd("'hello") == "\\'hello");
#endif /* _WIN32 */
}
BOOST_AUTO_TEST_SUITE_END()
| gpl-2.0 |
baguio/ereaderLauncher | app/src/main/java/uk/co/droidinactu/ebooklauncher/contenttable/ContentColumns.java | 1176 | package uk.co.droidinactu.ebooklauncher.contenttable;
import android.provider.BaseColumns;
public abstract interface ContentColumns extends BaseColumns {
public static final String ADDED_DATE = "added_date";
public static final String FILE_NAME = "file_name";
public static final String FILE_PATH = "file_path";
public static final String FILE_SIZE = "file_size";
public static final String MIME_TYPE = "mime_type";
public static final String MODIFIED_DATE = "modified_date";
public static final String PREVENT_DELETE = "prevent_delete";
public static final String SOURCE_ID = "source_id";
public static final String TYPE_ADDED_DATE = "INTEGER";
public static final String TYPE_FILE_NAME = "TEXT";
public static final String TYPE_FILE_PATH = "TEXT";
public static final String TYPE_FILE_SIZE = "INTEGER";
public static final String TYPE_ID = "INTEGER PRIMARY KEY AUTOINCREMENT";
public static final String TYPE_MIME_TYPE = "TEXT";
public static final String TYPE_MODIFIED_DATE = "INTEGER";
public static final String TYPE_PREVENT_DELETE = "INTEGER";
public static final String TYPE_SOURCE_ID = "INTEGER";
} | gpl-2.0 |
adrianjonmiller/baughneng | wp-content/themes/starkers-child/parts/shared/header.php | 766 | <header id="header" data-behavior="header_collapse">
<div class="container header-container">
<h1 id="logo"><a href="<?php echo home_url(); ?>"><img src="<?php echo get_stylesheet_directory_uri().'/img/logo.png' ?>" alt="<?php bloginfo( 'name' ); ?>" /></a></h1>
<div id="blog-description"><?php bloginfo( 'description' ); ?></div>
<!--- <?php get_search_form(); ?> -->
</div>
</header>
<?php wp_nav_menu(array(
'container'=> 'nav',
'container_id' => 'main-menu-container',
'container_class' => 'menu-container',
'menu_id' =>'main-menu',
'menu_class' =>'menu-inline',
'theme_location' => 'primary',
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>'
)); ?>
<div role="main" id="main">
<div class="container">
<div class="grid"> | gpl-2.0 |
djangogirlscodecamp/curriculum | lesson_2/exercises/warm-up/grade_range.py | 852 | #3.3 Write a program to prompt for a score between 0.0 and 1.0. If the score is out of range, print an error.
#If the score is between 0.0 and 1.0, print a grade using the following table:
#3.3 0.0๋ถํฐ 1.0 ์ฌ์ด์ ์ ์์ ๋ฑ๊ธ์ ๋งค๊ธฐ๊ธฐ ์ํ ํ๋ก๊ทธ๋จ์ ์์ฑํ์ธ์. ์ ์๊ฐ ๋ฒ์๋ฅผ ๋ฒ์ด๋๋ค๋ฉด ์๋ฌ ๋ฉ์ธ์ง๋ฅผ ํ๋ฆฐํธํ์ธ์.
#์ ์๊ฐ 0.0๋ถํฐ 1.0 ์ฌ์ด๋ผ๋ฉด, ์๋ ํ
์ด๋ธ์ ์ฌ์ฉํ์ฌ ๋ฑ๊ธ์ ํ๋ฆฐํธ ํด ๋ณด์ธ์.
#Score Grade
#>= 0.9 A
#>= 0.8 B
#>= 0.7 C
#>= 0.6 D
#< 0.6 F
#If the user enters a value out of range, print a suitable error message and exit. For the test, enter a score of 0.85.///
#์ ์ ๊ฐ ๋ฒ์๋ฅผ ๋ฒ์ด๋ ๊ฐ์ ์
๋ ฅํ์๋ค๋ฉด, ์ ๋นํ ์๋ฌ ๋ฉ์ธ์ง๊ฐ ํ๋ฆฐํธ๋๊ณ ์ข
๋ฃ๋๋๋ก ํ์ธ์. ํ
์คํธ๋ฅผ ์ํ์ฌ ์ ์๋ฅผ 0.85๋ก ์
๋ ฅ ํด ๋ณด์ธ์.
| gpl-2.0 |
naka211/domus | components/com_booking/controller.php | 6624 | <?php
/**
* @version 1.0.0
* @package com_booking
* @copyright Copyright (C) 2015. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Nguyen Thanh Trung <[email protected]> -
*/
// No direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
class BookingController extends JControllerLegacy {
/**
* Method to display a view.
*
* @param boolean $cachable If true, the view output will be cached
* @param array $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return JController This object to support chaining.
* @since 1.5
*/
public function display($cachable = false, $urlparams = false) {
require_once JPATH_COMPONENT . '/helpers/booking.php';
$view = JFactory::getApplication()->input->getCmd('view', 'bookings');
JFactory::getApplication()->input->set('view', $view);
parent::display($cachable, $urlparams);
return $this;
}
function saveOrder(){
$startDate = JRequest::getVar('startDate');
$endDate = JRequest::getVar('endDate');
$quantity = JRequest::getVar('quantity');
$firstName = JRequest::getVar('firstName');
$lastName = JRequest::getVar('lastName');
$name = $firstName." ".$lastName;
$address = JRequest::getVar('address');
$zip = JRequest::getVar('zip');
$city = JRequest::getVar('city');
$email = JRequest::getVar('email');
$phone = JRequest::getVar('phone');
$comment = JRequest::getVar('comment');
$newsletter = JRequest::getVar('newsletter');
$houseName = JRequest::getVar('houseName');
$startDateStr = strtotime(str_replace("/", "-", $startDate));
$endDateStr = strtotime(str_replace("/", "-", $endDate));
$db = JFactory::getDBO();
$q = "INSERT INTO #__booking (first_name, last_name, house_id, checkin, checkout, booking_date, number_of_persons, address, zip, city, email, phone, comment) VALUES ('".$firstName."', '".$lastName."', '".$houseName."', '".$startDateStr."', '".$endDateStr."', '".time()."', ".$quantity.", '".$address."', '".$zip."', '".$city."', '".$email."', '".$phone."', '".$comment."')";
$db->setQuery($q);
$db->execute();
$orderId = $db->insertid();
if($newsletter == 1){
$q = "SELECT subid FROM #__acymailing_subscriber WHERE email = '".$email."'";
$db->setQuery($q);
$subid = $db->loadResult();
if(empty($subid)){
$q = "INSERT INTO #__acymailing_subscriber (email, name, created, enabled, accept, html, source) VALUES ('".$email."', '".$name."', '".time()."', 1, 1, 1, 'module_98')";
$db->setQuery($q);
$db->execute();
$subid = $db->insertid();
$q = "INSERT INTO #__acymailing_listsub (listid, subid, subdate, status) VALUES (1, ".$subid.", '".time()."', 1)";
$db->setQuery($q);
$db->execute();
}
}
$this->sendEmail(1, $orderId);
$this->setRedirect("index.php?option=com_booking&view=home&layout=finish_booking&orderid=".$orderId);
}
function paymentSuccess(){
$orderId = JRequest::getVar('orderid');
$db = JFactory::getDBO();
$q = "SELECT * FROM #__booking WHERE id = ".$orderId;
$db->setQuery($q);
$order = $db->loadObject();
$db->setQuery("UPDATE #__booking SET status = 2 WHERE id = ".$orderId);
$db->execute();
$this->sendEmail(2, $orderId);
$this->setRedirect("index.php?option=com_booking&view=home&layout=success&orderid=".$orderId);
}
function sendEmail($type, $orderId){
$db = JFactory::getDBO();
$q = "SELECT * FROM #__booking WHERE id = ".$orderId;
$db->setQuery($q);
$order = $db->loadObject();
if($type == 1){
$text = '<h3>Tak for din bestilling! Din bestilling vil blive behandlet inden for 24 timer</h3>';
$subject = 'Booking nr. '.sprintf("%05d", $orderId).': ' . $order->house_id;
}
if($type == 2){
$text = '<h3>Betalt total: kr. '.number_format($order->total_da, 0, ',', '.').'</h3>';
$subject = 'Bekrรฆftelse for orden nr. '.sprintf("%05d", $orderId).': ' . $order->house_id;
}
$body = '<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Domusholidays.com</title>
<style>
body {
padding: 0;
margin: 0;
font-family: Helvetica, Arial,sans-serif;
background: #edf2f5;
color: #464646;
font-size: 14px;
line-height: 1.5em;
}
h2 {
font-size: 18px;
}
a {
color: #464646;
text-decoration: none;
}
hr {
border: 1px solid #f5f5f5 ;
}
#page {
width: 800px;
margin: 0 auto;
background: #fff;
padding: 30px;
min-height: 600px;
}
</style>
</head>
<body>
<div id="page">
<h4>Tak for din booking!</h4>
<h2>Booking-nr. '.sprintf("%05d", $orderId).'</h2>
<h2>'.$order->house_id.'</h2>
<hr>
<p><strong>Kundeoplysninger</strong></p>
<table class="table">
<tbody>
<tr>
<td>Ankomst dato:</td>
<td>'.date("d/m/Y", $order->checkin).'</td>
</tr>
<tr>
<td>Udrejse dato:</td>
<td>'.date("d/m/Y", $order->checkout).'</td>
</tr>
<tr>
<td width="20%">Antal Personer:</td>
<td>'.$order->number_of_persons.'</td>
</tr>
<tr>
<td>Fornavn:</td>
<td>'.$order->first_name.'</td>
</tr>
<tr>
<td>Efternavn:</td>
<td>'.$order->last_name.'</td>
</tr>
<tr>
<td>Adresse:</td>
<td>'.$order->address.'</td>
</tr>
<tr>
<td>Postnr:</td>
<td>'.$order->zip.'</td>
</tr>
<tr>
<td>By:</td>
<td>'.$order->city.'</td>
</tr>
<tr>
<td>E-mail:</td>
<td>'.$order->email.'</td>
</tr>
<tr>
<td>Telefon:</td>
<td>'.$order->phone.'</td>
</tr>
<tr>
<td>Besked:</td>
<td>'.$order->comment.'</td>
</tr>
</tbody>
</table>
<hr>
'.$text.'
<hr>
<p style="font-size: 14px;"><b>Domus Holidays ApS</b><br/>
Idrรฆtsvej 62<br/>
DK-2650 Hvidovre<br/>
CVR-nr. 37311774<br>
<a href="mailto:[email protected]"> [email protected]</a><br>
<a href="www.domusholidays.com">www.domusholidays.com</a></p>
</div>
</body>
</html>';
$app = JFactory::getApplication();
$mailfrom = $app->get('mailfrom');
$fromname = $app->get('fromname');
$admin = JFactory::getUser(116);
$admin_email = $admin->email;
$mail = JFactory::getMailer();
$mail->addRecipient($order->email);
$mail->addCC($admin_email);
$mail->IsHTML(true);
$mail->setSender(array($mailfrom, $fromname));
$mail->setSubject($subject);
$mail->setBody($body);
$sent = $mail->Send();
}
}
| gpl-2.0 |
ViktorHofer/AllAboutManga | AllAboutManga.Business.Libs/Models/MangaOrderChangedEvent.cs | 177 | ๏ปฟusing Microsoft.Practices.Prism.PubSubEvents;
namespace AllAboutManga.Business.Libs.Models
{
public class MangaOrderChangedEvent : PubSubEvent<MangaOrder>
{
}
}
| gpl-2.0 |
johannes-mueller/ardour | libs/widgets/stateful_button.cc | 6646 | /*
Copyright (C) 2000-2007 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <string>
#include <iostream>
#include <gtkmm/main.h>
#include "widgets/stateful_button.h"
using namespace Gtk;
using namespace Glib;
using namespace ArdourWidgets;
using namespace std;
StateButton::StateButton ()
: visual_state (0)
, _self_managed (false)
, _is_realized (false)
, style_changing (false)
, state_before_prelight (Gtk::STATE_NORMAL)
, is_toggle (false)
{
}
void
StateButton::set_visual_state (int n)
{
if (!_is_realized) {
/* not yet realized */
visual_state = n;
return;
}
if (n == visual_state) {
return;
}
string name = get_widget_name ();
name = name.substr (0, name.find_last_of ('-'));
switch (n) {
case 0:
/* relax */
break;
case 1:
name += "-active";
break;
case 2:
name += "-alternate";
break;
case 3:
name += "-alternate2";
break;
}
set_widget_name (name);
visual_state = n;
}
void
StateButton::avoid_prelight_on_style_changed (const Glib::RefPtr<Gtk::Style>& /* old_style */, GtkWidget* widget)
{
/* don't go into an endless recursive loop if we're changing
the style in response to an existing style change.
*/
if (style_changing) {
return;
}
if (gtk_widget_get_state (widget) == GTK_STATE_PRELIGHT) {
/* avoid PRELIGHT: make sure that the prelight colors in this new style match
the colors of the new style in whatever state we were in
before we switched to prelight.
*/
GtkRcStyle* rcstyle = gtk_widget_get_modifier_style (widget);
GtkStyle* style = gtk_widget_get_style (widget);
rcstyle->fg[GTK_STATE_PRELIGHT] = style->fg[state_before_prelight];
rcstyle->bg[GTK_STATE_PRELIGHT] = style->bg[state_before_prelight];
rcstyle->color_flags[GTK_STATE_PRELIGHT] = (GtkRcFlags) (GTK_RC_FG|GTK_RC_BG);
style_changing = true;
g_object_ref (rcstyle);
gtk_widget_modify_style (widget, rcstyle);
Widget* child = get_child_widget();
if (child) {
gtk_widget_modify_style (GTK_WIDGET(child->gobj()), rcstyle);
}
g_object_unref (rcstyle);
style_changing = false;
}
}
void
StateButton::avoid_prelight_on_state_changed (Gtk::StateType old_state, GtkWidget* widget)
{
GtkStateType state = gtk_widget_get_state (widget);
if (state == GTK_STATE_PRELIGHT) {
state_before_prelight = old_state;
/* avoid PRELIGHT when currently ACTIVE:
if we just went into PRELIGHT, make sure that the colors
match those of whatever state we were in before.
*/
GtkRcStyle* rcstyle = gtk_widget_get_modifier_style (widget);
GtkStyle* style = gtk_widget_get_style (widget);
rcstyle->fg[GTK_STATE_PRELIGHT] = style->fg[old_state];
rcstyle->bg[GTK_STATE_PRELIGHT] = style->bg[old_state];
rcstyle->color_flags[GTK_STATE_PRELIGHT] = (GtkRcFlags) (GTK_RC_FG|GTK_RC_BG);
g_object_ref (rcstyle);
gtk_widget_modify_style (widget, rcstyle);
Widget* child = get_child_widget ();
if (child) {
gtk_widget_modify_style (GTK_WIDGET(child->gobj()), rcstyle);
}
g_object_unref (rcstyle);
}
}
/* ----------------------------------------------------------------- */
StatefulToggleButton::StatefulToggleButton ()
{
is_toggle = true;
}
StatefulToggleButton::StatefulToggleButton (const std::string& label)
: ToggleButton (label)
{
is_toggle = true;
}
void
StatefulToggleButton::on_realize ()
{
ToggleButton::on_realize ();
_is_realized = true;
visual_state++; // to force transition
set_visual_state (visual_state - 1);
}
void
StatefulButton::on_realize ()
{
Button::on_realize ();
_is_realized = true;
visual_state++; // to force transition
set_visual_state (visual_state - 1);
}
void
StatefulToggleButton::on_toggled ()
{
if (!_self_managed) {
if (get_active()) {
set_state (Gtk::STATE_ACTIVE);
} else {
set_state (Gtk::STATE_NORMAL);
}
}
}
void
StatefulToggleButton::on_style_changed (const Glib::RefPtr<Gtk::Style>& style)
{
avoid_prelight_on_style_changed (style, GTK_WIDGET(gobj()));
Button::on_style_changed (style);
}
void
StatefulToggleButton::on_state_changed (Gtk::StateType old_state)
{
avoid_prelight_on_state_changed (old_state, GTK_WIDGET(gobj()));
Button::on_state_changed (old_state);
}
Widget*
StatefulToggleButton::get_child_widget ()
{
return get_child();
}
void
StatefulToggleButton::set_widget_name (const std::string& name)
{
set_name (name);
Widget* w = get_child();
if (w) {
w->set_name (name);
}
}
/*--------------------------------------------- */
StatefulButton::StatefulButton ()
{
}
StatefulButton::StatefulButton (const std::string& label)
: Button (label)
{
}
void
StatefulButton::on_style_changed (const Glib::RefPtr<Gtk::Style>& style)
{
avoid_prelight_on_style_changed (style, GTK_WIDGET(gobj()));
Button::on_style_changed (style);
}
void
StatefulButton::on_state_changed (Gtk::StateType old_state)
{
avoid_prelight_on_state_changed (old_state, GTK_WIDGET(gobj()));
Button::on_state_changed (old_state);
}
Widget*
StatefulButton::get_child_widget ()
{
return get_child();
}
void
StatefulButton::set_widget_name (const std::string& name)
{
set_name (name);
Widget* w = get_child();
if (w) {
w->set_name (name);
}
}
| gpl-2.0 |
havatv/qgisnnjoinplugin | i18n/NNJoin_nn.ts | 10902 | <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS><TS version="2.0">
<context>
<name>NNJoin</name>
<message>
<location filename="NNJoin_plugin.py" line="80"/>
<source>&NNJoin</source>
<translation>&NN-kopling</translation>
</message>
<message>
<location filename="NNJoin_plugin.py" line="79"/>
<source>NNJoin</source>
<translation>NN-kopling</translation>
</message>
<message>
<location filename="NNJoin_plugin.py" line="154"/>
<source>Information</source>
<translation>Informasjon</translation>
</message>
<message>
<location filename="NNJoin_plugin.py" line="154"/>
<source>Vector layers not found</source>
<translation>Ingen vektorlag</translation>
</message>
</context>
<context>
<name>NNJoinDialog</name>
<message>
<location filename="NNJoin_gui.py" line="53"/>
<source>NNJoin</source>
<translation>NN-kopling</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="126"/>
<source>No input layer defined</source>
<translation>Innlaget mangler</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="132"/>
<source>No join layer defined</source>
<translation>Koplingslaget mangler</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="154"/>
<source>Joining</source>
<translation>Kopler</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="54"/>
<source>Cancel</source>
<translation>Avbryt</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="211"/>
<source>NNJoin finished</source>
<translation>NN-kopling avslutta</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="577"/>
<source>Error</source>
<translation>Feil</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="585"/>
<source>Warning</source>
<translation>Advarsel</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="593"/>
<source>Info</source>
<translation>Informasjon</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="57"/>
<source>OK</source>
<translation>Kรธyr</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="55"/>
<source>Close</source>
<translation>Avslutt</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="236"/>
<source>Worker</source>
<translation>Arbeidsprosess</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="221"/>
<source>Aborted</source>
<translation>Avbrote</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="223"/>
<source>No layer created</source>
<translation>Ikkje noko lag</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="56"/>
<source>Help</source>
<translation>Hjelp</translation>
</message>
<message>
<location filename="NNJoin_gui.py" line="365"/>
<source>Information</source>
<translation>Informasjon</translation>
</message>
</context>
<context>
<name>NNJoinDialogBase</name>
<message>
<location filename="ui_frmNNJoin.ui" line="14"/>
<source>NNJoin</source>
<translation>NN-kopling</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="32"/>
<source>Input vector layer</source>
<translation>Innlag</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="130"/>
<source>Join vector layer</source>
<translation>Koplingslag</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="278"/>
<source>Output layer</source>
<translation>Resultatlag</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="361"/>
<source>Indicates the progress of the join operation</source>
<translation>Indikerer framdrifta i arbeidet</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="377"/>
<source>OK to run the join<br>Close to quit<br>Cancel to abort the join</source>
<translation>Kรธyr: Utfรธr koplinga<br>Avslutt: Avslutt programmet<br>Avbryt: Avbryt programmet</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="52"/>
<source>The base layer for the join.<br>Each feature of this layer will be joined to the nearest neighbour from the join layer.</source>
<translation>Basislaget for koplinga.<br>Kvart objekt i dette laget vil bli kopla til det nรฆraste objektet i koplingslaget</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="150"/>
<source>The join layer.<br>A feature from this layer is joined to all the features from the the input layer that has this features as it's nearest neighbour.</source>
<translation>Koplingslaget.<br>Eit objekt fra dette laget koplast til alle dei objekta i innlaget som det er nรฆraste nabo til</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="290"/>
<source>The result layer that contains the join.<br>For each feature of the input layer, the output layer contains that feature with all it's attributes and all the attributes of the nearest feature in the join layer added.</source>
<translation>Resultatlaget som inneholder koplinga.<br>For kvart objekt i innlaget vil utlaget inneholde objektet med sine attributt pluss attributtane til det nรฆrastliggande objektet i koplingslaget</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="256"/>
<source>Join prefix:</source>
<translation>Prefiks:</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="266"/>
<source>join_</source>
<translation>join_</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="157"/>
<source>Geometry type:</source>
<translation>Geometritype:</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="169"/>
<source>Unknown</source>
<translation>Ukjent</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="105"/>
<source>Approximate geometries by centroids</source>
<translation>Tilnรฆrming (sentroider)</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="263"/>
<source>The prefix used for the join layer attributes in the result layer.<br>Without a prefix, a join layer attribute that has the same name as an input layer attribute will not be included in the result layer.</source>
<translation>Prefikset som nyttast for attributtane frรฅ koplingslaget i resultatlaget.<br>Utan prefiks vil ein miste alle attributtar frรฅ koplingslaget som har same navn som ein attributt i inputlaget.</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="203"/>
<source>Approximate geometries</source>
<translation>Omtrentlege geometriar</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="210"/>
<source>Use an index to speed up the join</source>
<translation>Bruk ein romleg indeks for รฅ fรฅ koplinga til รฅ gรฅ fortare</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="213"/>
<source>Use index</source>
<translation>Bruk indeks</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="102"/>
<source>Use approximate input geometries.<br>The result will also be approximate.<br>Could speed up the join considerably.</source>
<translation>Bruk tilnรฆrma inngeometriar.<br>Resultatet vil ogsรฅ vรฆre tilnรฆrma.<br>Kan fรฅ koplinga til รฅ gรฅ fortare.</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="200"/>
<source>Uses an approximation of the geometry (bounding box) for the join.<br/>The result will also be approximate.</source>
<translation>Bruk tilnรฆrma koplingsgeometri.<br>Resultatet vil ogsรฅ vรฆre tilnรฆrma.</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="393"/>
<source>Get some help</source>
<translation>Fรฅ hjelp</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="396"/>
<source>Help</source>
<translation>Hjelp</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="315"/>
<source>Neighbour distance field:</source>
<translation>Felt for naboavstand</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="322"/>
<source>The field name used for the distance to the nearest neighbour.<br>Can not be the same as an existing field name.</source>
<translation>Namnet til feltet med avstand til nรฆrmaste nabo.<br>Kan ikkje vere likt eit eksisterande feltnamn.</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="325"/>
<source>distance</source>
<translation>avstand</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="189"/>
<source>Selected only</source>
<translation>Kun valgte</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="239"/>
<source>Avoids joining geometries that have a contained relation</source>
<translation>Unngรฅr รฅ kople geometriar som har eit "inneholdt i"-forhold</translation>
</message>
<message>
<location filename="ui_frmNNJoin.ui" line="242"/>
<source>Exclude containing</source>
<translation>Ekskluder "inneholdt i"</translation>
</message>
</context>
<context>
<name>Worker</name>
<message>
<location filename="NNJoin_engine.py" line="424"/>
<source>CRS Transformation error!</source>
<translation>Koordinattransformasjonsfeil!</translation>
</message>
</context>
</TS>
| gpl-2.0 |
camilin1129/classnet | application/views/user/logout/logout_success.php | 7353 | <?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>ClassNet</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Free HTML5 Website Template by gettemplates.co" />
<meta name="keywords" content="free website templates, free html5, free template, free bootstrap, free website template, html5, css3, mobile first, responsive" />
<meta name="author" content="gettemplates.co" />
<!--
//////////////////////////////////////////////////////
FREE HTML5 TEMPLATE
DESIGNED & DEVELOPED by FreeHTML5.co
Website: http://freehtml5.co/
Email: [email protected]
Twitter: http://twitter.com/fh5co
Facebook: https://www.facebook.com/fh5co
//////////////////////////////////////////////////////
-->
<!-- Facebook and Twitter integration -->
<meta property="og:title" content=""/>
<meta property="og:image" content=""/>
<meta property="og:url" content=""/>
<meta property="og:site_name" content=""/>
<meta property="og:description" content=""/>
<meta name="twitter:title" content="" />
<meta name="twitter:image" content="" />
<meta name="twitter:url" content="" />
<meta name="twitter:card" content="" />
<!-- <link href='https://fonts.googleapis.com/css?family=Work+Sans:400,300,600,400italic,700' rel='stylesheet' type='text/css'> -->
<!-- Animate.css -->
<link rel="stylesheet" href="<?= base_url('assets/css/animate.css') ?>">
<!-- Icomoon Icon Fonts-->
<link rel="stylesheet" href="<?= base_url('assets/css/icomoon.css') ?>">
<!-- Bootstrap -->
<link rel="stylesheet" href="<?= base_url('assets/css/bootstrap.css') ?>">
<!-- Theme style -->
<link rel="stylesheet" href="<?= base_url('assets/css/style.css') ?>">
<link rel="stylesheet" href="<?= base_url('assets/css/my_style.css') ?>">
<!-- Modernizr JS -->
<script src="<?= base_url('assets/js/modernizr-2.6.2.min.js') ?>"></script>
<!-- FOR IE9 below -->
<!--[if lt IE 9]>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="fh5co-loader"></div>
<div id="page">
<nav class="fh5co-nav" role="navigation">
<div class="container">
<div class="row">
<div class="col-xs-2">
<div id="fh5co-logo"><a href="<?= base_url('/')?>">ClassNet.</a></div>
</div>
<div class="col-xs-10 text-right menu-1">
<ul>
<li><a href="<?= base_url('/')?>">Home</a></li>
<li><a href="<?= base_url('work')?>">Work</a></li>
<li><a href="<?= base_url('about')?>">About</a></li>
<li class="has-dropdown">
<a href="<?= base_url('services')?>">Services</a>
<ul class="dropdown">
<li><a href="#">Web Design</a></li>
<li><a href="#">eCommerce</a></li>
<li><a href="#">Branding</a></li>
<li><a href="#">API</a></li>
</ul>
</li>
<li class="has-dropdown">
<a href="#">Tools</a>
<ul class="dropdown">
<li><a href="#">HTML5</a></li>
<li><a href="#">CSS3</a></li>
<li><a href="#">Sass</a></li>
<li><a href="#">jQuery</a></li>
</ul>
</li>
<li><a href="<?= base_url('contact')?>">Contact</a></li>
<?php if (isset($_SESSION['email']) && $_SESSION['logged_in'] === true) : ?>
<li class="btn-cta"><a href="<?= base_url('logout') ?>"><span>Salir</span></a></li>
<?php else : ?>
<li class="btn-cta"><a href="<?= base_url('reglog') ?>"><span>Registrate</span></a></li>
<li class="btn-cta"><a href="<?= base_url('loginreg') ?>"><span>Iniciar Sesiรณn</span></a></li>
<?php endif; ?>
</ul>
</div>
</div>
</div>
</nav>
<header id="fh5co-header" class="fh5co-cover fh5co-cover-sm" role="banner" style="background-image:url(<?= base_url('assets/images/img_bg_2.jpg')?>);">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2 text-center">
<div class="display-t">
<div class="display-tc animate-box" data-animate-effect="fadeIn">
<h1 style="font-size:35px">ClassNet una gran experiencia</h1>
<h2>Regresa pronto!</h2>
<h2 style="color:#F35F55">Usted a salido correctamente</h2>
</div>
</div>
</div>
</div>
</div>
</header>
<div id="fh5co-contact">
<div class="container">
<div class="row">
<div class="col-md-4"> </div>
<div class="col-md-4 col-md text-center animate-box ">
<h1 style="color:#F35F55"><strong>ClassNet</strong></h1>
<h3 style="color:#F35F55">Te esperamos pronto!</h3>
</div>
<div class="col-md-4"> </div>
</div>
</div>
</div>
<footer id="fh5co-footer" role="contentinfo">
<div class="container">
<div class="row row-pb-md">
<div class="col-md-4 fh5co-widget">
<h3>King.</h3>
<p>Facilis ipsum reprehenderit nemo molestias. Aut cum mollitia reprehenderit. Eos cumque dicta adipisci architecto culpa amet.</p>
<p><a href="#">Learn More</a></p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6 col-md-push-1">
<ul class="fh5co-footer-links">
<li><a href="#">About</a></li>
<li><a href="#">Help</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Terms</a></li>
<li><a href="#">Meetups</a></li>
</ul>
</div>
<div class="col-md-2 col-sm-4 col-xs-6 col-md-push-1">
<ul class="fh5co-footer-links">
<li><a href="#">Shop</a></li>
<li><a href="#">Privacy</a></li>
<li><a href="#">Testimonials</a></li>
<li><a href="#">Handbook</a></li>
<li><a href="#">Held Desk</a></li>
</ul>
</div>
<div class="col-md-2 col-sm-4 col-xs-6 col-md-push-1">
<ul class="fh5co-footer-links">
<li><a href="#">Find Designers</a></li>
<li><a href="#">Find Developers</a></li>
<li><a href="#">Teams</a></li>
<li><a href="#">Advertise</a></li>
<li><a href="#">API</a></li>
</ul>
</div>
</div>
<div class="row copyright">
<div class="col-md-12 text-center">
<p>
<small class="block">© 2016 Free HTML5. All Rights Reserved.</small>
<small class="block">Designed by <a href="http://freehtml5.co/" target="_blank">FreeHTML5.co</a> Demo Images: <a href="http://unsplash.com/" target="_blank">Unsplash</a></small>
</p>
<p>
<ul class="fh5co-social-icons">
<li><a href="#"><i class="icon-twitter"></i></a></li>
<li><a href="#"><i class="icon-facebook"></i></a></li>
<li><a href="#"><i class="icon-linkedin"></i></a></li>
<li><a href="#"><i class="icon-dribbble"></i></a></li>
</ul>
</p>
</div>
</div>
</div>
</footer>
</div>
<div class="gototop js-top">
<a href="#" class="js-gotop"><i class="icon-arrow-up"></i></a>
</div>
<!-- jQuery -->
<script src="<?= base_url('assets/js/jquery.min.js') ?>"></script>
<!-- jQuery Easing -->
<script src="<?= base_url('assets/js/jquery.easing.1.3.js') ?>"></script>
<!-- Bootstrap -->
<script src="<?= base_url('assets/js/bootstrap.min.js') ?>"></script>
<!-- Waypoints -->
<script src="<?= base_url('assets/js/jquery.waypoints.min.js') ?>"></script>
<!-- Main -->
<script src="<?= base_url('assets/js/main.js') ?>"></script>
</body>
</html>
| gpl-2.0 |
ACP3/module-files | Cache.php | 1388 | <?php
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENSE file at the top-level module directory for licensing details.
*/
namespace ACP3\Modules\ACP3\Files;
use ACP3\Core;
use ACP3\Modules\ACP3\Files\Model\Repository\FilesRepository;
class Cache extends Core\Modules\AbstractCacheStorage
{
const CACHE_ID = 'details_id_';
/**
* @var \ACP3\Modules\ACP3\Files\Model\Repository\FilesRepository
*/
protected $filesRepository;
/**
* @param \ACP3\Core\Cache $cache
* @param \ACP3\Modules\ACP3\Files\Model\Repository\FilesRepository $filesRepository
*/
public function __construct(
Core\Cache $cache,
FilesRepository $filesRepository
) {
parent::__construct($cache);
$this->filesRepository = $filesRepository;
}
/**
* @param int $fileId
*
* @return array
*/
public function getCache($fileId)
{
if ($this->cache->contains(self::CACHE_ID . $fileId) === false) {
$this->saveCache($fileId);
}
return $this->cache->fetch(self::CACHE_ID . $fileId);
}
/**
* @param int $fileId
*
* @return bool
*/
public function saveCache($fileId)
{
return $this->cache->save(self::CACHE_ID . $fileId, $this->filesRepository->getOneById($fileId));
}
}
| gpl-2.0 |
noba3/KoTos | addons/plugin.video.skygo/resources/TVGuide/textadd.py | 655 | import xbmc
import xbmcaddon
addon = xbmcaddon.Addon('plugin.video.skygo')
addonname = addon.getAddonInfo('name')
addonID = addon.getAddonInfo('id')
ini_add = xbmc.translatePath('special://home/addons/'+addonID+'/resources/TVGuide/add.ini')
def textadd():
try:
TV_ini = xbmc.translatePath('special://home/addons/script.tvguide/resources/addons.ini')
infile = open (ini_add, 'r')
filestr = infile.read()
outfile = open(TV_ini, 'a')
outfile.write(filestr)
xbmc.executebuiltin('Notification(Skygo sucessfully added to TVGuide addons,400,logo.png)')
except:
xbmc.executebuiltin('Notification(Failed!, Skygo not added!,200)')
textadd() | gpl-2.0 |
mcules/self-commerce | includes/modules/shipping/freeamount.php | 4355 | <?php
/* -----------------------------------------------------------------------------------------
$Id: freeamount.php 17 2012-06-04 20:33:29Z deisold $
XT-Commerce - community made shopping
http://www.xt-commerce.com
Copyright (c) 2003 XT-Commerce
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(freeamount.php,v 1.01 2002/01/24); www.oscommerce.com
(c) 2003 nextcommerce (freeamount.php,v 1.12 2003/08/24); www.nextcommerce.org
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
class freeamount {
var $code, $title, $description, $icon, $enabled;
function freeamount() {
$this->code = 'freeamount';
$this->title = MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE;
$this->description = MODULE_SHIPPING_FREEAMOUNT_TEXT_DESCRIPTION;
$this->icon =''; // change $this->icon = DIR_WS_ICONS . 'shipping_ups.gif'; to some freeshipping icon
$this->sort_order = MODULE_SHIPPING_FREEAMOUNT_SORT_ORDER;
$this->enabled = ((MODULE_SHIPPING_FREEAMOUNT_STATUS == 'True') ? true : false);
}
function quote($method = '') {
global $xtPrice;
if (( $xtPrice->xtcRemoveCurr($_SESSION['cart']->show_total()) < MODULE_SHIPPING_FREEAMOUNT_AMOUNT ) && MODULE_SHIPPING_FREEAMOUNT_DISPLAY == 'False')
return;
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE);
if ( $xtPrice->xtcRemoveCurr($_SESSION['cart']->show_total()) < MODULE_SHIPPING_FREEAMOUNT_AMOUNT )
$this->quotes['error'] = sprintf(MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY,$xtPrice->xtcFormat(MODULE_SHIPPING_FREEAMOUNT_AMOUNT,true,0,true));
else
$this->quotes['methods'] = array(array('id' => $this->code,
'title' => sprintf(MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY,$xtPrice->xtcFormat(MODULE_SHIPPING_FREEAMOUNT_AMOUNT,true,0,true)),
'cost' => 0));
if (xtc_not_null($this->icon)) $this->quotes['icon'] = xtc_image($this->icon, $this->title);
return $this->quotes;
}
function check() {
$check = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_FREEAMOUNT_STATUS'");
$check = xtc_db_num_rows($check);
return $check;
}
function install() {
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_SHIPPING_FREEAMOUNT_STATUS', 'True', '6', '7', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_FREEAMOUNT_ALLOWED', '', '6', '0', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_SHIPPING_FREEAMOUNT_DISPLAY', 'True', '6', '7', 'xtc_cfg_select_option(array(\'True\', \'False\'), ', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_FREEAMOUNT_AMOUNT', '50.00', '6', '8', now())");
xtc_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_SHIPPING_FREEAMOUNT_SORT_ORDER', '0', '6', '4', now())");
}
function remove() {
xtc_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}
function keys() {
return array('MODULE_SHIPPING_FREEAMOUNT_STATUS','MODULE_SHIPPING_FREEAMOUNT_ALLOWED', 'MODULE_SHIPPING_FREEAMOUNT_DISPLAY', 'MODULE_SHIPPING_FREEAMOUNT_AMOUNT','MODULE_SHIPPING_FREEAMOUNT_SORT_ORDER');
}
}
?>
| gpl-2.0 |
halimc17/buskipm_wp | wp-content/plugins/photo-gallery/admin/views/BWGViewAddAlbumsGalleries.php | 9288 | <?php
class BWGViewAddAlbumsGalleries {
////////////////////////////////////////////////////////////////////////////////////////
// Events //
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
// Constants //
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
// Variables //
////////////////////////////////////////////////////////////////////////////////////////
private $model;
////////////////////////////////////////////////////////////////////////////////////////
// Constructor & Destructor //
////////////////////////////////////////////////////////////////////////////////////////
public function __construct($model) {
$this->model = $model;
}
////////////////////////////////////////////////////////////////////////////////////////
// Public Methods //
////////////////////////////////////////////////////////////////////////////////////////
public function display() {
$album_id = ((isset($_GET['album_id'])) ? esc_html(stripslashes($_GET['album_id'])) : ((isset($_POST['album_id'])) ? esc_html(stripslashes($_POST['album_id'])) : ''));
$rows_data = $this->model->get_rows_data($album_id);
$page_nav = $this->model->page_nav($album_id);
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
$per_page = $this->model->per_page();
$pager = 0;
wp_print_scripts('jquery');
wp_print_scripts('wp-pointer');
wp_print_styles('admin-bar');
wp_print_styles('dashicons');
wp_print_styles('wp-admin');
wp_print_styles('buttons');
wp_print_styles('wp-auth-check');
wp_print_styles('wp-pointer');
if (get_bloginfo('version') < '3.9') { ?>
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
<?php } ?>
<link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css?ver='.wd_bwg_version(); ?>" id="spider_audio_player_tables-css" rel="stylesheet">
<script src="<?php echo WD_BWG_URL . '/js/bwg.js?ver='.wd_bwg_version(); ?>" type="text/javascript"></script>
<form class="wrap wp-core-ui bwg_form" id="albums_galleries_form" method="post" action="<?php echo add_query_arg(array('action' => 'addAlbumsGalleries', 'width' => '700', 'height' => '550', 'callback' => 'bwg_add_items', 'bwg_items_per_page'=>$per_page , 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:95%; margin: 0 auto;">
<?php wp_nonce_field( 'addAlbumsGalleries', 'bwg_nonce' ); ?>
<h2 style="width:200px;float:left"><?php _e("Albums/Galleries", 'bwg_back'); ?></h2>
<a href="" class="thickbox thickbox-preview" id="content-add_media" title="Add Album/Gallery" onclick="spider_get_items(event);" style="float:right; padding: 9px 0px 4px 0">
<img id='add_albums' src="<?php echo WD_BWG_URL . '/images/add_but.png'; ?>" style="border:none;" />
</a>
<div class="tablenav top">
<?php
WDWLibrary::search(__("Name", 'bwg_back'), $search_value, 'albums_galleries_form');
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_galleries_form', $per_page);
?>
</div>
<table class="wp-list-table widefat fixed pages">
<thead>
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
<th class="table_small_col <?php if ($order_by == 'id') {echo $order_class;} ?>">
<a onclick="spider_set_input_value('order_by', 'id');
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
spider_form_submit(event, 'albums_galleries_form')" href="">
<span>ID</span><span class="sorting-indicator"></span>
</a>
</th>
<th class="table_medium_col_uncenter <?php if ($order_by == 'is_album') {echo $order_class;} ?>">
<a onclick="spider_set_input_value('task', '');
spider_set_input_value('order_by', 'is_album');
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'is_album') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
spider_form_submit(event, 'albums_galleries_form')" href="">
<span><?php _e("Type", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
</a>
</th>
<th class="<?php if ($order_by == 'name') {echo $order_class;} ?>">
<a onclick="spider_set_input_value('order_by', 'name');
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
spider_form_submit(event, 'albums_galleries_form')" href="">
<span><?php _e("Name", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
</a>
</th>
</thead>
<tbody id="tbody_albums_galleries">
<?php
if ($rows_data) {
$iterator = 0;
foreach ($rows_data as $row_data) {
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
?>
<tr id="tr_<?php echo $iterator; ?>" <?php echo $alternate; ?>>
<td class="table_small_col check-column"><input id="check_<?php echo $iterator; ?>" name="check_<?php echo $iterator; ?>" type="checkbox" /></td>
<td id="id_<?php echo $iterator; ?>" class="table_small_col"><?php echo $row_data->id; ?></td>
<td id="url_<?php echo $iterator; ?>" class="table_medium_col_uncenter"><?php echo ($row_data->is_album ? __("Album", 'bwg_back') : __("Gallery", 'bwg_back')) ; ?></td>
<td>
<a onclick="window.parent.bwg_add_items(['<?php echo $row_data->id?>'],['<?php echo htmlspecialchars(addslashes($row_data->name))?>'], ['<?php echo htmlspecialchars(addslashes($row_data->is_album))?>'])" id="a_<?php echo $iterator; ?>" style="cursor:pointer;">
<?php echo $row_data->name?>
</a>
</td>
</tr>
<?php
$iterator++;
}
}
?>
</tbody>
</table>
<div class="tablenav bottom">
<?php
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_galleries_form', $per_page);
?>
</div>
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
<input id="album_id" name="album_id" type="hidden" value="<?php echo $album_id; ?>" />
</form>
<script src="<?php echo get_admin_url(); ?>load-scripts.php?c=1&load%5B%5D=common,admin-bar" type="text/javascript"></script>
<?php
include_once (WD_BWG_DIR .'/includes/bwg_pointers.php');
new BWG_pointers();
die();
}
////////////////////////////////////////////////////////////////////////////////////////
// Getters & Setters //
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
// Private Methods //
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
// Listeners //
////////////////////////////////////////////////////////////////////////////////////////
} | gpl-2.0 |
kenmcc/mypywws | src/pywws/ToTwitter.py | 5798 | #!/usr/bin/env python
# pywws - Python software for USB Wireless Weather Stations
# http://github.com/jim-easterbrook/pywws
# Copyright (C) 2008-14 Jim Easterbrook [email protected]
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""Post a message to Twitter
::
%s
This module posts a brief message to `Twitter
<https://twitter.com/>`_. Before posting to Twitter you need to set up
an account and then authorise pywws by running the
:py:mod:`TwitterAuth` program. See :doc:`../guides/twitter` for
detailed instructions.
"""
from __future__ import absolute_import
__docformat__ = "restructuredtext en"
__usage__ = """
usage: python -m pywws.ToTwitter [options] data_dir file
options are:
-h | --help display this help
data_dir is the root directory of the weather data
file is the text file to be uploaded
"""
__doc__ %= __usage__
__usage__ = __doc__.split('\n')[0] + __usage__
import codecs
import getopt
import logging
import sys
twitter = None
tweepy = None
try:
import twitter
except ImportError:
try:
import tweepy
except:
print "Not actually doing any twittering"
pass
from .constants import Twitter as pct
from . import DataStore
from . import Localisation
from .Logger import ApplicationLogger
class TweepyHandler(object):
def __init__(self, key, secret, latitude, longitude):
auth = tweepy.OAuthHandler(pct.consumer_key, pct.consumer_secret)
auth.set_access_token(key, secret)
self.api = tweepy.API(auth)
if latitude is not None and longitude is not None:
self.kwargs = {'lat' : latitude, 'long' : longitude}
else:
self.kwargs = {}
def post(self, status, media):
if media:
self.api.update_with_media(media, status[:117], **self.kwargs)
else:
self.api.update_status(status[:140], **self.kwargs)
class PythonTwitterHandler(object):
def __init__(self, key, secret, latitude, longitude):
self.api = twitter.Api(
consumer_key=pct.consumer_key,
consumer_secret=pct.consumer_secret,
access_token_key=key, access_token_secret=secret)
if latitude is not None and longitude is not None:
self.kwargs = {'latitude' : latitude, 'longitude' : longitude}
else:
self.kwargs = {}
def post(self, status, media):
if media:
self.api.PostMedia(status[:117], media, **self.kwargs)
else:
self.api.PostUpdate(status[:140], **self.kwargs)
class noApi(object):
def post(self, status, media):
pass
class ToTwitter(object):
def __init__(self, params):
self.logger = logging.getLogger('pywws.ToTwitter')
self.old_ex = None
# get character encoding of template output
self.encoding = params.get('config', 'template encoding', 'iso-8859-1')
# get parameters
key = params.get('twitter', 'key')
secret = params.get('twitter', 'secret')
if (not key) or (not secret):
raise RuntimeError('Authentication data not found')
latitude = params.get('twitter', 'latitude')
longitude = params.get('twitter', 'longitude')
# open API
if twitter:
self.api = PythonTwitterHandler(key, secret, latitude, longitude)
elif tweepy:
self.api = TweepyHandler(key, secret, latitude, longitude)
else:
self.api = noApi()
def Upload(self, tweet):
if not tweet:
return True
if tweet.startswith('media'):
media, tweet = tweet.split('\n', 1)
media = media.split()[1]
else:
media = None
if not isinstance(tweet, unicode):
tweet = tweet.decode(self.encoding)
try:
self.api.post(tweet, media)
return True
except Exception, ex:
e = str(ex)
if 'is a duplicate' in e:
return True
if e != self.old_ex:
self.logger.error(e)
self.old_ex = e
return False
def UploadFile(self, file):
tweet_file = codecs.open(file, 'r', encoding=self.encoding)
tweet = tweet_file.read()
tweet_file.close()
return self.Upload(tweet)
def main(argv=None):
if argv is None:
argv = sys.argv
try:
opts, args = getopt.getopt(argv[1:], "h", ['help'])
except getopt.error, msg:
print >>sys.stderr, 'Error: %s\n' % msg
print >>sys.stderr, __usage__.strip()
return 1
# process options
for o, a in opts:
if o in ('-h', '--help'):
print __usage__.strip()
return 0
# check arguments
if len(args) != 2:
print >>sys.stderr, "Error: 2 arguments required"
print >>sys.stderr, __usage__.strip()
return 2
logger = ApplicationLogger(1)
params = DataStore.params(args[0])
Localisation.SetApplicationLanguage(params)
if ToTwitter(params).UploadFile(args[1]):
return 0
return 3
if __name__ == "__main__":
sys.exit(main())
| gpl-2.0 |
Jbouska419/craftsman | administrator/components/com_hikashop/views/category/tmpl/selectstatus.php | 2686 | <?php
/**
* @package HikaShop for Joomla!
* @version 2.3.1
* @author hikashop.com
* @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><script language="javascript" type="text/javascript">
<!--
var selectedContents = new Array();
var allElements = <?php echo count($this->rows);?>;
<?php
foreach($this->rows as $oneRow){
if(!empty($oneRow->selected)){
echo "selectedContents['".$oneRow->category_name."'] = 'content';";
}
}
?>
function applyContent(contentid,rowClass){
if(selectedContents[contentid]){
window.document.getElementById('content'+contentid).className = rowClass;
delete selectedContents[contentid];
}else{
window.document.getElementById('content'+contentid).className = 'selectedrow';
selectedContents[contentid] = 'content';
}
}
function insertTag(){
var tag = '';
for(var i in selectedContents){
if(selectedContents[i] == 'content'){
allElements--;
if(tag != '') tag += ',';
tag = tag + i;
}
}
window.parent.document.getElementById('<?php echo $this->controlName; ?>').value = tag;
window.parent.hikashop.closeBox();
}
//-->
</script>
<style type="text/css">
table.adminlist tr.selectedrow td{
background-color:#FDE2BA;
}
</style>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT ?>" method="post" name="adminForm" id="adminForm">
<div style="float:right;margin-bottom : 10px">
<button class="btn" id='insertButton' onclick="insertTag(); return false;"><?php echo JText::_('HIKA_APPLY'); ?></button>
</div>
<div style="clear:both"></div>
<table class="adminlist table table-striped table-hover" cellpadding="1">
<thead>
<tr>
<th class="title">
<?php echo JText::_('HIKA_NAME'); ?>
</th>
<?php if($this->translated){?>
<th class="title">
<?php echo JText::_('NAME_TRANSLATED'); ?>
</th>
<?php }?>
<th class="title titleid">
<?php echo JText::_('ID'); ?>
</th>
</tr>
</thead>
<tbody>
<?php
$k = 0;
foreach($this->rows as $row){
?>
<tr class="<?php echo empty($row->selected) ? "row$k" : 'selectedrow'; ?>" id="content<?php echo $row->category_name; ?>" onclick="applyContent('<?php echo $row->category_name."','row$k'"?>);" style="cursor:pointer;">
<td>
<?php echo $row->category_name; ?>
</td>
<?php if($this->translated){?>
<td>
<?php echo @$row->translation; ?>
</td>
<?php }?>
<td align="center">
<?php echo $row->category_id; ?>
</td>
</tr>
<?php
$k = 1-$k;
}
?>
</tbody>
</table>
</form>
| gpl-2.0 |
vialette/ocs-collector-rb | vrac/settings/default/http.rb | 2833 | # ___
# / _ \ _ __ ___ _ _
# | (_) | '_ \/ -_) ' \
# \___/| .__/\___|_||_|
# |_|
#
# ___ _ _ _ _ _
# / __|___ _ __ | |__(_)_ _ __ _| |_ ___ _ _(_)__ _| |
# | (__/ _ \ ' \| '_ \ | ' \/ _` | _/ _ \ '_| / _` | |
# \___\___/_|_|_|_.__/_|_||_\__,_|\__\___/_| |_\__,_|_|
#
#
# ___ _ _
# / __| |_ _ _ _ _ __| |_ _ _ _ _ ___ ___
# \__ \ _| '_| || / _| _| || | '_/ -_|_-<
# |___/\__|_| \_,_\__|\__|\_,_|_| \___/__/
#
#
# Copyright (C) 2015 Stรฉphane Vialette ([email protected])
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
module OCS
module Settings
module Default
module HTTP
# Seconds to wait for 100 Continue response.
# If the HTTP object does not receive a response in this many seconds
# it sends the request body.
CONTINUE_TIMEOUT = nil
# Seconds to reuse the connection of the previous request.
# If the idle time is less than this Keep-Alive Timeout, Net::HTTP
# reuses the TCP/IP socket used by the previous message.
KEEP_ALIVE_TIMEOUT = 5
# Number of seconds to wait for the connection to open.
# Any number may be used, including Floats for fractional seconds.
# If the HTTP object cannot open a connection in this many seconds,
# it raises a Net::OpenTimeout exception.
# The default value is OCS::Settings::Default::HTTP::CONNECT_TIMEOUT.
OPEN_TIMEOUT = nil
# Number of seconds to wait for one block to be read (via one read call).
# Any number may be used, including Floats for fractional seconds.
# If the HTTP object cannot read data in this many seconds, it raises
# a Net::ReadTimeout exception.
READ_TIMEOUT = 60
# Turn on SSL.
# Notice that this with Net::HTTP, this flag must be set before
# starting session. If you change use_ssl value after session started,
# a Net::HTTP object raises IOError.
USE_SSL = false
# SSL timeout seconds.
SSL_TIMEOUT = 60
end # module HTTP
end # module Default
end # module Settings
end # module OCS
| gpl-2.0 |
mattkgross/WorkoutLogger | Workout/About.aspx.cs | 296 | ๏ปฟusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Workout
{
public partial class About : Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
} | gpl-2.0 |
stefanvr/WebTracks | db/schema.rb | 899 | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 0) do
# These are extensions that must be enabled in order to support this database
enable_extension 'plpgsql'
end
| gpl-2.0 |
KristerV/react-material-ui | package.js | 1043 | Package.describe({
name: 'izzilab:material-ui',
version: '0.1.0',
// Brief, one-line summary of the package.
summary: 'Material-UI using official React package',
// URL to the Git repository containing the source code for this package.
git: 'https://github.com/mrphu3074/react-material-ui.git',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting documentation, set this field to null.
documentation: 'README.md'
});
var MUI_VERSION = '0.10.1';
var EXTERNALIFY_VERSION = "0.1.0";
var TAP_EVENT_PLUGIN_VERSION = '0.1.7';
Npm.depends({
'externalify': EXTERNALIFY_VERSION,
'material-ui': MUI_VERSION,
'react-tap-event-plugin': TAP_EVENT_PLUGIN_VERSION
});
Package.onUse(function(api){
api.use(['[email protected]'], 'client');
api.use(['cosmos:[email protected]'], 'client');
api.addFiles([
'client.browserify.options.json',
'client.browserify.js'
], 'client');
api.export(["MUI", "injectTapEventPlugin"], 'client');
});
| gpl-2.0 |
Dominisher/WIPGame | ProjectPoseidon/Assets/Editor/UDPControllerEditor/UDPManagerEditor.cs | 244 | ๏ปฟusing UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor(typeof(UDPManager))]
public class UDPManagerEditor : Editor
{
//public override void OnInspectorGUI ()
//{
// UDPManager myTarget = (UDPManager)target;
//}
}
| gpl-2.0 |
kunj1988/Magento2 | lib/internal/Magento/Framework/Oauth/NonceGeneratorInterface.php | 1533 | <?php
/**
* Copyright ยฉ Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\Oauth;
/**
* NonceGeneratorInterface provides methods for generating a nonce for a consumer and validating a nonce to ensure
* that it is not already used by an existing consumer. Validation will persist the nonce if validation succeeds.
* A method for generating a current timestamp is also provided by this interface.
*
* @api
*/
interface NonceGeneratorInterface
{
/**
* Generate a new nonce for the consumer (if consumer is specified).
*
* @param ConsumerInterface $consumer
* @return string The generated nonce value.
*/
public function generateNonce(ConsumerInterface $consumer = null);
/**
* Generate a current timestamp.
*
* @return int The time as an int
*/
public function generateTimestamp();
/**
* Validate the specified nonce, which ensures that it can only be used by a single consumer and persist it
* with the specified consumer and timestamp. This method effectively saves the nonce and marks it as used
* by the specified consumer.
*
* @param ConsumerInterface $consumer
* @param string $nonce The nonce value.
* @param int $timestamp The 'oauth_timestamp' value.
* @return void
* @throws \Magento\Framework\Oauth\Exception Exceptions are thrown for validation errors.
*/
public function validateNonce(ConsumerInterface $consumer, $nonce, $timestamp);
}
| gpl-2.0 |
leemgs/open-build-service | src/api/test/functional/webui/users_test.rb | 4563 | # -*- coding: utf-8 -*-
require_relative '../../test_helper'
class Webui::EditPackageUsersTest < Webui::IntegrationTest
def test_add_and_edit_package_people # spec/support/shared_examples/features/user_tab.rb
use_js
@project = 'kde4'
@package = 'kdelibs'
@userspath = package_users_path(project: @project, package: @package)
login_user 'fred', 'buildservice', to: @userspath
add_user 'user2', 'maintainer'
add_user 'user3', 'bugowner'
add_user 'user4', 'reviewer'
add_user 'user5', 'downloader'
add_user 'user6', 'reader'
add_user 'user6', 'reviewer'
add_user 'user6', 'downloader'
add_user 'sadasxsacxsacsa', 'reader', expect: :unknown_user
add_user '~@$@#%#%@$0-=m,.,\/\/12`;.{{}}{}', 'maintainer', expect: :unknown_user
# add_package_role_to_username_with_question_sign do
add_user 'still-buggy?', 'maintainer', expect: :unknown_user
edit_user name: :user3,
reviewer: true,
downloader: true
edit_user name: :user3,
reviewer: false,
downloader: false
edit_user name: :user6,
maintainer: false,
bugowner: false,
reviewer: false,
downloader: false,
reader: false
edit_user name: :user4,
maintainer: true,
bugowner: true,
reviewer: true,
downloader: true,
reader: true
delete_user :user4
page.wont_have_selector 'table#user-table tr#user-user4'
end
def test_add_and_edit_project_users # spec/support/shared_examples/features/user_tab.rb
@project = 'kde4'
@userspath = project_users_path(project: @project)
login_user 'fred', 'buildservice', to: @userspath
add_user 'user2', 'maintainer'
add_user 'user3', 'bugowner'
add_user 'user4', 'reviewer'
add_user 'user5', 'downloader'
add_user 'user6', 'reader'
add_user 'user6', 'reviewer'
add_user 'user6', 'downloader'
add_user 'user6', 'downloader', expect: :already_exists
add_user 'sadasxsacxsacsa', 'reader', expect: :unknown_user
add_user '', 'maintainer', expect: :unknown_user
add_user '~@$@#%#%@$0-=m,.,\/\/12`;.{{}}{}', 'maintainer', expect: :unknown_user
add_user 'still-buggy?', 'maintainer', expect: :unknown_user
edit_user name: :user3,
reviewer: true,
downloader: true
edit_user name: :user3,
reviewer: false,
downloader: false
edit_user name: :user6,
maintainer: false,
bugowner: false,
reviewer: false,
downloader: false,
reader: false
edit_user name: :user4,
maintainer: true,
bugowner: true,
reviewer: true,
downloader: true,
reader: true
end
# Test Helpers
def edit_role(cell, new_value)
return if new_value.nil?
input = cell.first(:css, 'input')
input.click unless input.selected? == new_value
end
def edit_user(options)
assert !options[:name].blank?
row = find(:css, "tr#user-#{options[:name]}")
cell = row.all(:css, 'td')
edit_role cell[1], options[:maintainer]
edit_role cell[2], options[:bugowner]
edit_role cell[3], options[:reviewer]
edit_role cell[4], options[:downloader]
edit_role cell[5], options[:reader]
end
def add_user(user, role, options = {})
find(:id, 'add-user').click
page.must_have_text %r{Add New User to}
page.must_have_field 'userid'
page.must_have_selector 'select#role'
curl = page.current_url
options[:expect] ||= :success
fill_in 'userid', with: user
find('select#role').select(role)
click_button('Add user')
if options[:expect] == :success
flash_message_type.must_equal :info
flash_message.must_equal "Added user #{user} with role #{role}"
assert page.current_url.end_with? @userspath
elsif options[:expect] == :unknown_user
flash_message_type.must_equal :alert
flash_message.must_equal "Couldn't find User with login = #{user}".strip
assert curl, page.current_url
# go back manually
visit @userspath
elsif options[:expect] == :already_exists
flash_message_type.must_equal :alert
flash_message.must_equal 'Relationship already exists'
visit @userspath
else
raise ArgumentError
end
end
def delete_user(user)
# overwrite confirm function to avoid the dialog - they are very racy with selenium
page.evaluate_script('window.confirm = function() { return true; }')
find(:css, "table#user-table tr#user-#{user} a.remove-user").click
flash_message_type.must_equal :info
flash_message.must_equal "Removed user #{user}"
end
end
| gpl-2.0 |
opieproject/opie | noncore/unsupported/qpdf/xpdf/GfxFont.cc | 35063 | //========================================================================
//
// GfxFont.cc
//
// Copyright 1996-2002 Glyph & Cog, LLC
//
//========================================================================
#ifdef __GNUC__
#pragma implementation
#endif
#include <aconf.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "gmem.h"
#include "Error.h"
#include "Object.h"
#include "Dict.h"
#include "GlobalParams.h"
#include "CMap.h"
#include "CharCodeToUnicode.h"
#include "FontEncodingTables.h"
#include "BuiltinFontTables.h"
#include "FontFile.h"
#include "GfxFont.h"
//------------------------------------------------------------------------
struct StdFontMapEntry {
char *altName;
char *properName;
};
static StdFontMapEntry stdFontMap[] = {
{ "Arial", "Helvetica" },
{ "Arial,Bold", "Helvetica-Bold" },
{ "Arial,BoldItalic", "Helvetica-BoldOblique" },
{ "Arial,Italic", "Helvetica-Oblique" },
{ "Arial-Bold", "Helvetica-Bold" },
{ "Arial-BoldItalic", "Helvetica-BoldOblique" },
{ "Arial-BoldItalicMT", "Helvetica-BoldOblique" },
{ "Arial-BoldMT", "Helvetica-Bold" },
{ "Arial-Italic", "Helvetica-Oblique" },
{ "Arial-ItalicMT", "Helvetica-Oblique" },
{ "ArialMT", "Helvetica" },
{ "Courier,Bold", "Courier-Bold" },
{ "Courier,Italic", "Courier-Oblique" },
{ "Courier,BoldItalic", "Courier-BoldOblique" },
{ "CourierNew", "Courier" },
{ "CourierNew,Bold", "Courier-Bold" },
{ "CourierNew,BoldItalic", "Courier-BoldOblique" },
{ "CourierNew,Italic", "Courier-Oblique" },
{ "CourierNew-Bold", "Courier-Bold" },
{ "CourierNew-BoldItalic", "Courier-BoldOblique" },
{ "CourierNew-Italic", "Courier-Oblique" },
{ "CourierNewPS-BoldItalicMT", "Courier-BoldOblique" },
{ "CourierNewPS-BoldMT", "Courier-Bold" },
{ "CourierNewPS-ItalicMT", "Courier-Oblique" },
{ "CourierNewPSMT", "Courier" },
{ "Helvetica,Bold", "Helvetica-Bold" },
{ "Helvetica,BoldItalic", "Helvetica-BoldOblique" },
{ "Helvetica,Italic", "Helvetica-Oblique" },
{ "Helvetica-BoldItalic", "Helvetica-BoldOblique" },
{ "Helvetica-Italic", "Helvetica-Oblique" },
{ "TimesNewRoman", "Times-Roman" },
{ "TimesNewRoman,Bold", "Times-Bold" },
{ "TimesNewRoman,BoldItalic", "Times-BoldItalic" },
{ "TimesNewRoman,Italic", "Times-Italic" },
{ "TimesNewRoman-Bold", "Times-Bold" },
{ "TimesNewRoman-BoldItalic", "Times-BoldItalic" },
{ "TimesNewRoman-Italic", "Times-Italic" },
{ "TimesNewRomanPS", "Times-Roman" },
{ "TimesNewRomanPS-Bold", "Times-Bold" },
{ "TimesNewRomanPS-BoldItalic", "Times-BoldItalic" },
{ "TimesNewRomanPS-BoldItalicMT", "Times-BoldItalic" },
{ "TimesNewRomanPS-BoldMT", "Times-Bold" },
{ "TimesNewRomanPS-Italic", "Times-Italic" },
{ "TimesNewRomanPS-ItalicMT", "Times-Italic" },
{ "TimesNewRomanPSMT", "Times-Roman" }
};
//------------------------------------------------------------------------
// GfxFont
//------------------------------------------------------------------------
GfxFont *GfxFont::makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict) {
GString *nameA;
GfxFont *font;
Object obj1;
// get base font name
nameA = NULL;
fontDict->lookup("BaseFont", &obj1);
if (obj1.isName()) {
nameA = new GString(obj1.getName());
}
obj1.free();
// get font type
font = NULL;
fontDict->lookup("Subtype", &obj1);
if (obj1.isName("Type1") || obj1.isName("MMType1")) {
font = new Gfx8BitFont(xref, tagA, idA, nameA, fontType1, fontDict);
} else if (obj1.isName("Type1C")) {
font = new Gfx8BitFont(xref, tagA, idA, nameA, fontType1C, fontDict);
} else if (obj1.isName("Type3")) {
font = new Gfx8BitFont(xref, tagA, idA, nameA, fontType3, fontDict);
} else if (obj1.isName("TrueType")) {
font = new Gfx8BitFont(xref, tagA, idA, nameA, fontTrueType, fontDict);
} else if (obj1.isName("Type0")) {
font = new GfxCIDFont(xref, tagA, idA, nameA, fontDict);
} else {
error(-1, "Unknown font type: '%s'",
obj1.isName() ? obj1.getName() : "???");
font = new Gfx8BitFont(xref, tagA, idA, nameA, fontUnknownType, fontDict);
}
obj1.free();
return font;
}
GfxFont::GfxFont(char *tagA, Ref idA, GString *nameA) {
ok = gFalse;
tag = new GString(tagA);
id = idA;
name = nameA;
embFontName = NULL;
extFontFile = NULL;
}
GfxFont::~GfxFont() {
delete tag;
if (name) {
delete name;
}
if (embFontName) {
delete embFontName;
}
if (extFontFile) {
delete extFontFile;
}
}
void GfxFont::readFontDescriptor(XRef *xref, Dict *fontDict) {
Object obj1, obj2, obj3, obj4;
fouble t;
int i;
// assume Times-Roman by default (for substitution purposes)
flags = fontSerif;
embFontID.num = -1;
embFontID.gen = -1;
missingWidth = 0;
if (fontDict->lookup("FontDescriptor", &obj1)->isDict()) {
// get flags
if (obj1.dictLookup("Flags", &obj2)->isInt()) {
flags = obj2.getInt();
}
obj2.free();
// get name
obj1.dictLookup("FontName", &obj2);
if (obj2.isName()) {
embFontName = new GString(obj2.getName());
}
obj2.free();
// look for embedded font file
if (obj1.dictLookupNF("FontFile", &obj2)->isRef()) {
if (type == fontType1) {
embFontID = obj2.getRef();
} else {
error(-1, "Mismatch between font type and embedded font file");
}
}
obj2.free();
if (embFontID.num == -1 &&
obj1.dictLookupNF("FontFile2", &obj2)->isRef()) {
if (type == fontTrueType || type == fontCIDType2) {
embFontID = obj2.getRef();
} else {
error(-1, "Mismatch between font type and embedded font file");
}
}
obj2.free();
if (embFontID.num == -1 &&
obj1.dictLookupNF("FontFile3", &obj2)->isRef()) {
if (obj2.fetch(xref, &obj3)->isStream()) {
obj3.streamGetDict()->lookup("Subtype", &obj4);
if (obj4.isName("Type1")) {
if (type == fontType1) {
embFontID = obj2.getRef();
} else {
error(-1, "Mismatch between font type and embedded font file");
}
} else if (obj4.isName("Type1C")) {
if (type == fontType1) {
type = fontType1C;
embFontID = obj2.getRef();
} else if (type == fontType1C) {
embFontID = obj2.getRef();
} else {
error(-1, "Mismatch between font type and embedded font file");
}
} else if (obj4.isName("TrueType")) {
if (type == fontTrueType) {
embFontID = obj2.getRef();
} else {
error(-1, "Mismatch between font type and embedded font file");
}
} else if (obj4.isName("CIDFontType0C")) {
if (type == fontCIDType0) {
type = fontCIDType0C;
embFontID = obj2.getRef();
} else {
error(-1, "Mismatch between font type and embedded font file");
}
} else {
error(-1, "Unknown embedded font type '%s'",
obj4.isName() ? obj4.getName() : "???");
}
obj4.free();
}
obj3.free();
}
obj2.free();
// look for MissingWidth
obj1.dictLookup("MissingWidth", &obj2);
if (obj2.isNum()) {
missingWidth = obj2.getNum();
}
obj2.free();
// get Ascent and Descent
obj1.dictLookup("Ascent", &obj2);
if (obj2.isNum()) {
t = 0.001 * obj2.getNum();
// some broken font descriptors set ascent and descent to 0
if (t != 0) {
ascent = t;
}
}
obj2.free();
obj1.dictLookup("Descent", &obj2);
if (obj2.isNum()) {
t = 0.001 * obj2.getNum();
// some broken font descriptors set ascent and descent to 0
if (t != 0) {
descent = t;
}
}
obj2.free();
// font FontBBox
if (obj1.dictLookup("FontBBox", &obj2)->isArray()) {
for (i = 0; i < 4 && i < obj2.arrayGetLength(); ++i) {
if (obj2.arrayGet(i, &obj3)->isNum()) {
fontBBox[i] = 0.001 * obj3.getNum();
}
obj3.free();
}
}
obj2.free();
}
obj1.free();
}
CharCodeToUnicode *GfxFont::readToUnicodeCMap(Dict *fontDict, int nBits) {
CharCodeToUnicode *ctu;
GString *buf;
Object obj1;
int c;
if (!fontDict->lookup("ToUnicode", &obj1)->isStream()) {
obj1.free();
return NULL;
}
buf = new GString();
obj1.streamReset();
while ((c = obj1.streamGetChar()) != EOF) {
buf->append(c);
}
obj1.streamClose();
obj1.free();
ctu = CharCodeToUnicode::parseCMap(buf, nBits);
delete buf;
return ctu;
}
void GfxFont::findExtFontFile() {
if (name) {
if (type == fontType1) {
extFontFile = globalParams->findFontFile(name, ".pfa", ".pfb");
} else if (type == fontTrueType) {
extFontFile = globalParams->findFontFile(name, ".ttf", NULL);
}
}
}
char *GfxFont::readExtFontFile(int *len) {
FILE *f;
char *buf;
if (!(f = fopen(extFontFile->getCString(), "rb"))) {
error(-1, "External font file '%s' vanished", extFontFile->getCString());
return NULL;
}
fseek(f, 0, SEEK_END);
*len = (int)ftell(f);
fseek(f, 0, SEEK_SET);
buf = (char *)gmalloc(*len);
if ((int)fread(buf, 1, *len, f) != *len) {
error(-1, "Error reading external font file '%s'", extFontFile);
}
fclose(f);
return buf;
}
char *GfxFont::readEmbFontFile(XRef *xref, int *len) {
char *buf;
Object obj1, obj2;
Stream *str;
int c;
int size, i;
obj1.initRef(embFontID.num, embFontID.gen);
obj1.fetch(xref, &obj2);
if (!obj2.isStream()) {
error(-1, "Embedded font file is not a stream");
obj2.free();
obj1.free();
embFontID.num = -1;
return NULL;
}
str = obj2.getStream();
buf = NULL;
i = size = 0;
str->reset();
while ((c = str->getChar()) != EOF) {
if (i == size) {
size += 4096;
buf = (char *)grealloc(buf, size);
}
buf[i++] = c;
}
*len = i;
str->close();
obj2.free();
obj1.free();
return buf;
}
//------------------------------------------------------------------------
// Gfx8BitFont
//------------------------------------------------------------------------
Gfx8BitFont::Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
GfxFontType typeA, Dict *fontDict):
GfxFont(tagA, idA, nameA)
{
BuiltinFont *builtinFont;
char **baseEnc;
GBool baseEncFromFontFile;
char *buf;
int len;
FontFile *fontFile;
int code, code2;
char *charName;
GBool missing, hex;
Unicode toUnicode[256];
fouble mul;
int firstChar, lastChar;
Gushort w;
Object obj1, obj2, obj3;
int n, i, a, b, m;
type = typeA;
ctu = NULL;
// Acrobat 4.0 and earlier substituted Base14-compatible fonts
// without providing Widths and a FontDescriptor, so we munge the
// names into the proper Base14 names. (This table is from
// implementation note 44 in the PDF 1.4 spec.)
if (name) {
a = 0;
b = sizeof(stdFontMap) / sizeof(StdFontMapEntry);
// invariant: stdFontMap[a].altName <= name < stdFontMap[b].altName
while (b - a > 1) {
m = (a + b) / 2;
if (name->cmp(stdFontMap[m].altName) >= 0) {
a = m;
} else {
b = m;
}
}
if (!name->cmp(stdFontMap[a].altName)) {
delete name;
name = new GString(stdFontMap[a].properName);
}
}
// is it a built-in font?
builtinFont = NULL;
if (name) {
for (i = 0; i < nBuiltinFonts; ++i) {
if (!name->cmp(builtinFonts[i].name)) {
builtinFont = &builtinFonts[i];
break;
}
}
}
// default ascent/descent values
if (builtinFont) {
ascent = 0.001 * builtinFont->ascent;
descent = 0.001 * builtinFont->descent;
fontBBox[0] = 0.001 * builtinFont->bbox[0];
fontBBox[1] = 0.001 * builtinFont->bbox[1];
fontBBox[2] = 0.001 * builtinFont->bbox[2];
fontBBox[3] = 0.001 * builtinFont->bbox[3];
} else {
ascent = 0.95;
descent = -0.35;
fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0;
}
// get info from font descriptor
readFontDescriptor(xref, fontDict);
// look for an external font file
findExtFontFile();
// get font matrix
fontMat[0] = fontMat[3] = 1;
fontMat[1] = fontMat[2] = fontMat[4] = fontMat[5] = 0;
if (fontDict->lookup("FontMatrix", &obj1)->isArray()) {
for (i = 0; i < 6 && i < obj1.arrayGetLength(); ++i) {
if (obj1.arrayGet(i, &obj2)->isNum()) {
fontMat[i] = obj2.getNum();
}
obj2.free();
}
}
obj1.free();
// get Type 3 bounding box, font definition, and resources
if (type == fontType3) {
if (fontDict->lookup("FontBBox", &obj1)->isArray()) {
for (i = 0; i < 4 && i < obj1.arrayGetLength(); ++i) {
if (obj1.arrayGet(i, &obj2)->isNum()) {
fontBBox[i] = obj2.getNum();
}
obj2.free();
}
}
obj1.free();
if (!fontDict->lookup("CharProcs", &charProcs)->isDict()) {
error(-1, "Missing or invalid CharProcs dictionary in Type 3 font");
charProcs.free();
}
if (!fontDict->lookup("Resources", &resources)->isDict()) {
resources.free();
}
}
//----- build the font encoding -----
// Encodings start with a base encoding, which can come from
// (in order of priority):
// 1. FontDict.Encoding or FontDict.Encoding.BaseEncoding
// - MacRoman / MacExpert / WinAnsi / Standard
// 2. embedded or external font file
// 3. default:
// - builtin --> builtin encoding
// - TrueType --> MacRomanEncoding
// - others --> StandardEncoding
// and then add a list of differences (if any) from
// FontDict.Encoding.Differences.
// check FontDict for base encoding
hasEncoding = gFalse;
baseEnc = NULL;
baseEncFromFontFile = gFalse;
fontDict->lookup("Encoding", &obj1);
if (obj1.isDict()) {
obj1.dictLookup("BaseEncoding", &obj2);
if (obj2.isName("MacRomanEncoding")) {
hasEncoding = gTrue;
baseEnc = macRomanEncoding;
} else if (obj2.isName("MacExpertEncoding")) {
hasEncoding = gTrue;
baseEnc = macExpertEncoding;
} else if (obj2.isName("WinAnsiEncoding")) {
hasEncoding = gTrue;
baseEnc = winAnsiEncoding;
} else if (obj2.isName("StandardEncoding")) {
hasEncoding = gTrue;
baseEnc = standardEncoding;
}
obj2.free();
} else if (obj1.isName("MacRomanEncoding")) {
hasEncoding = gTrue;
baseEnc = macRomanEncoding;
} else if (obj1.isName("MacExpertEncoding")) {
hasEncoding = gTrue;
baseEnc = macExpertEncoding;
} else if (obj1.isName("WinAnsiEncoding")) {
hasEncoding = gTrue;
baseEnc = winAnsiEncoding;
} else if (obj1.isName("StandardEncoding")) {
hasEncoding = gTrue;
baseEnc = standardEncoding;
}
// check embedded or external font file for base encoding
// (only for Type 1 fonts - trying to get an encoding out of a
// TrueType font is a losing proposition)
fontFile = NULL;
buf = NULL;
if ((type == fontType1 || type == fontType1C) &&
(extFontFile || embFontID.num >= 0)) {
if (extFontFile) {
buf = readExtFontFile(&len);
} else {
buf = readEmbFontFile(xref, &len);
}
if (buf) {
#if 0
if (type == fontType1C && !strncmp(buf, "%!", 2)) {
// various tools (including Adobe's) occasionally embed Type 1
// fonts but label them Type 1C
type = fontType1;
}
if (type == fontType1) {
fontFile = new Type1FontFile(buf, len);
} else {
fontFile = new Type1CFontFile(buf, len);
}
if (fontFile->getName()) {
if (embFontName) {
delete embFontName;
}
embFontName = new GString(fontFile->getName());
}
if (!baseEnc) {
baseEnc = fontFile->getEncoding();
baseEncFromFontFile = gTrue;
}
#endif
gfree(buf);
}
}
// get default base encoding
if (!baseEnc) {
if (builtinFont) {
baseEnc = builtinFont->defaultBaseEnc;
} else if (type == fontTrueType) {
baseEnc = macRomanEncoding;
} else {
baseEnc = standardEncoding;
}
}
// copy the base encoding
for (i = 0; i < 256; ++i) {
enc[i] = baseEnc[i];
if ((encFree[i] = baseEncFromFontFile) && enc[i]) {
enc[i] = copyString(baseEnc[i]);
}
}
// merge differences into encoding
if (obj1.isDict()) {
obj1.dictLookup("Differences", &obj2);
if (obj2.isArray()) {
hasEncoding = gTrue;
code = 0;
for (i = 0; i < obj2.arrayGetLength(); ++i) {
obj2.arrayGet(i, &obj3);
if (obj3.isInt()) {
code = obj3.getInt();
} else if (obj3.isName()) {
if (code < 256) {
if (encFree[code]) {
gfree(enc[code]);
}
enc[code] = copyString(obj3.getName());
encFree[code] = gTrue;
}
++code;
} else {
error(-1, "Wrong type in font encoding resource differences (%s)",
obj3.getTypeName());
}
obj3.free();
}
}
obj2.free();
}
obj1.free();
if (fontFile) {
delete fontFile;
}
//----- build the mapping to Unicode -----
// look for a ToUnicode CMap
if (!(ctu = readToUnicodeCMap(fontDict, 8))) {
// no ToUnicode CMap, so use the char names
// pass 1: use the name-to-Unicode mapping table
missing = hex = gFalse;
for (code = 0; code < 256; ++code) {
if ((charName = enc[code])) {
if (!(toUnicode[code] = globalParams->mapNameToUnicode(charName)) &&
strcmp(charName, ".notdef")) {
// if it wasn't in the name-to-Unicode table, check for a
// name that looks like 'Axx' or 'xx', where 'A' is any letter
// and 'xx' is two hex digits
if ((strlen(charName) == 3 &&
isalpha(charName[0]) &&
isxdigit(charName[1]) && isxdigit(charName[2]) &&
((charName[1] >= 'a' && charName[1] <= 'f') ||
(charName[1] >= 'A' && charName[1] <= 'F') ||
(charName[2] >= 'a' && charName[2] <= 'f') ||
(charName[2] >= 'A' && charName[2] <= 'F'))) ||
(strlen(charName) == 2 &&
isxdigit(charName[0]) && isxdigit(charName[1]) &&
((charName[0] >= 'a' && charName[0] <= 'f') ||
(charName[0] >= 'A' && charName[0] <= 'F') ||
(charName[1] >= 'a' && charName[1] <= 'f') ||
(charName[1] >= 'A' && charName[1] <= 'F')))) {
hex = gTrue;
}
missing = gTrue;
}
} else {
toUnicode[code] = 0;
}
}
// pass 2: try to fill in the missing chars, looking for names of
// the form 'Axx', 'xx', 'Ann', 'ABnn', or 'nn', where 'A' and 'B'
// are any letters, 'xx' is two hex digits, and 'nn' is 2-4
// decimal digits
if (missing && globalParams->getMapNumericCharNames()) {
for (code = 0; code < 256; ++code) {
if ((charName = enc[code]) && !toUnicode[code] &&
strcmp(charName, ".notdef")) {
n = strlen(charName);
code2 = -1;
if (hex && n == 3 && isalpha(charName[0]) &&
isxdigit(charName[1]) && isxdigit(charName[2])) {
sscanf(charName+1, "%x", &code2);
} else if (hex && n == 2 &&
isxdigit(charName[0]) && isxdigit(charName[1])) {
sscanf(charName, "%x", &code2);
} else if (!hex && n >= 2 && n <= 4 &&
isdigit(charName[0]) && isdigit(charName[1])) {
code2 = atoi(charName);
} else if (n >= 3 && n <= 5 &&
isdigit(charName[1]) && isdigit(charName[2])) {
code2 = atoi(charName+1);
} else if (n >= 4 && n <= 6 &&
isdigit(charName[2]) && isdigit(charName[3])) {
code2 = atoi(charName+2);
}
if (code2 >= 0 && code2 <= 0xff) {
toUnicode[code] = (Unicode)code2;
}
}
}
}
ctu = CharCodeToUnicode::make8BitToUnicode(toUnicode);
}
//----- get the character widths -----
// initialize all widths
for (code = 0; code < 256; ++code) {
widths[code] = missingWidth * 0.001;
}
// use widths from font dict, if present
fontDict->lookup("FirstChar", &obj1);
firstChar = obj1.isInt() ? obj1.getInt() : 0;
obj1.free();
fontDict->lookup("LastChar", &obj1);
lastChar = obj1.isInt() ? obj1.getInt() : 255;
obj1.free();
mul = (type == fontType3) ? fontMat[0] : fouble(0.001);
fontDict->lookup("Widths", &obj1);
if (obj1.isArray()) {
flags |= fontFixedWidth;
for (code = firstChar; code <= lastChar; ++code) {
obj1.arrayGet(code - firstChar, &obj2);
if (obj2.isNum()) {
widths[code] = obj2.getNum() * mul;
if (widths[code] != widths[firstChar]) {
flags &= ~fontFixedWidth;
}
}
obj2.free();
}
// use widths from built-in font
} else if (builtinFont) {
// this is a kludge for broken PDF files that encode char 32
// as .notdef
if (builtinFont->widths->getWidth("space", &w)) {
widths[32] = 0.001 * w;
}
for (code = 0; code < 256; ++code) {
if (enc[code] && builtinFont->widths->getWidth(enc[code], &w)) {
widths[code] = 0.001 * w;
}
}
// couldn't find widths -- use defaults
} else {
// this is technically an error -- the Widths entry is required
// for all but the Base-14 fonts -- but certain PDF generators
// apparently don't include widths for Arial and TimesNewRoman
if (isFixedWidth()) {
i = 0;
} else if (isSerif()) {
i = 8;
} else {
i = 4;
}
if (isBold()) {
i += 2;
}
if (isItalic()) {
i += 1;
}
builtinFont = builtinFontSubst[i];
// this is a kludge for broken PDF files that encode char 32
// as .notdef
if (builtinFont->widths->getWidth("space", &w)) {
widths[32] = 0.001 * w;
}
for (code = 0; code < 256; ++code) {
if (enc[code] && builtinFont->widths->getWidth(enc[code], &w)) {
widths[code] = 0.001 * w;
}
}
}
obj1.free();
ok = gTrue;
}
Gfx8BitFont::~Gfx8BitFont() {
int i;
for (i = 0; i < 256; ++i) {
if (encFree[i] && enc[i]) {
gfree(enc[i]);
}
}
ctu->decRefCnt();
if (charProcs.isDict()) {
charProcs.free();
}
if (resources.isDict()) {
resources.free();
}
}
int Gfx8BitFont::getNextChar(char *s, int len, CharCode *code,
Unicode *u, int uSize, int *uLen,
fouble *dx, fouble *dy, fouble *ox, fouble *oy) {
CharCode c;
*code = c = (CharCode)(*s & 0xff);
*uLen = ctu->mapToUnicode(c, u, uSize);
*dx = widths[c];
*dy = *ox = *oy = 0;
return 1;
}
CharCodeToUnicode *Gfx8BitFont::getToUnicode() {
ctu->incRefCnt();
return ctu;
}
Dict *Gfx8BitFont::getCharProcs() {
return charProcs.isDict() ? charProcs.getDict() : (Dict *)NULL;
}
Object *Gfx8BitFont::getCharProc(int code, Object *proc) {
if (charProcs.isDict()) {
charProcs.dictLookup(enc[code], proc);
} else {
proc->initNull();
}
return proc;
}
Dict *Gfx8BitFont::getResources() {
return resources.isDict() ? resources.getDict() : (Dict *)NULL;
}
//------------------------------------------------------------------------
// GfxCIDFont
//------------------------------------------------------------------------
static int cmpWidthExcep(const void *w1, const void *w2) {
return ((GfxFontCIDWidthExcep *)w1)->first -
((GfxFontCIDWidthExcep *)w2)->first;
}
static int cmpWidthExcepV(const void *w1, const void *w2) {
return ((GfxFontCIDWidthExcepV *)w1)->first -
((GfxFontCIDWidthExcepV *)w2)->first;
}
GfxCIDFont::GfxCIDFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
Dict *fontDict):
GfxFont(tagA, idA, nameA)
{
Dict *desFontDict;
GString *collection, *cMapName;
Object desFontDictObj;
Object obj1, obj2, obj3, obj4, obj5, obj6;
int c1, c2;
int excepsSize, i, j, k;
ascent = 0.95;
descent = -0.35;
fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0;
cMap = NULL;
ctu = NULL;
widths.defWidth = 1.0;
widths.defHeight = -1.0;
widths.defVY = 0.880;
widths.exceps = NULL;
widths.nExceps = 0;
widths.excepsV = NULL;
widths.nExcepsV = 0;
cidToGID = NULL;
cidToGIDLen = 0;
// get the descendant font
if (!fontDict->lookup("DescendantFonts", &obj1)->isArray()) {
error(-1, "Missing DescendantFonts entry in Type 0 font");
obj1.free();
goto err1;
}
if (!obj1.arrayGet(0, &desFontDictObj)->isDict()) {
error(-1, "Bad descendant font in Type 0 font");
goto err3;
}
obj1.free();
desFontDict = desFontDictObj.getDict();
// font type
if (!desFontDict->lookup("Subtype", &obj1)) {
error(-1, "Missing Subtype entry in Type 0 descendant font");
goto err3;
}
if (obj1.isName("CIDFontType0")) {
type = fontCIDType0;
} else if (obj1.isName("CIDFontType2")) {
type = fontCIDType2;
} else {
error(-1, "Unknown Type 0 descendant font type '%s'",
obj1.isName() ? obj1.getName() : "???");
goto err3;
}
obj1.free();
// get info from font descriptor
readFontDescriptor(xref, desFontDict);
// look for an external font file
findExtFontFile();
//----- encoding info -----
// char collection
if (!desFontDict->lookup("CIDSystemInfo", &obj1)->isDict()) {
error(-1, "Missing CIDSystemInfo dictionary in Type 0 descendant font");
goto err3;
}
obj1.dictLookup("Registry", &obj2);
obj1.dictLookup("Ordering", &obj3);
if (!obj2.isString() || !obj3.isString()) {
error(-1, "Invalid CIDSystemInfo dictionary in Type 0 descendant font");
goto err4;
}
collection = obj2.getString()->copy()->append('-')->append(obj3.getString());
obj3.free();
obj2.free();
obj1.free();
// look for a ToUnicode CMap
if (!(ctu = readToUnicodeCMap(fontDict, 16))) {
// the "Adobe-Identity" and "Adobe-UCS" collections don't have
// cidToUnicode files
if (collection->cmp("Adobe-Identity") &&
collection->cmp("Adobe-UCS")) {
// look for a user-supplied .cidToUnicode file
if (!(ctu = globalParams->getCIDToUnicode(collection))) {
error(-1, "Unknown character collection '%s'",
collection->getCString());
delete collection;
goto err2;
}
}
}
// encoding (i.e., CMap)
//~ need to handle a CMap stream here
//~ also need to deal with the UseCMap entry in the stream dict
if (!fontDict->lookup("Encoding", &obj1)->isName()) {
error(-1, "Missing or invalid Encoding entry in Type 0 font");
delete collection;
goto err3;
}
cMapName = new GString(obj1.getName());
obj1.free();
if (!(cMap = globalParams->getCMap(collection, cMapName))) {
error(-1, "Unknown CMap '%s' for character collection '%s'",
cMapName->getCString(), collection->getCString());
delete collection;
delete cMapName;
goto err2;
}
delete collection;
delete cMapName;
// CIDToGIDMap (for embedded TrueType fonts)
if (type == fontCIDType2) {
fontDict->lookup("CIDToGIDMap", &obj1);
if (obj1.isStream()) {
cidToGIDLen = 0;
i = 64;
cidToGID = (Gushort *)gmalloc(i * sizeof(Gushort));
obj1.streamReset();
while ((c1 = obj1.streamGetChar()) != EOF &&
(c2 = obj1.streamGetChar()) != EOF) {
if (cidToGIDLen == i) {
i *= 2;
cidToGID = (Gushort *)grealloc(cidToGID, i * sizeof(Gushort));
}
cidToGID[cidToGIDLen++] = (Gushort)((c1 << 8) + c2);
}
} else if (!obj1.isName("Identity") && !obj1.isNull()) {
error(-1, "Invalid CIDToGIDMap entry in CID font");
}
obj1.free();
}
//----- character metrics -----
// default char width
if (desFontDict->lookup("DW", &obj1)->isInt()) {
widths.defWidth = obj1.getInt() * 0.001;
}
obj1.free();
// char width exceptions
if (desFontDict->lookup("W", &obj1)->isArray()) {
excepsSize = 0;
i = 0;
while (i + 1 < obj1.arrayGetLength()) {
obj1.arrayGet(i, &obj2);
obj1.arrayGet(i + 1, &obj3);
if (obj2.isInt() && obj3.isInt() && i + 2 < obj1.arrayGetLength()) {
if (obj1.arrayGet(i + 2, &obj4)->isNum()) {
if (widths.nExceps == excepsSize) {
excepsSize += 16;
widths.exceps = (GfxFontCIDWidthExcep *)
grealloc(widths.exceps,
excepsSize * sizeof(GfxFontCIDWidthExcep));
}
widths.exceps[widths.nExceps].first = obj2.getInt();
widths.exceps[widths.nExceps].last = obj3.getInt();
widths.exceps[widths.nExceps].width = obj4.getNum() * 0.001;
++widths.nExceps;
} else {
error(-1, "Bad widths array in Type 0 font");
}
obj4.free();
i += 3;
} else if (obj2.isInt() && obj3.isArray()) {
if (widths.nExceps + obj3.arrayGetLength() > excepsSize) {
excepsSize = (widths.nExceps + obj3.arrayGetLength() + 15) & ~15;
widths.exceps = (GfxFontCIDWidthExcep *)
grealloc(widths.exceps,
excepsSize * sizeof(GfxFontCIDWidthExcep));
}
j = obj2.getInt();
for (k = 0; k < obj3.arrayGetLength(); ++k) {
if (obj3.arrayGet(k, &obj4)->isNum()) {
widths.exceps[widths.nExceps].first = j;
widths.exceps[widths.nExceps].last = j;
widths.exceps[widths.nExceps].width = obj4.getNum() * 0.001;
++j;
++widths.nExceps;
} else {
error(-1, "Bad widths array in Type 0 font");
}
obj4.free();
}
i += 2;
} else {
error(-1, "Bad widths array in Type 0 font");
++i;
}
obj3.free();
obj2.free();
}
qsort(widths.exceps, widths.nExceps, sizeof(GfxFontCIDWidthExcep),
&cmpWidthExcep);
}
obj1.free();
// default metrics for vertical font
if (desFontDict->lookup("DW2", &obj1)->isArray() &&
obj1.arrayGetLength() == 2) {
if (obj1.arrayGet(0, &obj2)->isNum()) {
widths.defVY = obj1.getNum() * 0.001;
}
obj2.free();
if (obj1.arrayGet(1, &obj2)->isNum()) {
widths.defHeight = obj1.getNum() * 0.001;
}
obj2.free();
}
obj1.free();
// char metric exceptions for vertical font
if (desFontDict->lookup("W2", &obj1)->isArray()) {
excepsSize = 0;
i = 0;
while (i + 1 < obj1.arrayGetLength()) {
obj1.arrayGet(0, &obj2);
obj2.arrayGet(0, &obj3);
if (obj2.isInt() && obj3.isInt() && i + 4 < obj1.arrayGetLength()) {
if (obj1.arrayGet(i + 2, &obj4)->isNum() &&
obj1.arrayGet(i + 3, &obj5)->isNum() &&
obj1.arrayGet(i + 4, &obj6)->isNum()) {
if (widths.nExcepsV == excepsSize) {
excepsSize += 16;
widths.excepsV = (GfxFontCIDWidthExcepV *)
grealloc(widths.excepsV,
excepsSize * sizeof(GfxFontCIDWidthExcepV));
}
widths.excepsV[widths.nExcepsV].first = obj2.getInt();
widths.excepsV[widths.nExcepsV].last = obj3.getInt();
widths.excepsV[widths.nExcepsV].height = obj4.getNum() * 0.001;
widths.excepsV[widths.nExcepsV].vx = obj5.getNum() * 0.001;
widths.excepsV[widths.nExcepsV].vy = obj6.getNum() * 0.001;
++widths.nExcepsV;
} else {
error(-1, "Bad widths (W2) array in Type 0 font");
}
obj6.free();
obj5.free();
obj4.free();
i += 5;
} else if (obj2.isInt() && obj3.isArray()) {
if (widths.nExcepsV + obj3.arrayGetLength() / 3 > excepsSize) {
excepsSize =
(widths.nExcepsV + obj3.arrayGetLength() / 3 + 15) & ~15;
widths.excepsV = (GfxFontCIDWidthExcepV *)
grealloc(widths.excepsV,
excepsSize * sizeof(GfxFontCIDWidthExcepV));
}
j = obj2.getInt();
for (k = 0; k < obj3.arrayGetLength(); ++k) {
if (obj3.arrayGet(k, &obj4)->isNum() &&
obj3.arrayGet(k, &obj5)->isNum() &&
obj3.arrayGet(k, &obj6)->isNum()) {
widths.excepsV[widths.nExceps].first = j;
widths.excepsV[widths.nExceps].last = j;
widths.excepsV[widths.nExceps].height = obj4.getNum() * 0.001;
widths.excepsV[widths.nExceps].vx = obj5.getNum() * 0.001;
widths.excepsV[widths.nExceps].vy = obj6.getNum() * 0.001;
++j;
++widths.nExcepsV;
} else {
error(-1, "Bad widths (W2) array in Type 0 font");
}
obj6.free();
obj5.free();
obj4.free();
}
i += 2;
} else {
error(-1, "Bad widths (W2) array in Type 0 font");
++i;
}
obj3.free();
obj2.free();
}
qsort(widths.excepsV, widths.nExcepsV, sizeof(GfxFontCIDWidthExcepV),
&cmpWidthExcepV);
}
obj1.free();
desFontDictObj.free();
ok = gTrue;
return;
err4:
obj3.free();
obj2.free();
err3:
obj1.free();
err2:
desFontDictObj.free();
err1:;
}
GfxCIDFont::~GfxCIDFont() {
if (cMap) {
cMap->decRefCnt();
}
if (ctu) {
ctu->decRefCnt();
}
gfree(widths.exceps);
gfree(widths.excepsV);
if (cidToGID) {
gfree(cidToGID);
}
}
int GfxCIDFont::getNextChar(char *s, int len, CharCode *code,
Unicode *u, int uSize, int *uLen,
fouble *dx, fouble *dy, fouble *ox, fouble *oy) {
CID cid;
fouble w, h, vx, vy;
int n, a, b, m;
if (!cMap) {
*code = 0;
*uLen = 0;
*dx = *dy = 0;
return 1;
}
*code = (CharCode)(cid = cMap->getCID(s, len, &n));
if (ctu) {
*uLen = ctu->mapToUnicode(cid, u, uSize);
} else {
*uLen = 0;
}
// horizontal
if (cMap->getWMode() == 0) {
w = widths.defWidth;
h = vx = vy = 0;
if (widths.nExceps > 0 && cid >= widths.exceps[0].first) {
a = 0;
b = widths.nExceps;
// invariant: widths.exceps[a].first <= cid < widths.exceps[b].first
while (b - a > 1) {
m = (a + b) / 2;
if (widths.exceps[m].first <= cid) {
a = m;
} else {
b = m;
}
}
if (cid <= widths.exceps[a].last) {
w = widths.exceps[a].width;
}
}
// vertical
} else {
w = 0;
h = widths.defHeight;
vx = widths.defWidth / 2;
vy = widths.defVY;
if (widths.nExcepsV > 0 && cid >= widths.excepsV[0].first) {
a = 0;
b = widths.nExcepsV;
// invariant: widths.excepsV[a].first <= cid < widths.excepsV[b].first
while (b - a > 1) {
m = (a + b) / 2;
if (widths.excepsV[m].last <= cid) {
a = m;
} else {
b = m;
}
}
if (cid <= widths.excepsV[a].last) {
h = widths.excepsV[a].height;
vx = widths.excepsV[a].vx;
vy = widths.excepsV[a].vy;
}
}
}
*dx = w;
*dy = h;
*ox = vx;
*oy = vy;
return n;
}
int GfxCIDFont::getWMode() {
return cMap ? cMap->getWMode() : 0;
}
CharCodeToUnicode *GfxCIDFont::getToUnicode() {
ctu->incRefCnt();
return ctu;
}
GString *GfxCIDFont::getCollection() {
return cMap ? cMap->getCollection() : (GString *)NULL;
}
//------------------------------------------------------------------------
// GfxFontDict
//------------------------------------------------------------------------
GfxFontDict::GfxFontDict(XRef *xref, Dict *fontDict) {
int i;
Object obj1, obj2;
numFonts = fontDict->getLength();
fonts = (GfxFont **)gmalloc(numFonts * sizeof(GfxFont *));
for (i = 0; i < numFonts; ++i) {
fontDict->getValNF(i, &obj1);
obj1.fetch(xref, &obj2);
if (obj1.isRef() && obj2.isDict()) {
fonts[i] = GfxFont::makeFont(xref, fontDict->getKey(i),
obj1.getRef(), obj2.getDict());
if (fonts[i] && !fonts[i]->isOk()) {
delete fonts[i];
fonts[i] = NULL;
}
} else {
error(-1, "font resource is not a dictionary reference");
fonts[i] = NULL;
}
obj1.free();
obj2.free();
}
}
GfxFontDict::~GfxFontDict() {
int i;
for (i = 0; i < numFonts; ++i) {
if (fonts[i]) {
delete fonts[i];
}
}
gfree(fonts);
}
GfxFont *GfxFontDict::lookup(char *tag) {
int i;
for (i = 0; i < numFonts; ++i) {
if (fonts[i] && fonts[i]->matches(tag)) {
return fonts[i];
}
}
return NULL;
}
| gpl-2.0 |
marbogusz/paHMM-Tree | src/heuristics/StateTransitionEstimator.cpp | 3315 | //==============================================================================
// Pair-HMM phylogenetic tree estimator
//
// Copyright (c) 2015 Marcin Bogusz.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses>.
//==============================================================================
#include "heuristics/StateTransitionEstimator.hpp"
#include "models/NegativeBinomialGapModel.hpp"
namespace EBC
{
StateTransitionEstimator::StateTransitionEstimator(IndelModel* im, Definitions::OptimizationType ot, unsigned int pc, unsigned char gc, bool useEq) :
indelModel(im), stmSamples(pc), gapCharacter(gc), useStateEq(useEq)
{
DEBUG("Starting State Transition Estimator");
//indelModel = new NegativeBinomialGapModel();
maths = new Maths();
modelParams = new OptimizedModelParameters(NULL, indelModel,0, 0, false,
true, false, false, maths);
modelParams->useIndelModelInitialParameters();
bfgs = new Optimizer(modelParams, this,ot);
maxTime = Definitions::almostZero;
}
double StateTransitionEstimator::runIteration()
{
double result = 0;
//modelParams->outputParameters();
indelModel->setParameters(modelParams->getIndelParameters());
//go through matrices
for(auto tm : stmSamples)
{
//set parameter for every sample
result += tm->getLnL();
//calculate and add to result
}
return result * -1.0;
}
void StateTransitionEstimator::addTime(double time, unsigned int triplet, unsigned int pr)
{
if (time > maxTime)
maxTime = time;
DEBUG("State Transition Estimator add time for triplet " << triplet << "\t pair " << pr << "\ttime " << time);
stmSamples[2*triplet+pr] = new StateTransitionML(indelModel, time, gapCharacter, useStateEq);
}
void StateTransitionEstimator::addPair(vector<unsigned char>* s1,
vector<unsigned char>* s2, unsigned int triplet, unsigned int pr)
{
DUMP("State Transition Estimator add pair for triplet " << triplet << " and pair no " << pr );
stmSamples[2*triplet+pr]->addSample(s1,s2);
}
void StateTransitionEstimator::optimize()
{
modelParams->boundLambdaBasedOnDivergence(maxTime);
bfgs->optimize();
indelModel->setParameters(modelParams->getIndelParameters());
INFO("StateTransitionEstimator results:");
modelParams->logParameters();
//modelParams->outputParameters();
}
void StateTransitionEstimator::clean(int ndel)
{
if (ndel > 0){
stmSamples.erase(stmSamples.begin(), stmSamples.begin() + 2*ndel);
}
for(auto tm : stmSamples)
{
if (tm != nullptr)
delete tm;
}
}
StateTransitionEstimator::~StateTransitionEstimator()
{
delete bfgs;
delete modelParams;
delete maths;
//for(auto tm : stmSamples)
//{
// delete tm;
//}
//delete indelModel;
}
} /* namespace EBC */
| gpl-2.0 |
DIY-green/AndroidStudyDemo | Utils/src/main/java/com/cheng/utils/DeviceStatusUtil.java | 10693 | package com.cheng.utils;
import android.annotation.TargetApi;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.content.Context;
import android.content.Intent;
import android.media.AudioManager;
import android.os.Build;
import android.provider.Settings;
import android.view.Window;
import android.view.WindowManager;
/**
* ๆๆบ็ถๆๅทฅๅ
ท็ฑป ไธป่ฆๅ
ๆฌ็ฝ็ปใ่็ใๅฑๅนไบฎๅบฆใ้ฃ่กๆจกๅผใ้ณ้็ญ
*/
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public class DeviceStatusUtil {
/**
* Don't let anyone instantiate this class.
*/
private DeviceStatusUtil() {
throw new Error("Do not need instantiate!");
}
/**
* ่ทๅ็ณป็ปๅฑๅนไบฎๅบฆๆจกๅผ็็ถๆ๏ผ้่ฆWRITE_SETTINGSๆ้
*
* @param context
* ไธไธๆ
* @return System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC๏ผ่ชๅจ๏ผSystem.
* SCREEN_BRIGHTNESS_MODE_AUTOMATIC
* ๏ผๆๅจ๏ผ้ป่ฎค๏ผSystem.SCREEN_BRIGHTNESS_MODE_AUTOMATIC
*/
public static int getScreenBrightnessModeState(Context context) {
return Settings.System.getInt(context.getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS_MODE,
Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
}
/**
* ๅคๆญ็ณป็ปๅฑๅนไบฎๅบฆๆจกๅผๆฏๅฆๆฏ่ชๅจ๏ผ้่ฆWRITE_SETTINGSๆ้
*
* @param context
* ไธไธๆ
* @return true๏ผ่ชๅจ๏ผfalse๏ผๆๅจ๏ผ้ป่ฎค๏ผtrue
*/
public static boolean isScreenBrightnessModeAuto(Context context) {
return getScreenBrightnessModeState(context) == Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC ? true
: false;
}
/**
* ่ฎพ็ฝฎ็ณป็ปๅฑๅนไบฎๅบฆๆจกๅผ๏ผ้่ฆWRITE_SETTINGSๆ้
*
* @param context
* ไธไธๆ
* @param auto
* ่ชๅจ
* @return ๆฏๅฆ่ฎพ็ฝฎๆๅ
*/
public static boolean setScreenBrightnessMode(Context context, boolean auto) {
boolean result = true;
if (isScreenBrightnessModeAuto(context) != auto) {
result = Settings.System.putInt(context.getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS_MODE,
auto ? Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC
: Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
}
return result;
}
/**
* ่ทๅ็ณป็ปไบฎๅบฆ๏ผ้่ฆWRITE_SETTINGSๆ้
*
* @param context
* ไธไธๆ
* @return ไบฎๅบฆ๏ผ่ๅดๆฏ0-255๏ผ้ป่ฎค255
*/
public static int getScreenBrightness(Context context) {
return Settings.System.getInt(context.getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS, 255);
}
/**
* ่ฎพ็ฝฎ็ณป็ปไบฎๅบฆ๏ผๆญคๆนๆณๅชๆฏๆดๆนไบ็ณป็ป็ไบฎๅบฆๅฑๆง๏ผๅนถไธ่ฝ็ๅฐๆๆใ่ฆๆณ็ๅฐๆๆๅฏไปฅไฝฟ็จsetWindowBrightness()ๆนๆณ่ฎพ็ฝฎ็ชๅฃ็ไบฎๅบฆ๏ผ๏ผ
* ้่ฆWRITE_SETTINGSๆ้
*
* @param context
* ไธไธๆ
* @param screenBrightness
* ไบฎๅบฆ๏ผ่ๅดๆฏ0-255
* @return ่ฎพ็ฝฎๆฏๅฆๆๅ
*/
public static boolean setScreenBrightness(Context context,
int screenBrightness) {
int brightness = screenBrightness;
if (screenBrightness < 1) {
brightness = 1;
} else if (screenBrightness > 255) {
brightness = screenBrightness % 255;
if (brightness == 0) {
brightness = 255;
}
}
boolean result = Settings.System.putInt(context.getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS, brightness);
return result;
}
/**
* ่ฎพ็ฝฎ็ปๅฎActivity็็ชๅฃ็ไบฎๅบฆ๏ผๅฏไปฅ็ๅฐๆๆ๏ผไฝ็ณป็ป็ไบฎๅบฆๅฑๆงไธไผๆนๅ๏ผ
*
* @param activity
* ่ฆ้่ฟๆญคActivityๆฅ่ฎพ็ฝฎ็ชๅฃ็ไบฎๅบฆ
* @param screenBrightness
* ไบฎๅบฆ๏ผ่ๅดๆฏ0-255
*/
public static void setWindowBrightness(Activity activity,
float screenBrightness) {
float brightness = screenBrightness;
if (screenBrightness < 1) {
brightness = 1;
} else if (screenBrightness > 255) {
brightness = screenBrightness % 255;
if (brightness == 0) {
brightness = 255;
}
}
Window window = activity.getWindow();
WindowManager.LayoutParams localLayoutParams = window.getAttributes();
localLayoutParams.screenBrightness = (float) brightness / 255;
window.setAttributes(localLayoutParams);
}
/**
* ่ฎพ็ฝฎ็ณป็ปไบฎๅบฆๅนถๅฎๆถๅฏไปฅ็ๅฐๆๆ๏ผ้่ฆWRITE_SETTINGSๆ้
*
* @param activity
* ่ฆ้่ฟๆญคActivityๆฅ่ฎพ็ฝฎ็ชๅฃ็ไบฎๅบฆ
* @param screenBrightness
* ไบฎๅบฆ๏ผ่ๅดๆฏ0-255
* @return ่ฎพ็ฝฎๆฏๅฆๆๅ
*/
public static boolean setScreenBrightnessAndApply(Activity activity,
int screenBrightness) {
boolean result = true;
result = setScreenBrightness(activity, screenBrightness);
if (result) {
setWindowBrightness(activity, screenBrightness);
}
return result;
}
/**
* ่ทๅๅฑๅนไผ็ ๆถ้ด๏ผ้่ฆWRITE_SETTINGSๆ้
*
* @param context
* ไธไธๆ
* @return ๅฑๅนไผ็ ๆถ้ด๏ผๅไฝๆฏซ็ง๏ผ้ป่ฎค30000
*/
public static int getScreenDormantTime(Context context) {
return Settings.System.getInt(context.getContentResolver(),
Settings.System.SCREEN_OFF_TIMEOUT, 30000);
}
/**
* ่ฎพ็ฝฎๅฑๅนไผ็ ๆถ้ด๏ผ้่ฆWRITE_SETTINGSๆ้
*
* @param context
* ไธไธๆ
* @return ่ฎพ็ฝฎๆฏๅฆๆๅ
*/
public static boolean setScreenDormantTime(Context context, int millis) {
return Settings.System.putInt(context.getContentResolver(),
Settings.System.SCREEN_OFF_TIMEOUT, millis);
}
/**
* ่ทๅ้ฃ่กๆจกๅผ็็ถๆ๏ผ้่ฆWRITE_APN_SETTINGSๆ้
*
* @param context
* ไธไธๆ
* @return 1๏ผๆๅผ๏ผ0๏ผๅ
ณ้ญ๏ผ้ป่ฎค๏ผๅ
ณ้ญ
*/
@SuppressWarnings("deprecation")
public static int getAirplaneModeState(Context context) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
return Settings.System.getInt(context.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON, 0);
} else {
return Settings.Global.getInt(context.getContentResolver(),
Settings.Global.AIRPLANE_MODE_ON, 0);
}
}
/**
* ๅคๆญ้ฃ่กๆจกๅผๆฏๅฆๆๅผ๏ผ้่ฆWRITE_APN_SETTINGSๆ้
*
* @param context
* ไธไธๆ
* @return true๏ผๆๅผ๏ผfalse๏ผๅ
ณ้ญ๏ผ้ป่ฎคๅ
ณ้ญ
*/
public static boolean isAirplaneModeOpen(Context context) {
return getAirplaneModeState(context) == 1 ? true : false;
}
/**
* ่ฎพ็ฝฎ้ฃ่กๆจกๅผ็็ถๆ๏ผ้่ฆWRITE_APN_SETTINGSๆ้
*
* @param context
* ไธไธๆ
* @param enable
* ้ฃ่กๆจกๅผ็็ถๆ
* @return ่ฎพ็ฝฎๆฏๅฆๆๅ
*/
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) @SuppressWarnings("deprecation")
public static boolean setAirplaneMode(Context context, boolean enable) {
boolean result = true;
// ๅฆๆ้ฃ่กๆจกๅผๅฝๅ็็ถๆไธ่ฆ่ฎพ็ฝฎ็็ถๆไธไธๆ ท
if (isAirplaneModeOpen(context) != enable) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
result = Settings.System.putInt(context.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON, enable ? 1 : 0);
} else {
result = Settings.Global.putInt(context.getContentResolver(),
Settings.Global.AIRPLANE_MODE_ON, enable ? 1 : 0);
}
// ๅ้้ฃ่กๆจกๅผๅทฒ็ปๆนๅๅนฟๆญ
context.sendBroadcast(new Intent(
Intent.ACTION_AIRPLANE_MODE_CHANGED));
}
return result;
}
/**
* ่ทๅ่็็็ถๆ
*
* @return ๅๅผไธบBluetoothAdapter็ๅไธช้ๆๅญๆฎต๏ผSTATE_OFF, STATE_TURNING_OFF,
* STATE_ON, STATE_TURNING_ON
* @throws Exception
* ๆฒกๆๆพๅฐ่็่ฎพๅค
*/
public static int getBluetoothState() throws Exception {
BluetoothAdapter bluetoothAdapter = BluetoothAdapter
.getDefaultAdapter();
if (bluetoothAdapter == null) {
throw new Exception("bluetooth device not found!");
} else {
return bluetoothAdapter.getState();
}
}
/**
* ๅคๆญ่็ๆฏๅฆๆๅผ
* @return true๏ผๅทฒ็ปๆๅผๆ่
ๆญฃๅจๆๅผ๏ผfalse๏ผๅทฒ็ปๅ
ณ้ญๆ่
ๆญฃๅจๅ
ณ้ญ
* ๆฒกๆๆพๅฐ่็่ฎพๅค
*/
public static boolean isBluetoothOpen() throws Exception {
int bluetoothStateCode = getBluetoothState();
return bluetoothStateCode == BluetoothAdapter.STATE_ON
|| bluetoothStateCode == BluetoothAdapter.STATE_TURNING_ON ? true
: false;
}
/**
* ่ฎพ็ฝฎ่็็ถๆ
* @param enable
* ๆๅผ
* ๆฒกๆๆพๅฐ่็่ฎพๅค
*/
public static void setBluetooth(boolean enable) throws Exception {
// ๅฆๆๅฝๅ่็็็ถๆไธ่ฆ่ฎพ็ฝฎ็็ถๆไธไธๆ ท
if (isBluetoothOpen() != enable) {
// ๅฆๆๆฏ่ฆๆๅผๅฐฑๆๅผ๏ผๅฆๅๅ
ณ้ญ
if (enable) {
BluetoothAdapter.getDefaultAdapter().enable();
} else {
BluetoothAdapter.getDefaultAdapter().disable();
}
}
}
/**
* ่ทๅๅชไฝ้ณ้๏ผ้่ฆWRITE_APN_SETTINGSๆ้
* @param context ไธไธๆ
* @return ๅชไฝ้ณ้๏ผๅๅผ่ๅดไธบ0-15๏ผ้ป่ฎค0
*/
public static int getMediaVolume(Context context) {
return Settings.System.getInt(context.getContentResolver(),
"volume_music", 0);
// Settings.System.VOLUME_MUSIC, 0);
}
/**
* ่ทๅๅชไฝ้ณ้๏ผ้่ฆWRITE_APN_SETTINGSๆ้
* @param context ไธไธๆ
* @return ๅชไฝ้ณ้๏ผๅๅผ่ๅดไธบ0-15
*/
public static boolean setMediaVolume(Context context, int mediaVloume) {
if (mediaVloume < 0) {
mediaVloume = 0;
} else if (mediaVloume > 15) {
mediaVloume = mediaVloume % 15;
if (mediaVloume == 0) {
mediaVloume = 15;
}
}
return Settings.System.putInt(context.getContentResolver(),
"volume_music", mediaVloume);
// Settings.System.VOLUME_MUSIC, mediaVloume);
}
/**
* ่ทๅ้ๅฃฐ้ณ้๏ผ้่ฆWRITE_APN_SETTINGSๆ้
* @param context ไธไธๆ
* @return ้ๅฃฐ้ณ้๏ผๅๅผ่ๅดไธบ0-7๏ผ้ป่ฎคไธบ0
*/
public static int getRingVolume(Context context) {
return ((AudioManager) context.getSystemService(Context.AUDIO_SERVICE)).getStreamVolume(AudioManager.STREAM_RING);
}
/**
* ่ทๅๅชไฝ้ณ้
* @param context ไธไธๆ
* @return ๅชไฝ้ณ้๏ผๅๅผ่ๅดไธบ0-7
*/
public static void setRingVolume(Context context, int ringVloume) {
if (ringVloume < 0) {
ringVloume = 0;
} else if (ringVloume > 7) {
ringVloume = ringVloume % 7;
if (ringVloume == 0) {
ringVloume = 7;
}
}
((AudioManager) context.getSystemService(Context.AUDIO_SERVICE)).setStreamVolume(AudioManager.STREAM_RING,
ringVloume, AudioManager.FLAG_PLAY_SOUND);
}
// /**
// * ๆพไธๅฐ่ฎพๅคๅผๅธธ
// */
// public static class DeviceNotFoundException extends Exception{
// private static final long serialVersionUID = 1L;
//
// public DeviceNotFoundException(){}
//
// public DeviceNotFoundException(String message){
// super(message);
// }
// }
}
| gpl-2.0 |
joelbrock/ELFCO_CORE | fannie/mem/patronage/index.php | 1539 | <?php
/*******************************************************************************
Copyright 2011 Whole Foods Co-op, Duluth, MN
This file is part of Fannie.
IT CORE is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
IT CORE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
in the file license.txt along with IT CORE; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*********************************************************************************/
include(dirname(__FILE__) . '/../../config.php');
$page_title = "Fannie :: Patronage Tools";
$header = "Patronage Tools";
include($FANNIE_ROOT.'src/header.html');
?>
<ul>
<li><a href="working.php">Create working table</a></li>
<li><a href="gross.php">Calculate gross purchases</a></li>
<li><a href="rewards.php">Calculate rewards</a></li>
<li><a href="net.php">Update net purchases</a></li>
<li><a href="report.php">Report of loaded info</a></li>
<li><a href="upload.php">Upload rebates</a></li>
</ul>
<?php
include($FANNIE_ROOT.'src/footer.html');
?>
| gpl-2.0 |
yhnbgfd/Yang | WindowsFormsApplication1/Method/DeleteFile.cs | 320 | ๏ปฟusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace WindowsFormsApplication1.Method
{
class DeleteFile
{
public void del(string pathName)
{
string delFile = pathName;
File.Delete(delFile);
}
}
}
| gpl-2.0 |
alarulrajan/CodeFest | src/com/technoetic/xplanner/tags/ContentTag.java | 1881 | package com.technoetic.xplanner.tags;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.BodyTag;
import org.apache.struts.taglib.tiles.InsertTag;
import org.apache.struts.tiles.DirectStringAttribute;
/**
* The Class ContentTag.
*/
public class ContentTag extends InsertTag implements BodyTag {
/** The body content. */
private BodyContent bodyContent;
/* (non-Javadoc)
* @see org.apache.struts.taglib.tiles.InsertTag#doStartTag()
*/
@Override
public int doStartTag() throws JspException {
if (PrintLinkTag.isInPrintMode(this.pageContext)) {
this.definitionName = "tiles:print";
} else if (this.definitionName == null
|| this.definitionName == "tiles:print") {
this.definitionName = "tiles:default";
}
super.doStartTag();
return BodyTag.EVAL_BODY_BUFFERED;
}
/* (non-Javadoc)
* @see javax.servlet.jsp.tagext.BodyTag#doInitBody()
*/
@Override
public void doInitBody() throws JspException {
// empty
}
/* (non-Javadoc)
* @see javax.servlet.jsp.tagext.BodyTag#setBodyContent(javax.servlet.jsp.tagext.BodyContent)
*/
@Override
public void setBodyContent(final BodyContent bodyContent) {
this.bodyContent = bodyContent;
}
/* (non-Javadoc)
* @see org.apache.struts.taglib.tiles.InsertTag#doEndTag()
*/
@Override
public int doEndTag() throws JspException {
this.putAttribute("body",
new DirectStringAttribute(this.bodyContent.getString()));
return super.doEndTag();
}
/* (non-Javadoc)
* @see org.apache.struts.taglib.tiles.InsertTag#release()
*/
@Override
public void release() {
this.bodyContent = null;
super.release();
}
}
| gpl-2.0 |
cfloersch/keytool | src/main/java/xpertss/crypto/pkcs/ContentInfo.java | 6524 | package xpertss.crypto.pkcs;
import java.io.*;
import xpertss.crypto.util.*;
/**
* A ContentInfo type, as defined in PKCS#7.
*
* @author Benjamin Renaud
*/
public class ContentInfo {
// pkcs7 pre-defined content types
private static int[] pkcs7 = {1, 2, 840, 113549, 1, 7};
private static int[] data = {1, 2, 840, 113549, 1, 7, 1};
private static int[] sdata = {1, 2, 840, 113549, 1, 7, 2};
private static int[] edata = {1, 2, 840, 113549, 1, 7, 3};
private static int[] sedata = {1, 2, 840, 113549, 1, 7, 4};
private static int[] ddata = {1, 2, 840, 113549, 1, 7, 5};
private static int[] crdata = {1, 2, 840, 113549, 1, 7, 6};
private static int[] nsdata = {2, 16, 840, 1, 113730, 2, 5};
// timestamp token (id-ct-TSTInfo) from RFC 3161
private static int[] tstInfo = {1, 2, 840, 113549, 1, 9, 16, 1, 4};
// this is for backwards-compatibility with JDK 1.1.x
private static final int[] OLD_SDATA = {1, 2, 840, 1113549, 1, 7, 2};
private static final int[] OLD_DATA = {1, 2, 840, 1113549, 1, 7, 1};
public static ObjectIdentifier PKCS7_OID;
public static ObjectIdentifier DATA_OID;
public static ObjectIdentifier SIGNED_DATA_OID;
public static ObjectIdentifier ENVELOPED_DATA_OID;
public static ObjectIdentifier SIGNED_AND_ENVELOPED_DATA_OID;
public static ObjectIdentifier DIGESTED_DATA_OID;
public static ObjectIdentifier ENCRYPTED_DATA_OID;
public static ObjectIdentifier OLD_SIGNED_DATA_OID;
public static ObjectIdentifier OLD_DATA_OID;
public static ObjectIdentifier NETSCAPE_CERT_SEQUENCE_OID;
public static ObjectIdentifier TIMESTAMP_TOKEN_INFO_OID;
static {
PKCS7_OID = ObjectIdentifier.newInternal(pkcs7);
DATA_OID = ObjectIdentifier.newInternal(data);
SIGNED_DATA_OID = ObjectIdentifier.newInternal(sdata);
ENVELOPED_DATA_OID = ObjectIdentifier.newInternal(edata);
SIGNED_AND_ENVELOPED_DATA_OID = ObjectIdentifier.newInternal(sedata);
DIGESTED_DATA_OID = ObjectIdentifier.newInternal(ddata);
ENCRYPTED_DATA_OID = ObjectIdentifier.newInternal(crdata);
OLD_SIGNED_DATA_OID = ObjectIdentifier.newInternal(OLD_SDATA);
OLD_DATA_OID = ObjectIdentifier.newInternal(OLD_DATA);
/**
* The ASN.1 systax for the Netscape Certificate Sequence
* data type is defined
* <a href=http://wp.netscape.com/eng/security/comm4-cert-download.html>
* here.</a>
*/
NETSCAPE_CERT_SEQUENCE_OID = ObjectIdentifier.newInternal(nsdata);
TIMESTAMP_TOKEN_INFO_OID = ObjectIdentifier.newInternal(tstInfo);
}
ObjectIdentifier contentType;
DerValue content; // OPTIONAL
public ContentInfo(ObjectIdentifier contentType, DerValue content)
{
this.contentType = contentType;
this.content = content;
}
/**
* Make a contentInfo of type data.
*/
public ContentInfo(byte[] bytes)
{
DerValue octetString = new DerValue(DerValue.tag_OctetString, bytes);
this.contentType = DATA_OID;
this.content = octetString;
}
/**
* Parses a PKCS#7 content info.
*/
public ContentInfo(DerInputStream derin)
throws IOException, ParsingException
{
this(derin, false);
}
/**
* Parses a PKCS#7 content info.
* <p/>
* <p>This constructor is used only for backwards compatibility with
* PKCS#7 blocks that were generated using JDK1.1.x.
*
* @param derin the ASN.1 encoding of the content info.
* @param oldStyle flag indicating whether or not the given content info
* is encoded according to JDK1.1.x.
*/
public ContentInfo(DerInputStream derin, boolean oldStyle)
throws IOException, ParsingException
{
DerInputStream disType;
DerInputStream disTaggedContent;
DerValue type;
DerValue taggedContent;
DerValue[] typeAndContent;
DerValue[] contents;
typeAndContent = derin.getSequence(2);
// Parse the content type
type = typeAndContent[0];
disType = new DerInputStream(type.toByteArray());
contentType = disType.getOID();
if (oldStyle) {
// JDK1.1.x-style encoding
content = typeAndContent[1];
} else {
// This is the correct, standards-compliant encoding.
// Parse the content (OPTIONAL field).
// Skip the [0] EXPLICIT tag by pretending that the content is the
// one and only element in an implicitly tagged set
if (typeAndContent.length > 1) { // content is OPTIONAL
taggedContent = typeAndContent[1];
disTaggedContent
= new DerInputStream(taggedContent.toByteArray());
contents = disTaggedContent.getSet(1, true);
content = contents[0];
}
}
}
public DerValue getContent()
{
return content;
}
public ObjectIdentifier getContentType()
{
return contentType;
}
public byte[] getData() throws IOException
{
if (contentType.equals(DATA_OID) ||
contentType.equals(OLD_DATA_OID) ||
contentType.equals(TIMESTAMP_TOKEN_INFO_OID)) {
if (content == null)
return null;
else
return content.getOctetString();
}
throw new IOException("content type is not DATA: " + contentType);
}
public void encode(DerOutputStream out) throws IOException
{
DerOutputStream contentDerCode;
DerOutputStream seq;
seq = new DerOutputStream();
seq.putOID(contentType);
// content is optional, it could be external
if (content != null) {
DerValue taggedContent = null;
contentDerCode = new DerOutputStream();
content.encode(contentDerCode);
// Add the [0] EXPLICIT tag in front of the content encoding
taggedContent = new DerValue((byte) 0xA0,
contentDerCode.toByteArray());
seq.putDerValue(taggedContent);
}
out.write(DerValue.tag_Sequence, seq);
}
/**
* Returns a byte array representation of the data held in
* the content field.
*/
public byte[] getContentBytes() throws IOException
{
if (content == null)
return null;
DerInputStream dis = new DerInputStream(content.toByteArray());
return dis.getOctetString();
}
public String toString()
{
String out = "";
out += "Content Info Sequence\n\tContent type: " + contentType + "\n";
out += "\tContent: " + content;
return out;
}
}
| gpl-2.0 |
e-register/registro_old | lib/password_hash.rb | 2823 | # Password Hashing With PBKDF2 (http://crackstation.net/hashing-security.htm).
# Copyright (c) 2013, Taylor Hornby
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
require 'securerandom'
require 'openssl'
require 'base64'
# Salted password hashing with PBKDF2-SHA1.
# Authors: @RedragonX (dicesoft.net), havoc AT defuse.ca
# www: http://crackstation.net/hashing-security.htm
module PasswordHash
# The following constants can be changed without breaking existing hashes.
PBKDF2_ITERATIONS = 1000
SALT_BYTE_SIZE = 24
HASH_BYTE_SIZE = 24
HASH_SECTIONS = 4
SECTION_DELIMITER = ':'
ITERATIONS_INDEX = 1
SALT_INDEX = 2
HASH_INDEX = 3
# Returns a salted PBKDF2 hash of the password.
def self.createHash( password )
salt = SecureRandom.base64( SALT_BYTE_SIZE )
pbkdf2 = OpenSSL::PKCS5::pbkdf2_hmac_sha1(
password,
salt,
PBKDF2_ITERATIONS,
HASH_BYTE_SIZE
)
return ["sha1", PBKDF2_ITERATIONS, salt, Base64.encode64( pbkdf2 )].join( SECTION_DELIMITER )
end
# Checks if a password is correct given a hash of the correct one.
# correctHash must be a hash string generated with createHash.
def self.validatePassword( password, correctHash )
params = correctHash.split( SECTION_DELIMITER )
return false if params.length != HASH_SECTIONS
pbkdf2 = Base64.decode64( params[HASH_INDEX] )
testHash = OpenSSL::PKCS5::pbkdf2_hmac_sha1(
password,
params[SALT_INDEX],
params[ITERATIONS_INDEX].to_i,
pbkdf2.length
)
return pbkdf2 == testHash
end
end
| gpl-2.0 |
identityxx/penrose-server | core/src/test/org/safehaus/penrose/test/mapping/basic/SearchSizeLimitTest.java | 5193 | package org.safehaus.penrose.test.mapping.basic;
import org.safehaus.penrose.session.Session;
import org.safehaus.penrose.ldap.*;
import org.ietf.ldap.LDAPException;
/**
* @author Endi S. Dewata
*/
public class SearchSizeLimitTest extends BasicTestCase {
public SearchSizeLimitTest() throws Exception {
}
public void testSearchSizeLimitOne() throws Exception {
executeUpdate("insert into groups values ('group1', 'desc1')");
executeUpdate("insert into groups values ('group2', 'desc2')");
Session session = penrose.createSession();
session.bind(penroseConfig.getRootDn(), penroseConfig.getRootPassword());
SearchRequest request = new SearchRequest();
request.setDn(baseDn);
request.setFilter("(objectClass=*)");
request.setSizeLimit(1);
SearchResponse response = new SearchResponse();
session.search(request, response);
assertTrue(response.hasNext());
SearchResult searchResult = (SearchResult) response.next();
String dn = searchResult.getDn().toString();
assertEquals(baseDn, dn);
Attributes attributes = searchResult.getAttributes();
Object value = attributes.getValue("ou");
assertEquals("Groups", value);
try {
response.hasNext();
fail();
} catch (LDAPException e) {
assertEquals(LDAP.SIZE_LIMIT_EXCEEDED, e.getResultCode());
}
session.close();
}
public void testSearchSizeLimitTwo() throws Exception {
executeUpdate("insert into groups values ('group1', 'desc1')");
executeUpdate("insert into groups values ('group2', 'desc2')");
Session session = penrose.createSession();
session.bind(penroseConfig.getRootDn(), penroseConfig.getRootPassword());
SearchRequest request = new SearchRequest();
request.setDn(baseDn);
request.setFilter("(objectClass=*)");
request.setSizeLimit(2);
SearchResponse response = new SearchResponse();
session.search(request, response);
assertTrue(response.hasNext());
SearchResult searchResult = (SearchResult) response.next();
String dn = searchResult.getDn().toString();
assertEquals(baseDn, dn);
Attributes attributes = searchResult.getAttributes();
Object value = attributes.getValue("ou");
assertEquals("Groups", value);
assertTrue(response.hasNext());
searchResult = (SearchResult) response.next();
dn = searchResult.getDn().toString();
assertEquals("cn=group1,"+baseDn, dn);
attributes = searchResult.getAttributes();
value = attributes.getValue("cn");
assertEquals("group1", value);
value = attributes.getValue("description");
assertEquals("desc1", value);
try {
response.hasNext();
fail();
} catch (LDAPException e) {
assertEquals(LDAP.SIZE_LIMIT_EXCEEDED, e.getResultCode());
}
session.close();
}
public void testSearchSizeLimitThree() throws Exception {
executeUpdate("insert into groups values ('group1', 'desc1')");
executeUpdate("insert into groups values ('group2', 'desc2')");
Session session = penrose.createSession();
session.bind(penroseConfig.getRootDn(), penroseConfig.getRootPassword());
SearchRequest request = new SearchRequest();
request.setDn(baseDn);
request.setFilter("(objectClass=*)");
request.setSizeLimit(3);
SearchResponse response = new SearchResponse();
session.search(request, response);
assertTrue(response.hasNext());
SearchResult searchResult = (SearchResult) response.next();
String dn = searchResult.getDn().toString();
log.debug("DN: "+dn);
assertEquals(baseDn, dn);
Attributes attributes = searchResult.getAttributes();
Object value = attributes.getValue("ou");
assertEquals("Groups", value);
assertTrue(response.hasNext());
searchResult = (SearchResult) response.next();
dn = searchResult.getDn().toString();
log.debug("DN: "+dn);
assertEquals("cn=group1,"+baseDn, dn);
attributes = searchResult.getAttributes();
value = attributes.getValue("cn");
assertEquals("group1", value);
value = attributes.getValue("description");
assertEquals("desc1", value);
assertTrue(response.hasNext());
searchResult = (SearchResult) response.next();
dn = searchResult.getDn().toString();
log.debug("DN: "+dn);
assertEquals("cn=group2,"+baseDn, dn);
attributes = searchResult.getAttributes();
value = attributes.getValue("cn");
assertEquals("group2", value);
value = attributes.getValue("description");
assertEquals("desc2", value);
assertFalse(response.hasNext());
session.close();
}
}
| gpl-2.0 |
iworks/mu-plugins | admin-color-status.php | 1040 | <?php
/*
Plugin Name: Change admin post/page color by status
Plugin URI: http://wpsnipp.com/index.php/functions-php/change-admin-postpage-color-by-status-draft-pending-published-future-private/
Description: Adding this snippet to the functions.php of your wordpress theme will change the background colors of the post / page within the admin based on the current status. Draft, Pending, Published, Future, Private.
Version: trunk
Author: Kevin Chard
Author URI: http://wpsnipp.com/index.php/author/kevin/
License: GNU GPL
*/
class KevinChangeAdminColors
{
public function __construct()
{
add_action( 'admin_footer', array( &$this, 'posts_status_color' ) );
}
public function posts_status_color()
{
?>
<style>
.status-draft{background: #FCE3F2 !important;}
.status-pending{background: #87C5D6 !important;}
.status-publish{/* no background keep wp alternating colors */}
.status-future{background: #C6EBF5 !important;}
.status-private{background:#F2D46F;}
</style>
<?php
}
}
new KevinChangeAdminColors();
| gpl-2.0 |
ASirik/grand | wp-content/themes/eino/comments-loop-error.php | 481 | <?php if ( pings_open() && !comments_open() ) { ?>
<p class="comments-closed pings-open">
<?php printf( __( 'Comments are closed, but <a href="%s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'eino' ), esc_url( get_trackback_url() ) ); ?>
</p><!-- .comments-closed .pings-open -->
<?php } elseif ( !comments_open() ) { ?>
<p class="comments-closed">
<?php _e( 'Comments are closed.', 'eino' ); ?>
</p><!-- .comments-closed -->
<?php } ?> | gpl-2.0 |
AlzBinh/magento1_9 | app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Sortby.php | 4585 | <?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Mage
* @package Mage_Catalog
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
/**
* Catalogs Category Attribute Default and Available Sort By Backend Model
*
* @category Mage
* @package Mage_Catalog
* @author Magento Core Team <[email protected]>
*/
class Mage_Catalog_Model_Category_Attribute_Backend_Sortby
extends Mage_Eav_Model_Entity_Attribute_Backend_Abstract
{
/**
* Validate process
*
* @param Varien_Object $object
* @return bool
*/
public function validate($object)
{
$attributeCode = $this->getAttribute()->getName();
$postDataConfig = $object->getData('use_post_data_config');
if ($postDataConfig) {
$isUseConfig = in_array($attributeCode, $postDataConfig);
} else {
$isUseConfig = false;
$postDataConfig = array();
}
if ($this->getAttribute()->getIsRequired()) {
$attributeValue = $object->getData($attributeCode);
if ($this->getAttribute()->isValueEmpty($attributeValue)) {
if (is_array($attributeValue) && count($attributeValue)>0) {
} else {
if(!$isUseConfig) {
return false;
}
}
}
}
if ($this->getAttribute()->getIsUnique()) {
if (!$this->getAttribute()->getEntity()->checkAttributeUniqueValue($this->getAttribute(), $object)) {
$label = $this->getAttribute()->getFrontend()->getLabel();
Mage::throwException(Mage::helper('eav')->__('The value of attribute "%s" must be unique.', $label));
}
}
if ($attributeCode == 'default_sort_by') {
if ($available = $object->getData('available_sort_by')) {
if (!is_array($available)) {
$available = explode(',', $available);
}
$data = (!in_array('default_sort_by', $postDataConfig))? $object->getData($attributeCode):
Mage::getStoreConfig("catalog/frontend/default_sort_by");
if (!in_array($data, $available)) {
Mage::throwException(Mage::helper('eav')->__('Default Product Listing Sort by does not exist in Available Product Listing Sort By.'));
}
} else {
if (!in_array('available_sort_by', $postDataConfig)) {
Mage::throwException(Mage::helper('eav')->__('Default Product Listing Sort by does not exist in Available Product Listing Sort By.'));
}
}
}
return true;
}
/**
* Before Attribute Save Process
*
* @param Varien_Object $object
* @return Mage_Catalog_Model_Category_Attribute_Backend_Sortby
*/
public function beforeSave($object) {
$attributeCode = $this->getAttribute()->getName();
if ($attributeCode == 'available_sort_by') {
$data = $object->getData($attributeCode);
if (!is_array($data)) {
$data = array();
}
$object->setData($attributeCode, join(',', $data));
}
if (is_null($object->getData($attributeCode))) {
$object->setData($attributeCode, false);
}
return $this;
}
public function afterLoad($object) {
$attributeCode = $this->getAttribute()->getName();
if ($attributeCode == 'available_sort_by') {
$data = $object->getData($attributeCode);
if ($data) {
$object->setData($attributeCode, explode(',', $data));
}
}
return $this;
}
}
| gpl-2.0 |
petersalomonsen/frinika | src_unit_tests/TempoMessagesTest.java | 1313 | /*
* Created on Jun 18, 2006
*
* Copyright (c) 2004-2006 Peter Johan Salomonsen (http://www.petersalomonsen.com)
*
* http://www.frinika.com
*
* This file is part of Frinika.
*
* Frinika is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Frinika is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Frinika; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import javax.sound.midi.InvalidMidiDataException;
import junit.framework.TestCase;
import com.frinika.sequencer.midi.message.TempoMessage;
/**
* @author Peter Johan Salomonsen
*/
public class TempoMessagesTest extends TestCase {
public void testTempoMessages() throws InvalidMidiDataException
{
for(int n = 6;n<200;n++)
{
assertEquals(n,Math.round(new TempoMessage(new TempoMessage(n)).getBpm()));
}
}
}
| gpl-2.0 |
ETSGlobal/ezpublish_built | share/translations/ser-SR/translation.ts | 1019618 | <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0">
<context>
<name>contentstructuremenu/show_content_structure</name>
<message>
<source>Node ID: %node_id Visibility: %visibility</source>
<translation>ฤvor ID: %node_id Vidljivost: %visibility</translation>
</message>
</context>
<context>
<name>design</name>
<message>
<source>%group_name [Content object state group]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%state_name [Content object state]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/class/classlist</name>
<message>
<source>%group_name [Class group]</source>
<translation>%group_name [Grupa klasa]</translation>
</message>
<message>
<source>Last modified</source>
<translation>Poslednja promena</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Classes inside <%group_name> [%class_count]</source>
<translation>Klase unutar grupe <%group_name> [%class_count]</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Identifier</source>
<translation>Identifikator</translation>
</message>
<message>
<source>Modifier</source>
<translation>Modifikator</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Objects</source>
<translation>Objekti</translation>
</message>
<message>
<source>There are no classes in this group.</source>
<translation>Nema klasa u grupi.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>New class</source>
<translation>Nova klasa</translation>
</message>
<message>
<source>Edit this class group.</source>
<translation>Izmeni grupu klase.</translation>
</message>
<message>
<source>Remove this class group.</source>
<translation>Ukloni grupu klase.</translation>
</message>
<message>
<source>Back to class groups.</source>
<translation>Nazad u grupu.</translation>
</message>
<message>
<source>Select class for removal.</source>
<translation>Izaberi klasu za brisanje.</translation>
</message>
<message>
<source>Create a copy of the <%class_name> class.</source>
<translation>Napravi kopiju klase <%class_name>.</translation>
</message>
<message>
<source>Edit the <%class_name> class.</source>
<translation>Izmeni klasu <%class_name>.</translation>
</message>
<message>
<source>Remove selected classes from the <%class_group_name> class group.</source>
<translation>Obriลกi izabrane klase iz grupe <%class_group_name>.</translation>
</message>
<message>
<source>Create a new class within the <%class_group_name> class group.</source>
<translation>Kreiraj novu klasu unutar grupe <%class_group_name>.</translation>
</message>
<message>
<source>Use this menu to select the language you to want use then click the "New class" button. The item will be created within the current location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Classes inside <%group_name> (%class_count)</source>
<translation>Klase unutar grupe <%group_name> (%class_count)</translation>
</message>
<message>
<source>List of classes inside %group_name class group (%class_count)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/class/datatype/browse_objectrelation_placement</name>
<message>
<source>Choose node for default selection</source>
<translation>Izaberi ฤvor za osnovni izbor</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Select the item that you want to be the default selection then click "OK".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/class/datatype/browse_objectrelationlist_placement</name>
<message>
<source>Choose initial location</source>
<translation>Izaberi prvobitnu lokaciju</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Select the location that should be the default location then click "OK".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/class/edit</name>
<message>
<source>The class definition could not be stored.</source>
<translation>Definiciju klase nije moguฤe snimiti.</translation>
</message>
<message>
<source>The following information is either missing or invalid</source>
<translation>Sledeฤa informacija nedostaje ili je netaฤna</translation>
</message>
<message>
<source>The class definition was successfully stored.</source>
<translation>Definicija klase je uspeลกno snimljena.</translation>
</message>
<message>
<source>Edit <%class_name> [Class]</source>
<translation>Izmeni klasu <%class_name> [Klasa]</translation>
</message>
<message>
<source>Last modified</source>
<translation>Poslednja promena</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Identifier</source>
<translation>Identifikator</translation>
</message>
<message>
<source>Object name pattern</source>
<translation>Struktura imena objekta</translation>
</message>
<message>
<source>Container</source>
<translation>Kontejner</translation>
</message>
<message>
<source>Down</source>
<translation>Dole</translation>
</message>
<message>
<source>Up</source>
<translation>Gore</translation>
</message>
<message>
<source>Required</source>
<translation>Potreban</translation>
</message>
<message>
<source>Searchable</source>
<translation>Pretraลพiv</translation>
</message>
<message>
<source>Information collector</source>
<translation>Kolektor podataka</translation>
</message>
<message>
<source>Disable translation</source>
<translation>Onemoguฤi prevod</translation>
</message>
<message>
<source>This class does not have any attributes.</source>
<translation>Klasa nema atribute.</translation>
</message>
<message>
<source>Remove selected attributes</source>
<translation>Ukloni izabrane atribute</translation>
</message>
<message>
<source>Add attribute</source>
<translation>Novi atribut</translation>
</message>
<message>
<source>OK</source>
<translation></translation>
</message>
<message>
<source>Apply</source>
<translation>Primeni</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Use this field to set the informal name of the class. The name field can contain whitespaces and special characters.</source>
<translation>Koristi ovo polje za opisni naziv klase. Polje moลพe sadrลพati prazna mesta i specijalne karaktere.</translation>
</message>
<message>
<source>Use the order buttons to set the order of the class attributes. The up arrow moves the attribute one place up. The down arrow moves the attribute one place down.</source>
<translation>Koristi dugme za izbor sortiranja atributa klase.</translation>
</message>
<message>
<source>Use this field to set the informal name of the attribute. This field can contain whitespaces and special characters.</source>
<translation>Koristi ovo polje za opisni naziv atributa. Polje moลพe sadrลพati prazna mesta i specijalne karaktere.</translation>
</message>
<message>
<source>The <%datatype_name> datatype does not support search indexing.</source>
<translation><%datatype_name> ne podrลพava indeksiranje za pretraลพivanje.</translation>
</message>
<message>
<source>Use this checkbox for attributes that contain non-translatable content.</source>
<translation>Koristi ovaj checkbox za atribute ฤiji sadrลพaj nije za prevoฤenje.</translation>
</message>
<message>
<source>Remove the selected attributes.</source>
<translation>Ukloni izabrane atribute.</translation>
</message>
<message>
<source>Add a new attribute to the class. Use the menu on the left to select the attribute type.</source>
<translation>Dodaj novi atribut klasi.</translation>
</message>
<message>
<source>Store changes and exit from edit mode.</source>
<translation>Snimi izmene i napusti editovanje.</translation>
</message>
<message>
<source>Store changes and continue editing.</source>
<translation>Snimi izmene i nastavi editovati.</translation>
</message>
<message>
<source>Discard all changes and exit from edit mode.</source>
<translation>Poniลกti sve izmene i napusti editovanje.</translation>
</message>
<message>
<source>The class definition contains the following errors</source>
<translation>Definicija klase sadrลพi sledeฤe greลกke</translation>
</message>
<message>
<source>Use this field to set the internal name of the class. The identifier will be used in templates and in PHP code. Allowed characters are letters, numbers and underscores.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this field to configure how the name of the objects are generated. Type in the identifiers of the attributes that should be used. The identifiers must be enclosed in angle brackets. Text outside angle brackets will be included as it is shown here.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>URL alias name pattern</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this field to configure how the url alias of the objects are generated (applies to nice URLs). Type in the identifiers of the attributes that should be used. The identifiers must be enclosed in angle brackets. Text outside angle brackets will be included as is.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this checkbox to allow instances of the class to have sub items. If checked, it will be possible to create new sub items. If not checked, the sub items will not be displayed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default sorting of children</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use these controls to set the default sorting method for the sub items of instances of the content class.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Descending</source>
<translation type="unfinished">Silazno</translation>
</message>
<message>
<source>Ascending</source>
<translation type="unfinished">Uzlazno</translation>
</message>
<message>
<source>Use this checkbox to set the default availability for the objects of this class. The availability controls whether an object should be shown even if it does not exist in one of the languages specified by the "SiteLanguageList" setting. If this is the case, the system will use the main language of the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class attributes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select attribute for removal. Click the "Remove selected attributes" button to remove the selected attributes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this field to set the internal name of the attribute. The identifier will be used in templates and in PHP code. Allowed characters are letters, numbers and underscores.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this checkbox to specify whether the user should be forced to enter information into the attribute.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this checkbox to specify whether the contents of the attribute should be indexed by the search engine.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this checkbox to specify whether the attribute should collect input from users.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The <%datatype_name> datatype cannot be used as an information collector.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Description</source>
<translation type="unfinished">Opis</translation>
</message>
<message>
<source>Use this field to set the informal description of the class. The description field can contain whitespaces and special characters.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of class attributes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class attribute item</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this field to set the informal description of the attribute. This field can contain whitespaces and special characters.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this category to group attributes together in edit interface, some categories might also be hidden in full view if they are for instance only meta attributes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Category</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit <%class_name> (%object_count objects)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The draft of the class definition was successfully stored.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/class/edit_denied</name>
<message>
<source>Class edit conflict</source>
<translation>Konflikt editovanja klase</translation>
</message>
<message>
<source>This class is already being edited by someone else.</source>
<translation>Klasa je veฤ bila menjana od nekog drugog korisnika.</translation>
</message>
<message>
<source>Possible actions</source>
<translation>Moguฤe akcije</translation>
</message>
<message>
<source>Contact the person who is editing the class.</source>
<translation>Kontaktiraj korisnika koji edituje klasu.</translation>
</message>
<message>
<source>Wait until the lock expires and try again.</source>
<translation>Priฤekaj dok zakljuฤavanje ne istekne i probaj ponovo.</translation>
</message>
<message>
<source>Edit <%class_name> [Class]</source>
<translation>Izmeni klasu <%class_name> [Klasa]</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Current modifier</source>
<translation>Aktivni modifikator</translation>
</message>
<message>
<source>Unlock time</source>
<translation>Vreme otkljuฤavanja</translation>
</message>
<message>
<source>Retry</source>
<translation>Ponovi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
<message>
<source>The class is temporarily locked and thus it cannot be edited by you.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The class will be available for editing after it has been stored by the current modifier or when it is unlocked by the system.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/class/edit_language</name>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/class/groupedit</name>
<message>
<source>Edit <%group_name> [Class group]</source>
<translation>%group_name [Grupa klasa]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
</context>
<context>
<name>design/admin/class/grouplist</name>
<message>
<source>Class groups [%group_count]</source>
<translation>Grupe klasa [%group_count]</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Modifier</source>
<translation>Modifikator</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Select class group for removal.</source>
<translation>Izaberi grupu klasa za brisanje.</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Edit the <%class_group_name> class group.</source>
<translation>Izmeni grupu <%class_group_name>.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove the selected class groups. This will also remove all classes that only exist within the selected groups.</source>
<translation>Ukloni izabrane grupe klasa. Takoฤe ฤe ukloniti sve klase koje se nalaze unutar izabranih grupa.</translation>
</message>
<message>
<source>New class group</source>
<translation>Nova grupa klasa</translation>
</message>
<message>
<source>Create a new class group.</source>
<translation>Kreiraj novu grupu klasa.</translation>
</message>
<message>
<source>Recently modified classes</source>
<translation>Nedavno izmenjene klase</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Identifier</source>
<translation>Identifikator</translation>
</message>
<message>
<source>Edit the <%class_name> class.</source>
<translation>Izmeni klasu <%class_name>.</translation>
</message>
<message>
<source>Class groups (%group_count)</source>
<translation>Grupe klasa (%group_count)</translation>
</message>
<message>
<source>List of class groups</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of recently modified classes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Objects</source>
<translation type="unfinished">Objekti</translation>
</message>
</context>
<context>
<name>design/admin/class/removeclass</name>
<message>
<source>Are you sure you want to remove this class?</source>
<translation>Jeste li sigurni da ลพelite ukloniti ovu klasu?</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Confirm class removal</source>
<translation>Potvrdi uklanjanje klase</translation>
</message>
<message>
<source>Are you sure you want to remove the classes?</source>
<translation>Jesi li sigurni da ลพelite ukloniti ove klase?</translation>
</message>
<message>
<source>The %1 class was already removed from the group but still exists in other groups.</source>
<translation>%1 klasa je veฤ uklonjena iz grupe ali postoji u drugim grupama.</translation>
</message>
<message>
<source>The %1 classes were already removed from the group but still exist in other groups.</source>
<translation>%1 klase su veฤ uklonjene iz grupe ali postoji u drugim grupama.</translation>
</message>
<message>
<source>You do not have permission to remove classes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing class <%1> will result in the removal of %2 object and all its sub items.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing class <%1> will result in the removal of %2 objects and all their sub items.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/class/removegroup</name>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Confirm class group removal</source>
<translation>Potvrdi uklanjanje grupe klasa</translation>
</message>
<message>
<source>Are you sure you want to remove the class group?</source>
<translation>Jeste li sigurni da ลพelite ukloniti navedenu grupu klasa?</translation>
</message>
<message>
<source>Are you sure you want to remove the class groups?</source>
<translation>Jeste li sigurni da ลพelite ukloniti navedene grupe klasa?</translation>
</message>
<message>
<source>The following classes will be removed from the <%group_name> class group</source>
<translation>Sledeฤe klase ฤe biti uklonjene iz grupe <%group_name></translation>
</message>
<message>
<source>%objects objects will be removed</source>
<translation>%objects objekti ฤe biti uklonjeni</translation>
</message>
</context>
<context>
<name>design/admin/class/removetranslation</name>
<message>
<source>Confirm translation removal</source>
<translation type="unfinished">Potvrdi uklanjanje prevoda</translation>
</message>
<message>
<source>Are you sure you want to remove the following translations from class <%1>?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Language</source>
<translation type="unfinished">Jezik</translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel the removal of translations.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/class/select_language</name>
<message>
<source>New languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the language you want to add</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the language the added translation will be based on</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/class/select_languages</name>
<message>
<source>Edit <%class_name></source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/class/view</name>
<message>
<source>Last modified: %time, %username</source>
<translation>Poslednja promena: %time, %username</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Identifier</source>
<translation>Identifikator</translation>
</message>
<message>
<source>Object name pattern</source>
<translation>Struktura imena objekta</translation>
</message>
<message>
<source>Container</source>
<translation>Kontejner</translation>
</message>
<message>
<source>Yes</source>
<translation>Da</translation>
</message>
<message>
<source>No</source>
<translation>Ne</translation>
</message>
<message>
<source>Object count</source>
<translation>Ukupno objekata</translation>
</message>
<message>
<source>Attributes</source>
<translation>Atributi</translation>
</message>
<message>
<source>Flags</source>
<translation>Oznake</translation>
</message>
<message>
<source>Is required</source>
<translation>Potreban je</translation>
</message>
<message>
<source>Is not required</source>
<translation>Nije potreban</translation>
</message>
<message>
<source>Is searchable</source>
<translation>Moguฤe pretraลพivati</translation>
</message>
<message>
<source>Is not searchable</source>
<translation>Nije moguฤe pretraลพivati</translation>
</message>
<message>
<source>Collects information</source>
<translation>Prikuplja podatke</translation>
</message>
<message>
<source>Does not collect information</source>
<translation>Ne prikuplja podatke</translation>
</message>
<message>
<source>Translation is disabled</source>
<translation>Prevod je onemoguฤen</translation>
</message>
<message>
<source>Translation is enabled</source>
<translation>Prevod je omoguฤen</translation>
</message>
<message>
<source>Override templates [%1]</source>
<translation>Zaobiฤi ลกablone [%1]</translation>
</message>
<message>
<source>Override</source>
<translation>Zaobiฤi</translation>
</message>
<message>
<source>Source template</source>
<translation>Izvorni ลกablon</translation>
</message>
<message>
<source>Override template</source>
<translation>Zaobiฤi ลกablon</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Input did not validate</source>
<translation>Unos nije ispravan</translation>
</message>
<message>
<source>%class_name [Class]</source>
<translation>%class_name [Klasa]</translation>
</message>
<message>
<source>Edit this class.</source>
<translation>Izmeni klasu.</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Member of class groups [%group_count]</source>
<translation>ฤlan grupe klasa [%group_count]</translation>
</message>
<message>
<source>Class group</source>
<translation>Grupa klasa</translation>
</message>
<message>
<source>Select class group for removal.</source>
<translation>Izaberi grupu klasa za brisanje.</translation>
</message>
<message>
<source>Remove from selected</source>
<translation>Ukloni iz izabranih</translation>
</message>
<message>
<source>Remove the <%class_name> class from the selected class groups.</source>
<translation>Ukloni klasu <%class_name> iz izabranih grupa klasa.</translation>
</message>
<message>
<source>Add to class group</source>
<translation>Dodaj u grupu klasa</translation>
</message>
<message>
<source>Add the <%class_name> class to the group specified in the menu on the left.</source>
<translation>Dodaj klasu <%class_name> u grupu klasa izabranu u levom meniju.</translation>
</message>
<message>
<source>The <%class_name> class already exists within all class groups.</source>
<translation>Klasa <%class_name> veฤ postoji unutar grupe klasa.</translation>
</message>
<message>
<source>No group</source>
<translation>Nema grupe</translation>
</message>
<message>
<source>Siteaccess</source>
<translation>Siteaccess</translation>
</message>
<message>
<source>View template overrides for the <%source_template_name> template.</source>
<translation>Prikaลพi zaobilazne ลกablone za <%source_template_name> ลกablon.</translation>
</message>
<message>
<source>Edit the override template for the <%override_name> override.</source>
<translation>Izmeni zaobilazni ลกablon za <%override_name> zaobilazak.</translation>
</message>
<message>
<source>This class does not have any class-level override templates.</source>
<translation>Klasa nema ni jedan zaobilazni ลกablon na nivou klase.</translation>
</message>
<message>
<source>Select a group that the <%class_name> class should be added to.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translations [%translations]</source>
<translation type="unfinished">Prevodi [%translations]</translation>
</message>
<message>
<source>Existing languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Language</source>
<translation type="unfinished">Jezik</translation>
</message>
<message>
<source>Locale</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Main</source>
<translation type="unfinished">Glavni</translation>
</message>
<message>
<source>View translation.</source>
<translation type="unfinished">Prikaz prevoda.</translation>
</message>
<message>
<source>Use these radio buttons to select the desired main language.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit in <%language_name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected languages from the list above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There is no removable language.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Set main</source>
<translation type="unfinished">Postavi glavno</translation>
</message>
<message>
<source>Select the desired main language using the radio buttons above then click this button to store the setting.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot change the main language because the object is not translated to any other languages.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>URL alias name pattern</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default object availability</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Not available</source>
<translation type="unfinished">Nije dostupan</translation>
</message>
<message>
<source>Available</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default sorting of children</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this menu to select the language you want to use for editing then click the "Edit" button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Another language</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hide class groups.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class groups</source>
<translation type="unfinished">Grupe klasa</translation>
</message>
<message>
<source>Show class groups.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hide override templates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Override templates</source>
<translation type="unfinished">Zaobilasci ลกablona</translation>
</message>
<message>
<source>Show override templates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hide available translations.</source>
<translation type="unfinished">Sakrij dostupne prevode.</translation>
</message>
<message>
<source>Translations</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show available translations.</source>
<translation type="unfinished">Prikaลพi dostupne prevode.</translation>
</message>
<message>
<source>Class storing deferred</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The storing of the class has been deferred because existing objects need to be updated. The process has been scheduled to run in the background and will be started automatically. Please do not edit the class again until the process has finished. You can monitor the progress of the background process here:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Background process monitor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class name and number of objects</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Member of class groups (%group_count)</source>
<translation>ฤlan grupe klasa (%group_count)</translation>
</message>
<message>
<source>Override templates (%1)</source>
<translation>Zaobiฤi ลกablone (%1)</translation>
</message>
<message>
<source>Translations (%translations)</source>
<translation type="unfinished">Prevodi (%translations)</translation>
</message>
<message>
<source>Description</source>
<translation type="unfinished">Opis</translation>
</message>
<message>
<source>Category</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Application name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Confirm removal</source>
<translation type="unfinished">Potvrdi uklanjanje</translation>
</message>
</context>
<context>
<name>design/admin/collaboration</name>
<message>
<source>Approval</source>
<translation>Odobrenje</translation>
</message>
</context>
<context>
<name>design/admin/collaboration/group/view/list</name>
<message>
<source>Group list for '%1'</source>
<translation>Grupa lista za '%1'</translation>
</message>
<message>
<source>No items in group.</source>
<translation>Nema elemenata u grupi.</translation>
</message>
<message>
<source>Group tree for '%1'</source>
<translation>Stablo grupe za '%1'</translation>
</message>
</context>
<context>
<name>design/admin/collaboration/group_tree</name>
<message>
<source>Groups</source>
<translation>Grupe</translation>
</message>
</context>
<context>
<name>design/admin/collaboration/handler/view/full/ezapprove</name>
<message>
<source>Approval</source>
<translation>Odobrenje</translation>
</message>
<message>
<source>The content object %1 awaits approval before it can be published.</source>
<translation>Objekt sadrลพaja %1 ฤeka odobrenje da bi mogao biti objavljen. </translation>
</message>
<message>
<source>The content object %1 needs your approval before it can be published.</source>
<translation>Objekt sadrลพaja %1 ฤeka Vaลกe odobrenje da bi mogao biti objavljen.</translation>
</message>
<message>
<source>Do you approve of the content object being published?</source>
<translation>Odobravate li objavu objekta sadrลพaja?</translation>
</message>
<message>
<source>Edit the object</source>
<translation>Izmeni objekt</translation>
</message>
<message>
<source>The content object %1 was not accepted but will be available as a draft for the author.</source>
<translation>Objekt sadrลพaja %1 nije prihvaฤen, ali ฤe autoru biti dostupan kao skica.</translation>
</message>
<message>
<source>Comment</source>
<translation>Komentar</translation>
</message>
<message>
<source>Add Comment</source>
<translation>Dodaj komentar</translation>
</message>
<message>
<source>Approve</source>
<translation>Odobri</translation>
</message>
<message>
<source>Deny</source>
<translation>Odbij</translation>
</message>
<message>
<source>Preview</source>
<translation>Pregled</translation>
</message>
<message>
<source>Participants</source>
<translation>Uฤesnici</translation>
</message>
<message>
<source>Messages</source>
<translation>Poruke</translation>
</message>
<message>
<source>Do you want to send a message to the person approving it?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The content object %1 was approved and will be published when the publishing workflow continues.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The content object %1 [deleted] was approved and will be published once the publishing workflow continues.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The content object %1 was not accepted but is still available as a draft.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The content object %1 [deleted] was not accepted but is available as a draft again.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You may edit the draft and publish it, in which case an approval is required again.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The content object %1 [deleted] was not accepted but will be available as a draft for the author.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The author can edit the draft and publish it again, in which case a new approval is required.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/collaboration/handler/view/line/ezapprove</name>
<message>
<source>%1 awaits approval by editor</source>
<translation>%1 : OฤEKUJE odobrenje urednika</translation>
</message>
<message>
<source>%1 was approved for publishing</source>
<translation>%1 : ODOBRENO za objavu</translation>
</message>
<message>
<source>%1 was not approved for publishing</source>
<translation>%1 : ODBIJENO</translation>
</message>
<message>
<source>%1 awaits your approval</source>
<translation>%1 : ฤEKA Vaลกe odobrenje</translation>
</message>
<message>
<source>The content object %1 [deleted]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/collaboration/item_list</name>
<message>
<source>Subject</source>
<translation>Naslov</translation>
</message>
<message>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<source>Read</source>
<translation>Proฤitano</translation>
</message>
<message>
<source>Unread</source>
<translation>Neproฤitano</translation>
</message>
<message>
<source>Inactive</source>
<translation>Neaktivno</translation>
</message>
</context>
<context>
<name>design/admin/collaboration/view/element/ezapprove_comment</name>
<message>
<source>Posted: %1</source>
<translation>Objavljeno %1</translation>
</message>
</context>
<context>
<name>design/admin/collaboration/view/summary</name>
<message>
<source>Item list</source>
<translation>Lista elemenata</translation>
</message>
<message>
<source>No new items to be handled.</source>
<translation>Nema novih elemenata za obradu.</translation>
</message>
<message>
<source>Group tree</source>
<translation>Stablo grupe</translation>
</message>
</context>
<context>
<name>design/admin/content/bookmark</name>
<message>
<source>My bookmarks [%bookmark_count]</source>
<translation>Moje oznake za knjigu [%bookmark_count]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>There are no bookmarks in the list.</source>
<translation>Nema oznaka za knjigu u listi.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select bookmark for removal.</source>
<translation>Izaberi oznaku za knjigu za brisanje.</translation>
</message>
<message>
<source>Edit <%bookmark_name>.</source>
<translation>Izmeni <%bookmark_name>.</translation>
</message>
<message>
<source>Remove selected bookmarks.</source>
<translation>Ukloni izabrane oznake za knjigu.</translation>
</message>
<message>
<source>Add items</source>
<translation>Dodaj elemente</translation>
</message>
<message>
<source>Add items to your personal bookmark list.</source>
<translation>Dodaj elemente na moju listu oznaka za knjigu.</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nepoznato</translation>
</message>
<message>
<source>You do not have permission to edit the contents of <%bookmark_name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>My bookmarks (%bookmark_count)</source>
<translation>Moje oznake za knjigu (%bookmark_count)</translation>
</message>
</context>
<context>
<name>design/admin/content/browse</name>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>Top level</source>
<translation>Glavni nivo</translation>
</message>
<message>
<source>Back</source>
<translation>Nazad</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Display sub items using a simple list.</source>
<translation>Prikaลพi podelemente koristeฤi jednostavni listing.</translation>
</message>
<message>
<source>List</source>
<translation>Lista</translation>
</message>
<message>
<source>Thumbnail</source>
<translation>Sliฤica</translation>
</message>
<message>
<source>Display sub items as thumbnails.</source>
<translation>Prikaลพi podelemente kao sliฤice.</translation>
</message>
<message>
<source>To select objects, choose the appropriate radio button or checkbox(es), then click the "Select" button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>To select an object that is a child of one of the displayed objects, click the object name for a list of the children of the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bookmarks</source>
<translation type="unfinished">Oznake za knjigu</translation>
</message>
<message>
<source>Search result</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/browse_bookmark</name>
<message>
<source>Choose items to bookmark</source>
<translation>Izaberite elemente koje ฤete staviti u oznake za knjigu</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Select the items that you want to bookmark using the checkboxes then click "Select".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/browse_copy_node</name>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Choose location for the copy of <%object_name></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose a new location for the copy of <%object_name> using the radio buttons then click "Select".</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose location for the copy of subtree of node <%node_name></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose a new location for the copy of subtree of node <%node_name> using the radio buttons then click "Select".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/browse_export</name>
<message>
<source>Choose export node</source>
<translation>Izaberi izvozni ฤvor</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Select the item that you want to export using the checkboxes then click "Select".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/browse_first_placement</name>
<message>
<source>Choose location for new <%classname></source>
<translation>Izaberi lokaciju za novu klasu <%classname></translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Choose a location for the new <%classname> using the radio buttons then click "Select".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/browse_move_node</name>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Choose a new location for <%object_name></source>
<translation>Izaberi novu lokaciju za objekt <%object_name></translation>
</message>
<message>
<source>Choose a new location for <%object_name> using the radio buttons then click "Select".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/browse_move_placement</name>
<message>
<source>Choose a new location for <%version_name></source>
<translation>Izaberi novu lokaciju za verziju <%version_name></translation>
</message>
<message>
<source>The previous location was <%previous_location>.</source>
<translation>Preฤaลกnja lokacija je bila <%previous_location>.</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Choose a new location for <%version_name> using the radio buttons then click "Select".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/browse_placement</name>
<message>
<source>Choose locations for <%version_name></source>
<translation>Izaberi lokaciju za verziju <%version_name></translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Choose locations for <%version_name> using the checkboxes then click "Select".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/browse_related</name>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Choose objects that you want to relate to <%version_name></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use the checkboxes to choose the objects that you want to relate to <%version_name>.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/browse_swap_node</name>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Choose the node to exchange for <%object_name></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use the radio buttons to choose the node that you want to swap with <%object_name>.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/children_reverserelatedlist</name>
<message>
<source>Item</source>
<translation>Element</translation>
</message>
<message>
<source>Objects referring to this item</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/collectedinfo/feedback</name>
<message>
<source>Feedback for %feedbackname</source>
<translation>Povratna informacija o %feedbackname</translation>
</message>
<message>
<source>Return to site</source>
<translation>Povratak na stranicu</translation>
</message>
<message>
<source>You have already submitted feedback. The previously submitted data was:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Thanks for your feedback. The following information was collected.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/collectedinfo/form</name>
<message>
<source>Form %formname</source>
<translation>Obrazac %formname</translation>
</message>
<message>
<source>Collected information</source>
<translation>Prikupljene informacije</translation>
</message>
<message>
<source>Back</source>
<translation>Nazad</translation>
</message>
<message>
<source>You have already submitted this form. The previously submitted data was:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/collectedinfo/poll</name>
<message>
<source>Poll %pollname</source>
<translation>Anketa %pollname</translation>
</message>
<message>
<source>Poll results</source>
<translation>Rezultati ankete</translation>
</message>
<message>
<source>%count total votes</source>
<translation>Ukupno glasova: %count</translation>
</message>
<message>
<source>Anonymous users are not allowed to vote in this poll. Please log in.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have already voted in this poll.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/confirmtranslationremove</name>
<message>
<source>Confirm language removal</source>
<translation>Potvrdi uklanjanje jezika</translation>
</message>
<message>
<source>Are you sure you want to remove the language?</source>
<translation>Jesi li sigurni da ลพelite ukloniti jezik?</translation>
</message>
<message>
<source>Are you sure you want to remove the languages?</source>
<translation>Jesi li sigurni da ลพelite ukloniti jezike?</translation>
</message>
<message>
<source>Removing <%1> will also result in the removal of %2 translated versions.</source>
<translation>Uklanjanje <%1> ฤe ukloniti i sam prevod te %2 prevedene verzije.</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
</context>
<context>
<name>design/admin/content/create_languages</name>
<message>
<source>Language selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to create an object of the requested class in any language.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the language in which you want to create the object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/dashboard</name>
<message>
<source>Dashboard</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/datatype</name>
<message>
<source>No media file is available.</source>
<translation>Ni jedna medijska datoteka nije dostupna.</translation>
</message>
<message>
<source>Year</source>
<translation type="unfinished">Godina</translation>
</message>
<message>
<source>Month</source>
<translation type="unfinished">Mesec</translation>
</message>
<message>
<source>Day</source>
<translation type="unfinished">Dan</translation>
</message>
<message>
<source>Hour</source>
<translation type="unfinished">Sat</translation>
</message>
<message>
<source>Minute</source>
<translation type="unfinished">Minut</translation>
</message>
</context>
<context>
<name>design/admin/content/datatype/ezuser</name>
<message>
<source>Account status</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/diff</name>
<message>
<source>Versions for <%object_name> [%version_count]</source>
<translation type="obsolete">Verzije za objekt <%object_name> [%version_count]</translation>
</message>
<message>
<source>Status</source>
<translation type="obsolete">Status</translation>
</message>
<message>
<source>Modified</source>
<translation type="obsolete">Promenjeno</translation>
</message>
<message>
<source>Draft</source>
<translation type="obsolete">Skica</translation>
</message>
<message>
<source>Published</source>
<translation type="obsolete">Objavljeno</translation>
</message>
<message>
<source>Pending</source>
<translation type="obsolete">Na ฤekanju</translation>
</message>
<message>
<source>Archived</source>
<translation type="obsolete">Arhivirano</translation>
</message>
<message>
<source>Rejected</source>
<translation type="obsolete">Odbijeno</translation>
</message>
<message>
<source>Versions for <%object_name> (%version_count)</source>
<translation type="obsolete">Verzije za objekt <%object_name> (%version_count)</translation>
</message>
</context>
<context>
<name>design/admin/content/draft</name>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove all</source>
<translation>Ukloni sve</translation>
</message>
<message>
<source>My drafts [%draft_count]</source>
<translation>Moje skice [%draft_count]</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Select draft for removal.</source>
<translation>Izaberi skicu za brisanje.</translation>
</message>
<message>
<source>Edit <%draft_name>.</source>
<translation>Izmeni <%draft_name>.</translation>
</message>
<message>
<source>There are no drafts that belong to you.</source>
<translation>Nema skica koje pripadaju vama.</translation>
</message>
<message>
<source>Remove selected drafts.</source>
<translation>Ukloni izabrane skice.</translation>
</message>
<message>
<source>Remove all drafts that belong to you.</source>
<translation>Ukloni sve moje skice.</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nepoznat</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Language</source>
<translation type="unfinished">Jezik</translation>
</message>
<message>
<source>Are you sure you want to remove all drafts?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>My drafts (%draft_count)</source>
<translation>Moje skice (%draft_count)</translation>
</message>
</context>
<context>
<name>design/admin/content/edit</name>
<message>
<source>Edit <%object_name> [%class_name]</source>
<translation>Izmena objekta <%object_name> [%class_name]</translation>
</message>
<message>
<source>Translating content from %from_lang to %to_lang</source>
<translation>Prevod sadrลพaja sa jezika %from_lang na %to_lang</translation>
</message>
<message>
<source>Send for publishing</source>
<translation>Objavi</translation>
</message>
<message>
<source>Store draft</source>
<translation>Snimi skicu</translation>
</message>
<message>
<source>Store the contents of the draft that is being edited and continue editing. Use this button to periodically save your work while editing.</source>
<translation>Snimi sadrลพaj skice i nastavi editovanje. Koristi ovo dugme za povremeno snimanje prilikom editovanja.</translation>
</message>
<message>
<source>Discard draft</source>
<translation>Odbaci skicu</translation>
</message>
<message>
<source>Published</source>
<translation>Objavljeno</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Depth</source>
<translation>Dubina</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Priority</source>
<translation>Prioritet</translation>
</message>
<message>
<source>Locations [%locations]</source>
<translation>Lokacije [%locations]</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Location</source>
<translation>Lokacija</translation>
</message>
<message>
<source>Sub items</source>
<translation>Podelementi</translation>
</message>
<message>
<source>Sorting of sub items</source>
<translation>Sortiranje podelemenata</translation>
</message>
<message>
<source>Current visibility</source>
<translation>Trenutna vidljivost</translation>
</message>
<message>
<source>Visibility after publishing</source>
<translation>Vidljivost nakon objavljivanja</translation>
</message>
<message>
<source>Main</source>
<translation>Glavni</translation>
</message>
<message>
<source>Select location for removal.</source>
<translation>Izaberi lokaciju za brisanje.</translation>
</message>
<message>
<source>Desc.</source>
<translation>Silazno.</translation>
</message>
<message>
<source>Asc.</source>
<translation>Uzlazno.</translation>
</message>
<message>
<source>Hidden by parent</source>
<translation>Sakrij</translation>
</message>
<message>
<source>Visible</source>
<translation>Vidljivo</translation>
</message>
<message>
<source>Unchanged</source>
<translation>Neprovereno</translation>
</message>
<message>
<source>Hidden</source>
<translation>Skriven</translation>
</message>
<message>
<source>Use these radio buttons to specify the main location (main node) for the object being edited.</source>
<translation>Koristite ovu radio dugmad za odreฤivanje glavne lokacije [glavni ฤvor] objekta koji menjate.</translation>
</message>
<message>
<source>Move to another location.</source>
<translation>Premesti na drugu lokaciju.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected locations.</source>
<translation>Ukloni izabrane lokacije.</translation>
</message>
<message>
<source>Add locations</source>
<translation>Dodaj lokacije</translation>
</message>
<message>
<source>Add one or more locations for the object being edited.</source>
<translation>Dodaj jednu ili viลกe lokacija za objekt koji menjate.</translation>
</message>
<message>
<source>Object information</source>
<translation>Podaci o objektu</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Created</source>
<translation>Kreirano</translation>
</message>
<message>
<source>Not yet published</source>
<translation>Joลก nije objavljeno</translation>
</message>
<message>
<source>Published version</source>
<translation>Objavljena verzija</translation>
</message>
<message>
<source>Manage versions</source>
<translation>Upravljanje verzijama</translation>
</message>
<message>
<source>View and manage (copy, delete, etc.) the versions of this object.</source>
<translation>Prikaz i upravljanje [kopiranje, brisanje i sl.] verzija ovog objekta.</translation>
</message>
<message>
<source>Current draft</source>
<translation>Tekuฤa skica</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>View</source>
<translation>Prikaz</translation>
</message>
<message>
<source>Preview the draft that is being edited.</source>
<translation>Prikaลพi skicu koju editujem.</translation>
</message>
<message>
<source>Store and exit</source>
<translation>Snimi i izaฤi</translation>
</message>
<message>
<source>Store the draft that is being edited and exit from edit mode.</source>
<translation>Snimi skicu koju editujem i napusti editovanje.</translation>
</message>
<message>
<source>Translate</source>
<translation>Prevedi</translation>
</message>
<message>
<source>Related objects [%related_objects]</source>
<translation>Povezani objekti [%related_objects]</translation>
</message>
<message>
<source>Related images [%related_images]</source>
<translation>Povezane slike [%related_images]</translation>
</message>
<message>
<source>Related files [%related_files]</source>
<translation>Povezane datoteke [%related_files]</translation>
</message>
<message>
<source>File type</source>
<translation>Vrsta datoteke</translation>
</message>
<message>
<source>Size</source>
<translation>Veliฤina</translation>
</message>
<message>
<source>XML code</source>
<translation>XML kod</translation>
</message>
<message>
<source>Related content [%related_objects]</source>
<translation>Povezani sadrลพaj [%related_objects]</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>There are no objects related to the one that is currently being edited.</source>
<translation>Nema povezanih objekata sa objektom koji se edituje.</translation>
</message>
<message>
<source>Remove the selected items from the list(s) above. It is only the relations that will be removed. The items will not be deleted.</source>
<translation>Ukloni izabrane elemente sa gornje liste. To je samo relacija koja ฤe biti uklonjena. Elementi neฤe biti uklonjeni.</translation>
</message>
<message>
<source>Add existing</source>
<translation>Dodaj postojeฤi</translation>
</message>
<message>
<source>Add an existing item as a related object.</source>
<translation>Dodaj postojeฤi element kao povezani objekt.</translation>
</message>
<message>
<source>Upload new</source>
<translation>Uฤitaj sada</translation>
</message>
<message>
<source>Upload a file and add it as a related object.</source>
<translation>Uฤitaj datoteku i dodaj je kao povezani objekt.</translation>
</message>
<message>
<source>The draft could not be stored.</source>
<translation>Skica ne moลพe biti snimljena.</translation>
</message>
<message>
<source>Required data is either missing or is invalid</source>
<translation>Traลพeni podaci su pogreลกni ili nedostaju</translation>
</message>
<message>
<source>The following locations are invalid</source>
<translation>Lokacija je neispravna</translation>
</message>
<message>
<source>The draft was only partially stored.</source>
<translation>Skica je delimiฤno snimljena.</translation>
</message>
<message>
<source>The draft was successfully stored.</source>
<translation>Skica je uspeลกno snimljena.</translation>
</message>
<message>
<source>Are you sure you want to discard the draft?</source>
<translation>Jeste li sigurni da ลพelite poniลกtiti skicu?</translation>
</message>
<message>
<source>Discard the draft that is being edited. This will also remove the translations that belong to the draft (if any).</source>
<translation>Poniลกti skicu koja se edituje. Takoฤe ฤe se ukloniti i prevod za skicu (ako postoji).</translation>
</message>
<message>
<source>Publish the contents of the draft that is being edited. The draft will become the published version of the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back to edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Publish data</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class identifier</source>
<translation type="unfinished">Identifikator klase</translation>
</message>
<message>
<source>Class name</source>
<translation type="unfinished">Naziv klase</translation>
</message>
<message>
<source>This location will remain unchanged when the object is published.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This location will be created when the object is published.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This location will be moved when the object is published.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This location will be removed when the object is published.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to remove this location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Top node</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this menu to set the sorting method for the sub items in this location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this menu to set the sorting direction for the sub items in this location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot add or remove locations because the object being edited belongs to a top node.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot manage the versions of this object because there is only one version available (the one that is being edited).</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translate from</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit the current object showing the selected language as a reference.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Common</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Embedded</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Linked</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attribute</source>
<translation type="unfinished">Atribut</translation>
</message>
<message>
<source>You do not have permission to view this object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Copy this code and paste it into an XML field to embed the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Copy this code and paste it into an XML field to link the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Relation type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The following data is invalid according to the custom validation rules</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>States</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Toggle fullscreen editing!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Store draft and exit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Store the draft that is being edited and exit from edit mode. Use when you need to exit your work and return later to continue.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit <%object_name> (%class_name)</source>
<translation>Izmena objekta <%object_name> (%class_name)</translation>
</message>
<message>
<source>Locations (%locations)</source>
<translation>Lokacije (%locations)</translation>
</message>
<message>
<source>Preview</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Existing translations</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Base translation on</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Related objects (%related_objects)</source>
<translation>Povezani objekti (%related_objects)</translation>
</message>
<message>
<source>Related images (%related_images)</source>
<translation>Povezane slike (%related_images)</translation>
</message>
<message>
<source>Related files (%related_files)</source>
<translation>Povezane datoteke (%related_files)</translation>
</message>
<message>
<source>Related content (%related_objects)</source>
<translation>Povezani sadrลพaj (%related_objects)</translation>
</message>
<message>
<source>View the draft that is being edited.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Path String</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/edit_attribute</name>
<message>
<source>not translatable</source>
<translation>neprevodljiv</translation>
</message>
<message>
<source>required</source>
<translation>potreban</translation>
</message>
<message>
<source>information collector</source>
<translation>kolektor podataka</translation>
</message>
</context>
<context>
<name>design/admin/content/edit_draft</name>
<message>
<source>Object information</source>
<translation>Podaci o objektu</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Created</source>
<translation>Kreirano</translation>
</message>
<message>
<source>Not yet published</source>
<translation>Joลก nije objavljeno</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Published version</source>
<translation>Objavljena verzija</translation>
</message>
<message>
<source>Possible edit conflict</source>
<translation>Moguฤ konflikt editovanja</translation>
</message>
<message>
<source>This object is already being edited by someone else. In addition, it is already being edited by you.</source>
<translation>Objekt je menjan od strane nekog drugog korisnika.</translation>
</message>
<message>
<source>You should contact the other user(s) to make sure that you are not stepping on anyone's toes.</source>
<translation>Kontaktirajte ostale korisnike da ne doฤe do nesporazuma.</translation>
</message>
<message>
<source>The most recently modified draft is version #%version, created by %creator, last changed: %modified.</source>
<translation>Najnovija verzija skice je verzija#%version, kreirana od %creator dana %modified.</translation>
</message>
<message>
<source>This object is already being edited by you.</source>
<translation>Objekt ste veฤ menjali.</translation>
</message>
<message>
<source>Your most recently modified draft is version #%version, last changed: %modified.</source>
<translation>Vaลกa najnovije izmenjena skica je verzije #%version a izmenjena je %modified.</translation>
</message>
<message>
<source>This object is already being edited by someone else.</source>
<translation>Ovaj objekt je veฤ menjan od strane nekog drugog korisnika.</translation>
</message>
<message>
<source>Possible actions</source>
<translation>Moguฤe akcije</translation>
</message>
<message>
<source>Continue editing one of your drafts.</source>
<translation>Nastavite editovati jednu od vaลกih skica.</translation>
</message>
<message>
<source>Create a new draft and start editing it.</source>
<translation>Kreirajte novu skicu i krenite je editovati.</translation>
</message>
<message>
<source>Cancel the edit operation.</source>
<translation>Poniลกti editovanje.</translation>
</message>
<message>
<source>Current drafts [%draft_count]</source>
<translation>Trenutne skice [%draft_count]</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>Translations</source>
<translation>Prevodi</translation>
</message>
<message>
<source>Creator</source>
<translation>Kreirao</translation>
</message>
<message>
<source>Select draft version #%version for editing.</source>
<translation>Izaberite skicu verzije #%version za editovanje.</translation>
</message>
<message>
<source>View the contents of version #%version_number. Translation: %translation.</source>
<translation>Prikaลพi sadrลพaj verzije #%version_number. Prevod: %translation.</translation>
</message>
<message>
<source>Edit selected</source>
<translation>Izmeni izabrano</translation>
</message>
<message>
<source>Edit the selected draft.</source>
<translation>Izmeni izabranu skicu.</translation>
</message>
<message>
<source>New draft</source>
<translation>Nova skica</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
<message>
<source>The object has already been published by someone else.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Publish data as it is (and overwriting the published data).</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Go back to editing and show the published data.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conflicting versions [%draft_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Status</source>
<translation type="unfinished">Status</translation>
</message>
<message>
<source>View the contents of version #%version. Translation: %translation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show the published data</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create a new draft. The contents of the new draft will be copied from the published version.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot select draft version #%version for editing because it belongs to another user. Please select a draft that belongs to you or create a new draft and then edit it.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot edit any of the drafts because none of them belong to you. You can create a new draft, select it and then edit it.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conflicting versions (%draft_count)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Current drafts (%draft_count)</source>
<translation>Trenutne skice (%draft_count)</translation>
</message>
</context>
<context>
<name>design/admin/content/edit_languages</name>
<message>
<source>Object information</source>
<translation type="unfinished">Podaci o objektu</translation>
</message>
<message>
<source>ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Created</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Not yet published</source>
<translation type="unfinished">Joลก nije objavljeno</translation>
</message>
<message>
<source>Modified</source>
<translation type="unfinished">Promenjeno</translation>
</message>
<message>
<source>Published version</source>
<translation type="unfinished">Objavljena verzija</translation>
</message>
<message>
<source>Edit <%object_name></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Existing languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the language you want to edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the language you want to add</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the language the added translation will be based on</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to create a translation in another language.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>However you can select one of the following languages for editing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to edit the object in any available languages.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Existing translations</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the translation you want to edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the translation you want to add</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translate based on</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/history</name>
<message>
<source>Object information</source>
<translation type="unfinished">Podaci o objektu</translation>
</message>
<message>
<source>ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Created</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Not yet published</source>
<translation type="unfinished">Joลก nije objavljeno</translation>
</message>
<message>
<source>Modified</source>
<translation type="unfinished">Promenjeno</translation>
</message>
<message>
<source>Published version</source>
<translation type="unfinished">Objavljena verzija</translation>
</message>
<message>
<source>Version is not a draft</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version %1 is not available for editing anymore. Only drafts can be edited.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>To edit this version, first create a copy of it.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version is not yours</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version %1 was not created by you. You can only edit your own drafts.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unable to create new version</source>
<translation type="unfinished">Nije moguฤe kreirati novu verziju</translation>
</message>
<message>
<source>Version history limit has been exceeded and no archived version can be removed by the system.</source>
<translation type="unfinished">Prekoraฤeno je ograniฤenje istorijata pojedine verzije te ni jedna saฤuvana verzija ne moลพe biti uklonjena iz sistema.</translation>
</message>
<message>
<source>You can change your version history settings in content.ini, remove draft versions or edit existing drafts.</source>
<translation type="unfinished">Moลพete promeniti svoja podeลกavanja istorijata verzija u content.ini, ukloni skice ili izmeni postojeฤe skice. </translation>
</message>
<message>
<source>Versions for <%object_name> [%version_count]</source>
<translation type="unfinished">Verzije za objekt <%object_name> [%version_count]</translation>
</message>
<message>
<source>Version</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Status</source>
<translation type="unfinished">Status</translation>
</message>
<message>
<source>Modified translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Creator</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select version #%version_number for removal.</source>
<translation type="unfinished">Izaberite verziju #%version za brisanje.</translation>
</message>
<message>
<source>Version #%version_number cannot be removed because it is either the published version of the object or because you do not have permission to remove it.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>View the contents of version #%version_number. Translation: %translation.</source>
<translation type="unfinished">Prikaลพi sadrลพaj verzije #%version_number. Prevod: %translation.</translation>
</message>
<message>
<source>Draft</source>
<translation type="unfinished">Skica</translation>
</message>
<message>
<source>Published</source>
<translation type="unfinished">Objavljeno</translation>
</message>
<message>
<source>Pending</source>
<translation type="unfinished">Na ฤekanju</translation>
</message>
<message>
<source>Archived</source>
<translation type="unfinished">Arhivirano</translation>
</message>
<message>
<source>Rejected</source>
<translation type="unfinished">Odbijeno</translation>
</message>
<message>
<source>Untouched draft</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There is no need to make copies of untouched drafts.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create a copy of version #%version_number.</source>
<translation type="unfinished">Napravi kopiju verzije #%version_number.</translation>
</message>
<message>
<source>You cannot make copies of versions because you do not have permission to edit the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit the contents of version #%version_number.</source>
<translation type="unfinished">Izmeni sadrลพaj verzije #%version_number.</translation>
</message>
<message>
<source>You cannot edit the contents of version #%version_number either because it is not a draft or because you do not have permission to edit the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This object does not have any versions.</source>
<translation type="unfinished">Objekt nema ni jednu verziju.</translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove the selected versions from the object.</source>
<translation type="unfinished">Ukloni izabrane verzije iz objekta.</translation>
</message>
<message>
<source>Show differences</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back</source>
<translation type="unfinished">Nazad</translation>
</message>
<message>
<source>Translations</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Copy translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New drafts [%newerDraftCount]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This object does not have any drafts.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Differences between versions %oldVersion and %newVersion</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Old version</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inline changes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Block changes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New version</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back to history</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Versions for <%object_name> (%version_count)</source>
<translation type="unfinished">Verzije za objekt <%object_name> (%version_count)</translation>
</message>
<message>
<source>New drafts (%newerDraftCount)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/pendinglist</name>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>The pending list is empty.</source>
<translation>Vaลกa lista poslova koji Vas oฤekuju je prazna.</translation>
</message>
<message>
<source>My pending items [%pending_count]</source>
<translation>Moji poslovi na ฤekanju [%pending_count]</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nepoznat</translation>
</message>
<message>
<source>My pending items (%pending_count)</source>
<translation>Moji poslovi na ฤekanju (%pending_count)</translation>
</message>
</context>
<context>
<name>design/admin/content/removeassignment</name>
<message>
<source>Object information</source>
<translation>Podaci o objektu</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Created</source>
<translation>Kreirano</translation>
</message>
<message>
<source>Not yet published</source>
<translation>Joลก nije objavljeno</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Published version</source>
<translation>Objavljena verzija</translation>
</message>
<message>
<source>Manage versions</source>
<translation>Upravljanje verzijama</translation>
</message>
<message>
<source>Current draft</source>
<translation>Tekuฤa skica</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>Confirm location removal</source>
<translation>Potvrdi uklanjanje lokacije</translation>
</message>
<message>
<source>Insufficient permissions</source>
<translation>Nedovoljna ovlaลกฤenja</translation>
</message>
<message>
<source>Some of the locations that are about to be removed contain sub items.</source>
<translation>Neke od lokacija za uklanjanje sadrลพe podelemente.</translation>
</message>
<message>
<source>Removing the locations will also result in the removal of the sub items.</source>
<translation>Uklanjanje lokacije ukloniฤe i podelemente te lokacije.</translation>
</message>
<message>
<source>Are you sure you want to remove the locations along with their contents?</source>
<translation>Jeste li sigurni da ลพelite ukloniti lokaciju i sadrลพaj?</translation>
</message>
<message>
<source>Click the "Cancel" button and try removing only the locations that you are allowed to remove.</source>
<translation>Kliknite na "Odustani" i probajte ukloniti samo lokacije za koje imate ovlaลกฤenja.</translation>
</message>
<message>
<source>Location</source>
<translation>Lokacija</translation>
</message>
<message>
<source>Sub items</source>
<translation>Podelementi</translation>
</message>
<message>
<source>%child_count item</source>
<translation>%child_count element</translation>
</message>
<message>
<source>%child_count items</source>
<translation>elemenata: %child_count</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Remove the locations along with all the sub items.</source>
<translation>Ukloni lokacije zajedno sa svim podelementima.</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Cancel the removal of locations.</source>
<translation>Poniลกti uklanjanje lokacija.</translation>
</message>
<message>
<source>The locations marked with red contain items that you do not have permission to remove.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot continue because you do not have permission to remove some of the selected locations.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/removeeditversion</name>
<message>
<source>Object information</source>
<translation>Podaci o objektu</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Created</source>
<translation>Kreirano</translation>
</message>
<message>
<source>Not yet published</source>
<translation>Joลก nije objavljeno</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Published version</source>
<translation>Objavljena verzija</translation>
</message>
<message>
<source>Confirm draft discard</source>
<translation>Odbaci skicu</translation>
</message>
<message>
<source>Are you sure you want to discard the draft?</source>
<translation>Jeste li sigurni da ลพelite poniลกtiti skicu?</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Manage versions</source>
<translation>Upravljanje verzijama</translation>
</message>
<message>
<source>Current draft</source>
<translation>Tekuฤa skica</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
</context>
<context>
<name>design/admin/content/removeobject</name>
<message>
<source>%child_count item</source>
<translation>%child_count element</translation>
</message>
<message>
<source>%child_count items</source>
<translation>elemenata: %child_count</translation>
</message>
</context>
<context>
<name>design/admin/content/restore</name>
<message>
<source>Object retrieval</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The object will be restored at its original location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Restore at original location (below <%nodeName>).</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The system will prompt you to specify a location by browsing the tree.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select a location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Restore at original location (unavailable).</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>Continue restoring <%name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do not restore <%name> and return to trash.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Restoring object <%name> [%className]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The system will restore the original location of the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Restore original location <%nodeName></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The system will prompt you to browse for a location for the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Browse for location</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Restore original locations</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Restore <%name> to the specified location.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/reverserelatedlist</name>
<message>
<source>"%contentObjectName" [%children_count]: Sub items that are used by other objects </source>
<translation>"%contentObjectName" [%children_count]: Podelementi koje koriste drugi objekti</translation>
</message>
<message>
<source>This subtree/item has no external relations.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>"%contentObjectName" (%children_count): Sub items that are used by other objects </source>
<translation>"%contentObjectName" (%children_count): Podelementi koje koriste drugi objekti</translation>
</message>
</context>
<context>
<name>design/admin/content/search</name>
<message>
<source>Update attributes</source>
<translation>Aลพuriraj atribute</translation>
</message>
<message>
<source>Search</source>
<translation>Traลพi</translation>
</message>
<message>
<source>All content</source>
<translation>Celi sadrลพaj</translation>
</message>
<message>
<source>The same location</source>
<translation>Po istoj lokaciji</translation>
</message>
<message>
<source>For more options try the %1Advanced search%2.</source>
<comment>The parameters are link start and end tags.</comment>
<translation>Za viลกe opcija kod pretrage koristite %1napredno pretraลพivanje%2.</translation>
</message>
<message>
<source>No results were found while searching for <%1></source>
<translation>Niลกta nije pronaฤeno za upit <%1></translation>
</message>
<message>
<source>Search tips</source>
<translation>Saveti za pretraลพivanje</translation>
</message>
<message>
<source>Check spelling of keywords.</source>
<translation>Proverite jeste li ispravno napisali kljuฤne reฤi.</translation>
</message>
<message>
<source>Try more general keywords.</source>
<translation>Pokuลกajte s uopลกtenijim kljuฤnim reฤima.</translation>
</message>
<message>
<source>Search for <%1> returned %2 matches</source>
<translation>Pretraลพivanje : <%1> pronaฤeno pojmova: %2 </translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Advanced search</source>
<translation>Napredno pretraลพivanje</translation>
</message>
<message>
<source>Search for all of the following words</source>
<translation>Traลพi sve ponuฤene reฤi</translation>
</message>
<message>
<source>Search for an exact phrase</source>
<translation>Traลพi unesenu frazu</translation>
</message>
<message>
<source>Class</source>
<translation>klasa</translation>
</message>
<message>
<source>Any class</source>
<translation>svim klasama</translation>
</message>
<message>
<source>Class attribute</source>
<translation>atributima klase</translation>
</message>
<message>
<source>Any attribute</source>
<translation>svi atributi</translation>
</message>
<message>
<source>In</source>
<translation>u</translation>
</message>
<message>
<source>Any section</source>
<translation>svim segmentima</translation>
</message>
<message>
<source>Published</source>
<translation>Objavljeno</translation>
</message>
<message>
<source>Any time</source>
<translation>Bilo koje vreme</translation>
</message>
<message>
<source>Last day</source>
<translation>prethodni dan</translation>
</message>
<message>
<source>Last week</source>
<translation>proลกla sedmica</translation>
</message>
<message>
<source>Last month</source>
<translation>proลกli mesec</translation>
</message>
<message>
<source>Last three months</source>
<translation>posljednja tri meseca</translation>
</message>
<message>
<source>Last year</source>
<translation>proลกle godine</translation>
</message>
<message>
<source>Display per page</source>
<translation>Prikaลพi na istoj stranici</translation>
</message>
<message>
<source>5 items</source>
<translation>5 elemenata</translation>
</message>
<message>
<source>10 items</source>
<translation>10 elemenata</translation>
</message>
<message>
<source>20 items</source>
<translation>20 elemenata</translation>
</message>
<message>
<source>30 items</source>
<translation>30 elemenata</translation>
</message>
<message>
<source>50 items</source>
<translation>50 elemenata</translation>
</message>
<message>
<source>No results were found when searching for <%1></source>
<translation>Niลกta nije pronaฤeno za upit <%1></translation>
</message>
<message>
<source>The following words were excluded from the search</source>
<translation>Sledeฤe reฤi iskljuฤene su iz pretraลพivanja</translation>
</message>
<message>
<source>Try changing some keywords e.g. &quot;car&quot; instead of &quot;cars&quot;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Fewer keywords result in more matches. Try reducing keywords until you get a result.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/translationnew</name>
<message>
<source>Translation</source>
<translation>Prevod</translation>
</message>
<message>
<source>New translation for content</source>
<translation>Novi prevod za sadrลพaj</translation>
</message>
<message>
<source>Custom</source>
<translation>Posebno</translation>
</message>
<message>
<source>Name of custom translation</source>
<translation>Naziv posebnog prevoda</translation>
</message>
<message>
<source>Locale for custom translation</source>
<translation>Lokalizacija posebnog prevoda</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
</context>
<context>
<name>design/admin/content/translations</name>
<message>
<source>Language</source>
<translation>Jezik</translation>
</message>
<message>
<source>Locale</source>
<translation>Jeziฤko podeลกavanje</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Add language</source>
<translation>Dodaj jezik</translation>
</message>
<message>
<source>Available languages for translation of content [%translations_count]</source>
<translation>Dostupni jezici za prevod sadrลพaja [%translations_count]</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Translations</source>
<translation>Prevodi</translation>
</message>
<message>
<source>Select language for removal.</source>
<translation>Izaberi prevod za brisanje.</translation>
</message>
<message>
<source>Remove selected languages.</source>
<translation>Ukloni izabrane jezike.</translation>
</message>
<message>
<source>Add a new language. The new language can then be used when translating content.</source>
<translation>Dodaj novi jezik. Novi jezik moลพe biti koriลกฤen kod prevoda sadrลพaja.</translation>
</message>
<message>
<source>Country/region</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Classes translations</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The language cannot be removed because it is in use.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Available languages for translation of content (%translations_count)</source>
<translation>Dostupni jezici za prevod sadrลพaja (%translations_count)</translation>
</message>
<message>
<source>Toggle all.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/translationview</name>
<message>
<source>%translation [Translation]</source>
<translation>%translation [Prevod]</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Locale</source>
<translation>Jeziฤko podeลกavanje</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>%locale [Locale]</source>
<translation>%locale [Locale]</translation>
</message>
<message>
<source>Charset</source>
<translation>Kodna stranica</translation>
</message>
<message>
<source>Not set</source>
<translation>Nije podeลกena</translation>
</message>
<message>
<source>Allowed charsets</source>
<translation>Dopuลกtene kodne stranice</translation>
</message>
<message>
<source>Language name</source>
<translation>Naziv jezika</translation>
</message>
<message>
<source>International language name</source>
<translation>Internacionalni naziv jezike</translation>
</message>
<message>
<source>Language code</source>
<translation>Kod jezika</translation>
</message>
<message>
<source>Language comment</source>
<translation>Komentar jezika</translation>
</message>
<message>
<source>Locale code</source>
<translation>Kod jeziฤne postave</translation>
</message>
<message>
<source>Full locale code</source>
<translation>Kompletan kod jeziฤne postave</translation>
</message>
<message>
<source>HTTP locale code</source>
<translation>HTTP kod jeziฤne postave</translation>
</message>
<message>
<source>Decimal symbol</source>
<translation>Decimalni simbol</translation>
</message>
<message>
<source>Thousands separator</source>
<translation>Separator hiljada</translation>
</message>
<message>
<source>Decimal count</source>
<translation>Decimalnih mesta</translation>
</message>
<message>
<source>Negative symbol</source>
<translation>Negativni simbol</translation>
</message>
<message>
<source>Positive symbol</source>
<translation>Pozitivni simbol</translation>
</message>
<message>
<source>Currency decimal symbol</source>
<translation>Decimalni simbol</translation>
</message>
<message>
<source>Currency thousands separator</source>
<translation>Simbol za hiljadu (.)</translation>
</message>
<message>
<source>Currency decimal count</source>
<translation>Broj decimalnih mesta</translation>
</message>
<message>
<source>Currency negative symbol</source>
<translation>Negativni simbol</translation>
</message>
<message>
<source>Currency positive symbol</source>
<translation>Pozitivni simbol</translation>
</message>
<message>
<source>Currency symbol</source>
<translation>Simbol valute</translation>
</message>
<message>
<source>Currency name</source>
<translation>Naziv valute</translation>
</message>
<message>
<source>Currency short name</source>
<translation>Skraฤenica naziva valute</translation>
</message>
<message>
<source>First day of week</source>
<translation>Prvi dan u nedelji</translation>
</message>
<message>
<source>Monday</source>
<translation>Ponedeljak</translation>
</message>
<message>
<source>Weekday names</source>
<translation>Nazivi dana u nedelji</translation>
</message>
<message>
<source>Month names</source>
<translation>Nazivi meseci</translation>
</message>
<message>
<source>Sunday</source>
<translation>Nedelja</translation>
</message>
<message>
<source>Country/region name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Country/region comment</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Country/region code</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Country/region variation</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/trash</name>
<message>
<source>Trash [%list_count]</source>
<translation>Smeฤe [%list_count]</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Permanently remove the selected items.</source>
<translation>Trajno ukloni izabrane elemente.</translation>
</message>
<message>
<source>Empty trash</source>
<translation>Isprazni smeฤe</translation>
</message>
<message>
<source>Permanently remove all items from the trash.</source>
<translation>Trajno ukloni sve izabrane elemente iz smeฤa.</translation>
</message>
<message>
<source>There are no items in the trash</source>
<translation>Smeฤe je prazno</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nepoznat</translation>
</message>
<message>
<source>Original Placement</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use these checkboxes to mark items for removal. Click the "Remove selected" button to remove the selected items.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Restore</source>
<translation type="unfinished">Obnovi</translation>
</message>
<message>
<source>Trash (%list_count)</source>
<translation>Smeฤe (%list_count)</translation>
</message>
</context>
<context>
<name>design/admin/content/upload</name>
<message>
<source>Object information</source>
<translation>Podaci o objektu</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Created</source>
<translation>Kreirano</translation>
</message>
<message>
<source>Not yet published</source>
<translation>Joลก nije objavljeno</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Published version</source>
<translation>Objavljena verzija</translation>
</message>
<message>
<source>Manage versions</source>
<translation>Upravljanje verzijama</translation>
</message>
<message>
<source>Current draft</source>
<translation>Tekuฤa skica</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>The file could not be uploaded</source>
<translation>Datoteka ne moลพe biti uฤitana</translation>
</message>
<message>
<source>The following errors occurred</source>
<translation>Pojavile su se sledeฤe greลกke</translation>
</message>
<message>
<source>File upload</source>
<translation>Uฤitaj datoteku</translation>
</message>
<message>
<source>Upload file</source>
<translation>Uฤitaj datoteku</translation>
</message>
<message>
<source>Location</source>
<translation>Lokacija</translation>
</message>
<message>
<source>The location where the uploaded file should be placed.</source>
<translation>Lokacije gde bi se uฤitana datoteka trebala naฤi.</translation>
</message>
<message>
<source>Automatic</source>
<translation>Automatski</translation>
</message>
<message>
<source>File</source>
<translation>Datoteka</translation>
</message>
<message>
<source>Upload</source>
<translation>Uฤitaj</translation>
</message>
<message>
<source>Proceed with uploading the selected file.</source>
<translation>Nastavite sa uฤitavanjem izabrane datoteke.</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Choose a file from your local machine then click the "Upload" button. An object will be created according to file type and placed in the specified location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the file that you want to upload.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Abort the upload operation.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/upload_related</name>
<message>
<source>Upload a file and relate it to <%version_name></source>
<translation>Uฤitaj datoteku i poveลพi je sa verzijom <%version_name></translation>
</message>
<message>
<source>This operation allows you to upload a file and add it as a related object.</source>
<translation>Operacija vam omoguฤuje da uฤitate datoteku i snimite kao povezani objekt.</translation>
</message>
<message>
<source>When the file is uploaded, an object will be created according to the type of the file.</source>
<translation>Kad datoteka bude uฤitana, kreiraฤe se objekt sa obzirom na vrstu datoteke.</translation>
</message>
<message>
<source>The newly created object will be automatically related to the draft being edited (<%version_name>).</source>
<translation>Novi objekt biฤe automatski povezan sa skicom koja se edituje (<%version_name>).</translation>
</message>
<message>
<source>The newly created object will be placed within the specified location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the file you want to upload then click the "Upload" button.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/urlalias</name>
<message>
<source>The selected aliases were successfully removed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All aliases for this node were successfully removed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The specified language code <%language> is not valid.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text is missing for the URL alias</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter text in the input box to create a new alias.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The URL alias was successfully created, but was modified by the system to <%new_alias></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid characters will be removed or transformed to valid characters.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Existing objects or functionality with the same name take precedence on the name.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The URL alias <%new_alias> was successfully created</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The URL alias &lt;%new_alias&gt; already exists, and it points to &lt;%action_url&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>URL aliases for <%node_name> [%alias_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The current item does not have any aliases associated with it.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>URL alias</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Language</source>
<translation type="unfinished">Jezik</translation>
</message>
<message>
<source>Type</source>
<translation type="unfinished">Vrsta</translation>
</message>
<message>
<source>Redirect</source>
<translation type="unfinished">Preusmeri</translation>
</message>
<message>
<source>Direct</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected alias from the list above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the selected aliases?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove all</source>
<translation type="unfinished">Ukloni sve</translation>
</message>
<message>
<source>Remove all aliases for this node.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove all aliases for this node?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no removable aliases.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot remove any aliases because you do not have permission to edit the current item.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Generated aliases [%count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Note that these entries are automatically generated from the name of the object. To change these names you must edit the object in the specific language and publish the changes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit the contents for language %language.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot edit the contents for language %language because you do not have permission to edit the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create new alias</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>URL alias name:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter the URL for the new alias. Use forward slashes (/) to create subentries.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Destination:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Destination.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Language:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose the language for the new URL alias.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Not available</source>
<translation type="unfinished">Nije dostupan</translation>
</message>
<message>
<source>Alias should redirect to its destination</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>With <em>Alias should redirect to its destination</em> checked eZ Publish will redirect to the destination using a HTTP 301 response. Un-check it and the URL will stay the same &#8212; no redirection will be performed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If checked the alias will start from the parent of the current node. If un-checked the aliases will start from the root of the site.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Place alias on the site root</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The new alias be placed under %link</source>
<translation type="unfinished"></translation>
</message>
<message>
<source><em>Un-check</em> to create the new alias under %link. Leave it checked and the new alias will be created on <em><a href='/'>%siteroot</a></em>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Include in other languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create new URL forwarding with wildcard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Redirecting URL</source>
<translation type="unfinished">Preusmereni URL</translation>
</message>
<message>
<source>URL aliases for <%node_name> (%alias_count)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Generated aliases (%count)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/urlalias_global</name>
<message>
<source>Alias should redirect to its destination</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create</source>
<translation type="unfinished">Kreiraj</translation>
</message>
<message>
<source>Create a new global URL alias.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The selected aliases were successfully removed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All global aliases were successfully removed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The specified language code <%language> is not valid.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text is missing for the URL alias</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter text in the input box to create a new alias.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text is missing for the URL alias destination</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter some text in the destination input box to create a new alias.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The specified destination URL %url does not exist in the system, cannot create alias for it</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ensure that the destination points to a valid entry, one of:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Built-in functionality, e.g. %example.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Existing aliases for the content structure.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The URL alias was successfully created, but was modified by the system to <%new_alias></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Note that the new alias points to a node and will not be displayed in the global list. It can be examined on the URL-Alias page of the node, %node_link.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid characters will be removed or transformed to valid characters.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Existing objects or functionality with the same name take precedence on the name.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The URL alias <%new_alias> was successfully created</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The URL alias &lt;%new_alias&gt; already exists, and it points to &lt;%action_url&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Globally defined URL aliases [%alias_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show %number_of items per page.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The global list does not contain any aliases.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>URL alias</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Destination</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Language</source>
<translation type="unfinished">Jezik</translation>
</message>
<message>
<source>Always available</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Type</source>
<translation type="unfinished">Vrsta</translation>
</message>
<message>
<source>Redirect</source>
<translation type="unfinished">Preusmeri</translation>
</message>
<message>
<source>Direct</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected aliases from the list above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the selected aliases?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove all</source>
<translation type="unfinished">Ukloni sve</translation>
</message>
<message>
<source>Remove all global aliases.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove all global aliases?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no removable aliases.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New URL alias</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter the URL for the new alias. Use forward slashes (/) to create subentries.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter the destination URL for the new alias. Use forward slashes (/) to create subentries.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose the language for the new URL alias.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Makes the alias available in languages other than the one specified.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Destination (path to existing functionality or resource)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Globally defined URL aliases (%alias_count)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/urlalias_wildcard</name>
<message>
<source>The selected aliases were successfully removed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All wildcard aliases were successfully removed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text is missing for the URL alias</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter text in the input box to create a new alias.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text is missing for the URL alias destination</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter some text in the destination input box to create a new alias.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The URL alias <%wildcard_src_url> was successfully created</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The URL alias <%wildcard_src_url> already exists, and it points to <%wildcard_dst_url></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Defined URL aliases with wildcard[%wildcard_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show %number_of items per page.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The URL wildcard list does not contain any aliases.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>URL alias wildcard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Destination</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Type</source>
<translation type="unfinished">Vrsta</translation>
</message>
<message>
<source>Forward</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Direct</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Undefined</source>
<translation type="unfinished">Nedefinisano</translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected aliases from the list above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the selected wildcards?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove all</source>
<translation type="unfinished">Ukloni sve</translation>
</message>
<message>
<source>Remove all wildcard aliases.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove all wildcard aliases?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no removable aliases.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New URL wildcard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Perform redirecting.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create</source>
<translation type="unfinished">Kreiraj</translation>
</message>
<message>
<source>Create a new wildcard URL alias.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter the URL for the new wildcard. Example: developer/*</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter the destination URL for the new wildcard. Example: dev/{1\}</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Defined URL aliases with wildcard(%wildcard_count)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/content/versions</name>
<message>
<source>Unable to create new version</source>
<translation type="obsolete">Nije moguฤe kreirati novu verziju</translation>
</message>
<message>
<source>Version history limit has been exceeded and no archived version can be removed by the system.</source>
<translation type="obsolete">Prekoraฤeno je ograniฤenje istorijata pojedine verzije te ni jedna saฤuvana verzija ne moลพe biti uklonjena iz sistema.</translation>
</message>
<message>
<source>You can change your version history settings in content.ini, remove draft versions or edit existing drafts.</source>
<translation type="obsolete">Moลพete promeniti svoja podeลกavanja istorijata verzija u content.ini, ukloni skice ili izmeni postojeฤe skice. </translation>
</message>
<message>
<source>Versions for <%object_name> [%version_count]</source>
<translation type="obsolete">Verzije za objekt <%object_name> [%version_count]</translation>
</message>
<message>
<source>Version</source>
<translation type="obsolete">Verzija</translation>
</message>
<message>
<source>Status</source>
<translation type="obsolete">Status</translation>
</message>
<message>
<source>Creator</source>
<translation type="obsolete">Kreirao</translation>
</message>
<message>
<source>Created</source>
<translation type="obsolete">Kreirano</translation>
</message>
<message>
<source>Draft</source>
<translation>Skica</translation>
</message>
<message>
<source>Published</source>
<translation>Objavljeno</translation>
</message>
<message>
<source>Pending</source>
<translation>Na ฤekanju</translation>
</message>
<message>
<source>Archived</source>
<translation>Arhivirano</translation>
</message>
<message>
<source>Rejected</source>
<translation type="obsolete">Odbijeno</translation>
</message>
<message>
<source>Edit</source>
<translation type="obsolete">Izmeni</translation>
</message>
<message>
<source>Remove selected</source>
<translation type="obsolete">Ukloni izabrano</translation>
</message>
<message>
<source>Object information</source>
<translation type="obsolete">Podaci o objektu</translation>
</message>
<message>
<source>ID</source>
<translation type="obsolete">ID</translation>
</message>
<message>
<source>Not yet published</source>
<translation type="obsolete">Joลก nije objavljeno</translation>
</message>
<message>
<source>Modified</source>
<translation type="obsolete">Promenjeno</translation>
</message>
<message>
<source>Published version</source>
<translation type="obsolete">Objavljena verzija</translation>
</message>
<message>
<source>Select version #%version_number for removal.</source>
<translation type="obsolete">Izaberite verziju #%version za brisanje.</translation>
</message>
<message>
<source>View the contents of version #%version_number. Translation: %translation.</source>
<translation type="obsolete">Prikaลพi sadrลพaj verzije #%version_number. Prevod: %translation.</translation>
</message>
<message>
<source>Copy</source>
<translation type="obsolete">Kopiraj</translation>
</message>
<message>
<source>Create a copy of version #%version_number.</source>
<translation type="obsolete">Napravi kopiju verzije #%version_number.</translation>
</message>
<message>
<source>Edit the contents of version #%version_number.</source>
<translation type="obsolete">Izmeni sadrลพaj verzije #%version_number.</translation>
</message>
<message>
<source>This object does not have any versions.</source>
<translation type="obsolete">Objekt nema ni jednu verziju.</translation>
</message>
<message>
<source>Remove the selected versions from the object.</source>
<translation type="obsolete">Ukloni izabrane verzije iz objekta.</translation>
</message>
<message>
<source>Untouched draft</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back</source>
<translation type="obsolete">Nazad</translation>
</message>
<message>
<source>Versions for <%object_name> (%version_count)</source>
<translation type="obsolete">Verzije za objekt <%object_name> (%version_count)</translation>
</message>
</context>
<context>
<name>design/admin/content/view/versionview</name>
<message>
<source>Object information</source>
<translation>Podaci o objektu</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Created</source>
<translation>Kreirano</translation>
</message>
<message>
<source>Not yet published</source>
<translation>Joลก nije objavljeno</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Published version</source>
<translation>Objavljena verzija</translation>
</message>
<message>
<source>Manage versions</source>
<translation>Upravljanje verzijama</translation>
</message>
<message>
<source>View and manage (copy, delete, etc.) the versions of this object.</source>
<translation>Prikaz i upravljanje [kopiranje, brisanje i sl.] verzija ovog objekta.</translation>
</message>
<message>
<source>Version information</source>
<translation>Podaci o verziji</translation>
</message>
<message>
<source>Last modified</source>
<translation>Poslednja promena</translation>
</message>
<message>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<source>Draft</source>
<translation>Skica</translation>
</message>
<message>
<source>Published / current</source>
<translation>Objavljeno / tekuฤe</translation>
</message>
<message>
<source>Pending</source>
<translation>Na ฤekanju</translation>
</message>
<message>
<source>Archived</source>
<translation>Arhivirano</translation>
</message>
<message>
<source>Rejected</source>
<translation>Odbijeno</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>View control</source>
<translation>Prikaลพi kontrolu</translation>
</message>
<message>
<source>Translation</source>
<translation>Prevod</translation>
</message>
<message>
<source>%1 (No locale information available)</source>
<translation>%1 (nema podataka o lokalizaciji)</translation>
</message>
<message>
<source>Location</source>
<translation>Lokacija</translation>
</message>
<message>
<source>Update view</source>
<translation>Obnovi prikaz</translation>
</message>
<message>
<source>View the version that is currently being displayed using the selected language, location and design.</source>
<translation>Prikaลพi verziju koja je trenutno prikazana koristeฤi odabrani jezik, lokaciju i dizajn.</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Edit the draft that is being displayed.</source>
<translation>Izmeni skicu koja je prikazana.</translation>
</message>
<message>
<source>Siteaccess</source>
<translation>Siteaccess</translation>
</message>
<message>
<source>You cannot manage the versions of this object because there is only one version available (the one that is being displayed).</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Publish</source>
<translation type="unfinished">Objavi</translation>
</message>
<message>
<source>Publish the draft that is being displayed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This version is not a draft and therefore cannot be edited.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translation mismatch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your selected translation does not match the language of your selected siteaccess. This may lead to unexpected results in the preview, however it may also be what you intended.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back to edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back</source>
<translation type="unfinished">Nazad</translation>
</message>
</context>
<context>
<name>design/admin/contentstructuremenu</name>
<message>
<source>Fold/Unfold</source>
<translation>Skupi/Raลกiri</translation>
</message>
<message>
<source>Click on the icon to display a context-sensitive menu.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Node ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Visibility</source>
<translation type="unfinished">Vidljivost</translation>
</message>
<message>
<source>Hidden</source>
<translation type="unfinished">Skriven</translation>
</message>
<message>
<source>Hidden by superior</source>
<translation type="unfinished">Sakriveno od </translation>
</message>
<message>
<source>Visible</source>
<translation type="unfinished">Vidljivo</translation>
</message>
<message>
<source>Dynamic tree not allowed for this siteaccess</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Node does not exist</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Internal error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[%classname] Click on the icon to display a context-sensitive menu.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object ID</source>
<translation type="unfinished">Objekt ID</translation>
</message>
<message>
<source>Dynamic tree menu is disabled for this siteaccess!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/dashboard/all_latest_content</name>
<message>
<source>All latest content</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Type</source>
<translation type="unfinished">Vrsta</translation>
</message>
<message>
<source>Published</source>
<translation type="unfinished">Objavljeno</translation>
</message>
<message>
<source>Author</source>
<translation type="unfinished">Autor</translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit <%child_name>.</source>
<translation type="unfinished">Izmeni <%child_name>.</translation>
</message>
<message>
<source>You do not have permission to edit <%child_name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Latest content list is empty.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/dashboard/drafts</name>
<message>
<source>My drafts</source>
<translation type="unfinished">Moje skice</translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Type</source>
<translation type="unfinished">Vrsta</translation>
</message>
<message>
<source>Version</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Modified</source>
<translation type="unfinished">Promenjeno</translation>
</message>
<message>
<source>Edit <%draft_name>.</source>
<translation type="unfinished">Izmeni <%draft_name>.</translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Currently you do not have any drafts available.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/dashboard/latest_content</name>
<message>
<source>My latest content</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Type</source>
<translation type="unfinished">Vrsta</translation>
</message>
<message>
<source>Modified</source>
<translation type="unfinished">Promenjeno</translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit <%child_name>.</source>
<translation type="unfinished">Izmeni <%child_name>.</translation>
</message>
<message>
<source>You do not have permission to edit <%child_name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your latest content list is empty.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/dashboard/maintenance</name>
<message>
<source>Software update and Maintenance</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your installation: <span id="ez-version">%1</span></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If your installation is not running eZ Publish Enterprise, it might not be up to date with the latest maintenance service packs. Contact eZ Systems.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/dashboard/pending_list</name>
<message>
<source>My pending items</source>
<translation type="unfinished">Lista poslova koji me oฤekuju</translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Type</source>
<translation type="unfinished">Vrsta</translation>
</message>
<message>
<source>Modified</source>
<translation type="unfinished">Promenjeno</translation>
</message>
<message>
<source>Currently you do not have any pending items available.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/dashboard/wishlist</name>
<message>
<source>Wish list</source>
<translation type="unfinished">Lista ลพelja</translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Type</source>
<translation type="unfinished">Vrsta</translation>
</message>
<message>
<source>Currently you do not have any products on your wish list.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Published</source>
<translation type="unfinished">Objavljeno</translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit <%item_name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to edit <%item_name>.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/error/kernel</name>
<message>
<source>The requested page could not be displayed. (1)</source>
<translation>Zatraลพena stranica ne moลพe biti prikazana. (1)</translation>
</message>
<message>
<source>The system is unable to display the requested page because of security issues.</source>
<translation>Sistem ne moลพe prikazati zatraลพenu stranicu zbog nedovoljnih ovlaลกฤenja.</translation>
</message>
<message>
<source>Possible reasons</source>
<translation>Moguฤ razlog</translation>
</message>
<message>
<source>Your account does not have the proper privileges to access the requested page.</source>
<translation>Nemate potrebna ovlaลกฤenja za pristup ลพeljenoj stranici.</translation>
</message>
<message>
<source>The requested page does not exist. Try changing the URL.</source>
<translation>Traลพena stranica ne postoji. Proverite URL.</translation>
</message>
<message>
<source>The following permission setting is required</source>
<translation>Potrebna su ova ovlaลกฤenja</translation>
</message>
<message>
<source>Module</source>
<translation>Modul</translation>
</message>
<message>
<source>Function</source>
<translation>Funkcija</translation>
</message>
<message>
<source>Click the "Log in" button in order to log in.</source>
<translation>Kliknite na dugme "Prijava" za prijavu.</translation>
</message>
<message>
<source>Login</source>
<comment>Button</comment>
<translation>Prijava</translation>
</message>
<message>
<source>The requested page could not be displayed. (2)</source>
<translation>Zatraลพena stranica ne moลพe biti prikazana. (2)</translation>
</message>
<message>
<source>The resource you requested was not found.</source>
<translation>Izvor koji ste zatraลพili nije pronaฤen.</translation>
</message>
<message>
<source>The ID number or the name of the resource was misspelled. Try changing the URL.</source>
<translation>Identifikacija ili ime izvora je pogreลกno napisano, pokuลกajte ga promeniti. </translation>
</message>
<message>
<source>The resource is no longer available.</source>
<translation>Izvor podataka viลกe nije dostupan.</translation>
</message>
<message>
<source>The requested page could not be displayed. (20)</source>
<translation>Zatraลพena stranica ne moลพe biti prikazana. (20)</translation>
</message>
<message>
<source>The requested address or module could not be found.</source>
<translation>Zatraลพena adresa ili modul %module nije pronaฤen.</translation>
</message>
<message>
<source>The address was misspelled. Try changing the URL.</source>
<translation>Adresa je pogreลกno upisana. Proverite adresu URL-a.</translation>
</message>
<message>
<source>The name of the module was misspelled. Try changing the URL.</source>
<translation>Naziv modula je pogreลกno napisan.</translation>
</message>
<message>
<source>There is no <%module> module available on this site.</source>
<translation>Modul <%module> ne postoji.</translation>
</message>
<message>
<source>The requested page could not be displayed. (21)</source>
<translation>Zatraลพena stranica ne moลพe biti prikazana. (21)</translation>
</message>
<message>
<source>The requested view <%view> could not be found in the <%module> module.</source>
<translation>Zatraลพeni prikaz <%view> nije pronaฤen u modulu <%module>.</translation>
</message>
<message>
<source>The name of the view was misspelled. Try changing the URL.</source>
<translation>Naziv modula je pogreลกno napisan.</translation>
</message>
<message>
<source>The <%module> module does not have a <%view> view.</source>
<translation>Modul <%module> nema prikaz <%view>.</translation>
</message>
<message>
<source>The requested page could not be displayed. (22)</source>
<translation>Zatraลพena stranica ne moลพe biti prikazana. (22)</translation>
</message>
<message>
<source>The requested page could not be displayed. (3)</source>
<translation>Zatraลพena stranica ne moลพe biti prikazana. (3)</translation>
</message>
<message>
<source>The requested object is not available.</source>
<translation>Zatraลพeni objekt nije dostupan.</translation>
</message>
<message>
<source>The object is no longer available.</source>
<translation>Objekt viลกe nije dostupan.</translation>
</message>
<message>
<source>The requested page could not be displayed. (4)</source>
<translation>Zatraลพena stranica ne moลพe biti prikazana. (4)</translation>
</message>
<message>
<source>The requested object has been moved and thus it is no longer available at the specified address.</source>
<translation>Zatraลพeni objekt je uklonjen i zato viลกe nije dostupan na toj adresi.</translation>
</message>
<message>
<source>The system should automatically redirect you to the new location of the object.</source>
<translation>Sistem ฤe vas automatski preusmeriti na novu lokaciju objekta.</translation>
</message>
<message>
<source>You are not logged in to the system. Please log in.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The site is using URL matching to determine which siteaccess to use, but the name of the siteaccess is missing from the URL. Try to add the name of the siteaccess; it should be specified before the name of the module.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested view cannot be accessed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The <%view> within the <%module> is disabled and thus it cannot be accessed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested module cannot be accessed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The <%module> module is disabled and thus it cannot be accessed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The ID number of the object is incorrect. Check the URL for spelling mistakes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If redirection fails, click on the following address: %url.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The draft could not be created. (5)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid language code provided. The draft could not be created.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/error/shop</name>
<message>
<source>Not a product. (1)</source>
<translation>Nije proizvod. (1)</translation>
</message>
<message>
<source>The requested object is not a product and cannot be used by the shop module..</source>
<translation>Zatraลพeni objekt nije proizvod i ne moลพe biti koriลกฤen u webprodavnici.</translation>
</message>
<message>
<source>Incompatible product type. (2)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested object and current basket have incompatible price datatypes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid preferred currency. (3)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'%1' currency does not exist.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid preferred currency. (4)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'%1' cannot be used because it is inactive.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/ezinfo/about</name>
<message>
<source>eZ Publish information: %version</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>What is eZ Publish?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>License</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contributors</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Copyright Notice</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Third-Party Software</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Extensions</source>
<translation type="unfinished">Ekstenzije</translation>
</message>
</context>
<context>
<name>design/admin/infocollector/collectionlist</name>
<message>
<source>Information collected by <%object_name> [%collection_count]</source>
<translation>Prikupljeni podaci sa <%object_name> [%collection_count]</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Collection ID</source>
<translation>Kolektor ID</translation>
</message>
<message>
<source>Created</source>
<translation>Kreirano</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Select collected information for removal.</source>
<translation>Izaberi prikupljene informacije za brisanje.</translation>
</message>
<message>
<source>No information has been collected by this object.</source>
<translation>Objekt nije prikupio informacije.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected collection.</source>
<translation>Ukloni izabrane kolektore.</translation>
</message>
<message>
<source>Creator</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown user</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Information collected by <%object_name> (%collection_count)</source>
<translation>Prikupljeni podaci sa <%object_name> (%collection_count)</translation>
</message>
</context>
<context>
<name>design/admin/infocollector/confirmremoval</name>
<message>
<source>Confirm information collection removal</source>
<translation>Potvrda o uklanjanju</translation>
</message>
<message>
<source>Are you sure you want to remove the collected information?</source>
<translation>Jesi siguran da ลพeliลก ukloniti prikupljeno?</translation>
</message>
<message>
<source>%collections collection will be removed.</source>
<translation>%collections kolektor biฤe uklonjen.</translation>
</message>
<message>
<source>%collections collections will be removed.</source>
<translation>%collections kolektori biฤe uklonjeni.</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
</context>
<context>
<name>design/admin/infocollector/overview</name>
<message>
<source>Objects that have collected information [%object_count]</source>
<translation>Objekti koji su prikupili informacije [%object_count]</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>First collection</source>
<translation>Prvo skupljanje</translation>
</message>
<message>
<source>Last collection</source>
<translation>Zadnje skupljanje</translation>
</message>
<message>
<source>Collections</source>
<translation>Skupljanja</translation>
</message>
<message>
<source>Select collections for removal.</source>
<translation>Izaberi skupljanja za brisanje.</translation>
</message>
<message>
<source>section</source>
<translation>segment</translation>
</message>
<message>
<source>There are no objects that have collected any information.</source>
<translation>Nema objekata koji skupljaju informacije.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove all information that was collected by the selected objects.</source>
<translation>Ukloni sve informacije koje su prikupljene sa izabranim objektima.</translation>
</message>
<message>
<source>Objects that have collected information (%object_count)</source>
<translation>Objekti koji su prikupili informacije (%object_count)</translation>
</message>
</context>
<context>
<name>design/admin/infocollector/view</name>
<message>
<source>Collection #%collection_id for <%object_name></source>
<translation>SkupljenoID #%collection_id za objekt <%object_name></translation>
</message>
<message>
<source>Last modified</source>
<translation>Poslednja promena</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Remove collection.</source>
<translation>Ukloni skupljeno.</translation>
</message>
<message>
<source>Unknown user</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/navigator</name>
<message>
<source>Previous</source>
<translation>Nazad</translation>
</message>
<message>
<source>Next</source>
<translation>Napred</translation>
</message>
</context>
<context>
<name>design/admin/node/class/view</name>
<message>
<source>Class groups</source>
<translation type="unfinished">Grupe klasa</translation>
</message>
<message>
<source>Override templates</source>
<translation type="unfinished">Zaobilasci ลกablona</translation>
</message>
</context>
<context>
<name>design/admin/node/removenode</name>
<message>
<source>Remove node?</source>
<translation>Ukloni ฤvor?</translation>
</message>
<message>
<source>Are you sure you want to remove %1 from node %2?</source>
<translation>Jeste li sigurni da ลพelite ukloniti %1 iz ฤvora %2?</translation>
</message>
<message>
<source>Removing this assignment will also remove its %1 children.</source>
<translation>Uklanjanjem zadatka ujedno ฤe se ukloniti i %1 dete.</translation>
</message>
<message>
<source>Removed nodes can be retrieved later. You will find them in the trash.</source>
<translation>Uklonjeni ฤvorovi mogu biti pronaฤeni kasnije. Pronaฤi ฤete ih u smeฤu.</translation>
</message>
<message>
<source>Removing node assignment of %1</source>
<translation>Uklanjanje zadatak %1 za ฤvor</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Note</source>
<translation>Napomena</translation>
</message>
</context>
<context>
<name>design/admin/node/removeobject</name>
<message>
<source>Confirm location removal</source>
<translation>Potvrdi uklanjanje lokacije</translation>
</message>
<message>
<source>Insufficient permissions</source>
<translation>Nedovoljna ovlaลกฤenja</translation>
</message>
<message>
<source>Some of the items that are about to be removed contain sub items.</source>
<translation>Neki od elemenata koji ฤe biti uklonjeni sadrลพe podelemente.</translation>
</message>
<message>
<source>Removing the items will also result in the removal of their sub items.</source>
<translation>Uklanjanjem elemenata ukloniฤe se i njihovi podelementi.</translation>
</message>
<message>
<source>Are you sure you want to remove the items along with their contents?</source>
<translation>Jeste li sigurni da ลพelite ukloniti elemente zajedno sa njihovim sadrลพajem?</translation>
</message>
<message>
<source>Click the "Cancel" button and try removing only the locations that you are allowed to remove.</source>
<translation>Kliknite na "Odustani" i probajte ukloniti samo lokacije za koje imate ovlaลกฤenja.</translation>
</message>
<message>
<source>Item</source>
<translation>Element</translation>
</message>
<message>
<source>Sub items</source>
<translation>Podelementi</translation>
</message>
<message>
<source>Move to trash</source>
<translation>Premesti u smeฤe</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Cancel the removal of locations.</source>
<translation>Odustani od uklanjanja lokacija.</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>If "Move to trash" is checked, the items will be moved to the trash instead of being permanently deleted.</source>
<translation>Ako je opcija "Makni u smeฤe" oznaฤena, elementi ฤe biti uklonjeni u smeฤe a ne trajno uklonjeni sa sistema.</translation>
</message>
<message>
<source>Confirm translation removal</source>
<translation type="unfinished">Potvrdi uklanjanje prevoda</translation>
</message>
<message>
<source>Cancel the removal of translations.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Specify the location where you want to restore <%name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Some of the subtrees or objects selected for removal are used by other objects. Select the menu from the content tree, and</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Advanced</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reverse related for subtree</source>
<translation type="unfinished">Inverzna relacija za podstablo</translation>
</message>
<message>
<source>The lines marked with red contain more than the maximum possible nodes for subtree removal and will not be deleted. You can remove this subtree using the ezsubtreeremove.php script.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The lines marked with red contain items that you do not have permission to remove.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Some of the objects selected for removal are used by other objects. Select the menu from the content tree, and</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot continue because you do not have permission to remove some of the selected locations.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The system will let you restore the object <%name>. Specify where you wish to restore it.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Pending sub-object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removal failed because there is pending sub object under the node. Please finish the relevant process then redo the removal.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/node/view</name>
<message>
<source>Two-level index for <%node_name></source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/node/view/embed</name>
<message>
<source> - You do not have permission to view this object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to view this object</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/node/view/full</name>
<message>
<source>Hide preview of content.</source>
<translation>Sakrij prikaz sadrลพaja.</translation>
</message>
<message>
<source>Preview</source>
<translation>Pregled</translation>
</message>
<message>
<source>Show preview of content.</source>
<translation>Prikaลพi prikaz sadrลพaja.</translation>
</message>
<message>
<source>Hide available translations.</source>
<translation>Sakrij dostupne prevode.</translation>
</message>
<message>
<source>Show available translations.</source>
<translation>Prikaลพi dostupne prevode.</translation>
</message>
<message>
<source>Hide location overview.</source>
<translation>Sakrij lokacije.</translation>
</message>
<message>
<source>Locations</source>
<translation>Lokacije</translation>
</message>
<message>
<source>Show location overview.</source>
<translation>Prikaลพi lokacije.</translation>
</message>
<message>
<source>Hide relation overview.</source>
<translation>Sakrij relacije.</translation>
</message>
<message>
<source>Relations</source>
<translation>Relacije</translation>
</message>
<message>
<source>Show relation overview.</source>
<translation>Prikazi relacije.</translation>
</message>
<message>
<source>Hide role overview.</source>
<translation>Sakrij uloge.</translation>
</message>
<message>
<source>Roles</source>
<translation>Uloge</translation>
</message>
<message>
<source>Show role overview.</source>
<translation>Prikaลพi uloge.</translation>
</message>
<message>
<source>Hide policy overview.</source>
<translation>Sakrij smernice.</translation>
</message>
<message>
<source>Policies</source>
<translation>Politike</translation>
</message>
<message>
<source>Show policy overview.</source>
<translation>Prikaลพi smernice.</translation>
</message>
<message>
<source>Up one level</source>
<translation>Jedan nivo gore</translation>
</message>
<message>
<source>Sub items [%children_count]</source>
<translation>Podelemenata [%children_count]</translation>
</message>
<message>
<source>The current item does not contain any sub items.</source>
<translation>Tekuฤi element na sadrลพi ni jedan podelement.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove the selected items from the list above.</source>
<translation>Ukloni izabrane elemente sa gornje liste.</translation>
</message>
<message>
<source>Update priorities</source>
<translation>Aลพuriraj prioritete</translation>
</message>
<message>
<source>Apply changes to the priorities of the items in the list above.</source>
<translation>Primeni izmene na prioritete elemenata sa gornje liste.</translation>
</message>
<message>
<source>Create here</source>
<translation>Kreiraj ovde</translation>
</message>
<message>
<source>Depth</source>
<translation>Dubina</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Priority</source>
<translation>Prioritet</translation>
</message>
<message>
<source>Published</source>
<translation>Objavljeno</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Modifier</source>
<translation>Modifikator</translation>
</message>
<message>
<source>Copy</source>
<translation>Kopiraj</translation>
</message>
<message>
<source>Create a copy of <%child_name>.</source>
<translation>Napravi kopiju klase <%class_name>.</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Edit <%child_name>.</source>
<translation>Izmeni <%child_name>.</translation>
</message>
<message>
<source>Creator</source>
<translation>Kreirao</translation>
</message>
<message>
<source>Created</source>
<translation>Kreirano</translation>
</message>
<message>
<source>Versions</source>
<translation>Verzije</translation>
</message>
<message>
<source>Translations</source>
<translation>Prevodi</translation>
</message>
<message>
<source>Node ID</source>
<translation>ฤvor ID</translation>
</message>
<message>
<source>Object ID</source>
<translation>Objekt ID</translation>
</message>
<message>
<source>Language</source>
<translation>Jezik</translation>
</message>
<message>
<source>Locale</source>
<translation>Jeziฤko podeลกavanje</translation>
</message>
<message>
<source>Location</source>
<translation>Lokacija</translation>
</message>
<message>
<source>Sorting</source>
<translation>Sortiranje</translation>
</message>
<message>
<source>Main</source>
<translation>Glavni</translation>
</message>
<message>
<source>up</source>
<translation>gore</translation>
</message>
<message>
<source>down</source>
<translation>dole</translation>
</message>
<message>
<source>Remove selected locations from the list above.</source>
<translation>Ukloni izabranu lokaciju sa gornje liste.</translation>
</message>
<message>
<source>Set main</source>
<translation>Postavi glavno</translation>
</message>
<message>
<source>Last modified</source>
<translation>Poslednja promena</translation>
</message>
<message>
<source>Move</source>
<translation>Premesti</translation>
</message>
<message>
<source>Move this item to another location.</source>
<translation>Premesti ovaj element na drugu lokaciju.</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Remove this item.</source>
<translation>Ukloni ovaj element.</translation>
</message>
<message>
<source>Function</source>
<translation>Funkcija</translation>
</message>
<message>
<source>Limitation</source>
<translation>Ograniฤenje</translation>
</message>
<message>
<source>all modules</source>
<translation>svi moduli</translation>
</message>
<message>
<source>all functions</source>
<translation>sve funkcije</translation>
</message>
<message>
<source>There are no available policies.</source>
<translation>Nema politika.</translation>
</message>
<message>
<source>Related objects [%related_objects_count]</source>
<translation>Povezani objekti [%related_objects_count]</translation>
</message>
<message>
<source>The item being viewed does not make use of any other objects.</source>
<translation>Element koji pregledate ne koristi ni jedan drugi objekt.</translation>
</message>
<message>
<source>Assigned roles [%roles_count]</source>
<translation>Dodeljene uloge [%roles_count]</translation>
</message>
<message>
<source>No limitation</source>
<translation>Bez ograniฤenja</translation>
</message>
<message>
<source>Edit role.</source>
<translation>Izmeni ulogu.</translation>
</message>
<message>
<source>There are no assigned roles.</source>
<translation>Nema dodeljenih uloga.</translation>
</message>
<message>
<source>Hide details.</source>
<translation>Sakrij detalje.</translation>
</message>
<message>
<source>Details</source>
<translation>Detalji</translation>
</message>
<message>
<source>Show details.</source>
<translation>Prikaลพi detalje.</translation>
</message>
<message>
<source>Up one level.</source>
<translation>Jedan nivo gore.</translation>
</message>
<message>
<source>Show 10 items per page.</source>
<translation>Prikaลพi 10 elemenata po stranici.</translation>
</message>
<message>
<source>Show 50 items per page.</source>
<translation>Prikaลพi 50 elemenata po stranici.</translation>
</message>
<message>
<source>Show 25 items per page.</source>
<translation>Prikaลพi 25 elemenata po stranici.</translation>
</message>
<message>
<source>Display sub items using a simple list.</source>
<translation>Prikaลพi podelemente koristeฤi jednostavni listing.</translation>
</message>
<message>
<source>List</source>
<translation>Lista</translation>
</message>
<message>
<source>Thumbnail</source>
<translation>Sliฤica</translation>
</message>
<message>
<source>Display sub items using a detailed list.</source>
<translation>Prikaลพi podelemente koristeฤi kompleksniji listing.</translation>
</message>
<message>
<source>Detailed</source>
<translation>Detaljni prikaz</translation>
</message>
<message>
<source>Display sub items as thumbnails.</source>
<translation>Prikaลพi podelemente kao sliฤice.</translation>
</message>
<message>
<source>Not available</source>
<translation>Nije dostupan</translation>
</message>
<message>
<source>Class identifier</source>
<translation>Identifikator klase</translation>
</message>
<message>
<source>Class name</source>
<translation>Naziv klase</translation>
</message>
<message>
<source>Use these controls to set the sorting method for the sub items of the current location.</source>
<translation>Koristite ove kontrole za podeลกavanje metode sortiranja podelemenata na tekuฤoj lokaciji.</translation>
</message>
<message>
<source>Descending</source>
<translation>Silazno</translation>
</message>
<message>
<source>Ascending</source>
<translation>Uzlazno</translation>
</message>
<message>
<source>Visibility</source>
<translation>Vidljivost</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Move <%child_name> to another location.</source>
<translation>Premesti <%child_name> na drugu lokaciju.</translation>
</message>
<message>
<source>Locations [%locations]</source>
<translation>Lokacije [%locations]</translation>
</message>
<message>
<source>Sub items</source>
<translation>Podelementi</translation>
</message>
<message>
<source>Select location for removal.</source>
<translation>Izaberi lokaciju za brisanje.</translation>
</message>
<message>
<source>Hidden</source>
<translation>Skriven</translation>
</message>
<message>
<source>Make location and all sub items visible.</source>
<translation>Postavi lokaciju i sve podelemente vidljivima.</translation>
</message>
<message>
<source>Reveal</source>
<translation>Otkrij</translation>
</message>
<message>
<source>Hidden by superior</source>
<translation>Sakriveno od </translation>
</message>
<message>
<source>Hide location and all sub items.</source>
<translation>Sakrij lokaciju i sve podelemente.</translation>
</message>
<message>
<source>Hide</source>
<translation>Sakrij</translation>
</message>
<message>
<source>Visible</source>
<translation>Vidljivo</translation>
</message>
<message>
<source>Use these radio buttons to select the desired main location.</source>
<translation>Koristi ovu radio dugmad za izbor ลพeljene glavne lokacije.</translation>
</message>
<message>
<source>Add locations</source>
<translation>Dodaj lokacije</translation>
</message>
<message>
<source>Add one or more new locations.</source>
<translation>Dodaj jednu ili viลกe lokacija.</translation>
</message>
<message>
<source>It is not possible to add locations to a top level node.</source>
<translation>Nije moguฤe dodati lokacije na glavni ฤvor.</translation>
</message>
<message>
<source>The <%class_name> class is not configured to contain any sub items.</source>
<translation>Klasa <%class_name> nije konfigurisana za podelemente.</translation>
</message>
<message>
<source>Edit the contents of this item.</source>
<translation>Izmeni sadrลพaj elementa.</translation>
</message>
<message>
<source>Module</source>
<translation>Modul</translation>
</message>
<message>
<source>No limitations</source>
<translation>Bez ograniฤenja</translation>
</message>
<message>
<source>Relations [%relation_count]</source>
<translation>Relacije [%relation_count]</translation>
</message>
<message>
<source>Role</source>
<translation>Uloga</translation>
</message>
<message>
<source>Translations [%translations]</source>
<translation>Prevodi [%translations]</translation>
</message>
<message>
<source>View translation.</source>
<translation>Prikaz prevoda.</translation>
</message>
<message>
<source>Hide object relation overview.</source>
<translation>Sakrij pregled povezanog objekta.</translation>
</message>
<message>
<source>Show object relation overview.</source>
<translation>Prikaลพi pregled povezanog objekta.</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nepoznat</translation>
</message>
<message>
<source>The information could not be collected.</source>
<translation>Podaci nisu prikupljeni.</translation>
</message>
<message>
<source>Required data is either missing or is invalid</source>
<translation>Traลพeni podaci su pogreลกni ili nedostaju</translation>
</message>
<message>
<source>There is no removable location.</source>
<translation>Ne postoji lokacija za uklanjanje.</translation>
</message>
<message>
<source>Available policies [%policy_count]</source>
<translation>Dostupne politike [%policy_count]</translation>
</message>
<message>
<source>limited to %limitation_identifier %limitation_value</source>
<translation>ograniฤeno na %limitation_identifier %limitation_value</translation>
</message>
<message>
<source>You do not have permission to remove any of the items from the list above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot update the priorities because you do not have permission to edit the current item or because a non-priority sorting method is used.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this menu to select the type of item you want to create then click the "Create here" button. The item will be created in the current location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this menu to select the language you want to use for the creation then click the "Create here" button. The item will be created in the current location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create a new item in the current location. Use the menu on the left to select the type of item.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to create new items in the current location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot set the sorting method for the current location because you do not have permission to edit the current item.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use these checkboxes to select items for removal. Click the "Remove selected" button to remove the selected items.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to remove this item.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use the priority fields to control the order in which the items appear. You can use both positive and negative integers. Click the "Update priorities" button to apply the changes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You are not allowed to update the priorities because you do not have permission to edit <%node_name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot make a copy of <%child_name> because you do not have create permission for <%node_name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to edit <%child_name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use these checkboxes to select items for removal. Click the "Remove selected" button to remove the selected items.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(disabled)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(locked)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to edit %child_name.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Published at</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose section</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This location cannot be removed either because you do not have permission to remove it or because it is currently being displayed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The item being displayed has only one location, which is by default the main location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot set the main location because you do not have permission to edit the item being displayed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot remove any locations because you do not have permission to edit the current item.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot add new locations because you do not have permission to edit the current item.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the desired main location using the radio buttons above then click this button to store the setting.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot set the main location because there is only one location present.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot set the main location because you do not have permission to edit the current item.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Another language</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to edit this item.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to move this item to another location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Relation type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reverse related objects [%related_objects_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The item being viewed is not used by any other objects.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Existing languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use these radio buttons to select the desired main language.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit in <%language_name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected languages from the list above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There is no removable language.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot remove any language because you do not have permission to edit the current item.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the desired main language using the radio buttons above then click this button to store the setting.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot change the main language because the object is not translated to any other languages.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot change the main language because you do not have permission to edit the current item.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use the main language if there is no prioritized translation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this button to store the value of the checkbox above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to change this setting.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Move selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Move the selected items from the list above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to move any of the items from the list above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object states for object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Content object state group</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Available states</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No content object state is configured. This can be done %urlstart here %urlend.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Set states</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Apply states from the list above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No state to be applied to this content object. You might need to be assigned a more permissive access policy.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object states</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hide state assignment widget.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show state assignment widget.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translations (%count)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Locations (%count)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Relations (%count)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Roles (%count)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Policies (%count)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sub items (%children_count)</source>
<translation>Podelemenata (%children_count)</translation>
</message>
<message>
<source>Create</source>
<translation type="obsolete">Kreiraj</translation>
</message>
<message>
<source>in</source>
<translation type="obsolete">u</translation>
</message>
<message>
<source>Published order</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Node and object details like creator, when it was created, section it belongs to, number of versions and translations, Node ID and Object ID.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Content state</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>States and their states groups for current object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>State group</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No content object state is configured. This can be done %urlstart here%urlend.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Locations (aka Nodes) for current object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Policy list and the Role that are assignet to current node.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Limited to</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%limitation_identifier %limitation_value</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object relation list from current object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Related objects (%related_objects_count)</source>
<translation>Povezani objekti (%related_objects_count)</translation>
</message>
<message>
<source>Reverse object relation list to current object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reverse related objects (%related_objects_count)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of roles assigned with and without limitations for current node.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translations (%translations)</source>
<translation>Prevodi (%translations)</translation>
</message>
<message>
<source>Existing translations</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Language list of translations for current object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Tab is disabled, enable with toggler to the left of these tabs.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>View</source>
<translation type="unfinished">Prikaz</translation>
</message>
<message>
<source>Show simplified view of content.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ordering</source>
<translation type="unfinished">Naruฤivanje</translation>
</message>
<message>
<source>Show published ordering overview.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Loading ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Node remote ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object remote ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Table options</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Number of items per page:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Visible table columns:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select all visible</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select none</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create new</source>
<translation type="unfinished">Kreiraj novo</translation>
</message>
<message>
<source>More actions</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use the checkboxes to select one or more items.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>first</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>prev</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>next</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>last</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invert selection</source>
<translation type="unfinished">Obrnuti izbor</translation>
</message>
<message>
<source>Path String</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object state</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/node/view/line</name>
<message>
<source>Node ID: %node_id Visibility: %node_visibility</source>
<translation>ฤvor ID: %node_id Vidljivost: %visibility</translation>
</message>
<message>
<source>Click on the icon to display a context-sensitive menu.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/node/view/thumbnail</name>
<message>
<source>[%classname] Click on the icon to display a context-sensitive menu.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/notification/addingresult</name>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Add to my notifications</source>
<translation>Dodaj u moja obaveลกtenja</translation>
</message>
<message>
<source>Notification for node <%node_name> already exists.</source>
<translation>Obaveลกtenje za ฤvor <%node_name> veฤ postoji.</translation>
</message>
<message>
<source>Notification for node <%node_name> was added successfully.</source>
<translation>Obaveลกtenje za ฤvor <%node_name> je uspeลกno dodato.</translation>
</message>
</context>
<context>
<name>design/admin/notification/collaboration</name>
<message>
<source>Collaboration notification</source>
<translation>Obaveลกtenje o saradnji</translation>
</message>
<message>
<source>Choose which collaboration items you want to get notifications for.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/notification/handler/ezgeneraldigest/settings/edit</name>
<message>
<source>Receive all messages combined in one digest</source>
<translation>Primi sve poruke objedinjene u jedan kratki pregled</translation>
</message>
<message>
<source>Daily, at</source>
<translation>Dnevno u</translation>
</message>
<message>
<source>Once per week, on </source>
<translation>Jednom nedeljno u</translation>
</message>
<message>
<source>If day number is larger than the number of days within the current month, the last day of the current month will be used.</source>
<translation>Ako je broj dana veฤi od broja dana u tekuฤem mesecu, biฤe uzet zadnji dan tekuฤeg meseca.</translation>
</message>
<message>
<source>Receive digests</source>
<translation>Preuzmi saลพete sadrลพaje</translation>
</message>
<message>
<source>Once per month, on day number</source>
<translation>Jednom meseฤno, na dan</translation>
</message>
</context>
<context>
<name>design/admin/notification/handler/ezsubtree/settings/edit</name>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>My item notifications [%notification_count]</source>
<translation>Moja obaveลกtenja elementa [%notification_count]</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select item for removal.</source>
<translation>Izaberi element za brisanje.</translation>
</message>
<message>
<source>You have not subscribed to receive notifications about any items.</source>
<translation>Niste pretplaฤeni za primanje obaveลกtenja o elementima.</translation>
</message>
<message>
<source>Remove selected items.</source>
<translation>Ukloni izabrane elemente.</translation>
</message>
<message>
<source>Add items</source>
<translation>Dodaj elemente</translation>
</message>
<message>
<source>Add items to your personal notification list.</source>
<translation>Dodaj elemente na moju listu obaveลกtenja.</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nepoznat</translation>
</message>
<message>
<source>My item notifications (%notification_count)</source>
<translation>Moja obaveลกtenja elementa (%notification_count)</translation>
</message>
</context>
<context>
<name>design/admin/notification/runfilter</name>
<message>
<source>The notification time event was spawned.</source>
<translation>Dogaฤaj vremenska obaveลกtenja je stvoren.</translation>
</message>
<message>
<source>Notification</source>
<translation>Obaveลกtenje</translation>
</message>
<message>
<source>Spawn time event</source>
<translation>Stvori vremenski dogaฤaj</translation>
</message>
<message>
<source>The notification filter processed all available notification events.</source>
<translation>Izvrลกeno je filtriranje obaveลกtenja svih dostupnih dogaฤaja.</translation>
</message>
<message>
<source>Run notification filter</source>
<translation>Pokreni filtar za obaveลกtenja</translation>
</message>
</context>
<context>
<name>design/admin/notification/settings</name>
<message>
<source>My notification settings</source>
<translation>Moje podeลกavanja obaveลกtenja</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
</context>
<context>
<name>design/admin/package</name>
<message>
<source>Please provide information on the changes.</source>
<translation>Molimo dostavite podatke o promenama.</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Changes</source>
<translation>Promene</translation>
</message>
<message>
<source>Start an entry with a marker ( %emstart-%emend (dash) or %emstart*%emend (asterisk) ) at the beginning of the line. The change will continue to the next change marker.</source>
<translation>Zapoฤnite unos s markerom ( %emstart-%emend (dash) ili %emstart*%emend (asterix) ) na poฤetku reda. Promena ฤe vaลพiti do sledeฤeg markera promene. </translation>
</message>
<message>
<source>Package name</source>
<translation>Ime paketa</translation>
</message>
<message>
<source>Summary</source>
<translation>Ukratko</translation>
</message>
<message>
<source>Description</source>
<translation>Opis</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>Package host</source>
<translation>Host paketa</translation>
</message>
<message>
<source>Packager</source>
<translation>Autor paketa</translation>
</message>
<message>
<source>Name</source>
<comment>Maintainer name</comment>
<translation>Ime</translation>
</message>
<message>
<source>Role</source>
<comment>Maintainer role</comment>
<translation>Uloga</translation>
</message>
<message>
<source>Create package</source>
<translation>Kreiraj paket</translation>
</message>
<message>
<source>Available wizards</source>
<translation>Dostupni ฤarobnjaci</translation>
</message>
<message>
<source>Choose one of the following wizards for creating a package</source>
<translation>Izaberi jednog od sledeฤih ฤarobnjaka za kreiranje paketa</translation>
</message>
<message>
<source>Specify export properties. The default settings will most likely be suitable for your needs.</source>
<translation>Odredi podeลกavanja izvoza. Osnovne podeลกavanja ฤe najverovatnije odgovarati Vaลกim potrebama.</translation>
</message>
<message>
<source>Miscellaneous</source>
<translation>Razno</translation>
</message>
<message>
<source>Include class definitions.</source>
<translation>Ukljuฤi definicije klasa.</translation>
</message>
<message>
<source>Select templates from the following siteaccesses</source>
<translation>Izaberi ลกablone sa sledeฤih stranica</translation>
</message>
<message>
<source>Versions</source>
<translation>Verzije</translation>
</message>
<message>
<source>Published version</source>
<translation>Objavljena verzija</translation>
</message>
<message>
<source>All versions</source>
<translation>Sve verzije</translation>
</message>
<message>
<source>Languages</source>
<translation>Jezici</translation>
</message>
<message>
<source>Select languages to export</source>
<translation>Izaberi jezik za izvoz</translation>
</message>
<message>
<source>Node assignments</source>
<translation>Funkcije ฤvora</translation>
</message>
<message>
<source>Keep all in selected nodes</source>
<translation>Zadrลพi sve u izabranim ฤvorovima</translation>
</message>
<message>
<source>Main only</source>
<translation>Samo glavni</translation>
</message>
<message>
<source>Related objects</source>
<translation>Povezani objekti</translation>
</message>
<message>
<source>None</source>
<translation>Ni jedan</translation>
</message>
<message>
<source>Selected nodes</source>
<translation>Izabrani ฤvorovi</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Node</source>
<translation>ฤvor</translation>
</message>
<message>
<source>Export type</source>
<translation>Vrsta izvoza</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Add subtree</source>
<translation>Dodaj podstablo</translation>
</message>
<message>
<source>Add node</source>
<translation>Dodaj ฤvor</translation>
</message>
<message>
<source>Please select the site CSS file to be included in the package.</source>
<translation>Izaberite site CSS datoteku koja ฤe biti ukljuฤena u paket.</translation>
</message>
<message>
<source>Please select the classes CSS file to be included in the package.</source>
<translation>Izaberite classes CSS datoteku koja ฤe biti ukljuฤena u paket.</translation>
</message>
<message>
<source>Currently added image files</source>
<translation>Trenutno dodane grafiฤke datoteke</translation>
</message>
<message>
<source>Package wizard: %wizardname</source>
<translation>ฤarobnjak paketa: %wizardname</translation>
</message>
<message>
<source>Install package</source>
<translation>Instaliraj paket</translation>
</message>
<message>
<source>Install items</source>
<translation>Instaliraj elemente</translation>
</message>
<message>
<source>Skip installation</source>
<translation>Preskoฤi instaliranje</translation>
</message>
<message>
<source>Package install wizard: %wizardname</source>
<translation>ฤarobnjak za instaliranje paketa: %wizardname</translation>
</message>
<message>
<source>Next %arrowright</source>
<translation>Sledeฤi %arrowright</translation>
</message>
<message>
<source>Error</source>
<translation>Greลกka</translation>
</message>
<message>
<source>Upload package</source>
<translation>Uฤitaj paket</translation>
</message>
<message>
<source>Import package</source>
<translation>Uvezi paket</translation>
</message>
<message>
<source>Installed</source>
<translation>Instalirano</translation>
</message>
<message>
<source>Not installed</source>
<translation>Nije instalirano</translation>
</message>
<message>
<source>Imported</source>
<translation>Uvezeno</translation>
</message>
<message>
<source>Files [%collectionname]</source>
<translation>Datoteke (%collectionname)</translation>
</message>
<message>
<source>Details</source>
<translation>Detalji</translation>
</message>
<message>
<source>Uninstall</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Install</source>
<translation>Instaliraj</translation>
</message>
<message>
<source>Export to file</source>
<translation>Izvezi u datoteku</translation>
</message>
<message>
<source>State</source>
<translation>Status</translation>
</message>
<message>
<source>Maintainers</source>
<translation>Odrลพavaoci</translation>
</message>
<message>
<source>Documents</source>
<translation>Dokumenti</translation>
</message>
<message>
<source>Changelog</source>
<translation>Datoteka izmena</translation>
</message>
<message>
<source>File list</source>
<translation>Lista datoteka</translation>
</message>
<message>
<source>Uninstall package</source>
<translation>Ukloni paket</translation>
</message>
<message>
<source>Uninstall items</source>
<translation>Ukloni elemente</translation>
</message>
<message>
<source>Skip uninstallation</source>
<translation>Preskoฤi uklanjanje</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Email</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Provide some basic information for your package.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>License</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Provide information about the maintainer of the package.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Include templates related to exported objects.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose the objects to include in the package.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are currently no objects selected for export</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select an image file to be included in the package then click Next.
Click "Next" without choosing an image to continue to the next step.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The package can be installed on your system. Installing the package will copy files, create content classes etc., depending on the package.
If you do not want to install the package at this time, you can do so later on the view page for the package.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Continue</source>
<translation type="unfinished">Nastavi</translation>
</message>
<message>
<source>The package can be uninstalled from your system. Uninstalling the package will remove any installed files, content classes etc., depending on the package.
If you do not want to uninstall the package at this time, you can do so later on the view page for the package.
You can also remove the package without uninstalling it from the package list.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the file containing the package then click the upload button</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Regarding eZ Publish package '%packagename'</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Send email to the maintainer</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/package/list</name>
<message>
<source>Remove section?</source>
<translation>Ukloni segment?</translation>
</message>
<message>
<source>Removal of packages</source>
<translation>Uklanjanje paketa</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Package removal was canceled.</source>
<translation>Uklanjanje paketa je poniลกteno.</translation>
</message>
<message>
<source>Packages</source>
<translation>Paketi</translation>
</message>
<message>
<source>Repository</source>
<translation>Skladiลกte</translation>
</message>
<message>
<source>All</source>
<translation>Sve</translation>
</message>
<message>
<source>Change repository</source>
<translation>Promeni skladiลกte</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>Summary</source>
<translation>Ukratko</translation>
</message>
<message>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<source>Installed</source>
<translation>Instalirano</translation>
</message>
<message>
<source>Not installed</source>
<translation>Nije instalirano</translation>
</message>
<message>
<source>Imported</source>
<translation>Uvezeno</translation>
</message>
<message>
<source>There are no packages matching the selected repository.</source>
<translation>Nema paketa u izabranom skladiลกtu.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Import new package</source>
<translation>Uvezi novi paket</translation>
</message>
<message>
<source>Create new package</source>
<translation>Kreiraj paket</translation>
</message>
<message>
<source>Are you sure you want to remove the following packages?
The packages will be lost forever.
Note: The packages will not be uninstalled.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove</source>
<translation type="unfinished">Ukloni</translation>
</message>
</context>
<context>
<name>design/admin/pagelayout</name>
<message>
<source>Search</source>
<translation>Traลพi</translation>
</message>
<message>
<source>All content</source>
<translation>Celi sadrลพaj</translation>
</message>
<message>
<source>Current location</source>
<translation>Aktivna lokacija</translation>
</message>
<message>
<source>The same location</source>
<translation>po istoj lokaciji</translation>
</message>
<message>
<source>Advanced</source>
<translation>Napredno</translation>
</message>
<message>
<source>Content structure</source>
<translation type="unfinished">Struktura sadrลพaja</translation>
</message>
<message>
<source>Media library</source>
<translation type="unfinished">Biblioteka medija</translation>
</message>
<message>
<source>User accounts</source>
<translation type="unfinished">Korisniฤki raฤuni</translation>
</message>
<message>
<source>Webshop</source>
<translation type="unfinished">Web prodavnica</translation>
</message>
<message>
<source>Setup</source>
<translation type="unfinished">Setup</translation>
</message>
<message>
<source>Design</source>
<translation type="unfinished">Dizajn</translation>
</message>
<message>
<source>My account</source>
<translation type="obsolete">Moj raฤun</translation>
</message>
<message>
<source>Current user</source>
<translation>Aktivni korisnik</translation>
</message>
<message>
<source>Change information</source>
<translation>Izmena podataka</translation>
</message>
<message>
<source>Change password</source>
<translation>Promeni lozinku</translation>
</message>
<message>
<source>Logout</source>
<translation>Odjava</translation>
</message>
<message>
<source>Change user info</source>
<translation>Izmena podataka korisnika</translation>
</message>
<message>
<source>Bookmarks</source>
<translation>Oznake za knjigu</translation>
</message>
<message>
<source>Search all content.</source>
<translation>Traลพi po celom sadrลพaju.</translation>
</message>
<message>
<source>Search only from the current location.</source>
<translation>Traลพi samo sa aktivne lokacije.</translation>
</message>
<message>
<source>Advanced search.</source>
<translation>Napredno pretraลพivanje.</translation>
</message>
<message>
<source>Manage the main content structure of the site.</source>
<translation type="unfinished">Upravljanje glavnim sadrลพajem.</translation>
</message>
<message>
<source>Manage images, files, documents, etc.</source>
<translation type="unfinished">Upravljanje slikama, dokumentima i sl.</translation>
</message>
<message>
<source>Manage users, user groups and permission settings.</source>
<translation type="unfinished">Upravljanje korisnicima, grupama korisnika i dozvolama.</translation>
</message>
<message>
<source>Manage customers, orders, discounts and VAT types; view sales statistics.</source>
<translation type="unfinished">Upravljanje kupcima, sniลพenjima i porezima.</translation>
</message>
<message>
<source>Manage templates, menus, toolbars and other things related to appearence.</source>
<translation type="unfinished">Upravljanje ลกablonima, menijima, alatnim trakama i sl.</translation>
</message>
<message>
<source>Configure settings and manage advanced functionality.</source>
<translation type="unfinished">Konfiguracija podeลกavanja i upravljanje naprednim opcijama.</translation>
</message>
<message>
<source>Manage items and settings that belong to your account.</source>
<translation type="unfinished">Upravljanje elementima i podeลกavanjima koje pripadaju vaลกem korisniฤkom raฤunu.</translation>
</message>
<message>
<source>Change password for <%username>.</source>
<translation>Izmena lozinke za korisnika <%username>.</translation>
</message>
<message>
<source>There is %basket_count item in the shopping basket.</source>
<translation>Imate %basket_count proizvod u korpi.</translation>
</message>
<message>
<source>Shopping basket (%basket_count)</source>
<translation>Korpa (%basket_count)</translation>
</message>
<message>
<source>There are %basket_count items in the shopping basket.</source>
<translation>Imate %basket_count proizvoda u korpi.</translation>
</message>
<message>
<source>Logout from the system.</source>
<translation>Odjava sa sistema.</translation>
</message>
<message>
<source>Hide bookmarks.</source>
<translation>Sakrij oznake za knjigu.</translation>
</message>
<message>
<source>Manage your personal bookmarks.</source>
<translation>Upravljanje liฤnim oznakama za knjigu.</translation>
</message>
<message>
<source>Show bookmarks.</source>
<translation>Prikaลพi oznake za knjigu.</translation>
</message>
<message>
<source>Add to bookmarks</source>
<translation>Dodaj oznakama za knjigu</translation>
</message>
<message>
<source>Add the current item to your bookmarks.</source>
<translation>Dodaj postojeฤi element u moje oznake za knjigu.</translation>
</message>
<message>
<source>Hide clear cache menu.</source>
<translation>Sakrij menu oฤisti cache.</translation>
</message>
<message>
<source>Cache management page</source>
<translation>Upravljanje cache-om</translation>
</message>
<message>
<source>Clear cache</source>
<translation>Oฤisti cache</translation>
</message>
<message>
<source>Show clear cache menu.</source>
<translation>Prikaลพi menu oฤisti cache.</translation>
</message>
<message>
<source>Quick settings</source>
<translation>Brza podeลกavanja</translation>
</message>
<message>
<source>Hide quick settings</source>
<translation>Sakrij brza podeลกavanja</translation>
</message>
<message>
<source>[%classname] Click on the icon to display a context-sensitive menu.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Change name, email, password, etc.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Search in all content</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Search in '%node'</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dashboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>User preferences</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/pagelayout/path</name>
<message>
<source>You are here:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/pagelayout/rightmenu</name>
<message>
<source>Show / Hide rightmenu</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hide / Show rightmenu</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/parts/content/menu</name>
<message>
<source>Content structure</source>
<translation>Struktura sadrลพaja</translation>
</message>
<message>
<source>Trash</source>
<translation>Smeฤe</translation>
</message>
<message>
<source>Small</source>
<translation>Mali</translation>
</message>
<message>
<source>Medium</source>
<translation>Srednji</translation>
</message>
<message>
<source>Large</source>
<translation>Veliki</translation>
</message>
<message>
<source>View and manage the contents of the trash bin.</source>
<translation>Prikaz i upravljanje sadrลพajem smeฤa.</translation>
</message>
<message>
<source>Change the left menu width to small size.</source>
<translation>Promena prikaza veliฤine levog menija na mali.</translation>
</message>
<message>
<source>Change the left menu width to medium size.</source>
<translation>Promena prikaz veliฤine levog menija na srednji.</translation>
</message>
<message>
<source>Change the left menu width to large size.</source>
<translation>Promena prikaz veliฤine levog menija na veliki.</translation>
</message>
<message>
<source>Hide content structure.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show content structure.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Site structure</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/parts/media/menu</name>
<message>
<source>Media library</source>
<translation>Biblioteka medija</translation>
</message>
<message>
<source>Trash</source>
<translation>Smeฤe</translation>
</message>
<message>
<source>Small</source>
<translation>Mali</translation>
</message>
<message>
<source>Medium</source>
<translation>Srednji</translation>
</message>
<message>
<source>Large</source>
<translation>Veliki</translation>
</message>
<message>
<source>View and manage the contents of the trash bin.</source>
<translation>Prikaz i upravljanje sadrลพajem smeฤa.</translation>
</message>
<message>
<source>Change the left menu width to small size.</source>
<translation>Promena prikaza veliฤine levog menija na mali.</translation>
</message>
<message>
<source>Change the left menu width to medium size.</source>
<translation>Promena prikaz veliฤine levog menija na srednji.</translation>
</message>
<message>
<source>Change the left menu width to large size.</source>
<translation>Promena prikaz veliฤine levog menija na veliki.</translation>
</message>
</context>
<context>
<name>design/admin/parts/my/menu</name>
<message>
<source>My notification settings</source>
<translation>Moja podeลกavanja obaveลกtenja</translation>
</message>
<message>
<source>My bookmarks</source>
<translation>Moje oznake za knjigu</translation>
</message>
<message>
<source>Collaboration</source>
<translation>Saradnja</translation>
</message>
<message>
<source>Change password</source>
<translation>Promeni lozinku</translation>
</message>
<message>
<source>My account</source>
<translation>Moj raฤun</translation>
</message>
<message>
<source>My drafts</source>
<translation>Moje skice</translation>
</message>
<message>
<source>My pending items</source>
<translation>Lista poslova koji me oฤekuju</translation>
</message>
<message>
<source>My shopping basket</source>
<translation>Moja korpa za kupovinu</translation>
</message>
<message>
<source>My wish list</source>
<translation>Moja lista ลพelja</translation>
</message>
<message>
<source>Edit mode settings</source>
<translation>Podeลกavanja naฤina editovanja</translation>
</message>
<message>
<source>on</source>
<translation>ukljuฤeno</translation>
</message>
<message>
<source>Disable location window when editing content.</source>
<translation>Onemoguฤi prozor lokacije kod editovanja sadrลพaja.</translation>
</message>
<message>
<source>off</source>
<translation>iskljuฤeno</translation>
</message>
<message>
<source>Enable location window when editing content.</source>
<translation>Omoguฤi prozor lokacije kod editovanja sadrลพaja.</translation>
</message>
<message>
<source>Locations</source>
<translation>Lokacije</translation>
</message>
<message>
<source>Re-edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Disable &quot;Back to edit&quot; checkbox when editing content.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &quot;Back to edit&quot; checkbox when editing content.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit profile</source>
<translation type="unfinished">Izmeni profil</translation>
</message>
<message>
<source>Dashboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable &quot;Tabs&quot; by default while browsing content.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Disable &quot;Tabs&quot; by default while browsing content.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/parts/setup/menu</name>
<message>
<source>Cache management</source>
<translation>Upravljanje cache-om</translation>
</message>
<message>
<source>Search statistics</source>
<translation>Statistika pretraลพivanja</translation>
</message>
<message>
<source>System information</source>
<translation>Podaci o sistemu</translation>
</message>
<message>
<source>Link management</source>
<translation>URL upravljanje</translation>
</message>
<message>
<source>URL translator</source>
<translation>URL prevodilac</translation>
</message>
<message>
<source>Classes</source>
<translation>Klase</translation>
</message>
<message>
<source>Extensions</source>
<translation>Ekstenzije</translation>
</message>
<message>
<source>Ini settings</source>
<translation>Ini podeลกavanja</translation>
</message>
<message>
<source>Notification</source>
<translation>Obaveลกtenje</translation>
</message>
<message>
<source>PDF export</source>
<comment>PDF export</comment>
<translation>PDF izvoz</translation>
</message>
<message>
<source>Packages</source>
<translation>Paketi</translation>
</message>
<message>
<source>RAD</source>
<comment>Rapid Application Development</comment>
<translation>RAD</translation>
</message>
<message>
<source>RSS</source>
<translation>RSS</translation>
</message>
<message>
<source>Sections</source>
<translation>Segmenti</translation>
</message>
<message>
<source>Sessions</source>
<translation>Sesije</translation>
</message>
<message>
<source>Triggers</source>
<translation>Obaraฤi</translation>
</message>
<message>
<source>Workflows</source>
<translation>Radni tokovi</translation>
</message>
<message>
<source>Setup</source>
<translation>Setup</translation>
</message>
<message>
<source>Roles and policies</source>
<translation>Uloge i politike</translation>
</message>
<message>
<source>Upgrade check</source>
<translation>Unapreฤivanje sistema</translation>
</message>
<message>
<source>Global settings</source>
<translation>Globalna podeลกavanja</translation>
</message>
<message>
<source>Collected information</source>
<translation>Skupljene informacije</translation>
</message>
<message>
<source>Languages</source>
<translation type="unfinished">Jezici</translation>
</message>
<message>
<source>URL wildcards</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Workflow processes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>States</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>URL management</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/parts/shop/menu</name>
<message>
<source>Customers</source>
<translation>Klijenti</translation>
</message>
<message>
<source>Discounts</source>
<translation>Popusti</translation>
</message>
<message>
<source>Orders</source>
<translation>Narudลพbe</translation>
</message>
<message>
<source>Product statistics</source>
<translation>Statistika proizvoda</translation>
</message>
<message>
<source>VAT types</source>
<translation>Vrste PDV-a</translation>
</message>
<message>
<source>Shop</source>
<translation>Prodavnica</translation>
</message>
<message>
<source>Order status</source>
<translation>Status narudลพbe</translation>
</message>
<message>
<source>Archive</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT rules</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Product categories</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Currencies</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Preferred currency</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Products overview</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/parts/user/menu</name>
<message>
<source>User accounts</source>
<translation>Korisniฤki raฤuni</translation>
</message>
<message>
<source>Trash</source>
<translation>Smeฤe</translation>
</message>
<message>
<source>Small</source>
<translation>Mali</translation>
</message>
<message>
<source>Medium</source>
<translation>Srednji</translation>
</message>
<message>
<source>Large</source>
<translation>Veliki</translation>
</message>
<message>
<source>Manage permission settings.</source>
<translation type="obsolete">Upravljanje ovlaลกฤenjima.</translation>
</message>
<message>
<source>Roles and policies</source>
<translation>Uloge i politike</translation>
</message>
<message>
<source>View and manage the contents of the trash bin.</source>
<translation>Prikaz i upravljanje sadrลพajem smeฤa.</translation>
</message>
<message>
<source>Change the left menu width to small size.</source>
<translation>Promena prikaza veliฤine levog menija na mali.</translation>
</message>
<message>
<source>Change the left menu width to medium size.</source>
<translation>Promena prikaza veliฤine levog menija na srednji.</translation>
</message>
<message>
<source>Change the left menu width to large size.</source>
<translation>Promena prikaza veliฤine levog menija na veliki.</translation>
</message>
<message>
<source>Role information</source>
<translation>Informacije o ulogama</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Access control</source>
<translation>Kontrola pristupa</translation>
</message>
</context>
<context>
<name>design/admin/parts/visual/menu</name>
<message>
<source>Design</source>
<translation>Dizajn</translation>
</message>
<message>
<source>Menu management</source>
<translation>Upravljanje menijem</translation>
</message>
<message>
<source>Toolbar management</source>
<translation>Upravljanje alatnom trakom</translation>
</message>
<message>
<source>Templates</source>
<translation>ล abloni</translation>
</message>
<message>
<source>Look and feel</source>
<translation>Izgled weba</translation>
</message>
</context>
<context>
<name>design/admin/pdf/edit</name>
<message>
<source>PDF Export</source>
<translation>PDF izvoz</translation>
</message>
<message>
<source>%pdf_export_title [PDF export]</source>
<translation>%pdf_export_title [PDF izvoz]</translation>
</message>
<message>
<source>Title</source>
<translation>Naslov</translation>
</message>
<message>
<source>Display frontpage</source>
<translation>Prikaลพite prvu stranicu</translation>
</message>
<message>
<source>Intro text</source>
<translation>Uvodni tekst</translation>
</message>
<message>
<source>Sub text</source>
<translation>Podtekst</translation>
</message>
<message>
<source>Source node</source>
<translation>Izvorni ฤvor</translation>
</message>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>Export structure</source>
<translation>Struktura izvoza</translation>
</message>
<message>
<source>Tree</source>
<translation>Stablo</translation>
</message>
<message>
<source>Node</source>
<translation>ฤvor</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Frontpage</source>
<translation>Prva stranica</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>There is no source node.</source>
<translation>Nema izvornog ฤvora.</translation>
</message>
<message>
<source>Export classes (if exporting a tree)</source>
<translation>Izvoz klasa (ukoliko se izvozi stablo)</translation>
</message>
<message>
<source>Export type</source>
<translation>Vrsta izvoza</translation>
</message>
<message>
<source>Generate once</source>
<translation>Kreiraj jednom</translation>
</message>
<message>
<source>Generate on the fly</source>
<translation>Kreiraj u letu</translation>
</message>
<message>
<source>Filename (if generated on the fly)</source>
<translation>Datoteka (ako je generisano u letu)</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nepoznat</translation>
</message>
<message>
<source>The PDF export could not be stored.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Required data is either missing or is invalid</source>
<translation type="unfinished">Traลพeni podaci su pogreลกni ili nedostaju</translation>
</message>
</context>
<context>
<name>design/admin/pdf/list</name>
<message>
<source>PDF Export</source>
<translation>PDF izvoz</translation>
</message>
<message>
<source>There are no PDF exports in the list.</source>
<translation>Nema PDF izvoza na listi.</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Modifier</source>
<translation>Modifikator</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Select PDF export for removal.</source>
<translation>Izaberi PDF izvoz za brisanje.</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Edit the <%pdf_export_name> PDF export.</source>
<translation>Izmeni PDF izvoz <%pdf_export_name>.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected PDF exports.</source>
<translation>Ukloni oznaฤene PDF izvoze.</translation>
</message>
<message>
<source>New PDF export</source>
<translation>Novi PDF izvoz</translation>
</message>
<message>
<source>Create a new PDF export.</source>
<translation>Kreiraj novi PDF izvoz.</translation>
</message>
<message>
<source>PDF exports [%export_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>PDF exports (%export_count)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/popupmenu</name>
<message>
<source>View</source>
<translation>Prikaz</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Copy</source>
<translation>Kopiraj</translation>
</message>
<message>
<source>Move</source>
<translation>Premesti</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Advanced</source>
<translation>Napredno</translation>
</message>
<message>
<source>Expand</source>
<translation>Proลกiri</translation>
</message>
<message>
<source>Collapse</source>
<translation>Sklopi</translation>
</message>
<message>
<source>Add to my bookmarks</source>
<translation>Dodaj u moje oznake za knjigu</translation>
</message>
<message>
<source>Add to my notifications</source>
<translation>Dodaj u moja obaveลกtenja</translation>
</message>
<message>
<source>Swap with another node</source>
<translation>Zameni sa drugim ฤvorom</translation>
</message>
<message>
<source>Hide / unhide</source>
<translation>Sakrij / prikaลพi</translation>
</message>
<message>
<source>View index</source>
<translation>Prikaลพi index</translation>
</message>
<message>
<source>View class</source>
<translation>Prikaลพi klasu</translation>
</message>
<message>
<source>Edit class</source>
<translation>Izmeni klasu</translation>
</message>
<message>
<source>Delete view cache</source>
<translation>Obriลกi prikaz cache-a</translation>
</message>
<message>
<source>Delete template cache</source>
<translation>Obriลกi cache ลกablona</translation>
</message>
<message>
<source>Delete view cache from here</source>
<translation>Obriลกi cache prikaza odavde</translation>
</message>
<message>
<source>Template overrides</source>
<translation>Zaobilasci ลกablona</translation>
</message>
<message>
<source>New class override</source>
<translation>Novi zaobilazak klase</translation>
</message>
<message>
<source>New node override</source>
<translation>Novi zaobilazak ฤvora</translation>
</message>
<message>
<source>Remove bookmark</source>
<translation>Ukloni oznaku za knjigu</translation>
</message>
<message>
<source>Reverse related for subtree</source>
<translation>Inverzna relacija za podstablo</translation>
</message>
<message>
<source>Edit in</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Copy subtree</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create here</source>
<translation type="unfinished">Kreiraj ovde</translation>
</message>
<message>
<source>Another language</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Manage versions</source>
<translation type="unfinished">Upravljanje verzijama</translation>
</message>
<message>
<source>Manage URL aliases</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit class in</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose siteaccess</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create RSS/ATOM feed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove RSS/ATOM feed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sitemap for subtree</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Preview</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/preview/article</name>
<message>
<source>Yes</source>
<translation>Da</translation>
</message>
<message>
<source>No</source>
<translation>Ne</translation>
</message>
<message>
<source>Comments allowed</source>
<translation>Komentari dozvoljeni</translation>
</message>
</context>
<context>
<name>design/admin/preview/company</name>
<message>
<source>Contact information</source>
<translation>Kontakt informacije</translation>
</message>
<message>
<source>Address</source>
<translation>Adresa</translation>
</message>
<message>
<source>Additional information</source>
<translation>Dodatni podaci</translation>
</message>
<message>
<source>Contacts</source>
<translation>Kontakt osobe</translation>
</message>
</context>
<context>
<name>design/admin/preview/feedbackform</name>
<message>
<source>Subject</source>
<translation>Naslov</translation>
</message>
<message>
<source>Message</source>
<translation>Poruka</translation>
</message>
<message>
<source>Recipient</source>
<translation>Uฤesnici</translation>
</message>
<message>
<source>Your email address</source>
<translation type="unfinished">Vaลกa e-mail adresa</translation>
</message>
<message>
<source>Your name</source>
<translation type="unfinished">Vaลกe ime</translation>
</message>
</context>
<context>
<name>design/admin/preview/folder</name>
<message>
<source>Show children</source>
<translation>Prikaลพi decu</translation>
</message>
<message>
<source>Yes</source>
<translation>Da</translation>
</message>
<message>
<source>No</source>
<translation>Ne</translation>
</message>
</context>
<context>
<name>design/admin/preview/person</name>
<message>
<source>Contact information</source>
<translation>Podaci o kontaktu</translation>
</message>
<message>
<source>Comments</source>
<translation>Komentari</translation>
</message>
</context>
<context>
<name>design/admin/preview/poll</name>
<message>
<source>Result</source>
<translation>Rezultat</translation>
</message>
</context>
<context>
<name>design/admin/preview/product</name>
<message>
<source>Download this product sheet as PDF</source>
<translation>Uฤitaj ovu stranicu u PDF formatu</translation>
</message>
<message>
<source>People who bought this also bought</source>
<translation>Osobe koje su ga kupile takoฤe su kupile</translation>
</message>
</context>
<context>
<name>design/admin/role/assign_limited_section</name>
<message>
<source>Select section</source>
<translation>Izaberi sekciju</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>There are no sections on the system.</source>
<translation>Nema sekcija na sistemu.</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
</context>
<context>
<name>design/admin/role/createpolicystep1</name>
<message>
<source>Create a new policy for the <%role_name> role</source>
<translation>Kreiraj novu politiku za <%role_name%> rolu</translation>
</message>
<message>
<source>Step one: select module</source>
<translation>Korak prvi: izaberi modul</translation>
</message>
<message>
<source>Instructions</source>
<translation>Uputstva</translation>
</message>
<message>
<source>Click one of the "Grant.." buttons (explained below) in order to go to the next step.</source>
<translation>Klikni na jednu od opcija "Omoguฤi.." za prelazak na sledeฤi korak.</translation>
</message>
<message>
<source>The "Grant access to all functions" button will create a policy that grants unlimited access to all functions of the selected module. If you wish to limit the access method to a specific function, use the "Grant access to a function" button. Please note that function limitation is only supported by some modules (the next step will reveal if it works or not).</source>
<translation>"Dozvoli pristup svim funkcijama" kreiraฤe politiku koja dozvoljava neograniฤen pristup svim funkcijama u izabranom modulu.</translation>
</message>
<message>
<source>Module</source>
<translation>Modul</translation>
</message>
<message>
<source>Every module</source>
<translation>Svaki modul</translation>
</message>
<message>
<source>Grant access to all functions</source>
<translation>Omoguฤi pristup svim funkcijama</translation>
</message>
<message>
<source>Grant access to one function</source>
<translation>Omoguฤi pristup jednoj funkciji</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Welcome to the policy wizard. This three-step wizard will help you create a new policy that will be added to the role that is currently being edited. The wizard can be aborted at any stage by using the "Cancel" button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use the drop-down menu to select the module that you want to grant access to.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Every function</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/role/createpolicystep2</name>
<message>
<source>Step one: select module [completed]</source>
<translation>Korak prvi: izaberi modul [zavrลกen]</translation>
</message>
<message>
<source>Selected module</source>
<translation>Izabrani modul</translation>
</message>
<message>
<source>All modules</source>
<translation>Svi moduli</translation>
</message>
<message>
<source>Selected access method</source>
<translation>Izaberi metodu pristupa</translation>
</message>
<message>
<source>Limited</source>
<translation>Ograniฤeno</translation>
</message>
<message>
<source>Step two: select function</source>
<translation>Korak drugi: izaberi funkciju</translation>
</message>
<message>
<source>Instructions</source>
<translation>Uputstva</translation>
</message>
<message>
<source>Function</source>
<translation>Funkcija</translation>
</message>
<message>
<source>Grant full access</source>
<translation>Omoguฤi potpuni pristup</translation>
</message>
<message>
<source>Grant limited access</source>
<translation>Omoguฤi ograniฤeni pristup</translation>
</message>
<message>
<source>The selected module (%module_name) does not support limitations on the function level. Please go back to step one and use the "Grant access to all functions" option instead.</source>
<translation>Izabrani modul (%module_name) ne podrลพava ograniฤenja na tom nivou. Vrati se nazad i izaberi "Omoguฤi pristup svim funkcijama".</translation>
</message>
<message>
<source>Go back to step one</source>
<translation>Vrati se na prvi korak</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
<message>
<source>Create a new policy for the <%role_name> role</source>
<translation>Kreiraj novu politiku za <%role_name%> rolu</translation>
</message>
<message>
<source>Welcome to the policy wizard. This three-step wizard will help you set up a new policy. The policy will be added to the role that is currently being edited. The wizard can be aborted at any stage by using the "Cancel" button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use the drop-down menu to select the function that you want to grant access to.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Click on one of the "Grant.." buttons (explained below) in order to go to the next step.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The "Grant full access" button will create a policy that grants unlimited access to the selected function within the module that was specified in step one. If you want to limit the access method, click the "Grant limited access" button. Function limitation is only supported by some functions. If unsupported, eZ Publish will set up a policy with unlimited access to the selected function.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is not possible to grant limited access to all modules at once. To grant unlimited access to all modules and their functions, go back to step one and select "Grant access to all functions". To grant limited access to different functions within different modules, you must set up a collection of policies.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/role/createpolicystep3</name>
<message>
<source>Create a new policy for the <%role_name> role</source>
<translation>Kreiraj novu politiku za <%role_name%> rolu</translation>
</message>
<message>
<source>Step one: select module [completed]</source>
<translation>Korak prvi: izaberi modul [zavrลกen]</translation>
</message>
<message>
<source>Selected module</source>
<translation>Izabrani modul</translation>
</message>
<message>
<source>All modules</source>
<translation>Svi moduli</translation>
</message>
<message>
<source>Selected access method</source>
<translation>Izaberi metodu pristupa</translation>
</message>
<message>
<source>Limited</source>
<translation>Ograniฤeno</translation>
</message>
<message>
<source>Step two: select function [completed]</source>
<translation>Korak prvi: izaberi modul [zavrลกen]</translation>
</message>
<message>
<source>Selected function</source>
<translation>Odabrana funkcija</translation>
</message>
<message>
<source>Step three: set function limitations</source>
<translation>Korak treฤi: podesi ograniฤenja funkcije</translation>
</message>
<message>
<source>Instructions</source>
<translation>Uputstva</translation>
</message>
<message>
<source>Set the desired function limitations using the controls below.</source>
<translation>Podesi ลพeljena ograniฤenja funkcije koristeฤi kontrole.</translation>
</message>
<message>
<source>Click the "OK" button to finish the wizard. The policy will be added to the role that is currently being edited.</source>
<translation>Klikni na OK za kraj ฤarobnjaka. Politika ฤe biti dodana rolama.</translation>
</message>
<message>
<source>Any</source>
<translation>Bilo koji</translation>
</message>
<message>
<source>Nodes [%node_count]</source>
<translation>ฤvorovi [%node_count]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>The node list is empty.</source>
<translation>Lista ฤvorova je prazna.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Add nodes</source>
<translation>Dodaj ฤvor</translation>
</message>
<message>
<source>Subtrees [%subtree_count]</source>
<translation>Podstabla [%subtree_count]</translation>
</message>
<message>
<source>Subtree</source>
<translation>Podstablo</translation>
</message>
<message>
<source>The subtree list is empty.</source>
<translation>Lista podstabla je prazna.</translation>
</message>
<message>
<source>Add subtrees</source>
<translation>Dodaj podstablo</translation>
</message>
<message>
<source>Go back to step one</source>
<translation>Vrati se na prvi korak</translation>
</message>
<message>
<source>Go back to step two</source>
<translation>Vrati se na drugi korak</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
<message>
<source>Welcome to the policy wizard. This three-step wizard will help you set up a new policy. The policy will be added to the role that is currently being edited. The wizard can be aborted at any stage by using the "Cancel" button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Properties</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Nodes (%node_count)</source>
<translation>ฤvorovi (%node_count)</translation>
</message>
<message>
<source>Subtrees (%subtree_count)</source>
<translation>Podstabla (%subtree_count)</translation>
</message>
</context>
<context>
<name>design/admin/role/edit</name>
<message>
<source>Edit <%role_name> [Role]</source>
<translation>Izmeni <%role_name> [Uloga]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Policies</source>
<translation>Politike</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Module</source>
<translation>Modul</translation>
</message>
<message>
<source>Function</source>
<translation>Funkcija</translation>
</message>
<message>
<source>Limitations</source>
<translation>Ograniฤenja</translation>
</message>
<message>
<source>No limitations</source>
<translation>Bez ograniฤenja</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Role</source>
<translation>Uloga</translation>
</message>
<message>
<source>Select policy for removal.</source>
<translation>Izaberite politiku za brisanje.</translation>
</message>
<message>
<source>all modules</source>
<translation>svi moduli</translation>
</message>
<message>
<source>all functions</source>
<translation>sve funkcije</translation>
</message>
<message>
<source>Edit the policy's function limitations.</source>
<translation>Izmeni ograniฤenja funkcije politike.</translation>
</message>
<message>
<source>There are no policies set up for this role.</source>
<translation>Nema politika za podeลกavanje za ovu ulogu.</translation>
</message>
<message>
<source>Remove selected policies.</source>
<translation>Ukloni izabrane politike.</translation>
</message>
<message>
<source>New policy</source>
<translation>Nova politika</translation>
</message>
<message>
<source>Create a new policy.</source>
<translation>Kreiraj novu politiku.</translation>
</message>
<message>
<source>Save</source>
<translation type="unfinished">Snimi</translation>
</message>
<message>
<source>Save policy changes to this role</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/role/list</name>
<message>
<source>Roles [%role_count]</source>
<translation>Uloge [%role_count]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Role</source>
<translation>Uloga</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected roles.</source>
<translation>Ukloni izabrane uloge.</translation>
</message>
<message>
<source>New role</source>
<translation>Nova uloga</translation>
</message>
<message>
<source>Create a new role.</source>
<translation>Kreiraj novu ulogu.</translation>
</message>
<message>
<source>Toggle selection</source>
<translation>Izaberi selekciju</translation>
</message>
<message>
<source>Select role for removal.</source>
<translation>Izaberi ulogu za brisanje.</translation>
</message>
<message>
<source>Assign</source>
<translation>Dodeli</translation>
</message>
<message>
<source>Assign the <%role_name> role to a user or a user group.</source>
<translation>Dodeli <%role_name> ulogu korisniku ili grupi korisnika.</translation>
</message>
<message>
<source>Edit the <%role_name> role.</source>
<translation>Izmeni ulogu <%role_name>.</translation>
</message>
<message>
<source>Copy</source>
<translation>Kopiraj</translation>
</message>
<message>
<source>Copy the <%role_name> role.</source>
<translation>Kopiraj <%role_name> ulogu.</translation>
</message>
<message>
<source>Roles (%role_count)</source>
<translation>Uloge (%role_count)</translation>
</message>
</context>
<context>
<name>design/admin/role/policyedit</name>
<message>
<source>Edit <%policy_name> policy for <%role_name> role</source>
<translation>Izmeni politiku <%policy_name> za ulogu <%role_name></translation>
</message>
<message>
<source>Module</source>
<translation>Modul</translation>
</message>
<message>
<source>Function</source>
<translation>Funkcija</translation>
</message>
<message>
<source>Function limitations</source>
<translation>ograniฤenje funkcije</translation>
</message>
<message>
<source>Any</source>
<translation>Bilo koji</translation>
</message>
<message>
<source>Nodes [%node_count]</source>
<translation>ฤvorovi [%node_count]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>The node list is empty.</source>
<translation>Lista ฤvorova je prazna.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Add nodes</source>
<translation>Dodaj ฤvorove</translation>
</message>
<message>
<source>Subtrees [%subtree_count]</source>
<translation>Podstabla [%subtree_count]</translation>
</message>
<message>
<source>Subtree</source>
<translation>Podstablo</translation>
</message>
<message>
<source>The subtree list is empty.</source>
<translation>Lista podstabla je prazna.</translation>
</message>
<message>
<source>Add subtrees</source>
<translation>Dodaj podstablo</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>The function limitations of this policy cannot be edited. This is either because the function does not support limitations or because the function was assigned without limitations when the policy was created.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Nodes (%node_count)</source>
<translation>ฤvorovi (%node_count)</translation>
</message>
<message>
<source>Subtrees (%subtree_count)</source>
<translation>Podstabla (%subtree_count)</translation>
</message>
</context>
<context>
<name>design/admin/role/view</name>
<message>
<source>all modules</source>
<translation>svi moduli</translation>
</message>
<message>
<source>all functions</source>
<translation>sve funkcije</translation>
</message>
<message>
<source>Role</source>
<translation>Uloga</translation>
</message>
<message>
<source>%role_name [Role]</source>
<translation>%role_name [Uloga]</translation>
</message>
<message>
<source>Policies [%policies_count]</source>
<translation>Politike [%policies_count]</translation>
</message>
<message>
<source>No limitations</source>
<translation>Bez ograniฤenja</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>Edit this role.</source>
<translation>Izmeni ulogu.</translation>
</message>
<message>
<source>Users and groups using the <%role_name> role [%users_count]</source>
<translation>Korisnici i grupe korisnika koriste <%role_name> ulogu [%users_count]</translation>
</message>
<message>
<source>User/group</source>
<translation>Korisnik/Grupa</translation>
</message>
<message>
<source>Limitation</source>
<translation>Ograniฤenje</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Assign</source>
<translation>Dodeli</translation>
</message>
<message>
<source>Subtree</source>
<translation>Podstablo</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Module</source>
<translation>Modul</translation>
</message>
<message>
<source>Function</source>
<translation>Funkcija</translation>
</message>
<message>
<source>There are no policies set up for this role.</source>
<translation>Nema politike postavljene za tu ulogu.</translation>
</message>
<message>
<source>Toggle selection</source>
<translation>Izaberi selekciju</translation>
</message>
<message>
<source>Select user or user group for removal.</source>
<translation>Izaberi korisnika ili grupu korisnika za brisanje.</translation>
</message>
<message>
<source>This role is not assigned to any users or user groups.</source>
<translation>Ova uloga nije dodeljena ni jednom korisniku ili grupi korisnika.</translation>
</message>
<message>
<source>Remove selected users and/or user groups.</source>
<translation>Obriลกi izabranog korisnika i/ili grupu korisnika.</translation>
</message>
<message>
<source>Assign the <%role_name> role to a user or a user group.</source>
<translation>Dodeli <%role_name> ulogu korisniku ili grupi korisnika.</translation>
</message>
<message>
<source>Select limitation.</source>
<translation>Izaberi ograniฤenje.</translation>
</message>
<message>
<source>Assign with limitation</source>
<translation>Dodeli sa ograniฤenjem</translation>
</message>
<message>
<source>Assign the <%role_name> role with limitation (specified to the left) to a user or a user group.</source>
<translation>Dodeli <%role_name> ulogu sa ograniฤenjima [prikazanim levo] korisniku ili grupi korisnika.</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Policies (%policies_count)</source>
<translation>Politike (%policies_count)</translation>
</message>
<message>
<source>Path: '/%path_string', Class identifier: '%class_identifier'</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Users and groups using the <%role_name> role (%users_count)</source>
<translation>Korisnici i grupe korisnika koriste <%role_name> ulogu (%users_count)</translation>
</message>
</context>
<context>
<name>design/admin/rss/browse_destination</name>
<message>
<source>Choose a destination for RSS import</source>
<translation>Izaberite destinaciju za RSS uvoz</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Use the radio buttons to choose a destination location for RSS import then click "OK".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/rss/browse_image</name>
<message>
<source>Choose image for RSS export</source>
<translation>Izaberite sliku za RSS izvoz</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Use the radio buttons to choose an image to use in the RSS export then click "OK".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/rss/browse_source</name>
<message>
<source>Choose source for RSS export</source>
<translation>Izaberite izvor za RSS izvoz</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Use the radio buttons to choose the item that you want to export using RSS then click "OK".</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/rss/browse_user</name>
<message>
<source>Choose owner for RSS imported objects</source>
<translation>Izaberite vlasnika za RSS uvezene objekte</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Use the radio buttons to choose a user then click "OK". The user will become the owner of the objects that were imported using RSS.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/rss/edit_export</name>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Description</source>
<translation>Opis</translation>
</message>
<message>
<source>Site URL</source>
<translation>URL stranice</translation>
</message>
<message>
<source>Image</source>
<translation>Slika</translation>
</message>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>RSS version</source>
<translation>RSS verzija</translation>
</message>
<message>
<source>Active</source>
<translation>Aktivno</translation>
</message>
<message>
<source>Access URL</source>
<translation>Pristup URL-u</translation>
</message>
<message>
<source>Source path</source>
<translation>Put od izvora</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Title</source>
<translation>Naziv</translation>
</message>
<message>
<source>Remove this source</source>
<translation>Ukloni izvor</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Edit <%rss_export_name> [RSS Export]</source>
<translation>Izmeni <%rss_export_name> [RSS izvoz]</translation>
</message>
<message>
<source>Use the description field to write a text explaining what users can expect from the RSS export.</source>
<translation>U polje za opis upiลกi ลกta korisnici mogu oฤekivati od RSS izvoza.</translation>
</message>
<message>
<source>Click this button to select an image for the RSS export. Note that images only work with RSS version 2.0</source>
<translation>Klikni na dugme za izbor slike za RSS izvoz. Slike vaลพe samo za RSS verziju 2.0</translation>
</message>
<message>
<source>Use this drop-down menu to select the RSS version to use for the export. You must select RSS 2.0 in order to export the image selected above.</source>
<translation>Izaberi padajuฤi menu za izbor verzije RSS za izvoz. Moraลก izabrati verziju 2.0 ako ลพeliลก izvesti i slike koje si izabrao.</translation>
</message>
<message>
<source>Use this checkbox to control if the RSS export is active or not. An inactive export will not be automatically updated.</source>
<translation>Koristi ovaj checkbox za kontrolu da li je RSS izvoz aktivan ili ne. Neaktivan RSS izvoz neฤe biti automatski aลพuriran.</translation>
</message>
<message>
<source>Use this field to set the URL where the RSS export should be available. Note that "rss/feed/" will be appended to the real URL. </source>
<translation>Koristi polje za unos URL gde ฤe RSS izvoz biti dostupan. Napomena: "rss/feed/ ฤe biti dodan u realni URL.</translation>
</message>
<message>
<source>Source</source>
<translation>Izvor</translation>
</message>
<message>
<source>Click to remove this source from the RSS export.</source>
<translation>Klikni za uklanjanje izvora iz RSS izvoza.</translation>
</message>
<message>
<source>Add source</source>
<translation>Dodaj izvor</translation>
</message>
<message>
<source>Click to add a new source to the RSS export.</source>
<translation>Klikni za dodavanje novog izvora u RSS izvoz.</translation>
</message>
<message>
<source>Apply the changes and return to the RSS overview.</source>
<translation>Primeni izmene i vrati se na prikaz RSS-a.</translation>
</message>
<message>
<source>Cancel the changes and return to the RSS overview.</source>
<translation>Poniลกti izmene i vrati se na prikaz RSS-a.</translation>
</message>
<message>
<source>If RSS Export is Active then a valid Access URL is required.</source>
<translation>Ako je RSS izvoz aktivan tada je potreban ispravan pristupni URL.</translation>
</message>
<message>
<source>Number of objects</source>
<translation>Broj objekata</translation>
</message>
<message>
<source>Main node only</source>
<translation>Samo glavni ฤvor</translation>
</message>
<message>
<source>Check if you want to only feed the object from the main node.</source>
<translation>Kliknite ako ลพelite da pravite feed samo iz glavnog ฤvora.</translation>
</message>
<message>
<source>Subnodes</source>
<translation>Podฤvorovi</translation>
</message>
<message>
<source>Invalid input</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name of the RSS export. This name is used in the Administration Interface only, to distinguish the different exports from each other.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this field to enter the base URL of your site. It is used to produce the URLs in the export, composed by the Site URL (e.g. "http://www.example.com/index.php") and the path to the object (e.g. "/articles/my_article"). The Site URL depends on your web server and eZ Publish configuration.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Leave this field empty if you want system automaticaly detect the URL of your site from the URL you access feed with</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove image</source>
<translation type="unfinished">Ukloni sliku</translation>
</message>
<message>
<source>Click to remove image from RSS export.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this drop-down to select the maximum number of objects included in the RSS feed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Click this button to select the source node for the RSS export source. Objects of the type selected in the drop-down below published as sub items of the selected node will be included in the RSS export.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Activate this checkbox if objects from the subnodes of the source should also be fed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this drop-down to select the type of object that triggers the export. Click the "Set" button to load the correct attribute types for the remaining fields.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Click this button to load the correct values into the drop-down fields below. Use the drop-down menu on the left to select the class.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this drop-down to select the attribute that should be exported as the title of the RSS export entry.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this drop-down to select the attribute that should be exported as the description of the RSS export entry.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Category</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>optional</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this drop-down to select the attribute that should be exported as the category of the RSS export entry.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Skip</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enclosure (media)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this drop-down to select the attribute that should be exported as the enclosure of the RSS export entry, enclosures are direct link to a media file, so use a media/image/file datatype .</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Field data</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/rss/edit_import</name>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Source URL</source>
<translation>Izvorni URL</translation>
</message>
<message>
<source>Destination path</source>
<translation>Put prema destinaciji</translation>
</message>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>Imported objects will be owned by</source>
<translation>Vlasnik uvezenih objekata biฤe</translation>
</message>
<message>
<source>Change user</source>
<translation>Izmena podataka korisnika</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Ignore</source>
<translation>Zanemari</translation>
</message>
<message>
<source>Active</source>
<translation>Aktivno</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Edit <%rss_import_name> [RSS Import]</source>
<translation>Izmeni <%rss_import_name> [RSS uvoz]</translation>
</message>
<message>
<source>Use this field to enter the source URL of the RSS feed to import.</source>
<translation>Koristite polje za unos izvornog URLa RSS uvoza.</translation>
</message>
<message>
<source>Click this button to select the destination node where objects created by the import are located.</source>
<translation>Kliknite dugme da bi izabrali ciljni ฤvor gde ฤe ฤvorovi kreirani iz uvoza biti locirani.</translation>
</message>
<message>
<source>Click this button to select the user who should own the objects created by the import.</source>
<translation>Kliknite ovo dugme za izbor korisnika kome ฤe pripadati uvezeni objekti.</translation>
</message>
<message>
<source>Use this checkbox to control if the RSS feed is active or not. An inactive feed will not be automatically updated.</source>
<translation>Koristite ovaj checkbox da kontroliลกete da li je RSS feed aktivan ili ne. Neaktivan feed se neฤe automatski osveลพavati.</translation>
</message>
<message>
<source>Apply the changes and return to the RSS overview.</source>
<translation>Primeni izmene i vrati se na prikaz RSS-a.</translation>
</message>
<message>
<source>Cancel the changes and return to the RSS overview.</source>
<translation>Poniลกti izmene i vrati se na prikaz RSS-a.</translation>
</message>
<message>
<source>Name of the RSS import. This name is used in the Administration Interface only, to distinguish the different imports from each other.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Click this button to proceed and analyze the import feed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>RSS Version</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this drop-down to select the type of object the import should create. Click the "Set" button to load the attribute types for the remaining fields.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Click this button to load the correct values into the drop-down fields below. Use the drop-down menu on the left to select the class.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class attributes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this drop-down menu to select the attribute that should bet set as information from the RSS stream.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object attributes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name of the RSS import. This name is used in the Administration Interface only to distinguish the different imports from each other.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/rss/list</name>
<message>
<source>RSS exports [%exports_count]</source>
<translation>RSS izvozi [%exports_count]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<source>Modifier</source>
<translation>Modifikator</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Active</source>
<translation>Aktivno</translation>
</message>
<message>
<source>Inactive</source>
<translation>Neaktivno</translation>
</message>
<message>
<source>The RSS export list is empty.</source>
<translation>Lista RSS izvoza je prazna.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>New export</source>
<translation>Novi izvoz</translation>
</message>
<message>
<source>RSS imports [%imports_count]</source>
<translation>RSS uvozi [%imports_count]</translation>
</message>
<message>
<source>The RSS import list is empty.</source>
<translation>Lista RSS uvoza je prazna.</translation>
</message>
<message>
<source>New import</source>
<translation>Novi uvoz</translation>
</message>
<message>
<source>Invert selection</source>
<translation>Obrnuti izbor</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select RSS export for removal.</source>
<translation>Izaberi RSS izvoz za brisanje.</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Edit the <%name> RSS export.</source>
<translation>Izmeni <%name> RSS izvoz.</translation>
</message>
<message>
<source>Remove selected RSS exports.</source>
<translation>Ukloni oznaฤene RSS izvoze.</translation>
</message>
<message>
<source>Create a new RSS export.</source>
<translation>Kreiraj novi RSS izvoz.</translation>
</message>
<message>
<source>Select RSS import for removal.</source>
<translation>Izaberi RSS uvoz za brisanje.</translation>
</message>
<message>
<source>Edit the <%name> RSS import.</source>
<translation>Izmeni <%name> RSS uvoz.</translation>
</message>
<message>
<source>Remove selected RSS imports.</source>
<translation>Ukloni oznaฤeni RSS uvoz.</translation>
</message>
<message>
<source>Create a new RSS import.</source>
<translation>Kreiraj novi RSS uvoz.</translation>
</message>
<message>
<source>RSS exports (%exports_count)</source>
<translation>RSS izvozi (%exports_count)</translation>
</message>
<message>
<source>RSS imports (%imports_count)</source>
<translation>RSS uvozi (%imports_count)</translation>
</message>
</context>
<context>
<name>design/admin/search/stats</name>
<message>
<source>Search statistics</source>
<translation>Statistika pretraลพivanja</translation>
</message>
<message>
<source>Phrase</source>
<translation>Oblici i sintagme</translation>
</message>
<message>
<source>Number of phrases</source>
<translation>Broj sintagmi</translation>
</message>
<message>
<source>Average result returned</source>
<translation>Proseฤni ostvareni rezultat</translation>
</message>
<message>
<source>Reset statistics</source>
<translation>Postavi na nulu statistiku</translation>
</message>
<message>
<source>The list is empty.</source>
<translation>Lista je prazna.</translation>
</message>
<message>
<source>Clear the search log.</source>
<translation>Oฤisti informacije o traลพenju.</translation>
</message>
</context>
<context>
<name>design/admin/section/assign_notification</name>
<message>
<source>Assign section notification</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The section < %1 > was not assigned to the nodes listed below because of insufficient permission:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no objects in the system that you could assign the section < %1 > to.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to assign the section < %1 > to any object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished">OK</translation>
</message>
</context>
<context>
<name>design/admin/section/browse_assign</name>
<message>
<source>Choose start location for the <%section_name> section</source>
<translation>Izaberite poฤetnu lokaciju segmenta <%section_name></translation>
</message>
<message>
<source>Use the radio buttons to select an item that should have the <%section_name> section assigned.</source>
<translation>Koristite radio dugmad za izbor elementa kojem ฤe se dodeliti segment <%section_name>.</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
<message>
<source>Note that the section assignment of the sub items will also be changed.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/section/confirmremove</name>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Confirm section removal</source>
<translation>Potvrdite brisanje segmenta</translation>
</message>
<message>
<source>Are you sure you want to remove the sections?</source>
<translation>Jeste li sigurni da ลพelite ukloniti segmente?</translation>
</message>
<message>
<source>The following sections will be removed</source>
<translation>Segmenti ฤe biti uklonjeni</translation>
</message>
<message>
<source>Warning</source>
<translation>Upozorenje</translation>
</message>
<message>
<source>The following sections cannot be removed because they are either assigned to objects or used in role and policy limitations</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>None of the selected sections can be removed because they are either assigned to objects or used in role and policy limitations</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing a section may corrupt template output and other things in the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Proceed only if you are sure that it is safe.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/section/edit</name>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Edit <%section_name> [Section]</source>
<translation>Izmeni segment <%section_name> [Segment]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Navigation part</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier can not be empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier should consist of letters, numbers or '_' with letter prefix.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The identifier has been used in another section.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Section edit error</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier</source>
<translation type="unfinished">Identifikator</translation>
</message>
</context>
<context>
<name>design/admin/section/list</name>
<message>
<source>Sections [%section_count]</source>
<translation>Segmenti [%section_count]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>section</source>
<translation>segment</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>New section</source>
<translation>Novi segment</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select section for removal.</source>
<translation>Izaberi segment za brisanje.</translation>
</message>
<message>
<source>Assign</source>
<translation>Dodeli</translation>
</message>
<message>
<source>Assign the <%section_name> section to a subtree.</source>
<translation>Dodeli segment <%section_name> podstablu.</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Edit the <%section_name> section.</source>
<translation>Izmeni segment <%section_name>.</translation>
</message>
<message>
<source>Remove selected sections.</source>
<translation>Ukloni izabrane segmente.</translation>
</message>
<message>
<source>Create a new section.</source>
<translation>Kreiraj novi segment.</translation>
</message>
<message>
<source>You are not allowed to assign the <%section_name> section.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sections (%section_count)</source>
<translation>Segmenti (%section_count)</translation>
</message>
<message>
<source>Assign a subtree to the <%section_name> section.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier</source>
<translation type="unfinished">Identifikator</translation>
</message>
</context>
<context>
<name>design/admin/section/view</name>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>%section_name [Section]</source>
<translation>%section_name [Segment]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Edit this section.</source>
<translation>Izmeni segment.</translation>
</message>
<message>
<source>Roles containing limitations associated with this section [%number_of_roles]</source>
<translation>Uloge sadrลพe ograniฤenja s obzirom na segment [%number_of_roles]</translation>
</message>
<message>
<source>Role</source>
<translation>Uloga</translation>
</message>
<message>
<source>Limited policies</source>
<translation>Ograniฤene politike</translation>
</message>
<message>
<source>This section is not used to limit the policies of any role.</source>
<translation>Ovaj segment ne koristi ograniฤenja politika bilo koje uloge.</translation>
</message>
<message>
<source>Users and user groups with role limitations associated with this section [%number_of_roles]</source>
<translation>Korisnici i grupe korisnika sa ograniฤenim ulogama povezani sa ovim segmentom [%number_of_roles]</translation>
</message>
<message>
<source>User or user group</source>
<translation>Korisnik ili grupa korisnika</translation>
</message>
<message>
<source>This section is not used for limiting roles that are assigned to users or user groups. </source>
<translation>Ovaj segment se ne koristi za ograniฤene uloge koje su dodeljene korisnicima ili grupama korisnika.</translation>
</message>
<message>
<source>Objects within this section [%number_of_objects]</source>
<translation>Objekti unutar segmenta [%number_of_objects]</translation>
</message>
<message>
<source>This section is not assigned to any objects.</source>
<translation>Segment nije dodeljen ni jednom objektu.</translation>
</message>
<message>
<source>Roles containing limitations associated with this section (%number_of_roles)</source>
<translation>Uloge sadrลพe ograniฤenja s obzirom na segment (%number_of_roles)</translation>
</message>
<message>
<source>Users and user groups with role limitations associated with this section (%number_of_roles)</source>
<translation>Korisnici i grupe korisnika sa ograniฤenim ulogama povezani sa ovim segmentom (%number_of_roles)</translation>
</message>
<message>
<source>Objects within this section (%number_of_objects)</source>
<translation>Objekti unutar segmenta (%number_of_objects)</translation>
</message>
<message>
<source>Assign subtree</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Assign subtree of objects to this section</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier</source>
<translation type="unfinished">Identifikator</translation>
</message>
</context>
<context>
<name>design/admin/settings</name>
<message>
<source>Edit setting %setting</source>
<translation>Izmeni podeลกavanje %setting</translation>
</message>
<message>
<source>New setting</source>
<translation>Novo podeลกavanje</translation>
</message>
<message>
<source>Block</source>
<translation>Blok</translation>
</message>
<message>
<source>Setting</source>
<translation>Podeลกavanje</translation>
</message>
<message>
<source>Setting: <new setting></source>
<translation>Podeลกavanje: <novo podeลกavanje></translation>
</message>
<message>
<source>Change setting type</source>
<translation>Promeni vrstu podeลกavanja</translation>
</message>
<message>
<source>Tip</source>
<translation>Savet</translation>
</message>
<message>
<source>To create an empty array leave the first line empty</source>
<translation>Za kreiranje prazne matrice ostavite prvu liniju praznu</translation>
</message>
<message>
<source>Siteaccess setting</source>
<translation>Podeลกavanja siteaccessa</translation>
</message>
<message>
<source>Override setting (global)</source>
<translation>Podeลกavanja zaobilaลพenja (globalne)</translation>
</message>
<message>
<source>Setting value</source>
<translation>Vrednost podeลกavanja</translation>
</message>
<message>
<source>Enabled</source>
<translation>Omoguฤeno</translation>
</message>
<message>
<source>Disabled</source>
<translation>Onemoguฤeno</translation>
</message>
<message>
<source>True</source>
<translation>Taฤno</translation>
</message>
<message>
<source>False</source>
<translation>Netaฤno</translation>
</message>
<message>
<source>Save</source>
<translation>Snimi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
<message>
<source>Input did not validate</source>
<translation>Unos nije ispravan</translation>
</message>
<message>
<source>%valfield is empty</source>
<translation>vrednost nije unesena</translation>
</message>
<message>
<source>Variable %valfield already exists in section %block</source>
<translation>Varijabla %valfield veฤ postoji u segmentu %block</translation>
</message>
<message>
<source>%valfield is not allowed to contain spaces</source>
<translation>%valfield ne sme sadrลพati prazna mesta</translation>
</message>
<message>
<source>Writing setting: %setting_name to file: %filename failed.</source>
<translation>Zapisivanje podeลกavanja: %setting_name u datoteku %filename nije uspelo.</translation>
</message>
<message>
<source>Name contains illegal character(s).</source>
<translation>Naziv sadrลพi nedozvoljeni karakter.</translation>
</message>
<message>
<source>Name should only contain A-Z and 0-9.</source>
<translation>Naziv mora sadrลพati samo slova i brojeve.</translation>
</message>
<message>
<source>%valfield does not contain a valid string.</source>
<translation>%valfield ne sadrลพi ispravan tekst.</translation>
</message>
<message>
<source>If the string is all numbers use the numeric type instead.</source>
<translation>Ako je tekst samo brojฤani koristite brojฤanu vrstu.</translation>
</message>
<message>
<source>%valfield does not contain a valid numeric</source>
<translation>%valfield ne sadrลพi ispravne numeriฤke vrednosti</translation>
</message>
<message>
<source>A valid numeric can only contain 0-9 and one . (dot). </source>
<translation>Valjan numeriฤki niz moลพe sadrลพati samo brojeve i jednu taฤku.</translation>
</message>
<message>
<source>$valfield does not contain valid array.</source>
<translation>%valfield ne sadrลพi ispravnu matricu.</translation>
</message>
<message>
<source>View settings</source>
<translation>Prikaz podeลกavanja</translation>
</message>
<message>
<source>Using siteaccess</source>
<translation>Koristi siteaccess</translation>
</message>
<message>
<source>%ini_file consist of %blocks section(s) and %setting_count different setting(s)</source>
<translation>%ini_file sadrลพi segmenata %blocks i %setting_count razliฤitih podeลกavanja</translation>
</message>
<message>
<source>Select ini file to view</source>
<translation>Izaberite ini datoteku za prikaz</translation>
</message>
<message>
<source>Select siteaccess</source>
<translation>Izaberite siteaccess</translation>
</message>
<message>
<source>Select</source>
<translation>Izaberi</translation>
</message>
<message>
<source>Settings for %inifile in siteaccess %siteaccess</source>
<translation>Podeลกavanja za %inifile u siteaccess %siteaccess</translation>
</message>
<message>
<source>[add setting]</source>
<translation>[dodaj podeลกavanje]</translation>
</message>
<message>
<source>Placement</source>
<translation>Mesto</translation>
</message>
<message>
<source>Value</source>
<translation>Vrednost</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Ini setting</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ini File</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Siteaccess</source>
<translation type="unfinished">Siteaccess</translation>
</message>
<message>
<source>Values for each location setting are shown. The first values are lowest priority; the values toward the end have higher priority than the first ones.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Location (prioritized list shown)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default (cannot change)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No value</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Setting name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose another name that is not already in use</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Make sure you have permission to %path and try again.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please select an ini file from the drop-down below</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Values for each location setting are shown. The first values have lowest priority; the values toward the end have higher priority than the first ones.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/setup</name>
<message>
<source>File consistency check OK.</source>
<translation>Provera konzistentnosti datoteka - U redu.</translation>
</message>
<message>
<source>Database check OK.</source>
<translation>Provera baze podataka - u redu.</translation>
</message>
<message>
<source>The database is not consistent with the distribution database.</source>
<translation>Baza nije identiฤna sa distribucionom bazom.</translation>
</message>
<message>
<source>To synchronize your database with the distribution setup, run the following SQL commands</source>
<translation>Za sinhronizaciju vaลกe i distribucione baze izvrลกite SQL naredbe</translation>
</message>
<message>
<source>System upgrade check</source>
<translation>Provera unapreฤivanja sistema</translation>
</message>
<message>
<source>File consistency check</source>
<translation>Provera konzistentnosti datoteka</translation>
</message>
<message>
<source>Database consistency check</source>
<translation>Provera konzistentnosti baze</translation>
</message>
<message>
<source>Check file consistency</source>
<translation>Provera konzistentnosti datoteka</translation>
</message>
<message>
<source>Check database consistency</source>
<translation>Proveri konzistentnost baze</translation>
</message>
<message>
<source>Warning: it is not safe to upgrade without checking the modifications done to the following files</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Before upgrading eZ Publish to a newer version, it is important to check that the current installation is ready for upgrading.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remember to make a backup of the eZ Publish directory and the database before you upgrade.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The file consistency tool checks if you have altered any of the files that came with the current installation. Altered files may be replaced by new versions that contain bugfixes, new features, etc. Make sure that you backup and then merge your changes into the new versions of the files.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The database consistency tool checks if the current database is consistent with the database schema that came with the eZ Publish distribution. If there are any inconsistencies, the tool will suggest the necessary SQL statements that should be run in order to bring the database into a consistent state. Please run the suggested SQL statements before upgrading.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The upgrade checking tools require a lot of system resources. They may take some time to run.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/setup/cache</name>
<message>
<source>Content view cache was cleared</source>
<translation>Predmemorija(cache) prikaza sadrลพaja je oฤiลกฤena</translation>
</message>
<message>
<source>All caches were cleared</source>
<translation>Sav cache je oฤiลกฤen</translation>
</message>
<message>
<source>Ini file cache was cleared</source>
<translation>Cache Ini datoteke je oฤiลกฤen</translation>
</message>
<message>
<source>Template cache was cleared</source>
<translation>Predmemorija(cache) ลกablona je oฤiลกฤena</translation>
</message>
<message>
<source>%name was cleared</source>
<translation>%name je oฤiลกฤen</translation>
</message>
<message>
<source>Template overrides and compiled templates</source>
<translation>Zaobilasci ลกablona i kompajliranih ลกablona</translation>
</message>
<message>
<source>Clear template caches</source>
<translation>Oฤisti cache ลกablona</translation>
</message>
<message>
<source>Content views and template blocks</source>
<translation>Prikaz sadrลพaja i blokova ลกablona</translation>
</message>
<message>
<source>Clear content caches</source>
<translation>Oฤisti cache sadrลพaja</translation>
</message>
<message>
<source>Clear all caches</source>
<translation>Oฤisti sve cache-a</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Path</source>
<translation>Putanja</translation>
</message>
<message>
<source>Clear selected</source>
<translation>Izbriลกi izabrano</translation>
</message>
<message>
<source>The following caches were cleared</source>
<translation>Cache je oฤiลกฤen</translation>
</message>
<message>
<source>Clear caches</source>
<translation>Oฤisti cache</translation>
</message>
<message>
<source>Configuration (ini) caches</source>
<translation>Konfiguraciona (ini) predmemorija</translation>
</message>
<message>
<source>Everything</source>
<translation>Sve</translation>
</message>
<message>
<source>Fine-grained cache control</source>
<translation>Specijalizovana kontrola cache-a</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select the <%cache_name> for clearing.</source>
<translation>Izaberite cache <%cache_name> za ฤiลกฤenje.</translation>
</message>
<message>
<source>Clear the selected caches.</source>
<translation>Oฤisti izabrane cache-a.</translation>
</message>
<message>
<source>Static content cache was regenerated</source>
<translation>Statiฤki cache sadrลพaja je regenerisan</translation>
</message>
<message>
<source>Static content cache</source>
<translation>Statiฤki cache</translation>
</message>
<message>
<source>Regenerate static content cache</source>
<translation>Regeneriลกi statiฤki cache</translation>
</message>
<message>
<source>Create new</source>
<translation>Kreiraj novo</translation>
</message>
<message>
<source>This operation will clear all the template override caches and the compiled templates. It may lead to slower site performance until the caches are recreated.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This operation will clear all caches that are related to either template views or cache blocks inside the pagelayout template. Use it if you have modified templates or if you have made changes inside a cache block.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Clear Ini caches</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This operation will clear all the configuration caches. Use it to force the system to re-read the configuration files if you have changed settings.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This operation will clear all the caches and may lead to slow site response times until the caches are recreated.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The <%cache_name> is disabled and thus it cannot be marked for clearing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This operation will regenerate all the static content caches that are configured. This action can take some time depending on the specifications of the server and the number of locations that are configured to be statically cached. If you encounter time-out problems, use the &quot;bin/php/makestaticcache.php&quot; shell script.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Categories</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/setup/datatypecode</name>
<message>
<source>Constructor</source>
<translation>Konstruktor</translation>
</message>
</context>
<context>
<name>design/admin/setup/extensions</name>
<message>
<source>Available extensions [%extension_count]</source>
<translation>Dostupne ekstenzije [%extension_count]</translation>
</message>
<message>
<source>Active</source>
<translation>Aktivna</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Activate or deactivate extension. Use the "Apply changes" button to apply the changes.</source>
<translation>Aktivirajte ili deaktivirajte ekstenziju. Koristite "Primeni izmene" dugme za primenu izmena.</translation>
</message>
<message>
<source>There are no available extensions.</source>
<translation>Nema dostupnih ekstenzija.</translation>
</message>
<message>
<source>Click this button to store changes if you have modified the status of the checkboxes above.</source>
<translation>Kliknite na dugme za snimanje izmena ako ste menjali status gornjih checkboxova.</translation>
</message>
<message>
<source>Regenerate autoload arrays for extensions</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Click this button to regenerate the autoload arrays used by the system for extensions.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Problems detected during autoload generation:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Available extensions (%extension_count)</source>
<translation>Dostupne ekstenzije (%extension_count)</translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Activate or deactivate extension. Use the "Update" button to apply the changes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/setup/info</name>
<message>
<source>System information</source>
<translation>Podaci o sistemu</translation>
</message>
<message>
<source>Site</source>
<translation>Site</translation>
</message>
<message>
<source>Version</source>
<comment>PHP version</comment>
<translation>Verzija</translation>
</message>
<message>
<source>Extensions</source>
<comment>PHP extensions</comment>
<translation>Ekstenzije</translation>
</message>
<message>
<source>Miscellaneous</source>
<translation>Razno</translation>
</message>
<message>
<source>Safe mode is on.</source>
<translation>Sigurnosni naฤin rada je ukljuฤen.</translation>
</message>
<message>
<source>Safe mode is off.</source>
<translation>Sigurnosni naฤin rada je iskljuฤen.</translation>
</message>
<message>
<source>Basedir restriction is on and set to %1.</source>
<translation>Restrikcija baznog direktorija je aktivna i postavljena na %1.</translation>
</message>
<message>
<source>Basedir restriction is off.</source>
<translation>Restrikcija baznog direktorija je iskljuฤena.</translation>
</message>
<message>
<source>Global variable registration is on.</source>
<translation>Registracija globalnih varijabli je ukljuฤena.</translation>
</message>
<message>
<source>Global variable registration is off.</source>
<translation>Registracija globalnih varijabli je iskljuฤena.</translation>
</message>
<message>
<source>File uploading is enabled.</source>
<translation>Uฤitavanje datoteke je omoguฤeno.</translation>
</message>
<message>
<source>File uploading is disabled.</source>
<translation>Uฤitavanje datoteke je onemoguฤeno.</translation>
</message>
<message>
<source>Maximum size of post data (text and files) is %1.</source>
<translation>Maksimalna veliฤina podataka (tekst i dokumenti) je %1.</translation>
</message>
<message>
<source>Script memory limit is %1.</source>
<translation>Ograniฤenje memorije skripte je %1.</translation>
</message>
<message>
<source>Maximum execution time is %1 seconds.</source>
<translation>Maksimalno vreme izvrลกenja je %1 sekundi.</translation>
</message>
<message>
<source>Name</source>
<comment>PHP Accelerator name</comment>
<translation>Naziv</translation>
</message>
<message>
<source>Version</source>
<comment>PHP Accelerator version</comment>
<translation>Verzija</translation>
</message>
<message>
<source>Version information could not be detected.</source>
<translation>Podaci o verziji nisu detektovani.</translation>
</message>
<message>
<source>Status</source>
<comment>PHP Accelerator status</comment>
<translation>Status</translation>
</message>
<message>
<source>Enabled.</source>
<translation>Omoguฤen.</translation>
</message>
<message>
<source>Disabled.</source>
<translation>Onemoguฤen.</translation>
</message>
<message>
<source>Database</source>
<translation>Baza podataka</translation>
</message>
<message>
<source>Type</source>
<comment>Database type</comment>
<translation>Vrsta</translation>
</message>
<message>
<source>Server</source>
<comment>Database server</comment>
<translation>Server</translation>
</message>
<message>
<source>Socket path</source>
<comment>Database socket path</comment>
<translation>Putanja socket </translation>
</message>
<message>
<source>Not in use.</source>
<translation>Ne koristi se.</translation>
</message>
<message>
<source>Database name</source>
<comment>Database name</comment>
<translation>Naziv baze podataka</translation>
</message>
<message>
<source>Connection retry count</source>
<comment>Database retry count</comment>
<translation>Brojaฤ ponovljenih konekcija na bazu</translation>
</message>
<message>
<source>Character set</source>
<comment>Database charset</comment>
<translation>Karakter set</translation>
</message>
<message>
<source>Internal</source>
<translation>Interni</translation>
</message>
<message>
<source>Slave database (read only)</source>
<translation>Pomoฤna baza podataka (samo ฤitanje)</translation>
</message>
<message>
<source>Database</source>
<comment>Database name</comment>
<translation>Baza podataka</translation>
</message>
<message>
<source>There is no slave database in use.</source>
<translation>Ne koristi se pomoฤna baza podataka.</translation>
</message>
<message>
<source>PHP</source>
<translation>PHP</translation>
</message>
<message>
<source>PHP Accelerator</source>
<translation>PHP Akcelerator</translation>
</message>
<message>
<source>CPU</source>
<comment>CPU info</comment>
<translation>CPU</translation>
</message>
<message>
<source>Memory</source>
<comment>Memory info</comment>
<translation>Memorija</translation>
</message>
<message>
<source>eZ Publish</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version</source>
<comment>eZ Publish version</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>SVN revision</source>
<comment>eZ Publish version</comment>
<translation type="obsolete">SVN revizija </translation>
</message>
<message>
<source>Extensions</source>
<comment>eZ Publish extensions</comment>
<translation type="unfinished">Ekstenzije</translation>
</message>
<message>
<source>Script memory limit is unlimited.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A known and active PHP Accelerator could not be found.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Web server (software)</source>
<comment>Web server title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<comment>Web server name</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version</source>
<comment>Web server version</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Modules</source>
<comment>Web server modules</comment>
<translation type="unfinished">Moduli</translation>
</message>
<message>
<source>The modules of the web server could not be detected.</source>
<comment>Web server modules</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish was unable to extract information from the web server.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Web server (hardware)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Details</source>
<comment>Detailed PHP information</comment>
<translation type="unfinished">Detalji</translation>
</message>
<message>
<source>PHP autoload functions</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/setup/operatorcode</name>
<message>
<source>Example</source>
<translation>Primer</translation>
</message>
<message>
<source>Constructor, does nothing by default.</source>
<translation>Po osnovnoj postavci konstruktor ne ฤini niลกta.</translation>
</message>
<message>
<source>Executes the PHP function for the operator cleanup and modifies \a $operatorValue.</source>
<translation>Izvrลกava PHP funkciju za operatora ฤiลกฤenja i menja \a $operatorValue.</translation>
</message>
<message>
<source>\\return an array with the template operator name.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Example code. This code must be modified to do what the operator should do. Currently it only trims text.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/setup/rad</name>
<message>
<source>Rapid Application Development Tools</source>
<translation>Rapid Application Development alati</translation>
</message>
<message>
<source>Available RAD tools</source>
<translation>Dostupni RAD alati</translation>
</message>
<message>
<source>Template operator wizard</source>
<translation>ฤarobnjak za operatore ลกablona</translation>
</message>
<message>
<source>Datatype wizard</source>
<translation>ฤarobnjak datatype</translation>
</message>
<message>
<source>Template operator wizard (step 1 of 3)</source>
<translation>ฤarobnjak operatora ลกablona (korak 1 od 3)</translation>
</message>
<message>
<source>Restart</source>
<translation>Ponovo zapoฤni</translation>
</message>
<message>
<source>Next</source>
<translation>Sledeฤi</translation>
</message>
<message>
<source>The rapid application development (RAD) tools make the creation of new/extended functionality for eZ Publish easier. Currently there are two RAD tools available: the template operator wizard and the datatype wizard. The template operator wizard basically generates a valid framework (PHP code) for a new template operator. The datatype wizard generates a valid framework (PHP code) for a new datatype.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Welcome to the template operator wizard. Template operators are usually used for manipulating template variables. However, they can also be used to generate or fetch data. This wizard will take you through a couple of steps with some basic choices. When finished, eZ Publish will generate a PHP framework for a new operator (which will be available for download).</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/setup/rad/datatype</name>
<message>
<source>Datatype wizard (step 1 of 3)</source>
<translation>Datatype ฤarobnjak (korak 1 od 3)</translation>
</message>
<message>
<source>Restart</source>
<translation>Ponovo zapoฤni</translation>
</message>
<message>
<source>Next</source>
<translation>Sledeฤi</translation>
</message>
<message>
<source>Datatype wizard (step 2 of 3)</source>
<translation>Datatype ฤarobnjak (korak 2 od 3)</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Descriptive name</source>
<translation>Opisni naziv</translation>
</message>
<message>
<source>Handle input on class level</source>
<translation>Upravljaj sa unosom na nivou klase</translation>
</message>
<message>
<source>Datatype wizard (step 3 of 3)</source>
<translation>Datatype ฤarobnjak (korak 3 od 3)</translation>
</message>
<message>
<source>Name of class</source>
<translation>Naziv klase</translation>
</message>
<message>
<source>The creator of the datatype</source>
<translation>Dizajner datatypa</translation>
</message>
<message>
<source>Description</source>
<translation>Opis</translation>
</message>
<message>
<source>Handles the datatype %datatype_name. By using %datatype_name you can ...</source>
<translation>Upravlja sa datatype %datatypename. Koristeฤi %datatypename moลพete ...</translation>
</message>
<message>
<source>Hint: The first line will be used as the brief description. The rest will become operator documentation.</source>
<translation>Savet: Prva linija biฤe iskoriลกฤena za kratak opis. Ostatak ฤe postati dokumentacija operatora.</translation>
</message>
<message>
<source>Finish and generate</source>
<translation>Zavrลกi i generiลกi</translation>
</message>
<message>
<source>Welcome to the wizard for creating a new datatype. Everything stored in a content object are called attributes. Attributes are defined as data types. To customize storing and validation of attributes, you can create your own data types.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class constant name</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/setup/rad/templateoperator</name>
<message>
<source>Template operator wizard (step 2 of 3)</source>
<translation>ฤarobnjak operatora ลกablona (korak 2 od 3)</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Handles input</source>
<translation>Upravlja unosom</translation>
</message>
<message>
<source>Generates output</source>
<translation>Generiลกe izlazni rezultat</translation>
</message>
<message>
<source>Parameters</source>
<translation>Parametri</translation>
</message>
<message>
<source>No parameters</source>
<translation>Nema parametara</translation>
</message>
<message>
<source>Named parameters</source>
<translation>Nazivi parametara</translation>
</message>
<message>
<source>Sequential parameters</source>
<translation>Sekvencijalni parametri</translation>
</message>
<message>
<source>Custom</source>
<translation>Posebno</translation>
</message>
<message>
<source>Restart</source>
<translation>Ponovo zapoฤni</translation>
</message>
<message>
<source>Next</source>
<translation>Sledeฤi</translation>
</message>
<message>
<source>Template operator wizard (step 3 of 3)</source>
<translation>ฤarobnjak operatora ลกablona (korak 3 od 3)</translation>
</message>
<message>
<source>Class name</source>
<translation>Naziv klase</translation>
</message>
<message>
<source>Author</source>
<translation>Autor</translation>
</message>
<message>
<source>Description</source>
<translation>Opis</translation>
</message>
<message>
<source>Handles template operator %operator_name. By using %operator_name you can...</source>
<translation>Barata sa operatorom %operator_name ลกablona. Koristeฤi %operator_name moลพete ...</translation>
</message>
<message>
<source>Hint: The first line will be used for the brief description. The rest will become the documentation.</source>
<translation>Savet: Prva linija biฤe iskoriลกฤena za kratak opis. Ostatak ฤe postati dokumentacija.</translation>
</message>
<message>
<source>Example code</source>
<translation>Primer koda</translation>
</message>
<message>
<source>Hint: Feel free to add example code that demonstrates how the operator works.</source>
<translation>Savet: Slobodno dodajte primer koda kako bi demonstrirali kako operator radi.</translation>
</message>
<message>
<source>Finish and generate</source>
<translation>Zavrลกi i generiลกi</translation>
</message>
</context>
<context>
<name>design/admin/setup/session</name>
<message>
<source>The sessions were successfully removed.</source>
<translation>Sesije su uspeลกno uklonjene.</translation>
</message>
<message>
<source>Session administration</source>
<translation>Upravljanje sesijama</translation>
</message>
<message>
<source>Sessions</source>
<translation>Sesije</translation>
</message>
<message>
<source>Total number of sessions</source>
<translation>Ukupan broj sesija</translation>
</message>
<message>
<source>There are %logged_in_count registered and %anonymous_count anonymous users online.</source>
<translation>Postoji %logged_in_count registrovanih i %anonymous_count anonimnih korisnika na mreลพi. </translation>
</message>
<message>
<source>WARNING! When you remove sessions, users that are logged in will be logged out from the system.</source>
<translation>UPOZORENJE! Pri uklanjanju sesija, moลพe se dogoditi da prijavljeni korisnici budu izbaฤeni iz sistema. </translation>
</message>
<message>
<source>Remove all sessions</source>
<translation>Ukloni sve sesije</translation>
</message>
<message>
<source>Remove timed out / old sessions</source>
<translation>Ukloni istekle / stare sesije</translation>
</message>
<message>
<source>Filtered sessions</source>
<translation>Filtrirane sesije</translation>
</message>
<message>
<source>Displaying sessions for %username</source>
<translation>Prikaลพi sesije za korisnika %username</translation>
</message>
<message>
<source>Sessions for all users</source>
<translation>Sesije za sve korisnike</translation>
</message>
<message>
<source>Users</source>
<translation>Korisnici</translation>
</message>
<message>
<source>Everyone</source>
<translation>Svi korisnici</translation>
</message>
<message>
<source>Registered users</source>
<translation>Registrovani korisnici</translation>
</message>
<message>
<source>Anonymous users</source>
<translation>Anonimni korisnici</translation>
</message>
<message>
<source>Update list</source>
<translation>Obnovi listu</translation>
</message>
<message>
<source>Include inactive users</source>
<translation>Ukljuฤi neaktivne korisnike</translation>
</message>
<message>
<source>Invert selection</source>
<translation>Obrnuti izbor</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor..</translation>
</message>
<message>
<source>Login</source>
<translation>Prijava</translation>
</message>
<message>
<source>Count</source>
<translation>Zbir</translation>
</message>
<message>
<source>Full name</source>
<translation>Ime i prezime</translation>
</message>
<message>
<source>Idle time</source>
<translation>Vreme mirovanja</translation>
</message>
<message>
<source>Idle since</source>
<translation>Miruje od</translation>
</message>
<message>
<source>Select session for removal.</source>
<translation>Izaberi sesiju za brisanje.</translation>
</message>
<message>
<source>Time skew detected</source>
<translation>Detektovan vremenski paradoks</translation>
</message>
<message>
<source>There are no sessions matching the selected options.</source>
<translation>Nema sesija koje odgovaraju izabranim opcijama.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected sessions.</source>
<translation>Ukloni izabrane sesije.</translation>
</message>
<message>
<source>Email</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Not all timed out sessions were successfully removed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your alternatives are to:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repeat the operation several times to complete it.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Clear the timed out session data from command-line using: &gt;php bin/php/ezsessiongc.php</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Install the session cleanup cronjob 'session_gc.php' and run on nightly intervals (see cronjob.ini or doc for how)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was cut short in order to avoid execution timeout.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/accounthandlers/html/ez</name>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Address</source>
<translation>Adresa</translation>
</message>
<message>
<source>Company</source>
<translation>Firma</translation>
</message>
<message>
<source>Street</source>
<translation>Ulica</translation>
</message>
<message>
<source>Zip code</source>
<translation>Zip</translation>
</message>
<message>
<source>Place</source>
<translation>Mesto</translation>
</message>
<message>
<source>State</source>
<translation>Status</translation>
</message>
<message>
<source>Email</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Country/region</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/archivelist</name>
<message>
<source>Archived orders [%count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished">Vreme</translation>
</message>
<message>
<source>Customer</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ascending</source>
<translation type="unfinished">Uzlazno</translation>
</message>
<message>
<source>Descending</source>
<translation type="unfinished">Silazno</translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Total (ex. VAT)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Total (inc. VAT)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Status</source>
<translation type="unfinished">Status</translation>
</message>
<message>
<source>Select order for removal.</source>
<translation type="unfinished">Izaberi narudลพbu za brisanje.</translation>
</message>
<message>
<source>The order list is empty.</source>
<translation type="unfinished">Lista narudลพbi je prazna.</translation>
</message>
<message>
<source>Unarchive selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unarchive selected orders.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Archived orders (%count)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/basket</name>
<message>
<source>Shopping basket</source>
<translation>Korpa za kupovinu</translation>
</message>
<message>
<source>Product</source>
<translation>Proizvod</translation>
</message>
<message>
<source>Quantity</source>
<translation>Koliฤina </translation>
</message>
<message>
<source>VAT</source>
<translation>PDV</translation>
</message>
<message>
<source>Price (ex. VAT)</source>
<translation>Cena bez PDV-a</translation>
</message>
<message>
<source>Price (inc. VAT)</source>
<translation>Cena s PDV-om</translation>
</message>
<message>
<source>Discount</source>
<translation>Popust</translation>
</message>
<message>
<source>Total (ex. VAT)</source>
<translation>Ukupno bez PDV-a</translation>
</message>
<message>
<source>Total (inc. VAT)</source>
<translation>Ukupno sa PDV-om</translation>
</message>
<message>
<source>Selected options</source>
<translation>Izabrane opcije</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Continue shopping</source>
<translation>Nastavi kupovinu</translation>
</message>
<message>
<source>Checkout</source>
<translation>Provera</translation>
</message>
<message>
<source>Items removed</source>
<translation>Uklonjeni elementi</translation>
</message>
<message>
<source>The following items were removed from your basket because the products have changed</source>
<translation>Sledeฤi elementi uklonjeni su iz Vaลกe korpe jer su proizvodi promenjeni</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select item for removal.</source>
<translation>Izaberi element za brisanje.</translation>
</message>
<message>
<source>There are no items in your shopping basket.</source>
<translation>Nema proizvoda u korpi.</translation>
</message>
<message>
<source>Remove selected items from the basket.</source>
<translation>Ukloni izabrane proizvode iz korpe.</translation>
</message>
<message>
<source>Click this button to update the basket if you have modified any quantity and/or option fields.</source>
<translation>Kliknite na dugme za aลพuriranje korpe ako ste menjali sadrลพaj i koliฤinu.</translation>
</message>
<message>
<source>Leave the basket and continue shopping.</source>
<translation>Nastavite sa kupovinom.</translation>
</message>
<message>
<source>Proceed to checkout and purchase the items that are in the basket.</source>
<translation>Nastavite sa plaฤanjem.</translation>
</message>
<message>
<source>VAT is unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT percentage is not yet known for some of the items being purchased.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This probably means that some information about you is not yet available and will be obtained during checkout.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Subtotal of items</source>
<translation type="unfinished">Meฤuzbir proizvoda</translation>
</message>
<message>
<source>Shipping</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Order total</source>
<translation type="unfinished">Ukupno narudลพbe</translation>
</message>
<message>
<source>You cannot remove any items because there are no items in the basket.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot store any changes because the basket is empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot check out because the basket is empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Subtotal ex. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Shipping total ex. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Total VAT</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/browse_discountcustomer</name>
<message>
<source>Choose customers for discount group</source>
<translation>Izaberi kupce za grupu popusta</translation>
</message>
<message>
<source>Use the checkboxes to select users and user groups (customers) that you wish to add to the discount group.</source>
<translation>Koristite checkboxove za izbor kupaca ili grupe kupaca koje ลพelite staviti u grupu popusta.</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
</context>
<context>
<name>design/admin/shop/browse_discountgroup</name>
<message>
<source>Choose products for discount group</source>
<translation>Izaberi proizvode za grupu popusta</translation>
</message>
<message>
<source>Use the checkboxes to select products to be included in the discount group.</source>
<translation>Koristi checkbox za izbor proizvoda koji ฤe biti na sniลพenju.</translation>
</message>
<message>
<source>Navigate using the available tabs (above), the tree menu (left) and the content list (middle).</source>
<translation>Koristi dostupne tabove [gore], stablo menu [levo] i listu sadrลพaja [sredina] za navigaciju.</translation>
</message>
</context>
<context>
<name>design/admin/shop/confirmorder</name>
<message>
<source>Order confirmation</source>
<translation>Potvrda narudลพbe</translation>
</message>
<message>
<source>Please confirm that the information below is correct. Click "Confirm order" to confirm the order.</source>
<translation>Molimo Vas da proverite podatke. Kliknite na "Narudลพba" za potvrdu narudลพbe.</translation>
</message>
<message>
<source>Customer</source>
<translation>Kupac</translation>
</message>
<message>
<source>Items to be purchased</source>
<translation>Proizvodi koji ฤe biti kupljeni</translation>
</message>
<message>
<source>Product</source>
<translation>Proizvod</translation>
</message>
<message>
<source>Quantity</source>
<translation>Koliฤina </translation>
</message>
<message>
<source>VAT</source>
<translation>PDV</translation>
</message>
<message>
<source>Price (ex. VAT)</source>
<translation>Cena bez PDV-a</translation>
</message>
<message>
<source>Price (inc. VAT)</source>
<translation>Cena s PDV-om</translation>
</message>
<message>
<source>Discount</source>
<translation>Popust</translation>
</message>
<message>
<source>Total price (ex. VAT)</source>
<translation>Ukupna cena (bez PDV-a)</translation>
</message>
<message>
<source>Total price (inc. VAT)</source>
<translation>Ukupna cena (sa PDV-om)</translation>
</message>
<message>
<source>Selected options</source>
<translation>Izabrane opcije</translation>
</message>
<message>
<source>Order summary</source>
<translation>Ukratko narudลพbe</translation>
</message>
<message>
<source>Subtotal of items</source>
<translation>Meฤuzbir proizvoda</translation>
</message>
<message>
<source>Order total</source>
<translation>Ukupno narudลพbe</translation>
</message>
<message>
<source>Confirm order</source>
<translation>Potvrdi narudลพbu</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
</context>
<context>
<name>design/admin/shop/currencylist</name>
<message>
<source>Currencies</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show 10 items per page.</source>
<translation type="unfinished">Prikaลพi 10 elemenata po stranici.</translation>
</message>
<message>
<source>Show 50 items per page.</source>
<translation type="unfinished">Prikaลพi 50 elemenata po stranici.</translation>
</message>
<message>
<source>Show 25 items per page.</source>
<translation type="unfinished">Prikaลพi 25 elemenata po stranici.</translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Code</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Symbol</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Locale</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Status</source>
<translation type="unfinished">Status</translation>
</message>
<message>
<source>Auto rate</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Custom rate</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Factor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Rate</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use these checkboxes to select items for removal. Click the "Remove selected" button to remove the selected items.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown currency name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select status</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>N/A</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit '%currency_code' currency.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The available currency list is empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected currencies from the list above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New currency</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add new currency to the list above.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update auto rates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update auto rates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update autoprices</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update autoprices.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Apply changes</source>
<translation type="unfinished">Primeni izmene</translation>
</message>
<message>
<source>Apply statuses, custom rates, factor values.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Preferred currency</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/customerlist</name>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Orders</source>
<translation>Narudลพbe</translation>
</message>
<message>
<source>Total (ex. VAT)</source>
<translation>Ukupno (bez PDV-a)</translation>
</message>
<message>
<source>Total (inc. VAT)</source>
<translation>Ukupno (sa PDV-om)</translation>
</message>
<message>
<source>The customer list is empty.</source>
<translation>Lista kupaca je prazna.</translation>
</message>
<message>
<source>Customers [%customers]</source>
<translation>Kupci [%customers]</translation>
</message>
<message>
<source>Customers (%customers)</source>
<translation>Kupci (%customers)</translation>
</message>
</context>
<context>
<name>design/admin/shop/customerorderview</name>
<message>
<source>Customer information</source>
<translation>Podaci o kupcu</translation>
</message>
<message>
<source>Orders [%order_count]</source>
<translation>Narudลพbe [%order_count]</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Total (ex. VAT)</source>
<translation>Ukupno (bez PDV-a)</translation>
</message>
<message>
<source>Total (inc. VAT)</source>
<translation>Ukupno (sa PDV-om)</translation>
</message>
<message>
<source>Time</source>
<translation>Vreme</translation>
</message>
<message>
<source>Purchased products [%product_count]</source>
<translation>Kupljeni proizvodi [%product_count]</translation>
</message>
<message>
<source>Product</source>
<translation>Proizvod</translation>
</message>
<message>
<source>Quantity</source>
<translation>Koliฤina</translation>
</message>
<message>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<source>Orders (%order_count)</source>
<translation>Narudลพbe (%order_count)</translation>
</message>
<message>
<source>Purchased products (%product_count)</source>
<translation>Kupljeni proizvodi (%product_count)</translation>
</message>
</context>
<context>
<name>design/admin/shop/discountgroup</name>
<message>
<source>Discount groups [%discount_groups]</source>
<translation>Grupe sniลพenja [%discount_groups]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>New discount group</source>
<translation>Nova grupa popusta</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select discount group for removal.</source>
<translation>Izaberi grupu popusta za brisanje.</translation>
</message>
<message>
<source>Edit the <%discountgroup_name> discount group.</source>
<translation>Izmeni grupu sniลพenja <%discountgroup_name>.</translation>
</message>
<message>
<source>There are no discount groups.</source>
<translation>Nema grupa sniลพenja.</translation>
</message>
<message>
<source>Remove selected discount groups.</source>
<translation>Ukloni izabrane grupe sniลพenja.</translation>
</message>
<message>
<source>Create a new discount group.</source>
<translation>Kreiraj novu grupu sniลพenja.</translation>
</message>
<message>
<source>Discount groups (%discount_groups)</source>
<translation>Grupe sniลพenja (%discount_groups)</translation>
</message>
</context>
<context>
<name>design/admin/shop/discountgroupedit</name>
<message>
<source>Edit <%discount_group> [Discount group]</source>
<translation>Izmeni <%discount_group> [Grupa sniลพenja]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
</context>
<context>
<name>design/admin/shop/discountgroupmembershipview</name>
<message>
<source>%discount_group [Discount group]</source>
<translation>%discount_group [Grupa popusta]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Discount rules [%rule_count]</source>
<translation>Uloge popusta [%rule_count]</translation>
</message>
<message>
<source>Percent</source>
<translation>Procenat</translation>
</message>
<message>
<source>Apply to</source>
<translation>Primeni na</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>New discount rule</source>
<translation>Nova uloga popusta</translation>
</message>
<message>
<source>Edit this discount group.</source>
<translation>Izmeni grupu popusta.</translation>
</message>
<message>
<source>Remove this discount group.</source>
<translation>Ukloni grupu popusta.</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select discount rule for removal.</source>
<translation>Izaberi ulogu popusta za brisanje.</translation>
</message>
<message>
<source>Edit the <%discount_rule_name> discount rule.</source>
<translation>Izmeni ulogu <%discount_rule_name> popusta.</translation>
</message>
<message>
<source>There are no discount rules in this group.</source>
<translation>Nema uloga popusta u grupi.</translation>
</message>
<message>
<source>Remove selected discount rules.</source>
<translation>Ukloni izabrane uloge popusta.</translation>
</message>
<message>
<source>Create a new discount rule and add it to the <%discount_group_name> discount group.</source>
<translation>Kreiraj novu ulogu popusta i dodaj je u grupu <%discount_group_name> popusta.</translation>
</message>
<message>
<source>Customers (users and user groups) [%customer_count]</source>
<translation>Kupci (kupci i grupe kupaca) [%customer_count]</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Select user or user group for removal.</source>
<translation>Izaberi korisnika ili grupu korisnika za brisanje.</translation>
</message>
<message>
<source>There are no customers in this discount group.</source>
<translation>Nema kupaca u grupi popusta.</translation>
</message>
<message>
<source>Remove selected users and/or user groups.</source>
<translation>Obriลกi izabranog korisnika i/ili grupu korisnika.</translation>
</message>
<message>
<source>Add customers</source>
<translation>Dodaj kupce</translation>
</message>
<message>
<source>Add users and/or user groups to the <%discount_group_name> discount group.</source>
<translation>Dodaj kupca i-ili grupu kupaca u grupu <%discount_group_name> popusta.</translation>
</message>
<message>
<source>Discount rules (%rule_count)</source>
<translation>Uloge popusta (%rule_count)</translation>
</message>
<message>
<source>Customers (users and user groups) (%customer_count)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/discountruleedit</name>
<message>
<source>Edit <%rule_name> [Discount rule]</source>
<translation>Izmena <%rule_name> [Uloga popusta]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Discount percent</source>
<translation>Procenat popusta</translation>
</message>
<message>
<source>Any</source>
<translation>Bilo koji</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>New discount rule</source>
<translation type="unfinished">Nova uloga popusta</translation>
</message>
<message>
<source>Product types</source>
<translation>Tipovi proizvoda</translation>
</message>
<message>
<source>in sections</source>
<translation>u segmentima</translation>
</message>
<message>
<source>Individual products</source>
<translation>Pojedinaฤni proizvodi</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>The individual product list is empty.</source>
<translation>Pojedinaฤna lista proizvoda je prazna.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Add products</source>
<translation>Dodaj proizvode</translation>
</message>
</context>
<context>
<name>design/admin/shop/editcurrency</name>
<message>
<source>Create currency</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit '%currency_code' currency</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Currency code</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(Use three capital letters)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Currency symbol</source>
<translation type="unfinished">Simbol valute</translation>
</message>
<message>
<source>Formatting locale</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select locale for formatting price values.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Custom rate</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Rate factor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unable to edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create</source>
<translation type="unfinished">Kreiraj</translation>
</message>
<message>
<source>Finish creating currency.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Store changes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Store changes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel creating new currency.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back</source>
<translation type="unfinished">Nazad</translation>
</message>
<message>
<source>Back to the currency list</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/editvatrule</name>
<message>
<source>Edit VAT charging rule</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create new VAT charging rule</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Country/region</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Any</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Product categories</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT type</source>
<translation type="unfinished">Vrsta PDV-a</translation>
</message>
<message>
<source>Store changes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Store changes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create</source>
<translation type="unfinished">Kreiraj</translation>
</message>
<message>
<source>Finish creating currency.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel creating new currency.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/orderlist</name>
<message>
<source>Orders [%count]</source>
<translation>Narudลพbe [%count]</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Customer</source>
<translation>Klijent</translation>
</message>
<message>
<source>Total (ex. VAT)</source>
<translation>Ukupno bez PDV-a</translation>
</message>
<message>
<source>Total (inc. VAT)</source>
<translation>Ukupno sa PDV-om</translation>
</message>
<message>
<source>Time</source>
<translation>Vreme</translation>
</message>
<message>
<source>Ascending</source>
<translation>Uzlazno</translation>
</message>
<message>
<source>Descending</source>
<translation>Silazno</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select order for removal.</source>
<translation>Izaberi narudลพbu za brisanje.</translation>
</message>
<message>
<source>The order list is empty.</source>
<translation>Lista narudลพbi je prazna.</translation>
</message>
<message>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Click this button to store changes if you have modified any of the fields above.</source>
<translation>Kliknite na dugme za ฤuvanje izmena ako ste izmenili bilo koje polje.</translation>
</message>
<message>
<source>( removed )</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Archive selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Archive selected orders.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Orders (%count)</source>
<translation>Narudลพbe (%count)</translation>
</message>
</context>
<context>
<name>design/admin/shop/orderstatistics</name>
<message>
<source>Product statistics [%count]</source>
<translation>Statistika proizvoda [%count]</translation>
</message>
<message>
<source>Product</source>
<translation>Proizvod</translation>
</message>
<message>
<source>Quantity</source>
<translation>Koliฤina </translation>
</message>
<message>
<source>Total (ex. VAT)</source>
<translation>Ukupno bez PDV-a</translation>
</message>
<message>
<source>Total (inc. VAT)</source>
<translation>Ukupno sa PDV-om</translation>
</message>
<message>
<source>All years</source>
<translation>Sve godine</translation>
</message>
<message>
<source>All months</source>
<translation>Svi meseci</translation>
</message>
<message>
<source>Show</source>
<translation>Pokaลพi</translation>
</message>
<message>
<source>SUM</source>
<translation>UKUPNO</translation>
</message>
<message>
<source>The list is empty.</source>
<translation>Lista je prazna.</translation>
</message>
<message>
<source>Select the year for which you want to view statistics.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the month for which you want to view statistics.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update the list using the values specified by the menus to the left.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Product statistics (%count)</source>
<translation>Statistika proizvoda (%count)</translation>
</message>
</context>
<context>
<name>design/admin/shop/orderview</name>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Product items</source>
<translation>Proizvodi</translation>
</message>
<message>
<source>Product</source>
<translation>Proizvod</translation>
</message>
<message>
<source>Count</source>
<translation>Zbir</translation>
</message>
<message>
<source>VAT</source>
<translation>PDV</translation>
</message>
<message>
<source>Price ex. VAT</source>
<translation>Cena bez PDV-a</translation>
</message>
<message>
<source>Price inc. VAT</source>
<translation>Cena s PDV-om</translation>
</message>
<message>
<source>Discount</source>
<translation>Popust</translation>
</message>
<message>
<source>Order summary</source>
<translation>Ukratko narudลพbe</translation>
</message>
<message>
<source>Subtotal of items</source>
<translation>Meฤuzbir proizvoda</translation>
</message>
<message>
<source>Order total</source>
<translation>Ukupno narudลพbe</translation>
</message>
<message>
<source>Remove this order.</source>
<translation>Ukloni ovu narudลพbu</translation>
</message>
<message>
<source>Order #%order_id [%order_status]</source>
<translation>Narudลพba #%order_id [%order_status]</translation>
</message>
<message>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<source>Person</source>
<translation>Osoba</translation>
</message>
<message>
<source>Selected options</source>
<translation>Izabrane opcije</translation>
</message>
<message>
<source>Status history [%status_count]</source>
<translation>Istorijat statusa [%status_count]</translation>
</message>
<message>
<source>Total price ex. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Total price inc. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This is the person who modified the status of the order. Click to view the user information.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Status history (%status_count)</source>
<translation>Istorijat statusa (%status_count)</translation>
</message>
</context>
<context>
<name>design/admin/shop/preferredcurrency</name>
<message>
<source>The available currency list is empty</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/productcategories</name>
<message>
<source>Input did not validate</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Product categories [%categories]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select product category for removal.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no product categories.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected product categories.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New product category</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create a new product category.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Apply changes</source>
<translation type="unfinished">Primeni izmene</translation>
</message>
<message>
<source>Click this button to store changes if you have modified any of the fields above.</source>
<translation type="unfinished">Kliknite na dugme za ฤuvanje izmena ako ste izmenili bilo koje polje.</translation>
</message>
<message>
<source>Product categories (%categories)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/productsoverview</name>
<message>
<source>Products overview</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Price</source>
<translation type="unfinished">Cena</translation>
</message>
<message>
<source>Show 10 items per page.</source>
<translation type="unfinished">Prikaลพi 10 elemenata po stranici.</translation>
</message>
<message>
<source>Show 50 items per page.</source>
<translation type="unfinished">Prikaลพi 50 elemenata po stranici.</translation>
</message>
<message>
<source>Show 25 items per page.</source>
<translation type="unfinished">Prikaลพi 25 elemenata po stranici.</translation>
</message>
<message>
<source>The product list is empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select product class.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show products</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show products of selected class.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sorting</source>
<translation type="unfinished">Sortiranje</translation>
</message>
<message>
<source>Select sorting field.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select sorting order.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Descending</source>
<translation type="unfinished">Silazno</translation>
</message>
<message>
<source>Ascending</source>
<translation type="unfinished">Uzlazno</translation>
</message>
<message>
<source>Sort products</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sort products.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/removeorder</name>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
<message>
<source>Confirm order removal</source>
<translation>Potvrdite uklanjanje narudลพbe</translation>
</message>
<message>
<source>Are you sure you want to remove order #%order_number?</source>
<translation>Jeste sigurni da ลพelite ukloniti narudลพbu #%order_number?</translation>
</message>
<message>
<source>Are you sure you want to remove the following orders?</source>
<translation>Jeste sigurni da ลพelite ukloniti sledeฤe narudลพbe?</translation>
</message>
</context>
<context>
<name>design/admin/shop/removeproductcategories</name>
<message>
<source>Confirm removal of product categories</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the categories?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove this category?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing category <%1> will result in modifying 1 VAT charging rule.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing category <%1> will result in modifying %2 VAT charging rules.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing category <%1> will result in resetting category for 1 product.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing category <%1> will result in resetting category for %2 products.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Note that the removal may cause conflicts in VAT charging rules.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/removevattypes</name>
<message>
<source>Confirm removal of the VAT types</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Confirm removal of this VAT type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing VAT types</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing VAT type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unable to remove the VAT types</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unable to remove this VAT type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the VAT types?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove this VAT type?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT type <%1> is set as default for 1 product class.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT type <%1> is set as default for %2 product classes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing VAT type <%1> will result in removal of 1 VAT charging rule.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing VAT type <%1> will result in removal of %2 VAT charging rules.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing VAT type <%1> will result in resetting VAT type for 1 product to its default value.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing VAT type <%1> will result in resetting VAT type for %2 products to their default value.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back</source>
<translation type="unfinished">Nazad</translation>
</message>
</context>
<context>
<name>design/admin/shop/status</name>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Click this button to store changes if you have modified any of the fields above.</source>
<translation>Kliknite na dugme za ฤuvanje izmena ako ste izmenili bilo koje polje.</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Status ID</source>
<translation>Status ID</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Active</source>
<translation>Aktivno</translation>
</message>
<message>
<source>Select order status for removal.</source>
<translation>Izaberite status narudลพbe za uklanjanje.</translation>
</message>
<message>
<source>Check this if you want the status to be usable in the shopping system.</source>
<translation>Izaberite ovo ako ลพelite da status bude koriลกฤen u sistemu prodavnice.</translation>
</message>
<message>
<source>There are no order statuses.</source>
<translation>Nema statusa narudลพbi.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected order statuses.</source>
<translation>Ukloni izabrane statuse narudลพbi.</translation>
</message>
<message>
<source>New order status</source>
<translation>Novi status narudลพbe.</translation>
</message>
<message>
<source>Create a new order status.</source>
<translation>Kreiraj novi status narudลพbe.</translation>
</message>
<message>
<source>Order status [%order_status]</source>
<translation>Status narudลพbe [%order_status]</translation>
</message>
<message>
<source>Order status (%order_status)</source>
<translation>Status narudลพbe (%order_status)</translation>
</message>
</context>
<context>
<name>design/admin/shop/userregister</name>
<message>
<source>Required information is missing...</source>
<translation>Nedostaje potrebna informacija...</translation>
</message>
<message>
<source>Account information</source>
<translation>Podaci o raฤunu</translation>
</message>
<message>
<source>First name</source>
<translation>Ime</translation>
</message>
<message>
<source>Last name</source>
<translation>Prezime</translation>
</message>
<message>
<source>Company</source>
<translation>Firma</translation>
</message>
<message>
<source>Street</source>
<translation>Ulica</translation>
</message>
<message>
<source>ZIP code</source>
<translation>PBR</translation>
</message>
<message>
<source>City</source>
<translation>Mesto</translation>
</message>
<message>
<source>State</source>
<translation>Regija</translation>
</message>
<message>
<source>Comments</source>
<translation>Komentari</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Fill in the fields that are marked with a star.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Fill in the necessary information. Required fields are marked with a star.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Email</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Country/region</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/vatrules</name>
<message>
<source>Wrong or missing rules.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Errors in VAT rules configuration may lead to charging wrong VAT for your products. Please fix them.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT charging rules [%rules]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Country/region</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Product categories</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT type</source>
<translation type="unfinished">Vrsta PDV-a</translation>
</message>
<message>
<source>Select rule for removal.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Any</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit rule.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no VAT charging rules.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected VAT charging rules.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New rule</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create a new VAT charging rule.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT charging rules (%rules)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/shop/vattype</name>
<message>
<source>VAT types [%vat_types]</source>
<translation>Vrste PDV-a [%vat_types]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Percentage</source>
<translation>Procenat</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select VAT type for removal.</source>
<translation>Izaberite tip poreza za uklanjanje.</translation>
</message>
<message>
<source>There are no VAT types.</source>
<translation>Nema tipova poreza.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected VAT types.</source>
<translation>Uklonite izabrane tipove poreza.</translation>
</message>
<message>
<source>New VAT type</source>
<translation>Novi tip poreza.</translation>
</message>
<message>
<source>Create a new VAT type.</source>
<translation>Kreiraj novi tip poreza.</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Click this button to store changes if you have modified any of the fields above.</source>
<translation>Kliknite na dugme za ฤuvanje izmena ako ste izmenili bilo koje polje.</translation>
</message>
<message>
<source>Input did not validate</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT types (%vat_types)</source>
<translation>Vrste PDV-a (%vat_types)</translation>
</message>
</context>
<context>
<name>design/admin/shop/wishlist</name>
<message>
<source>My wish list [%item_count]</source>
<translation>Moja lista ลพelja [%item_count]</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Quantity</source>
<translation>Koliฤina </translation>
</message>
<message>
<source>VAT</source>
<translation>PDV</translation>
</message>
<message>
<source>Price (ex. VAT)</source>
<translation>Cena bez PDV-a</translation>
</message>
<message>
<source>Price (inc. VAT)</source>
<translation>Cena s PDV-om</translation>
</message>
<message>
<source>Discount</source>
<translation>Popust</translation>
</message>
<message>
<source>Total price (ex. VAT)</source>
<translation>Ukupna cena (bez PDV-a)</translation>
</message>
<message>
<source>Total price (inc. VAT)</source>
<translation>Ukupna cena (sa PDV-om)</translation>
</message>
<message>
<source>Select item for removal.</source>
<translation>Izaberi element za brisanje.</translation>
</message>
<message>
<source>Selected options</source>
<translation>Izabrane opcije</translation>
</message>
<message>
<source>The wish list is empty.</source>
<translation>Lista ลพelja je prazna</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected items.</source>
<translation>Ukloni izabrane elemente.</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Click this button to store changes if you have modified quantity and/or option values.</source>
<translation>Kliknite ovo dugme da snimite izmene ako ste menjali koliฤini i/ili sadrลพaj.</translation>
</message>
<message>
<source>My wish list (%item_count)</source>
<translation>Moja lista ลพelja (%item_count)</translation>
</message>
</context>
<context>
<name>design/admin/state/edit</name>
<message>
<source>The content object state was successfully stored.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The content object state could not be stored.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Required data is either missing or is invalid</source>
<translation type="unfinished">Traลพeni podaci su pogreลกni ili nedostaju</translation>
</message>
<message>
<source>Edit content object state "%state_name"</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New content object state</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default language:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Description:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Save changes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel saving any changes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Save changes to this state.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/state/group</name>
<message>
<source>ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier</source>
<translation type="unfinished">Identifikator</translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Description</source>
<translation type="unfinished">Opis</translation>
</message>
<message>
<source>Object states in this group [%state_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object count</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Order</source>
<translation type="unfinished">Narudลพba</translation>
</message>
<message>
<source>Select content object state group for removal.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected states.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create new</source>
<translation type="unfinished">Kreiraj novo</translation>
</message>
<message>
<source>Create a new state.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update ordering</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update the order of the content object states in this group.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object states in this group (%state_count)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/state/group_edit</name>
<message>
<source>Edit content object state group "%group_name"</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New content object state group</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default language:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Description:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Save changes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Save changes to this state group.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel saving any changes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create</source>
<translation type="unfinished">Kreiraj</translation>
</message>
<message>
<source>Create this state group.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel creating this state group.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/state/groups</name>
<message>
<source>The content object state group was successfully stored.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The content object state group could not be stored.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Required data is either missing or is invalid</source>
<translation type="unfinished">Traลพeni podaci su pogreลกni ili nedostaju</translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier</source>
<translation type="unfinished">Identifikator</translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select content object state group for removal.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected state groups.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create new</source>
<translation type="unfinished">Kreiraj novo</translation>
</message>
<message>
<source>Create a new state group.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/state/view</name>
<message>
<source>ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier</source>
<translation type="unfinished">Identifikator</translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Description</source>
<translation type="unfinished">Opis</translation>
</message>
</context>
<context>
<name>design/admin/state_groups</name>
<message>
<source>Content object state groups [%group_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Content object state groups (%group_count)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/trigger/list</name>
<message>
<source>Module</source>
<translation>Modul</translation>
</message>
<message>
<source>Function</source>
<translation>Funkcija</translation>
</message>
<message>
<source>Connection type</source>
<translation>Vrsta konekcije</translation>
</message>
<message>
<source>Workflow</source>
<translation>Radni tok</translation>
</message>
<message>
<source>No workflow</source>
<translation>Nema radnog toka</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Workflow triggers [%trigger_count]</source>
<translation>Okidaฤi radnog toka [%trigger_count]</translation>
</message>
<message>
<source>Select the workflow that should be triggered %type the %function function is executed within the %module module.</source>
<translation>Izaberite radni tok koji ฤe okidaฤ %type sa funkcijom %function izvrลกiti unutar modula %module.</translation>
</message>
<message>
<source>Click this button to store changes if you have modified any of the fields above.</source>
<translation>Kliknite na dugme za ฤuvanje izmena ako ste izmenili bilo koje polje.</translation>
</message>
<message>
<source>Workflow triggers (%trigger_count)</source>
<translation>Okidaฤi radnog toka (%trigger_count)</translation>
</message>
</context>
<context>
<name>design/admin/url/edit</name>
<message>
<source>Address</source>
<translation>Adresa</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>URL</source>
<translation>URL</translation>
</message>
<message>
<source>Edit URL #%url_id</source>
<translation>Izmeni URL #%url_id</translation>
</message>
</context>
<context>
<name>design/admin/url/list</name>
<message>
<source>URL</source>
<translation>URL</translation>
</message>
<message>
<source>Valid links [%url_list_count]</source>
<translation type="obsolete">Vaลพeฤi URLovi [%url_list_count]</translation>
</message>
<message>
<source>Invalid links [%url_list_count]</source>
<translation type="obsolete">Nevaลพeฤi URLovi [%url_list_count]</translation>
</message>
<message>
<source>All links [%url_list_count]</source>
<translation type="obsolete">Svi URLovi [%url_list_count]</translation>
</message>
<message>
<source>All</source>
<translation>Svi</translation>
</message>
<message>
<source>Valid</source>
<translation>Vaลพeฤi</translation>
</message>
<message>
<source>Invalid</source>
<translation>Nevaลพeฤi</translation>
</message>
<message>
<source>Address</source>
<translation>Adresa</translation>
</message>
<message>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<source>Checked</source>
<translation>Oznaฤeno</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>open</source>
<translation>otvori</translation>
</message>
<message>
<source>Never</source>
<translation>Nikad</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nepoznat</translation>
</message>
<message>
<source>Show all URLs.</source>
<translation>Prikaลพi sve URLove.</translation>
</message>
<message>
<source>Show only invalid URLs.</source>
<translation>Prikaลพi samo nevaลพeฤe URLove.</translation>
</message>
<message>
<source>Show only valid URLs.</source>
<translation>Prikaลพi samo vaลพeฤe URLove.</translation>
</message>
<message>
<source>View information about URL.</source>
<translation>Prikaลพi informaciju o URLu.</translation>
</message>
<message>
<source>Open URL in new window.</source>
<translation>Otvori URL u novom prozoru.</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Edit URL.</source>
<translation>Izmeni URL.</translation>
</message>
<message>
<source>The requested list is empty.</source>
<translation>Zatraลพena lista je prazna.</translation>
</message>
<message>
<source>Valid links (%url_list_count)</source>
<translation>Vaลพeฤi URLovi (%url_list_count)</translation>
</message>
<message>
<source>Invalid links (%url_list_count)</source>
<translation>Nevaลพeฤi URLovi (%url_list_count)</translation>
</message>
<message>
<source>All links (%url_list_count)</source>
<translation>Svi URLovi (%url_list_count)</translation>
</message>
<message>
<source>Valid URLs [%url_list_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid URLs [%url_list_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All URLs [%url_list_count]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/url/view</name>
<message>
<source>URL #%url_id</source>
<translation>URL #%url_id</translation>
</message>
<message>
<source>Last modified</source>
<translation>Poslednja promena</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nepoznat</translation>
</message>
<message>
<source>Address</source>
<translation>Adresa</translation>
</message>
<message>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<source>Valid</source>
<translation>Vaลพeฤi</translation>
</message>
<message>
<source>Invalid</source>
<translation>Nevaลพeฤi</translation>
</message>
<message>
<source>Last checked</source>
<translation>Poslednja provera</translation>
</message>
<message>
<source>This URL has not been checked.</source>
<translation>URL nije proveren.</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Objects using URL #%url_id [%url_count]</source>
<translation>Objekti koji koriste URL #%url_id [%url_count]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>URL #%url_id is not in use by any objects.</source>
<translation>URL #%url_id ne koristi ni jedan objekt.</translation>
</message>
<message>
<source>URL</source>
<translation>URL</translation>
</message>
<message>
<source>Edit this URL.</source>
<translation>Izmeni URL.</translation>
</message>
<message>
<source>Edit <%object_name>.</source>
<translation>Izmeni <%object_name>.</translation>
</message>
<message>
<source>Draft</source>
<translation>Skica</translation>
</message>
<message>
<source>Published</source>
<translation>Objavljeno</translation>
</message>
<message>
<source>Pending</source>
<translation>Na ฤekanju</translation>
</message>
<message>
<source>Archived</source>
<translation>Arhivirano</translation>
</message>
<message>
<source>Rejected</source>
<translation>Odbijeno</translation>
</message>
<message>
<source> (in trash)</source>
<translation>(u smeฤu)</translation>
</message>
<message>
<source>All</source>
<translation>Sve</translation>
</message>
<message>
<source>View the contents of version #%version_number.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Objects using URL #%url_id (%url_count)</source>
<translation>Objekti koji koriste URL #%url_id (%url_count)</translation>
</message>
</context>
<context>
<name>design/admin/user</name>
<message>
<source>Activate account</source>
<translation>Aktivirajte raฤun</translation>
</message>
<message>
<source>User registered</source>
<translation>Korisnik registrovan</translation>
</message>
<message>
<source>Your account is now activated.</source>
<translation type="obsolete">Vaลก je raฤun aktiviran.</translation>
</message>
<message>
<source>Sorry, the key submitted was not a valid key. Account was not activated.</source>
<translation type="obsolete">Naลพalost, uneseni kljuฤ nije odgovarajuฤi kljuฤ. Raฤun nije aktiviran.</translation>
</message>
<message>
<source>Your account was successfully created.</source>
<translation>Vaลก je raฤun uspeลกno otvoren.</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Your account was successfully created. An email will be sent to the specified
email address. Follow the instructions in that mail to activate
your account.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/user/login</name>
<message>
<source>The system could not log you in.</source>
<translation>Nije moguฤe spojiti vas na sistem.</translation>
</message>
<message>
<source>Make sure that the username and password is correct.</source>
<translation>Proverite je li vaลกe korisniฤko ime i lozinka ispravna.</translation>
</message>
<message>
<source>Please try again or contact the site administrator.</source>
<translation>Molimo probajte ponovo ili kontaktirajte administratora <%administrator>.</translation>
</message>
<message>
<source>Access denied!</source>
<translation>Uskraฤen pristup!</translation>
</message>
<message>
<source>Please contact the site administrator.</source>
<translation>Molimo kontaktirajte administratora.</translation>
</message>
<message>
<source>Use the "Register" button to create a new account.</source>
<translation>Koristite "Prijavite se" dugme za kreiranje novog korisniฤkog raฤuna.</translation>
</message>
<message>
<source>Username</source>
<translation>Korisniฤko ime</translation>
</message>
<message>
<source>Password</source>
<translation>Lozinka</translation>
</message>
<message>
<source>Log in</source>
<comment>Login button</comment>
<translation>Prijava</translation>
</message>
<message>
<source>Click here to log in using the username/password combination entered in the fields above.</source>
<translation>Kliknite ovde za prijavu koristeฤi username/lozinka kombinaciju unesenu u gornja polja.</translation>
</message>
<message>
<source>Register</source>
<comment>Register button</comment>
<translation>Registruj se</translation>
</message>
<message>
<source>Click here to create a new account.</source>
<translation>Kliknite ovde za kreiranje novog korisniฤkog raฤuna.</translation>
</message>
<message>
<source>"%user_login" is not allowed to log in because failed login attempts by this user exceeded allowable number of failed login attempts!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All letters must be entered in the correct case.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to access <%siteaccess_name>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Log in to the Administration Interface of eZ Publish</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please enter a valid username/password combination then click "Log in".</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The user will not be allowed to login after <b>%max_number_failed</b> failed login attempts.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter a valid username in this field.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enter a valid password in this field.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remember me</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/user/password</name>
<message>
<source>Username</source>
<translation>Korisniฤko ime</translation>
</message>
<message>
<source>Old password</source>
<translation>Stara lozinka</translation>
</message>
<message>
<source>New password</source>
<translation>Nova lozinka</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>The password could not be changed.</source>
<translation>Lozinka ne moลพe biti zamenjena.</translation>
</message>
<message>
<source>The old password was either missing or incorrect.</source>
<translation>Stara lozinka je neispravna ili nedostaje.</translation>
</message>
<message>
<source>Please retype the old password and try again.</source>
<translation>Molimo ponovo unesite staru lozinku.</translation>
</message>
<message>
<source>The new passwords did not match.</source>
<translation>Nova lozinka ne odgovara.</translation>
</message>
<message>
<source>Please retype the new passwords and try again.</source>
<translation>Molimo ponovo unesite novu lozinku.</translation>
</message>
<message>
<source>The password was successfully changed.</source>
<translation>Lozinka je uspeลกno promenjena.</translation>
</message>
<message>
<source>Change password for <%username></source>
<translation>Izmena lozinke za korisnika <%username></translation>
</message>
<message>
<source>Confirm new password</source>
<translation>Potvrdi novu lozinku</translation>
</message>
<message>
<source>The password must be at least %1 characters long.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/user/register</name>
<message>
<source>The information could not be stored...</source>
<translation>Podaci nisu saฤuvani...</translation>
</message>
<message>
<source>The following information is either incorrect or missing</source>
<translation>Sledeฤa informacija nedostaje ili je netaฤna</translation>
</message>
<message>
<source>Please correct the inputs (marked with red labels) and try again.</source>
<translation>Molimo ispravite unos (oznaฤeno sa crvenim) i probajte ponovo.</translation>
</message>
<message>
<source>Register new user</source>
<translation>Registruj novog korisnika</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Unable to register new user</source>
<translation>Nije moguฤe registrovati novog korisnika</translation>
</message>
<message>
<source>Back</source>
<translation>Nazad</translation>
</message>
</context>
<context>
<name>design/admin/user/setting</name>
<message>
<source>Maximum concurrent logins</source>
<translation>Maksimalan broj istih logovanja</translation>
</message>
<message>
<source>Enable user account</source>
<translation>Unesite korisniฤki raฤun</translation>
</message>
<message>
<source>Use this checkbox to enable or disable the user account.</source>
<translation>Koristite checkbox za aktivaciju/deaktivaciju korisniฤkog raฤuna.</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>This functionality is not currently not available. [Use this field to specify the maximum allowed number of concurrent logins.]</source>
<translation>Ova funkcionalnost trenutno nije dostupna (U ovo polje unesite maksimalan broj konkurentnih spajanja.)</translation>
</message>
<message>
<source>User settings for <%user_name></source>
<translation>Korisniฤke podeลกavanja za <%user_name></translation>
</message>
<message>
<source>Account has been locked because the maximum number of failed login attempts was exceeded.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Maximum number of failed login attempts</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Number of failed login attempts for this user</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset</source>
<translation type="unfinished">Ponovo postavi</translation>
</message>
</context>
<context>
<name>design/admin/visual/menuconfig</name>
<message>
<source>Menu management</source>
<translation>Upravljanje menijem</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Menu positioning</source>
<translation>Pozicija menija</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Click here to store the changes if you have modified the menu settings above.</source>
<translation>Kliknite ovde za snimanje izmena.</translation>
</message>
<message>
<source>Siteaccess</source>
<translation type="unfinished">Siteaccess</translation>
</message>
</context>
<context>
<name>design/admin/visual/templatecreate</name>
<message>
<source>Could not create template, permission denied.</source>
<translation>Nije bilo moguฤe kreirati ลกablon, uskraฤena dozvola.</translation>
</message>
<message>
<source>Invalid name. You can only use the characters a-z, numbers and _.</source>
<translation>Netaฤno ime. Moลพete koristiti iskljuฤivo znakove a-z, brojeve i_.</translation>
</message>
<message>
<source>Create new template override for <%template_name></source>
<translation>Kreiraj novi ลกablon za zaobilaลพenje <%template_name></translation>
</message>
<message>
<source>The newly created template file will be placed in</source>
<translation>Novo kreirana datoteka ลกablona biฤe saฤuvana u</translation>
</message>
<message>
<source>Filename</source>
<translation>Datoteka</translation>
</message>
<message>
<source>Override keys</source>
<translation>Kljuฤevi zaobilaska</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>All classes</source>
<translation>Sve klase</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>All sections</source>
<translation>Svi segmenti</translation>
</message>
<message>
<source>Node ID</source>
<translation>ฤvor ID</translation>
</message>
<message>
<source>Base template on</source>
<translation>Utemeljen ลกablon na</translation>
</message>
<message>
<source>Empty file</source>
<translation>Prazna datoteka</translation>
</message>
<message>
<source>Copy of default template</source>
<translation>Kopija osnovnog ลกablona</translation>
</message>
<message>
<source>Container (with children)</source>
<translation>Kontejner (sa decom)</translation>
</message>
<message>
<source>View (without children)</source>
<translation>Prikaz (bez dece)</translation>
</message>
<message>
<source>Any</source>
<translation>Sve</translation>
</message>
<message>
<source>Object</source>
<translation>Objekt</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
</context>
<context>
<name>design/admin/visual/templateedit</name>
<message>
<source>Edit template: <%template></source>
<translation>Izmeni ลกablon: <%template></translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Click this button to save the contents of the text field above to the template file.</source>
<translation>Kliknite na dugme za snimanje sadrลพaja tekstualnog polja u datoteku ลกablona.</translation>
</message>
<message>
<source>Back to overrides</source>
<translation>Povratak na zaobilaske</translation>
</message>
<message>
<source>Back to override overview.</source>
<translation>Nazad na pregled zaobilazaka.</translation>
</message>
<message>
<source>The web server does not have write access to the requested template.</source>
<translation>Web server nema ovlaลกฤenja pisanja u zatraลพeni ลกablon.</translation>
</message>
<message>
<source>The web server does not have read access to the requested template.</source>
<translation>Web server nema ovlaลกฤenja ฤitanja zatraลพenog ลกablon.</translation>
</message>
<message>
<source>The requested template does not exist or is not being used as an override.</source>
<translation>Zatraลพeni ลกablon ne postoji ili nije zaobilazni ลกablon.</translation>
</message>
<message>
<source>Edit <%template_name> [Template]</source>
<translation>Izmeni <%template_name> [ล ablon]</translation>
</message>
<message>
<source>Requested template</source>
<translation>Traลพeni ลกablon</translation>
</message>
<message>
<source>Siteaccess</source>
<translation>Siteaccess</translation>
</message>
<message>
<source>Open as read only</source>
<translation>Otvori samo za ฤitanje</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>You do not have permission to save the contents of the text field above to the template file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The template cannot be edited.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Override template</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/visual/templatelist</name>
<message>
<source>Template</source>
<translation>ล ablon</translation>
</message>
<message>
<source>Design resource</source>
<translation>Izvor dizajna</translation>
</message>
<message>
<source>Manage overrides for template.</source>
<translation>Upravljanje zaobilascima ลกablona.</translation>
</message>
<message>
<source>Most common templates</source>
<translation>Najuobiฤajeniji ลกabloni</translation>
</message>
<message>
<source>Template list</source>
<translation type="unfinished">Lista ลกablona</translation>
</message>
</context>
<context>
<name>design/admin/visual/templateview</name>
<message>
<source>Overrides for <%template_name> template in <%current_siteaccess> siteaccess [%override_count]</source>
<translation>Zaobilazni ลกablon <%template_name> u tekuฤem <%current_siteaccess> [%override_count]</translation>
</message>
<message>
<source>Default template resource</source>
<translation>Osnovni izvor ลกablona</translation>
</message>
<message>
<source>Siteaccess</source>
<translation>Siteaccess</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>File</source>
<translation>Datoteka</translation>
</message>
<message>
<source>Match conditions</source>
<translation>Uskladi uslove</translation>
</message>
<message>
<source>Priority</source>
<translation>Prioritet</translation>
</message>
<message>
<source>Edit override template.</source>
<translation>Izmeni zaobilazni ลกablon.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected template overrides.</source>
<translation>Ukloni odabrani zaobilazni ลกablon.</translation>
</message>
<message>
<source>New override</source>
<translation>Novi zaobilazak</translation>
</message>
<message>
<source>Create a new template override.</source>
<translation>Kreiraj novi zaobilazni ลกablon.</translation>
</message>
<message>
<source>Update priorities</source>
<translation>Aลพuriraj prioritete</translation>
</message>
<message>
<source>The overrides could not be removed.</source>
<translation>Zaobilasci ne mogu biti uklonjeni.</translation>
</message>
<message>
<source>The following files and override rules could not be removed because of insufficient file permissions</source>
<translation>Nemate odgovarajuฤa ovlaลกฤenja za uklanjanje datoteka i zaobilaznih uloga</translation>
</message>
<message>
<source>No file matched</source>
<translation>Datoteka nije pronaฤena</translation>
</message>
<message>
<source>The override.ini file could not be modified because of insufficient permission.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no overrides for the <%template_name> template.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Overrides for <%template_name> template in <%current_siteaccess> siteaccess (%override_count)</source>
<translation>Zaobilazni ลกablon <%template_name> u tekuฤem <%current_siteaccess> (%override_count)</translation>
</message>
</context>
<context>
<name>design/admin/visual/toolbar</name>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>True</source>
<translation>Taฤno</translation>
</message>
<message>
<source>False</source>
<translation>Netaฤno</translation>
</message>
<message>
<source>Yes</source>
<translation>Da</translation>
</message>
<message>
<source>No</source>
<translation>Ne</translation>
</message>
<message>
<source>There are currently no tools in this toolbar</source>
<translation>Trenutno nema alata u alatnoj traci</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Update priorities</source>
<translation>Aลพuriraj prioritete</translation>
</message>
<message>
<source>Add Tool</source>
<translation>Dodaj alat</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Click this button to store changes if you have modified the parameters above.</source>
<translation>Kliknite na dugme za ฤuvanje izmena ako ste izmenili bilo koje polje.</translation>
</message>
<message>
<source>Back to toolbars</source>
<translation>Nazad na alatnu traku</translation>
</message>
<message>
<source>Go back to the toolbar list.</source>
<translation>Nazad na listu alata.</translation>
</message>
<message>
<source>Toolbar management</source>
<translation>Upravljanje alatnom trakom</translation>
</message>
<message>
<source>Current siteaccess</source>
<translation>Trenutni SiteAccess</translation>
</message>
<message>
<source>Select siteaccess</source>
<translation>Izaberite siteaccess</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Available toolbars for the <%siteaccess> siteaccess</source>
<translation>Dostupne alatne trake za <%siteaccess></translation>
</message>
<message>
<source>Tool list for <Toolbar_%toolbar_position></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Siteaccess</source>
<translation type="unfinished">Siteaccess</translation>
</message>
</context>
<context>
<name>design/admin/workflow/edit</name>
<message>
<source>Input did not validate</source>
<translation>Unos nije ispravan</translation>
</message>
<message>
<source>Data requires fixup</source>
<translation>Podaci zahtevaju popravljanje</translation>
</message>
<message>
<source>Edit <%workflow_name> [Workflow]</source>
<translation>Izmeni <%workflow_name> [Radni tok]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Move down</source>
<translation>Pomakni dole</translation>
</message>
<message>
<source>Move up</source>
<translation>Pomakni gore</translation>
</message>
<message>
<source>Description / comments</source>
<translation>Opis / komentari</translation>
</message>
<message>
<source>There are no events within this workflow.</source>
<translation>Nema dogaฤaja unutar radnog toka.</translation>
</message>
<message>
<source>Remove selected events</source>
<translation>Ukloni izabrane dogaฤaje</translation>
</message>
<message>
<source>Add event</source>
<translation>Dodaj dogaฤaj</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>The workflow could not be stored.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The following information is either missing or invalid</source>
<translation type="unfinished">Sledeฤa informacija nedostaje ili je netaฤna</translation>
</message>
<message>
<source>Error : Could not load workflow event "%eventtype" (event type not available)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hint : This can happen when a workflow extension has been disabled</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/workflow/eventtype/edit</name>
<message>
<source>Affected sections</source>
<translation>Koriลกฤeni segmenti</translation>
</message>
<message>
<source>All sections</source>
<translation>Sve sekcije</translation>
</message>
<message>
<source>Classes to run workflow</source>
<translation>Klase za radni tok</translation>
</message>
<message>
<source>All classes</source>
<translation>Sve klase</translation>
</message>
<message>
<source>Users without workflow IDs</source>
<translation>Korisnici bez identifikacija radnog toka</translation>
</message>
<message>
<source>Workflow to run</source>
<translation>Radni tok koji treba izvrลกiti</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>All</source>
<translation>Sve</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Update attributes</source>
<translation>Aลพuriraj atribute</translation>
</message>
<message>
<source>Attribute</source>
<translation>Atribut</translation>
</message>
<message>
<source>Select attribute</source>
<translation>Izaberi atribut</translation>
</message>
<message>
<source>Class/attribute combinations [%count]</source>
<translation>Klasa/atribut kombinacija [%count]</translation>
</message>
<message>
<source>There are no combinations</source>
<translation>Nema kombinacija</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Modify the objects' publishing dates</source>
<translation>Izmeni datume objavljenih objekata</translation>
</message>
<message>
<source>Please install a payment extension first.</source>
<translation>Molimo prvo instaliraj ekstenzije za plaฤanje.</translation>
</message>
<message>
<source>User</source>
<translation>Korisnik</translation>
</message>
<message>
<source>Excluded user groups ( users in these groups do not need to have their content approved )</source>
<translation>Iskljuฤene grupe korisnika (korisnici u ovim grupama ne treba da imaju potvrฤivanje sadrลพaja)</translation>
</message>
<message>
<source>User and user groups</source>
<translation>Korisnici i grupe korisnika</translation>
</message>
<message>
<source>No groups selected.</source>
<translation>Nema izabranih grupa</translation>
</message>
<message>
<source>Add groups</source>
<translation>Dodaj grupe</translation>
</message>
<message>
<source>Affected languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Affected versions</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All versions</source>
<translation type="unfinished">Sve verzije</translation>
</message>
<message>
<source>Publishing new object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Updating existing object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Users who approve content</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No users selected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add users</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Groups who approve content</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Group</source>
<translation type="unfinished">Grupa</translation>
</message>
<message>
<source>You have to create a workflow before using this event.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no payment gateway extensions installed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class/attribute combinations (%count)</source>
<translation>Klasa/atribut kombinacija (%count)</translation>
</message>
</context>
<context>
<name>design/admin/workflow/groupedit</name>
<message>
<source>Edit <%group_name> [Workflow group]</source>
<translation>Izmeni <%group_name> [Grupa radnog toka]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
</context>
<context>
<name>design/admin/workflow/grouplist</name>
<message>
<source>Workflow groups [%groups_count]</source>
<translation>Grupe radnih tokova [%groups_count]</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>There are no workflow groups.</source>
<translation>Nema grupa radnih tokova.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected workflow groups.</source>
<translation>Ukloni izabrane grupe radnih tokova.</translation>
</message>
<message>
<source>New workflow group</source>
<translation>Nova grupa radnih tokova</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select workflow group for removal.</source>
<translation>Izaberi grupu radnog toka za brisanje.</translation>
</message>
<message>
<source>Edit the <%workflow_group_name> workflow group.</source>
<translation>Izmeni grupu <%workflow_group_name>.</translation>
</message>
<message>
<source>Create a new workflow group.</source>
<translation>Kreiraj novu grupu radnog toka.</translation>
</message>
<message>
<source>Workflow groups (%groups_count)</source>
<translation>Grupe radnih tokova (%groups_count)</translation>
</message>
</context>
<context>
<name>design/admin/workflow/proccesslist</name>
<message>
<source>There are no workflow processes in progress.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/workflow/processlist</name>
<message>
<source>Workflow processes [%trigger_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[%process_count]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Workflow</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>User</source>
<translation type="unfinished">Korisnik</translation>
</message>
<message>
<source>Created</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Process status</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Last event</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Current event</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Workflow processes (%trigger_count)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(%process_count)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin/workflow/view</name>
<message>
<source>Input did not validate</source>
<translation>Unos nije ispravan</translation>
</message>
<message>
<source>%workflow_name [Workflow]</source>
<translation>%workflow_name [Radni tok]</translation>
</message>
<message>
<source>Last modified</source>
<translation>Poslednja promena</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Member of groups [%group_count]</source>
<translation>Pripada grupama [%group_count]</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Group</source>
<translation>Grupa</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Add to group</source>
<translation>Dodaj u grupu</translation>
</message>
<message>
<source>No group</source>
<translation>Nema grupe</translation>
</message>
<message>
<source>Events [%event_count]</source>
<translation>Dogaฤaji [%event_count]</translation>
</message>
<message>
<source>Position</source>
<translation>Pozicija</translation>
</message>
<message>
<source>Description</source>
<translation>Opis</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Additional information</source>
<translation>Dodatni podaci</translation>
</message>
<message>
<source>Member of groups (%group_count)</source>
<translation>Pripada grupama (%group_count)</translation>
</message>
<message>
<source>Events (%event_count)</source>
<translation>Dogaฤaji (%event_count)</translation>
</message>
</context>
<context>
<name>design/admin/workflow/workflowlist</name>
<message>
<source>%group_name [Workflow group]</source>
<translation>%group_name [Grupa radnih tokova]</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Workflows [%workflow_count]</source>
<translation>Radni tokovi [%workflow_count]</translation>
</message>
<message>
<source>Modifier</source>
<translation>Modifikator</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>There are no workflows in this group.</source>
<translation>Nema radnih tokova u grupi.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>New workflow</source>
<translation>Novi radni tok</translation>
</message>
<message>
<source>Edit this workflow group.</source>
<translation>Izmeni grupu radnog toka.</translation>
</message>
<message>
<source>Remove this workflow group.</source>
<translation>Ukloni grupu radnog toka.</translation>
</message>
<message>
<source>Back to workflow groups.</source>
<translation>Nazad u grupu radnog toka.</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Select workflow for removal.</source>
<translation>Izaberi radni tok za brisanje.</translation>
</message>
<message>
<source>Edit the <%workflow_name> workflow.</source>
<translation>Izmeni radni tok <%workflow_name>.</translation>
</message>
<message>
<source>Remove selected workflows.</source>
<translation>Ukloni izabrane radne tokove.</translation>
</message>
<message>
<source>Create a new workflow.</source>
<translation>Kreiraj novi radni tok.</translation>
</message>
<message>
<source>Workflows (%workflow_count)</source>
<translation>Radni tokovi (%workflow_count)</translation>
</message>
</context>
<context>
<name>design/admin2/ajaxupload</name>
<message>
<source><em>%file</em> has successfully been uploaded.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin2/ajaxuploader</name>
<message>
<source>Go to the parent level</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Step 1/3: Upload a file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Type</source>
<translation type="unfinished">Vrsta</translation>
</message>
<message>
<source>Section</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>prev</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>next</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Step 2/3: Choose a location for the new '%class' object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose a location for the '%class' object that is going to be created from it.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose this location</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Step 3/3: Preview of '%name' (%class)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File</source>
<translation type="unfinished">Datoteka</translation>
</message>
<message>
<source>Required</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The name will be autogenerated</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload the file</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/admin2/content/datatype</name>
<message>
<source>Upload a file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload a file to create a new object and add it to the relation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose a location</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Some required fields are empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unable to parse the JSON response.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload a file and add the resulting object in the relation</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/base</name>
<message>
<source>Back to poll</source>
<translation>Povratak na anketu</translation>
</message>
<message>
<source>Subject</source>
<translation>Naslov</translation>
</message>
<message>
<source>Message</source>
<translation>Poruka</translation>
</message>
<message>
<source>Notify me about updates</source>
<translation>Obavesti me o novostima</translation>
</message>
<message>
<source>Sticky</source>
<translation>Nalepnica</translation>
</message>
<message>
<source>Create new weblog</source>
<translation>Kreiraj novi mreลพni dnevnik</translation>
</message>
<message>
<source>Read more...</source>
<translation>Proฤitaj viลกe...</translation>
</message>
<message>
<source>Contact information</source>
<translation>Kontakt podaci</translation>
</message>
<message>
<source>Address</source>
<translation>Adresa</translation>
</message>
<message>
<source>Additional information</source>
<translation>Dodatni podaci</translation>
</message>
<message>
<source>Tip a friend</source>
<translation>Poลกaljite na mail</translation>
</message>
<message>
<source>Download PDF</source>
<translation>Uฤitaj PDF</translation>
</message>
<message>
<source>Download PDF version of this page</source>
<translation>Uฤitaj PDF verziju ove stranice</translation>
</message>
<message>
<source>Comments</source>
<translation>Komentari</translation>
</message>
<message>
<source>New Comment</source>
<translation>Novi komentar</translation>
</message>
<message>
<source>You are not allowed to create comments.</source>
<translation>Nemate dozvolu za unos komentara.</translation>
</message>
<message>
<source>Contacts</source>
<translation>Kontakt osobe</translation>
</message>
<message>
<source>Send form</source>
<translation>Poลกalji</translation>
</message>
<message>
<source>New topic</source>
<translation>Nova tema</translation>
</message>
<message>
<source>Keep me updated</source>
<translation>Redovno me obaveลกtavaj</translation>
</message>
<message>
<source>Topic</source>
<translation>Tema</translation>
</message>
<message>
<source>Replies</source>
<translation>Odgovori</translation>
</message>
<message>
<source>Author</source>
<translation>Autor</translation>
</message>
<message>
<source>Last reply</source>
<translation>Poslednji odgovor</translation>
</message>
<message>
<source>Pages</source>
<translation>Stranice</translation>
</message>
<message>
<source>Message preview</source>
<translation>Pregled poruke</translation>
</message>
<message>
<source>Previous topic</source>
<translation>Prethodna tema</translation>
</message>
<message>
<source>Next topic</source>
<translation>Sledeฤa tema</translation>
</message>
<message>
<source>New reply</source>
<translation>Novi odgovor</translation>
</message>
<message>
<source>here</source>
<translation>ovde</translation>
</message>
<message>
<source>Location</source>
<translation>Lokacija</translation>
</message>
<message>
<source>Moderated by</source>
<translation>Promenio</translation>
</message>
<message>
<source>View as slideshow</source>
<translation>Pregledaj u nizu</translation>
</message>
<message>
<source>Previous image</source>
<translation>Prethodna slika</translation>
</message>
<message>
<source>Next image</source>
<translation>Sledeฤa slika</translation>
</message>
<message>
<source>Result</source>
<translation>Rezultat</translation>
</message>
<message>
<source>Add to basket</source>
<translation>Dodaj u korpu</translation>
</message>
<message>
<source>Download this product sheet as PDF</source>
<translation>Uฤitaj ovu stranicu u PDF formatu</translation>
</message>
<message>
<source>Product reviews</source>
<translation>Ocena proizvoda</translation>
</message>
<message>
<source>New review</source>
<translation>Nova ocena</translation>
</message>
<message>
<source>People who bought this also bought</source>
<translation>Osobe koje su ga kupile takoฤe su kupile</translation>
</message>
<message>
<source>Previous entry</source>
<translation>Prethodni unos</translation>
</message>
<message>
<source>Next entry</source>
<translation>Sledeฤi unos</translation>
</message>
<message>
<source>New comment</source>
<translation>Novi komentar</translation>
</message>
<message>
<source>More...</source>
<translation>Viลกe...</translation>
</message>
<message>
<source>View flash</source>
<translation>Pregledaj Flash</translation>
</message>
<message>
<source>View list</source>
<translation>Detaljnije</translation>
</message>
<message>
<source>Enter forum</source>
<translation>Ukljuฤi se u forum</translation>
</message>
<message>
<source>Enter gallery</source>
<translation>Pregledaj galeriju</translation>
</message>
<message>
<source>Vote</source>
<translation>Glasaj</translation>
</message>
<message>
<source>More information</source>
<translation>Dodatne informacije</translation>
</message>
<message>
<source>View movie</source>
<translation>Pregledaj film</translation>
</message>
<message>
<source>in</source>
<translation>u</translation>
</message>
<message>
<source>View comments</source>
<translation>Pregledaj komentare</translation>
</message>
<message>
<source>Top menu</source>
<translation>Glavni menu</translation>
</message>
<message>
<source>Sub menu</source>
<translation>Podmenu</translation>
</message>
<message>
<source>Left menu</source>
<translation>Levi menu</translation>
</message>
<message>
<source>Left sub menu</source>
<translation>Levi podmenu</translation>
</message>
<message>
<source>Details...</source>
<translation>Detalji...</translation>
</message>
<message>
<source>Poll %pollname</source>
<translation>Anketa %pollname</translation>
</message>
<message>
<source>Results</source>
<translation>Rezultati</translation>
</message>
<message>
<source>Votes</source>
<translation>Glasova</translation>
</message>
<message>
<source>%count total votes</source>
<translation>ukupno glasova: %count</translation>
</message>
<message>
<source>Collected information from %1</source>
<translation>Podaci skupljeni sa %1</translation>
</message>
<message>
<source>The following information was collected</source>
<translation>Skupljene su sledeฤe informacije</translation>
</message>
<message>
<source>The file could not be found.</source>
<translation>Datoteka ne moลพe biti naฤena.</translation>
</message>
<message>
<source>New row</source>
<translation>Novi red</translation>
</message>
<message>
<source>Remove Selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Price</source>
<translation>Cena</translation>
</message>
<message>
<source>Your price</source>
<translation>Vaลกa cena</translation>
</message>
<message>
<source>You save</source>
<translation>Vaลกa uลกteda</translation>
</message>
<message>
<source>Edit %1 - %2</source>
<translation>Izmeni: %1 - %2</translation>
</message>
<message>
<source>Send for publishing</source>
<translation>Objavi</translation>
</message>
<message>
<source>Discard</source>
<translation>Odbaci</translation>
</message>
<message>
<source>Publish</source>
<translation>Objavi</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Post</source>
<translation>Poลกalji</translation>
</message>
<message>
<source>Preview</source>
<translation>Pregledaj</translation>
</message>
<message>
<source>Latest from</source>
<translation>Najnovije od</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Number of Topics</source>
<translation>Broj tema</translation>
</message>
<message>
<source>Number of Posts</source>
<translation>Broj poslanih</translation>
</message>
<message>
<source>%count votes</source>
<translation>%count glasova</translation>
</message>
<message>
<source>Author: </source>
<translation>Autor:</translation>
</message>
<message>
<source>#page of #total</source>
<translation>#page od #total</translation>
</message>
<message>
<source>Search</source>
<translation>Pretraลพi</translation>
</message>
<message>
<source>For more options try the %1Advanced search%2</source>
<comment>The parameters are link start and end tags.</comment>
<translation>Za viลกe opcija kod pretrage koristite %1Napredno pretraลพivanje%2</translation>
</message>
<message>
<source>The following words were excluded from the search</source>
<translation>Sledeฤe reฤi iskljuฤene su iz pretraลพivanja</translation>
</message>
<message>
<source>No results were found when searching for "%1"</source>
<translation>Niลกta nije pronaฤeno za upit ''%1"</translation>
</message>
<message>
<source>Search tips</source>
<translation>Saveti za pretraลพivanje</translation>
</message>
<message>
<source>Check spelling of keywords.</source>
<translation>Proverite jeste li ispravno napisali kljuฤne reฤi.</translation>
</message>
<message>
<source>Try more general keywords.</source>
<translation>Pokuลกajte s uopลกtenijim kljuฤnim reฤima.</translation>
</message>
<message>
<source>Search for "%1" returned %2 matches</source>
<translation>Pronaฤeno je %2 rezultata koji su zadovoljili kriterijume pretraลพivanja "%1"</translation>
</message>
<message>
<source>Previous</source>
<translation>Nazad</translation>
</message>
<message>
<source>Next</source>
<translation>Napred</translation>
</message>
<message>
<source>Anonymous users are not allowed to vote in this poll. Please log in.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have already voted in this poll.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>N/A</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your email address</source>
<translation type="unfinished">Vaลกa e-mail adresa</translation>
</message>
<message>
<source>You need to be logged in to get access to the forums. Log in %login_link_start%here%login_link_end%</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You need to be logged in to get access to the forums. Log in</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reply to:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Try changing some keywords eg. &quot;car&quot; instead of &quot;cars&quot;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Fewer keywords result in more matches. Try reducing keywords until you get a result.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Powered by %linkStartTag eZ Publish&reg;&trade; open source content management system %linkEndTag and development framework.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Powered by %linkStartTag eZ Publish&reg; open source content management system %linkEndTag and development framework.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/base/shop</name>
<message>
<source>Quantity</source>
<translation>Koliฤina </translation>
</message>
<message>
<source>Price</source>
<translation>Cena</translation>
</message>
<message>
<source>Basket</source>
<translation>Korpa</translation>
</message>
<message>
<source>VAT</source>
<translation>PDV</translation>
</message>
<message>
<source>Discount</source>
<translation>Popust</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Selected options</source>
<translation>Izabrane opcije</translation>
</message>
<message>
<source>Checkout</source>
<translation>Naplata</translation>
</message>
<message>
<source>Continue shopping</source>
<translation>Nastavi kupovinu</translation>
</message>
<message>
<source>Store quantities</source>
<translation>Koliฤine u prodavnici</translation>
</message>
<message>
<source>You have no products in your basket</source>
<translation>Nemate proizvoda u korpi</translation>
</message>
<message>
<source>Confirm order</source>
<translation>Potvrdi narudลพbu</translation>
</message>
<message>
<source>Product items</source>
<translation>Proizvodi</translation>
</message>
<message>
<source>Order summary</source>
<translation>Ukratko narudลพbe</translation>
</message>
<message>
<source>Order total</source>
<translation>Ukupno narudลพbe</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
<message>
<source>Confirm</source>
<translation>Potvrdi</translation>
</message>
<message>
<source>Order %order_id [%order_status]</source>
<translation>Narudลพba %order_id [%order_status]</translation>
</message>
<message>
<source>Order history</source>
<translation>Istorijat narudลพbe</translation>
</message>
<message>
<source>The following items were removed from your basket because the products were changed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT is unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT percentage is not yet known for some of the items being purchased.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This probably means that some information about you is not yet available and will be obtained during checkout.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Total price</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Subtotal inc. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Basket summary</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Shipping total inc. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Item total inc. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Total inc. VAT</source>
<translation type="unfinished">Ukupno sa PDV-om</translation>
</message>
<message>
<source>Subtotal of items ex. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Shipping total ex. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Item total ex. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Total VAT</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/ezwebin/content/datatype</name>
<message>
<source>Year</source>
<translation type="obsolete">Godina</translation>
</message>
<message>
<source>Month</source>
<translation type="obsolete">Mesec</translation>
</message>
<message>
<source>Day</source>
<translation type="obsolete">Dan</translation>
</message>
<message>
<source>Hour</source>
<translation type="obsolete">Sat</translation>
</message>
<message>
<source>Minute</source>
<translation type="obsolete">Minut</translation>
</message>
</context>
<context>
<name>design/ezwebin/link</name>
<message>
<source>Printable version</source>
<translation type="unfinished">Verzija za ispis</translation>
</message>
</context>
<context>
<name>design/ezwebin/node/removeobject</name>
<message>
<source>The items contain more than the maximum possible nodes for subtree removal and will not be deleted. You can remove this subtree using the ezsubtreeremove.php script.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/plain/layout</name>
<message>
<source>Advanced search</source>
<translation>Napredno pretraลพivanje</translation>
</message>
<message>
<source>Search</source>
<translation>Traลพi</translation>
</message>
</context>
<context>
<name>design/standard/class</name>
<message>
<source>Class is locked</source>
<translation>Klasa je zakljuฤana</translation>
</message>
<message>
<source>Retry</source>
<translation>Ponovi</translation>
</message>
</context>
<context>
<name>design/standard/class/classlist</name>
<message>
<source>No classes in </source>
<translation>Nema klasa u</translation>
</message>
<message>
<source>Click on the 'New' button to create a class.</source>
<translation>Izaberi dugme ''Novo'' da bi kreirao novu klasu.</translation>
</message>
<message>
<source>Classes in</source>
<translation>Klase u</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Identifier</source>
<translation>Identifikator</translation>
</message>
<message>
<source>Modifier</source>
<translation>Modifikator</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Object count</source>
<translation>Ukupno objekata</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmeni</translation>
</message>
<message>
<source>Copy</source>
<translation>Kopiraj</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>New class</source>
<translation>Nova klasa</translation>
</message>
<message>
<source>Last modified classes</source>
<translation>Poslednje izmenjene klase %1</translation>
</message>
</context>
<context>
<name>design/standard/class/datatype</name>
<message>
<source>Empty</source>
<translation>Prazno</translation>
</message>
<message>
<source>Current date</source>
<translation>Tekuฤi datum</translation>
</message>
<message>
<source>Current datetime</source>
<translation>Tekuฤe vreme</translation>
</message>
<message>
<source>Multiple choice</source>
<translation>Viลกestruki izbor</translation>
</message>
<message>
<source>Flash</source>
<translation>Flash</translation>
</message>
<message>
<source>QuickTime</source>
<translation>QuickTime</translation>
</message>
<message>
<source>Price inc. VAT</source>
<translation>Cena s PDV-om</translation>
</message>
<message>
<source>Price ex. VAT</source>
<translation>Cena bez PDV-a</translation>
</message>
<message>
<source>Current time</source>
<translation>Tekuฤe vreme</translation>
</message>
<message>
<source>Max file size</source>
<translation>Maksimalna veliฤina datoteke</translation>
</message>
<message>
<source>Default value</source>
<translation>Osnovna vrednost</translation>
</message>
<message>
<source>Min float value</source>
<translation>Minimalna vrednost pomaka</translation>
</message>
<message>
<source>Max float value</source>
<translation>Maksimalna vrednost pomaka</translation>
</message>
<message>
<source>Min integer value</source>
<translation>Minimalna vrednost celog broja</translation>
</message>
<message>
<source>Max integer value</source>
<translation>Maksimalna vrednost celog broja</translation>
</message>
<message>
<source>Default name</source>
<translation>Osnovno ime</translation>
</message>
<message>
<source>Identifier</source>
<translation>Identifikator</translation>
</message>
<message>
<source>Media player type</source>
<translation>Vrsta media player-a</translation>
</message>
<message>
<source>Allowed classes</source>
<translation>Dopuลกtene klase</translation>
</message>
<message>
<source>Any</source>
<translation>Bilo koji</translation>
</message>
<message>
<source>VAT type</source>
<translation>Vrsta PDV-a</translation>
</message>
<message>
<source>Max string length</source>
<translation>Maksimalna duลพina niza</translation>
</message>
<message>
<source>Preferred number of rows</source>
<translation>Preferirani broj redova</translation>
</message>
<message>
<source>Default number of rows</source>
<translation>Osnovni broj redova</translation>
</message>
<message>
<source>New option</source>
<translation>Nova moguฤnost</translation>
</message>
<message>
<source>Pretext</source>
<translation>Uvodni tekst</translation>
</message>
<message>
<source>Posttext</source>
<translation>Naknadni tekst</translation>
</message>
<message>
<source>Digits</source>
<translation>Cifre</translation>
</message>
<message>
<source>Start value</source>
<translation>Poฤetna vrednost</translation>
</message>
<message>
<source>Ini file</source>
<translation>Ini datoteka</translation>
</message>
<message>
<source>Ini Section</source>
<translation>Ini sekcija</translation>
</message>
<message>
<source>Ini Parameter</source>
<translation>Ini parametar</translation>
</message>
<message>
<source>Ini file location</source>
<translation>Ini lokacija datoteke</translation>
</message>
<message>
<source>Ini setting type</source>
<translation>Ini vrsta podeลกavanja </translation>
</message>
<message>
<source>Text</source>
<translation>Tekst</translation>
</message>
<message>
<source>Enable/Disable</source>
<translation>Omoguฤiti/Onemoguฤiti</translation>
</message>
<message>
<source>True/False</source>
<translation>Taฤno/Netaฤno</translation>
</message>
<message>
<source>Integer</source>
<translation>Integer</translation>
</message>
<message>
<source>Float</source>
<translation>Decimalni</translation>
</message>
<message>
<source>Array</source>
<translation>Niz</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>New and existing objects</source>
<translation>Novi i postojeฤi objekti</translation>
</message>
<message>
<source>Only new objects</source>
<translation>Samo novi objekti</translation>
</message>
<message>
<source>Only existing objects</source>
<translation>Samo postojeฤi objekti</translation>
</message>
<message>
<source>Select which classes user can create</source>
<translation>Izaberi koje kategorije korisnik moลพe kreirati</translation>
</message>
<message>
<source>Checked</source>
<translation>Provereno</translation>
</message>
<message>
<source>Unchecked</source>
<translation>Neprovereno</translation>
</message>
<message>
<source>Single choice</source>
<translation>Jedna moguฤnost</translation>
</message>
<message>
<source>The ini file has probably been modified manually since last time.</source>
<translation>Ini datoteka verovatno je ruฤno promenjena od poslednjeg puta.</translation>
</message>
<message>
<source>Ini Value: </source>
<translation>Ini vrednost:</translation>
</message>
<message>
<source>Enabled</source>
<translation>Omoguฤen</translation>
</message>
<message>
<source>Disabled</source>
<translation>Onemoguฤen</translation>
</message>
<message>
<source>True</source>
<translation>Taฤno</translation>
</message>
<message>
<source>False</source>
<translation>Netaฤno</translation>
</message>
<message>
<source>Adjusted current datetime</source>
<translation>Prilagoฤeno tekuฤe vreme</translation>
</message>
<message>
<source>Selection method</source>
<translation>Odabrana metoda</translation>
</message>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>Remove selection</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Allow fuzzy match</source>
<translation>Dozvoli viลกeznaฤnu kompatibilnost</translation>
</message>
<message>
<source>Make empty array</source>
<translation>Stvori prazno polje</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Year</source>
<translation>Godina</translation>
</message>
<message>
<source>Month</source>
<translation>Mesec</translation>
</message>
<message>
<source>Day</source>
<translation>Dan</translation>
</message>
<message>
<source>Hour</source>
<translation>Sat</translation>
</message>
<message>
<source>Minute</source>
<translation>Minut</translation>
</message>
<message>
<source>Drop-down list</source>
<translation>Padajuฤa lista</translation>
</message>
<message>
<source>Drop-down tree</source>
<translation>Padajuฤe stablo</translation>
</message>
<message>
<source>There are no elements in the list.</source>
<translation>Nema elemenata u listi.</translation>
</message>
<message>
<source>New element</source>
<translation>Novi element</translation>
</message>
<message>
<source>Add a new enum element.</source>
<translation>Dodaj novi brojฤani element.</translation>
</message>
<message>
<source>Remove selected elements.</source>
<translation>Ukloni izabrane elemente.</translation>
</message>
<message>
<source>Current value</source>
<translation>Tekuฤa vrednost</translation>
</message>
<message>
<source>Columns</source>
<translation>Kolone</translation>
</message>
<message>
<source>Matrix column</source>
<translation>Matrica</translation>
</message>
<message>
<source>The matrix does not have any columns.</source>
<translation>Matrica nema ni jednu kolonu.</translation>
</message>
<message>
<source>New column</source>
<translation>Nova kolona</translation>
</message>
<message>
<source>Add a new column.</source>
<translation>Dodaj novu kolonu.</translation>
</message>
<message>
<source>Remove selected columns.</source>
<translation>Ukloni izabrane kolone.</translation>
</message>
<message>
<source>New objects will not be placed in the content tree.</source>
<translation>Novi objekti neฤe biti stavljeni u sadrลพaj.</translation>
</message>
<message>
<source>Select location</source>
<translation>Izaberi lokaciju</translation>
</message>
<message>
<source>Remove location</source>
<translation>Ukloni lokaciju</translation>
</message>
<message>
<source>Select option for removal.</source>
<translation>Izaberi opciju za brisanje.</translation>
</message>
<message>
<source>There are no options.</source>
<translation>Nema opcija.</translation>
</message>
<message>
<source>Add a new option.</source>
<translation>Dodaj novu opciju.</translation>
</message>
<message>
<source>Remove selected options.</source>
<translation>Ukloni izabrane opcije.</translation>
</message>
<message>
<source>Current date and time adjusted by</source>
<translation>Tekuฤi datum i vreme uredio</translation>
</message>
<message>
<source>Style</source>
<translation>Stil</translation>
</message>
<message>
<source>Elements</source>
<translation>Elementi</translation>
</message>
<message>
<source>Element</source>
<translation>Element</translation>
</message>
<message>
<source>Value</source>
<translation>Vrednost</translation>
</message>
<message>
<source>Default selection item</source>
<translation>Osnovni element odabira</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Unknown section</source>
<translation>Nepoznat segment</translation>
</message>
<message>
<source>No item has been selected.</source>
<translation>Nije izabran ni jedan element.</translation>
</message>
<message>
<source>Select item</source>
<translation>Izaberi element</translation>
</message>
<message>
<source>Package type</source>
<translation>Vrsta paketa</translation>
</message>
<message>
<source>View mode</source>
<translation>Naฤin prikaza</translation>
</message>
<message>
<source>Combo box</source>
<translation>Combo box</translation>
</message>
<message>
<source>Icon view</source>
<translation>Prikaz sa sliฤicama</translation>
</message>
<message>
<source>VAT</source>
<translation>PDV</translation>
</message>
<message>
<source>Options</source>
<translation>Moguฤnosti</translation>
</message>
<message>
<source>Option</source>
<translation>Moguฤnost</translation>
</message>
<message>
<source>characters</source>
<translation>karakteri</translation>
</message>
<message>
<source>year(s)</source>
<translation>godina(e)</translation>
</message>
<message>
<source>month(s)</source>
<translation>mesec(i)</translation>
</message>
<message>
<source>day(s)</source>
<translation>dan(i)</translation>
</message>
<message>
<source>hour(s)</source>
<translation>sat(i)</translation>
</message>
<message>
<source>minute(s)</source>
<translation>minuta(e)</translation>
</message>
<message>
<source>Interface</source>
<translation>Interface</translation>
</message>
<message>
<source>Yes</source>
<translation>Da</translation>
</message>
<message>
<source>No</source>
<translation>Ne</translation>
</message>
<message>
<source>combobox</source>
<translation>combobox</translation>
</message>
<message>
<source>icon view</source>
<translation>prikaz sa sliฤicama</translation>
</message>
<message>
<source>Default VAT</source>
<translation>Osnovni PDV</translation>
</message>
<message>
<source>Default VAT type</source>
<translation>Osnovni PDV tip</translation>
</message>
<message>
<source>Price</source>
<translation>Cena</translation>
</message>
<message>
<source>Default selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select which countries by default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use seconds</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Second</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Checkboxes / radio buttons</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Drop-down menu / multi menu</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ISBN-13 format</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Range data for the ISBN-13 does not exist</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please follow the instructions for the ISBN datatype to install the valid ranges.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Definition from distribution</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Load the definition that follows the standard distribution here:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Import ISBN range data</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>RealPlayer</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Silverlight</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Windows Media Player</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default currency</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List with radio buttons</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List with checkboxes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Multiple selection list</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Template based, multi</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Template based, single</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New Objects</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object class</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(none)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Placing new objects under</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>See</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default location</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Drop-down menu / multi select</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Radio buttons / checkboxes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Warning: the ini file settings value and object value does not match.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ini File: </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Tag preset</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Html5 Video</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Html5 Audio</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>second(s)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/class/datatype </name>
<message>
<source>Max file size</source>
<translation>Maksimalna veliฤina datoteke</translation>
</message>
</context>
<context>
<name>design/standard/class/edit</name>
<message>
<source>Add to group</source>
<translation>Dodaj u grupu</translation>
</message>
<message>
<source>Remove from groups</source>
<translation>Ukloni iz grupe</translation>
</message>
<message>
<source>Input did not validate</source>
<translation>Unos nije potvrฤen</translation>
</message>
<message>
<source>Input was stored successfully</source>
<translation>Unos je uspeลกno smeลกten</translation>
</message>
<message>
<source>Attributes</source>
<translation>Atributi</translation>
</message>
<message>
<source>Required</source>
<translation>Zatraลพeno</translation>
</message>
<message>
<source>Searchable</source>
<translation>Moguฤe pretraลพivati</translation>
</message>
<message>
<source>Information collector</source>
<translation>Kolektor podataka</translation>
</message>
<message>
<source>Down</source>
<translation>Dole</translation>
</message>
<message>
<source>Up</source>
<translation>Gore</translation>
</message>
<message>
<source>New</source>
<translation>Novi</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Apply</source>
<translation>Primeni</translation>
</message>
<message>
<source>Discard</source>
<translation>Odbaci</translation>
</message>
<message>
<source>Are you sure you want to remove these classes?</source>
<translation>Jeste li sigurni da ลพelite ukloniti ove klase?</translation>
</message>
<message>
<source>Removing class %1 will remove %2!</source>
<translation>Uklanjanjem klase %1 biฤe uklonjeno %2!</translation>
</message>
<message>
<source>Confirm</source>
<translation>Potvrdi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Are you sure you want to remove these class groups?</source>
<translation>Jeste li sigurni da ลพelite ukloniti navedene grupe klasa?</translation>
</message>
<message>
<source>Removing class group %1 will remove the classes %2!</source>
<translation>Uklanjanje grupe klasa %1 ฤe ukloniti klase %2!</translation>
</message>
<message>
<source>Editing class - %1</source>
<translation>Izmena klase - %1</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Identifier</source>
<translation>Identifikator</translation>
</message>
<message>
<source>Object name pattern</source>
<translation>Struktura imena objekta</translation>
</message>
<message>
<source>Member of groups</source>
<translation>Pripada grupama</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Datatypes</source>
<translation>Vrste podataka</translation>
</message>
<message>
<source>Editing class group - %1</source>
<translation>Izmena grupe klasa - %1</translation>
</message>
<message>
<source>Last modified by %username on %time</source>
<translation>Poslednje promene izvrลกio %username u %time</translation>
</message>
<message>
<source>Disable translation</source>
<translation>Onemoguฤi prevod</translation>
</message>
<message>
<source>Modified by %username on %time</source>
<translation>Promene izvrลกio %username u %time</translation>
</message>
<message>
<source>The class %1 was already removed from the group but still exists in others.</source>
<translation>Klasa %1 je uklonjena iz grupe ali joลก uvek postoji u drugim grupama.</translation>
</message>
<message>
<source>The classes %1 were already removed from the group but still exist in others.</source>
<translation>Klase %1 su uklonjene iz grupe ali joลก uvek postoje u drugim grupama.</translation>
</message>
<message>
<source>Default object availability</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this menu to select the type of attribute you want to create. Click the "add attribute" button. The attribute will be appended to the bottom of the list of attributes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The class should have at least one attribute and a nonempty 'Name' attribute</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Is container class</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Objects always available (default value)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Discard changes</source>
<translation type="unfinished">Odbaci promene</translation>
</message>
<message>
<source>Description</source>
<translation type="unfinished">Opis</translation>
</message>
<message>
<source>Use this field to set the informal description of the class. The description field can contain whitespaces and special characters.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/class/edit_locked</name>
<message>
<source>Class locked</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This class has pending modifications defered to cronjob and thus it cannot be edited.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Wait until the script is finished. You might see the status in the %urlstart script monitor%urlend</a>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>To force the modification of the class you may run the following command</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit <%class_name> [Class]</source>
<translation type="unfinished">Izmeni klasu <%class_name> [Klasa]</translation>
</message>
<message>
<source>Class</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Last modifier</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Last modified on</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The class will be available for editing after the script has been run by the cronjob.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Retry</source>
<translation type="unfinished">Ponovi</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/class/list</name>
<message>
<source>Class groups</source>
<translation>Grupe klasa</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Modifier</source>
<translation>Modifikator</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>New group</source>
<translation>Nova grupa</translation>
</message>
<message>
<source>Last modified classes</source>
<translation>Poslednje izmenjene klase</translation>
</message>
<message>
<source>Setup menu</source>
<translation>Setup menu</translation>
</message>
<message>
<source>New class</source>
<translation>Nova klasa</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Identifier</source>
<translation>Identifikator</translation>
</message>
<message>
<source>Copy</source>
<translation>Kopija</translation>
</message>
</context>
<context>
<name>design/standard/class/view</name>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Identifier</source>
<translation>Identifikator</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>Object count</source>
<translation>Brojanje objekata</translation>
</message>
<message>
<source>Class - %1</source>
<translation>Klasa - %1</translation>
</message>
<message>
<source>Last modified by %username on %time</source>
<translation>Poslednje promene izvrลกio %username u %time</translation>
</message>
<message>
<source>Object name pattern</source>
<translation>Struktura imena objekta</translation>
</message>
<message>
<source>Container</source>
<translation>Kontejner</translation>
</message>
<message>
<source>Yes</source>
<translation>Da</translation>
</message>
<message>
<source>No</source>
<translation>Ne</translation>
</message>
<message>
<source>Member of groups</source>
<translation>Pripada grupama</translation>
</message>
<message>
<source>Attributes</source>
<translation>Atributi</translation>
</message>
<message>
<source>Is required</source>
<translation>Potreban je</translation>
</message>
<message>
<source>Is not required</source>
<translation>Nije potreban</translation>
</message>
<message>
<source>Is searchable</source>
<translation>Moguฤe pretraลพivati</translation>
</message>
<message>
<source>Is not searchable</source>
<translation>Nije moguฤe pretraลพivati</translation>
</message>
<message>
<source>Collects information</source>
<translation>Prikuplja podatke</translation>
</message>
<message>
<source>Does not collect information</source>
<translation>Ne prikuplja podatke</translation>
</message>
<message>
<source>Translation is disabled</source>
<translation>Prevod je onemoguฤen</translation>
</message>
<message>
<source>Translation is enabled</source>
<translation>Prevod je omoguฤen</translation>
</message>
<message>
<source>Override templates</source>
<translation>Zaobilasci ลกablona</translation>
</message>
<message>
<source>Override</source>
<translation>Zaobilazak</translation>
</message>
<message>
<source>Source template</source>
<translation>Izvorni ลกablon</translation>
</message>
<message>
<source>Override template</source>
<translation>Zaobilazni ลกablon</translation>
</message>
<message>
<source>Objects always available (default value)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Siteaccess</source>
<translation type="unfinished">Siteaccess</translation>
</message>
<message>
<source>Description</source>
<translation type="unfinished">Opis</translation>
</message>
</context>
<context>
<name>design/standard/collaboration</name>
<message>
<source>Group list for '%1'</source>
<translation>Lista grupe za '%1'</translation>
</message>
<message>
<source>No items in group.</source>
<translation>Nema elemenata u grupi.</translation>
</message>
<message>
<source>Groups</source>
<translation>Grupe</translation>
</message>
<message>
<source>Approval</source>
<translation>Odobrenje</translation>
</message>
<message>
<source>Subject</source>
<translation>Naslov</translation>
</message>
<message>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<source>Read</source>
<translation>Proฤitano</translation>
</message>
<message>
<source>Unread</source>
<translation>Neproฤitano</translation>
</message>
<message>
<source>Inactive</source>
<translation>Neaktivno</translation>
</message>
<message>
<source>Posted: %1</source>
<translation>Poslano: %1</translation>
</message>
<message>
<source>No new items to be handled.</source>
<translation>Nema novih elemenata za obradu.</translation>
</message>
<message>
<source>Summary</source>
<translation>Ukratko</translation>
</message>
<message>
<source>[more]</source>
<translation>(viลกe)</translation>
</message>
</context>
<context>
<name>design/standard/collaboration/approval</name>
<message>
<source>Approval</source>
<translation>Dozvola</translation>
</message>
<message>
<source>The content object %1 awaits approval before it can be published.</source>
<translation>Objekt sadrลพaja %1 ฤeka odobrenje da bi mogao biti objavljen. </translation>
</message>
<message>
<source>The content object %1 needs your approval before it can be published.</source>
<translation>Objekt sadrลพaja %1 ฤeka Vaลกe odobrenje da bi mogao biti objavljen.</translation>
</message>
<message>
<source>Do you approve of the content object being published?</source>
<translation>Odobravate li objavu objekta sadrลพaja?</translation>
</message>
<message>
<source>Comment</source>
<translation>Komentar</translation>
</message>
<message>
<source>Add Comment</source>
<translation>Dodaj komentar</translation>
</message>
<message>
<source>Approve</source>
<translation>Odobri</translation>
</message>
<message>
<source>Deny</source>
<translation>Odbij</translation>
</message>
<message>
<source>Participants</source>
<translation>Uฤesnici</translation>
</message>
<message>
<source>Messages</source>
<translation>Poruke</translation>
</message>
<message>
<source>Edit the object</source>
<translation>Izmeni objekt</translation>
</message>
<message>
<source>The content object %1 was not accepted but will be available as a draft for the author.</source>
<translation>Objekt sadrลพaja %1 nije prihvaฤen, ali ฤe autoru biti dostupan kao skica.</translation>
</message>
<message>
<source>[%sitename] Approval of "%objectname" awaits your attention</source>
<translation>(%sitename) Odobrenje ''%objectname'' zahteva vaลกu paลพnju</translation>
</message>
<message>
<source>[%sitename] "%objectname" awaits approval</source>
<translation>(%sitename) ''%objectname'' ฤeka odobrenje</translation>
</message>
<message>
<source>You may re-edit the draft and publish it, in which case an approval is required again.</source>
<translation>Moลพete preurediti skicu te je objaviti, u tom sluฤaju ponovo Vam je potrebno odobrenje.</translation>
</message>
<message>
<source>This email is to inform you that "%objectname" awaits your attention at %sitename.
The publishing process has been halted and it is up to you to decide if it should continue or stop.
The approval can be viewed by using the URL below.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This email is to inform you that "%objectname" awaits approval at %sitename before it can be published.
If you want to send comments to the approver or view the status use the URL below.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you want to send a message to the person approving it?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The content object %1 was approved and will be published when the publishing workflow continues.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The content object %1 was not accepted but is still available as a draft.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The author can re-edit the draft and publish it again, in which case a new approval item is made.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/collaboration/handler/view/line/ezapprove</name>
<message>
<source>The content object %1 [deleted]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%1 awaits approval by editor</source>
<translation type="unfinished">%1 : OฤEKUJE odobrenje urednika</translation>
</message>
<message>
<source>%1 awaits your approval</source>
<translation type="unfinished">%1 : ฤEKA Vaลกe odobrenje</translation>
</message>
<message>
<source>%1 was approved for publishing</source>
<translation type="unfinished">%1 : ODOBRENO za objavu</translation>
</message>
<message>
<source>%1 was not approved for publishing</source>
<translation type="unfinished">%1 : ODBIJENO</translation>
</message>
</context>
<context>
<name>design/standard/content</name>
<message>
<source>Are you sure you want to remove this translation?</source>
<translation>Jeste li sigurni da ลพelite ukloniti ovaj prevod?</translation>
</message>
<message>
<source>Confirm</source>
<translation>Potvrdi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Change translation for content</source>
<translation>Promeni prevod za sadrลพaj</translation>
</message>
<message>
<source>Pick one of the translations from the list to change to or enter a new custom one in the input fields.</source>
<translation>Izaberi jedan od ponuฤenih prevoda s liste radi promene ili unesi novi posebno prilagoฤeni u polje za unos. </translation>
</message>
<message>
<source>New translation for content</source>
<translation>Novi prevod za sadrลพaj</translation>
</message>
<message>
<source>Pick one of the translations from the list to add or enter a new custom one in the input fields.</source>
<translation>Izaberi jedan od prevoda s liste da bi ga dodao/la ili unesi posebno prilagoฤeni u polja za unos. </translation>
</message>
<message>
<source>Translations</source>
<translation>Prevodi</translation>
</message>
<message>
<source>Custom</source>
<translation>Prilagodi</translation>
</message>
<message>
<source>Name of translation</source>
<translation>Ime prevoda</translation>
</message>
<message>
<source>Locale</source>
<translation>Lokalan</translation>
</message>
<message>
<source>Change</source>
<translation>Promeni</translation>
</message>
<message>
<source>Create</source>
<translation>Kreiraj</translation>
</message>
<message>
<source>Content translations</source>
<translation>Prevodi sadrลพaja</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>New</source>
<translation>Novo</translation>
</message>
<message>
<source>Removing '%1' will remove the translation itself and %2 translated versions!</source>
<translation>Uklanjanje '%1' ฤe ukloniti i sam prevod te %2 prevedene verzije!</translation>
</message>
<message>
<source>Language</source>
<translation>Jezik</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Below you will find a list of active translations that content objects may be translated into.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Country/region</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your content is being published</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Publishing finished</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your content is pending an external action</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/browse</name>
<message>
<source>Create new</source>
<translation>Kreiraj novo</translation>
</message>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Up one level</source>
<translation>Jedan nivo gore</translation>
</message>
<message>
<source>Top levels</source>
<translation>Glavni nivo</translation>
</message>
<message>
<source>Switch top levels by clicking one of these items.</source>
<translation>Promeni glavni nivo izborom jednog od ovih elemenata.</translation>
</message>
<message>
<source>Bookmarks</source>
<translation>Oznake za knjigu</translation>
</message>
<message>
<source>Bookmark items are managed using %bookmarkname in the %personalname part.</source>
<translation>Oznakama za knjigu se upravlja upotrebom %bookmarkname u %personalname delu.</translation>
</message>
<message>
<source>My bookmarks</source>
<translation>Moje oznake za knjigu</translation>
</message>
<message>
<source>Personal</source>
<translation>Liฤno</translation>
</message>
<message>
<source>Recent items</source>
<translation>Nedavni elementi</translation>
</message>
<message>
<source>Recent items are added on publishing.</source>
<translation>Nedavni elementi dodani kod objavljivanja.</translation>
</message>
<message>
<source>Select</source>
<translation>Oznaฤi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>New</source>
<translation>Novi</translation>
</message>
<message>
<source>To select objects, choose the appropriate radio button or checkbox(es), then click the "Select" button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>To select an object that is a child of one of the displayed objects, click the object name for a list of the children of the object.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/copy</name>
<message>
<source>Copy all versions</source>
<translation>Kopiraj sve verzije</translation>
</message>
<message>
<source>Copy current version</source>
<translation>Kopiraj sve tekuฤe verzije</translation>
</message>
<message>
<source>Copy</source>
<translation>Kopiraj</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Copying %1</source>
<translation>Kopiranje u toku %1</translation>
</message>
<message>
<source>Version count is %1 and current version is %2.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/copy_subtree</name>
<message>
<source>Copying subtree from node %1</source>
<translation>Kopiraj podstablo sa ฤvora %1</translation>
</message>
<message>
<source>Copy all versions.</source>
<translation>Kopiraj sve verzije.</translation>
</message>
<message>
<source>Copy current version.</source>
<translation>Kopiraj sve tekuฤe verzije.</translation>
</message>
<message>
<source>Copy</source>
<translation>Kopiraj</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Keep creators of content objects being copied unchanged.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Set new creator for content objects being copied.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Keep time of creation and modification of content objects being copied unchanged.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Copy and publish content objects at current time.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/copy_subtree_notification</name>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Copy subtree Notification</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/create</name>
<message>
<source>Create new</source>
<translation>Kreiraj novo</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
</context>
<context>
<name>design/standard/content/create_languages</name>
<message>
<source>Existing languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the language in which you want to create an object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create</source>
<translation type="unfinished">Kreiraj</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/datatype</name>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Remove image</source>
<translation>Ukloni sliku</translation>
</message>
<message>
<source>High</source>
<translation>Visoko</translation>
</message>
<message>
<source>Best</source>
<translation>Najbolje</translation>
</message>
<message>
<source>Low</source>
<translation>Nisko</translation>
</message>
<message>
<source>Autohigh</source>
<translation>Autohigh</translation>
</message>
<message>
<source>Autolow</source>
<translation>Autolow</translation>
</message>
<message>
<source>Autoplay</source>
<translation>Autoplay</translation>
</message>
<message>
<source>Loop</source>
<translation>Petlja</translation>
</message>
<message>
<source>Controller</source>
<translation>Kontrolor</translation>
</message>
<message>
<source>ImageWindow</source>
<translation>Grafiฤki prozor</translation>
</message>
<message>
<source>All</source>
<translation>Svi</translation>
</message>
<message>
<source>ControlPanel</source>
<translation>Kontrolna tabla</translation>
</message>
<message>
<source>InfoVolumePanel</source>
<translation>InfoVolumePanel</translation>
</message>
<message>
<source>InfoPanel</source>
<translation>InfoPanel</translation>
</message>
<message>
<source>No relation</source>
<translation>Nije povezano</translation>
</message>
<message>
<source>No</source>
<translation>Ne</translation>
</message>
<message>
<source>Yes</source>
<translation>Da</translation>
</message>
<message>
<source>User account information</source>
<translation>Podaci o korisniฤkom raฤunu</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Filename</source>
<translation>Ime datoteke</translation>
</message>
<message>
<source>Year</source>
<translation>Godina</translation>
</message>
<message>
<source>Month</source>
<translation>Mesec</translation>
</message>
<message>
<source>Day</source>
<translation>Dan</translation>
</message>
<message>
<source>Hour</source>
<translation>Sat</translation>
</message>
<message>
<source>Minute</source>
<translation>Minut</translation>
</message>
<message>
<source>Alternative image text</source>
<translation>Alternativni tekst za sliku</translation>
</message>
<message>
<source>Width</source>
<translation>ลกirina</translation>
</message>
<message>
<source>Height</source>
<translation>Visina</translation>
</message>
<message>
<source>Quality</source>
<translation>Kvaliteta</translation>
</message>
<message>
<source>Controls</source>
<translation>Komande</translation>
</message>
<message>
<source>Remove object</source>
<translation>Ukloni objekt</translation>
</message>
<message>
<source>Options</source>
<translation>Moguฤnosti</translation>
</message>
<message>
<source>Start value</source>
<translation>Poฤetna vrednost</translation>
</message>
<message>
<source>Stop value</source>
<translation>Krajnja vrednost</translation>
</message>
<message>
<source>Step value</source>
<translation>Vrednost naredbe</translation>
</message>
<message>
<source>URL</source>
<translation>URL</translation>
</message>
<message>
<source>Text</source>
<translation>Tekst</translation>
</message>
<message>
<source>User ID</source>
<translation>Korisniฤki ID</translation>
</message>
<message>
<source>Password</source>
<translation>Lozinka</translation>
</message>
<message>
<source>Confirm password</source>
<translation>Potvrdi lozinku</translation>
</message>
<message>
<source>Price</source>
<translation>Cena</translation>
</message>
<message>
<source>Email</source>
<translation>E-mail</translation>
</message>
<message>
<source>No media file is available.</source>
<translation>Ni jedna medijska datoteka nije dostupna.</translation>
</message>
<message>
<source>Priority</source>
<translation>Prioritet</translation>
</message>
<message>
<source>Default</source>
<translation>Osnovno</translation>
</message>
<message>
<source>Additional price</source>
<translation>Dodatna cena</translation>
</message>
<message>
<source>Username</source>
<translation>Korisniฤko ime</translation>
</message>
<message>
<source>Your price</source>
<translation>Vaลกa cena</translation>
</message>
<message>
<source>You save</source>
<translation>Vaลกa uลกteda</translation>
</message>
<message>
<source>Select author row for removal.</source>
<translation>Izaberi autorov red za brisanje.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected rows from the author list.</source>
<translation>Ukloni izabrane redove sa autorove liste.</translation>
</message>
<message>
<source>Add author</source>
<translation>Dodaj autora</translation>
</message>
<message>
<source>Add a new row to the author list.</source>
<translation>Dodaj novi red u autorovu listu.</translation>
</message>
<message>
<source>MIME type</source>
<translation>MIME- vrsta</translation>
</message>
<message>
<source>Size</source>
<translation>Veliฤina</translation>
</message>
<message>
<source>Remove the file from this draft.</source>
<translation>Ukloni datoteku iz skice.</translation>
</message>
<message>
<source>Remove selected rows from the matrix.</source>
<translation>Ukloni izabrane redove iz matrice.</translation>
</message>
<message>
<source>Number of rows to add.</source>
<translation>Broj redaka za dodavanje.</translation>
</message>
<message>
<source>Add rows</source>
<translation>Dodaj redove</translation>
</message>
<message>
<source>Add new rows to the matrix.</source>
<translation>Dodaj nove redove u matricu.</translation>
</message>
<message>
<source>Select multioption for removal.</source>
<translation>Izaberi multioption za brisanje.</translation>
</message>
<message>
<source>Use the radio buttons to set the default option.</source>
<translation>Koristite radio dugme za postavljanje osnovne opcije.</translation>
</message>
<message>
<source>Add option</source>
<translation>Dodaj opciju</translation>
</message>
<message>
<source>Add a new option.</source>
<translation>Dodaj novu opciju.</translation>
</message>
<message>
<source>Remove selected options.</source>
<translation>Ukloni izabrane opcije.</translation>
</message>
<message>
<source>Add multioption</source>
<translation>Dodaj multioption</translation>
</message>
<message>
<source>Add a new multioption.</source>
<translation>Dodaj novu multioption.</translation>
</message>
<message>
<source>Remove selected multioptions.</source>
<translation>Ukloni izabranu multioption.</translation>
</message>
<message>
<source>Select option for removal.</source>
<translation>Izaberi opciju za brisanje.</translation>
</message>
<message>
<source>There are no options.</source>
<translation>Nema opcija.</translation>
</message>
<message>
<source>Current file</source>
<translation>Tekuฤa datoteka</translation>
</message>
<message>
<source>There is no file.</source>
<translation>Ne postoji datoteka.</translation>
</message>
<message>
<source>New file for upload</source>
<translation>Nova datoteka za uฤitavanje</translation>
</message>
<message>
<source>Current image</source>
<translation>Trenutna slika</translation>
</message>
<message>
<source>Preview</source>
<translation>Pregled</translation>
</message>
<message>
<source>There is no image file.</source>
<translation>Niste ubacili sliku.</translation>
</message>
<message>
<source>New image file for upload</source>
<translation>Nova slika za uฤitavanje</translation>
</message>
<message>
<source>Select row for removal.</source>
<translation>Izaberi red za brisanje.</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Flash</source>
<translation>Flash</translation>
</message>
<message>
<source>QuickTime</source>
<translation>QuickTime</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nepoznat</translation>
</message>
<message>
<source>Option</source>
<translation>Moguฤnost</translation>
</message>
<message>
<source>There are no multioptions.</source>
<translation>Nema multioptions.</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>There are no related objects.</source>
<translation>Nema povezanih objekata.</translation>
</message>
<message>
<source>Edit selected</source>
<translation>Izmeni izabrano</translation>
</message>
<message>
<source>Create new object</source>
<translation>Kreiraj novi objekt</translation>
</message>
<message>
<source>There are no authors in the author list.</source>
<translation>Nema autora na listi autora.</translation>
</message>
<message>
<source>There are no rows in the matrix.</source>
<translation>Nema redaka u matrici.</translation>
</message>
<message>
<source>Option set name</source>
<translation>Opcija podesi naziv</translation>
</message>
<message>
<source>Configure user account settings</source>
<translation>Podesi podeลกavanja korisniฤkog raฤuna</translation>
</message>
<message>
<source>Add object</source>
<translation type="obsolete">Dodaj objekt</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Edit <%object_name> [%object_class]</source>
<translation>Izmena <%object_name> [%object_class]</translation>
</message>
<message>
<source>Add objects</source>
<translation>Dodaj objekte</translation>
</message>
<message>
<source>Not specified</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Second</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version: %old</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version: %new</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Diff output disabled for %type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Image version %ver</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>RealPlayer</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Silverlight</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Windows Media Player</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version %ver</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Related object ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Modified</source>
<translation type="unfinished">Promenjeno</translation>
</message>
<message>
<source>Creator</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object version</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add group</source>
<translation type="unfinished">Dodaj grupu</translation>
</message>
<message>
<source>Add a new group.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Rules</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Set rules</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset rules</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Currency</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Value</source>
<translation type="unfinished">Vrednost</translation>
</message>
<message>
<source>Select price for removal.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Auto</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected prices.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Price list is empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Set custom price</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Set custom price.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no available currencies.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT</source>
<translation type="unfinished">PDV</translation>
</message>
<message>
<source>Price inc. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Price ex. VAT</source>
<translation type="unfinished">Cena bez PDV-a</translation>
</message>
<message>
<source>VAT type</source>
<translation type="unfinished">Vrsta PDV-a</translation>
</message>
<message>
<source>Parent node</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Allowed classes</source>
<translation type="unfinished">Dopuลกtene klase</translation>
</message>
<message>
<source>Any</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no objects of allowed classes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create new object with name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Order</source>
<translation type="unfinished">Narudลพba</translation>
</message>
<message>
<source>Published</source>
<translation type="unfinished">Objavljeno</translation>
</message>
<message>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Current account status:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>enabled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>disabled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Multioption:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Image</source>
<translation type="unfinished">Slika</translation>
</message>
<message>
<source>Def</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dis</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select if you want to disallow this option choice</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add multioption sub level</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add a new multioption sub level.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove multioption</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Group</source>
<translation type="unfinished">Grupa</translation>
</message>
<message>
<source>N/A</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>locked</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Using tag '%tagname' with class '%class' is not allowed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Option group name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no related object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Find object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Find objects</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The related objects will be edited in the same language as this object. If such translations do not exist they will be created, based on the source language of your choice.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translation base</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This object is already translated, the existing translation will be used.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This object is not translated, please select the language the new translation will be based on.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your browser does not support html5 video.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your browser does not support html5 audio.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Confirm email</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add an object in the relation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add an existing object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Browse to add an existing object in this relation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Objects in the relation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected elements from the relation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add objects in the relation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add existing objects</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Browse to add existing objects in this relation</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/diff</name>
<message>
<source>Versions for <%object_name> [%version_count]</source>
<translation type="obsolete">Verzije za objekt <%object_name> [%version_count]</translation>
</message>
<message>
<source>Status</source>
<translation type="obsolete">Status</translation>
</message>
<message>
<source>Modified</source>
<translation type="obsolete">Promenjeno</translation>
</message>
<message>
<source>Draft</source>
<translation type="obsolete">Skica</translation>
</message>
<message>
<source>Published</source>
<translation type="obsolete">Objavljeno</translation>
</message>
<message>
<source>Pending</source>
<translation type="obsolete">Na ฤekanju</translation>
</message>
<message>
<source>Archived</source>
<translation type="obsolete">Arhivirano</translation>
</message>
<message>
<source>Rejected</source>
<translation type="obsolete">Odbijeno</translation>
</message>
</context>
<context>
<name>design/standard/content/edit</name>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>Preview</source>
<translation>Pregled</translation>
</message>
<message>
<source>Send for publishing</source>
<translation>Objavi</translation>
</message>
<message>
<source>Discard</source>
<translation>Odbaci</translation>
</message>
<message>
<source>Location</source>
<translation>Lokacija</translation>
</message>
<message>
<source>Sort by</source>
<translation>Poredaj po</translation>
</message>
<message>
<source>Ordering</source>
<translation>Naruฤivanje</translation>
</message>
<message>
<source>Main</source>
<translation>Glavni</translation>
</message>
<message>
<source>Move</source>
<translation>Premesti</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Published</source>
<translation>Objavljeno</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Depth</source>
<translation>Dubina</translation>
</message>
<message>
<source>Priority</source>
<translation>Prioritet</translation>
</message>
<message>
<source>Add locations</source>
<translation>Dodaj lokacije</translation>
</message>
<message>
<source>Object info</source>
<translation>Podaci o objektu</translation>
</message>
<message>
<source>Not yet published</source>
<translation>Joลก nije objavljeno</translation>
</message>
<message>
<source>Current</source>
<translation>Tekuฤi</translation>
</message>
<message>
<source>Manage</source>
<translation>Upravljaj</translation>
</message>
<message>
<source>Translations</source>
<translation>Prevod</translation>
</message>
<message>
<source>Related objects</source>
<translation>Povezani objekti</translation>
</message>
<message>
<source>Find</source>
<translation>Traลพi</translation>
</message>
<message>
<source>New</source>
<translation>Novi</translation>
</message>
<message>
<source>Validation failed</source>
<translation>Potvrฤivanje nije uspelo</translation>
</message>
<message>
<source>Input did not validate</source>
<translation>Unos nije potvrฤen</translation>
</message>
<message>
<source>Location did not validate</source>
<translation>Lokacija nije potvrฤena</translation>
</message>
<message>
<source>Input was stored successfully</source>
<translation>Unos je uspeลกno smeลกten</translation>
</message>
<message>
<source>Confirm</source>
<translation>Potvrdi </translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Collected information from %1</source>
<translation>Podaci prikupljeni sa %1</translation>
</message>
<message>
<source>Edit %1 - %2</source>
<translation>Izmena %1 - %2</translation>
</message>
<message>
<source>Store draft</source>
<translation>Snimi skicu</translation>
</message>
<message>
<source>New draft</source>
<translation>Nova skica</translation>
</message>
<message>
<source>Created</source>
<translation>Kreirao</translation>
</message>
<message>
<source>Versions</source>
<translation>Verzije</translation>
</message>
<message>
<source>Editing</source>
<translation>Izmena</translation>
</message>
<message>
<source>Feedback from %1</source>
<translation>Povratne informacije od %1</translation>
</message>
<message>
<source>The currently published version is %version and was published at %time.</source>
<translation>Trenutno objavljena verzija je %version, koja je objavljena u %time.</translation>
</message>
<message>
<source>The last modification was done at %modified.</source>
<translation>Poslednja promena unesena je u %modified.</translation>
</message>
<message>
<source>The object is owned by %owner.</source>
<translation>Objekt je vlasniลกtvo %owner.</translation>
</message>
<message>
<source>This object is already being edited by you.
You can either continue editing one of your drafts or you can create a new draft.</source>
<translation>Ovaj objekt vi veฤ menjate.
Moลพete nastaviti editovati jednu od svojih skica ili kreirati novu skicu.</translation>
</message>
<message>
<source>This object is already being edited by someone else.
You should either contact the person about the draft or create a new draft for personal editing.</source>
<translation>Ovaj objekt veฤ edituje neko drugi.
Trebali biste kontaktirati tu osobu u vezi skice ili kreirati novu skicu za vaลกe editovanje.</translation>
</message>
<message>
<source>Current drafts</source>
<translation>Tekuฤe skice</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>Owner</source>
<translation>Vlasnik</translation>
</message>
<message>
<source>Last modified</source>
<translation>Poslednja promena</translation>
</message>
<message>
<source>Input was partially stored</source>
<translation>Unos je delimiฤno smeลกten</translation>
</message>
<message>
<source>Are you sure you want to discard the draft %versionname?</source>
<translation>Jeste li sigurni da ลพelite poniลกtiti skicu %versionname?</translation>
</message>
<message>
<source>Last Modified</source>
<translation>Poslednja promena</translation>
</message>
<message>
<source>The following feedback was collected</source>
<translation>Prikupljene su sledeฤe povratne informacije</translation>
</message>
<message>
<source>The following information was collected</source>
<translation>Prikupljene su sledeฤe povratne informacije</translation>
</message>
<message>
<source>This object is already being edited by yourself or someone else.
You can either continue editing one of your drafts or you can create a new draft.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class identifier</source>
<translation type="unfinished">Identifikator klase</translation>
</message>
<message>
<source>Class name</source>
<translation type="unfinished">Naziv klase</translation>
</message>
<message>
<source>No translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translate</source>
<translation type="unfinished">Prevedi</translation>
</message>
</context>
<context>
<name>design/standard/content/edit_languages</name>
<message>
<source>Existing languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the language you want to use when editing the object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the language you want to add to the object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the language the added translation will be based on</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use an empty, untranslated draft</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to create a translation in another language.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>However you can select one of the following languages for editing</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have permission to edit the object in any available languages.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/ezoption</name>
<message>
<source>No value chosen</source>
<translation>Nije izabrana vrednost</translation>
</message>
</context>
<context>
<name>design/standard/content/feedback</name>
<message>
<source>Feedback for %feedbackname</source>
<translation>Povratna informacija o %feedbackname</translation>
</message>
<message>
<source>Return to site</source>
<translation>Povratak na stranicu</translation>
</message>
<message>
<source>You have already submitted feedback. The previously submitted data was:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Thanks for your feedback. The following information was collected.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/form</name>
<message>
<source>Form %formname</source>
<translation>Obrazac %formname</translation>
</message>
<message>
<source>Return to site</source>
<translation>Povratak na stranicu</translation>
</message>
<message>
<source>Collected information</source>
<translation>Prikupljene informacije</translation>
</message>
<message>
<source>You have already submitted this form. The previously submitted data was:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/history</name>
<message>
<source>Version is not a draft</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version %1 is not available for editing anymore. Only drafts can be edited.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>To edit this version, first create a copy of it.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version is not yours</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version %1 was not created by you. You can only edit your own drafts.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unable to create new version</source>
<translation type="unfinished">Nije moguฤe kreirati novu verziju</translation>
</message>
<message>
<source>Version history limit has been exceeded and no archived version can be removed by the system.</source>
<translation type="unfinished">Prekoraฤeno je ograniฤenje istorijata pojedine verzije te ni jedna saฤuvana verzija ne moลพe biti uklonjena iz sistema.</translation>
</message>
<message>
<source>You can change your version history settings in content.ini, remove draft versions or edit existing drafts.</source>
<translation type="unfinished">Moลพete promeniti svoja podeลกavanja istorijata verzija u content.ini, ukloni skice ili izmeni postojeฤe skice. </translation>
</message>
<message>
<source>Versions for <%object_name> [%version_count]</source>
<translation type="unfinished">Verzije za objekt <%object_name> [%version_count]</translation>
</message>
<message>
<source>Version</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Status</source>
<translation type="unfinished">Status</translation>
</message>
<message>
<source>Modified translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Creator</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Created</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Modified</source>
<translation type="unfinished">Promenjeno</translation>
</message>
<message>
<source>Select version #%version_number for removal.</source>
<translation type="unfinished">Izaberite verziju #%version za brisanje.</translation>
</message>
<message>
<source>Version #%version_number cannot be removed because it is either the published version of the object or because you do not have permission to remove it.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>View the contents of version #%version_number. Translation: %translation.</source>
<translation type="unfinished">Prikaลพi sadrลพaj verzije #%version_number. Prevod: %translation.</translation>
</message>
<message>
<source>Draft</source>
<translation type="unfinished">Skica</translation>
</message>
<message>
<source>Published</source>
<translation type="unfinished">Objavljeno</translation>
</message>
<message>
<source>Pending</source>
<translation type="unfinished">Na ฤekanju</translation>
</message>
<message>
<source>Archived</source>
<translation type="unfinished">Arhivirano</translation>
</message>
<message>
<source>Rejected</source>
<translation type="unfinished">Odbijeno</translation>
</message>
<message>
<source>Untouched draft</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create a copy of version #%version_number.</source>
<translation type="unfinished">Napravi kopiju verzije #%version_number.</translation>
</message>
<message>
<source>You cannot make copies of versions because you do not have permission to edit the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit the contents of version #%version_number.</source>
<translation type="unfinished">Izmeni sadrลพaj verzije #%version_number.</translation>
</message>
<message>
<source>You cannot edit the contents of version #%version_number either because it is not a draft or because you do not have permission to edit the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This object does not have any versions.</source>
<translation type="unfinished">Objekt nema ni jednu verziju.</translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove the selected versions from the object.</source>
<translation type="unfinished">Ukloni izabrane verzije iz objekta.</translation>
</message>
<message>
<source>Show differences</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back</source>
<translation type="unfinished">Nazad</translation>
</message>
<message>
<source>Published version</source>
<translation type="unfinished">Objavljena verzija</translation>
</message>
<message>
<source>Translations</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Copy translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New drafts [%newerDraftCount]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This object does not have any drafts.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Differences between versions %oldVersion and %newVersion</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Old version</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Inline changes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Block changes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New version</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back to history</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/newcontent</name>
<message>
<source>New content since last visit</source>
<translation>Novi sadrลพaj od vaลกe poslednje posete</translation>
</message>
<message>
<source>Your last visit to this site was</source>
<translation>Zadnji put ste bili tu</translation>
</message>
<message>
<source>There is no new content since your last visit.</source>
<translation>Nema novog sadrลพaja od vaลกe poslednje posete.</translation>
</message>
</context>
<context>
<name>design/standard/content/pdf</name>
<message>
<source>#page of #total</source>
<translation>#page od #total</translation>
</message>
<message>
<source>#level1 - #level2</source>
<translation>#level1 - #level2</translation>
</message>
<message>
<source>#levelIndex1:#levelIndex2</source>
<translation>#levelIndex1:#levelIndex2</translation>
</message>
<message>
<source>Content</source>
<translation>Sadrลพaj</translation>
</message>
<message>
<source>Versionview not supported in PDF yet</source>
<translation>Prikaz verzije joลก nije moguฤ u PDF formatu</translation>
</message>
<message>
<source>eZ Publish PDF export</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/poll</name>
<message>
<source>Poll %pollname</source>
<translation>Anketa %pollname</translation>
</message>
<message>
<source>%count total votes</source>
<translation>Ukupno glasova: %count</translation>
</message>
<message>
<source>Poll results</source>
<translation>Rezultati ankete</translation>
</message>
<message>
<source>Anonymous users are not allowed to vote in this poll. Please log in.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have already voted in this poll.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/removetranslation</name>
<message>
<source>Language</source>
<translation type="unfinished">Jezik</translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/search</name>
<message>
<source>Advanced search</source>
<translation>Napredno pretraลพivanje</translation>
</message>
<message>
<source>Any class</source>
<translation>Bilo koja klasa</translation>
</message>
<message>
<source>Update attributes</source>
<translation>Atributi aลพuriranih elemenata</translation>
</message>
<message>
<source>Any section</source>
<translation>Bilo kojeg segmenta</translation>
</message>
<message>
<source>Any time</source>
<translation>datum nije vaลพan</translation>
</message>
<message>
<source>Last day</source>
<translation>unutar jednog dana</translation>
</message>
<message>
<source>Last week</source>
<translation>u zadnjih sedmica dana</translation>
</message>
<message>
<source>Last month</source>
<translation>u zadnjih mesec dana</translation>
</message>
<message>
<source>Last three months</source>
<translation>u zadnja tri meseca</translation>
</message>
<message>
<source>Last year</source>
<translation>u zadnjih godinu dana</translation>
</message>
<message>
<source>Search</source>
<translation>Pretraลพi</translation>
</message>
<message>
<source>For more options try the %1Advanced search%2</source>
<comment>The parameters are link start and end tags.</comment>
<translation>Za viลกe opcija kod pretrage koristite %1Napredno pretraลพivanje%2</translation>
</message>
<message>
<source>No results were found when searching for "%1"</source>
<translation>Niลกta nije pronaฤeno za upit ''%1"</translation>
</message>
<message>
<source>Search for "%1" returned %2 matches</source>
<translation>Pronaฤeno je %2 rezultata koji su zadovoljili kriterijume pretraลพivanja "%1"</translation>
</message>
<message>
<source>Search all the words</source>
<translation>Traลพi sve reฤi</translation>
</message>
<message>
<source>Search the exact phrase</source>
<translation>Traลพi taฤnu frazu</translation>
</message>
<message>
<source>Search with at least one of the words</source>
<translation>Traลพi barem jednu od unesenih reฤi</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Class attribute</source>
<translation>Atribut klase</translation>
</message>
<message>
<source>In</source>
<translation>Unutar</translation>
</message>
<message>
<source>Published</source>
<translation>Objavljeno</translation>
</message>
<message>
<source>Display per page</source>
<translation>Broj rezultata po stranici</translation>
</message>
<message>
<source>5 items</source>
<translation>5 rezultata</translation>
</message>
<message>
<source>10 items</source>
<translation>10 rezultata</translation>
</message>
<message>
<source>20 items</source>
<translation>20 rezultata</translation>
</message>
<message>
<source>30 items</source>
<translation>30 rezultata</translation>
</message>
<message>
<source>50 items</source>
<translation>50 rezultata</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Search tips</source>
<translation>Saveti za pretraลพivanje</translation>
</message>
<message>
<source>Check spelling of keywords.</source>
<translation>Proverite jeste li ispravno napisali kljuฤne reฤi.</translation>
</message>
<message>
<source>Try more general keywords.</source>
<translation>Pokuลกajte s uopลกtenijim kljuฤnim reฤima.</translation>
</message>
<message>
<source>Any attribute</source>
<translation>svi atributi</translation>
</message>
<message>
<source>The following words were excluded from the search</source>
<translation>Sledeฤe reฤi iskljuฤene su iz pretraลพivanja</translation>
</message>
<message>
<source>Try changing some keywords eg. &quot;car&quot; instead of &quot;cars&quot;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Fewer keywords result in more matches. Try reducing keywords until you get a result.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/content/tipafriend</name>
<message>
<source>Tip a friend</source>
<translation>Poลกaljite prijatelju</translation>
</message>
<message>
<source>The message was sent.</source>
<translation>Poruka je poslana.</translation>
</message>
<message>
<source>Click here to return to the original page.</source>
<translation>Pritisni ovde za povratak na poฤetnu stranicu.</translation>
</message>
<message>
<source>The message was not sent.</source>
<translation>Ova poruka nije poslana.</translation>
</message>
<message>
<source>The message was not sent due to an unknown error. Please notify the site administrator about this error.</source>
<translation>Ova poruka nije poslana zbog nepoznate greลกke. Molimo Vas da %1obavestite%2 administratora.</translation>
</message>
<message>
<source>Your name</source>
<translation>Vaลกe ime</translation>
</message>
<message>
<source>Your email address</source>
<translation>Vaลกa e-mail adresa</translation>
</message>
<message>
<source>Receivers name</source>
<translation>Ime primaoca</translation>
</message>
<message>
<source>Receivers email address</source>
<translation>E-mail adresa primaoca</translation>
</message>
<message>
<source>Subject</source>
<translation>Naslov</translation>
</message>
<message>
<source>Comment</source>
<translation>Komentar</translation>
</message>
<message>
<source>Send</source>
<translation>Poลกalji</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>This message was sent to you because "%1 <%2>" thought you might find the page "%3" at %4 interesting.</source>
<translation>Primili ste ovu poruku jer je ''%1 <%2>'' smatrao da bi Vas mogla zanimati stranica ''%3'' na %4.</translation>
</message>
<message>
<source>Please correct the following errors</source>
<translation>Molimo ispravite sledeฤe greลกke</translation>
</message>
<message>
<source>This is the link to the page</source>
<translation>Ovo je link na stranicu</translation>
</message>
<message>
<source>Comment by "%1 <%2>"</source>
<translation>Komentarisao "%1 <%2>"</translation>
</message>
</context>
<context>
<name>design/standard/content/trash</name>
<message>
<source>Trash</source>
<translation>Smeฤe</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Trash is empty</source>
<translation>Smeฤe je prazno</translation>
</message>
<message>
<source>Empty Trash</source>
<translation>Isprazni smeฤe</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Current version</source>
<translation>Tekuฤa verzija</translation>
</message>
<message>
<source>Restore</source>
<translation>Obnovi</translation>
</message>
<message>
<source>Select all</source>
<translation>Oznaฤi sve</translation>
</message>
<message>
<source>Deselect all</source>
<translation>Odznaฤi sve</translation>
</message>
</context>
<context>
<name>design/standard/content/upload</name>
<message>
<source>Upload file</source>
<translation>Uฤitaj datoteku</translation>
</message>
<message>
<source>Some errors occurred</source>
<translation>Doลกlo je do greลกke</translation>
</message>
<message>
<source>Location</source>
<translation>Lokacija</translation>
</message>
<message>
<source>Automatic</source>
<translation>Automatski</translation>
</message>
<message>
<source>Upload</source>
<translation>Uฤitaj</translation>
</message>
<message>
<source>Click here to upload a file. The file will be placed within the location that is specified using the dropdown menu on the top.</source>
<translation>Klikni ovde za uฤitavanje datoteke. Datoteka ฤe biti smeลกtena unutar lokacije koju odredite koristeฤi padajuฤi menu na vrhu.</translation>
</message>
<message>
<source>Choose a file from your locale machine then click the "Upload" button. An object will be created according to file type and placed in your chosen location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File</source>
<translation type="unfinished">Datoteka</translation>
</message>
</context>
<context>
<name>design/standard/content/version</name>
<message>
<source>Version</source>
<translation type="obsolete">Verzija</translation>
</message>
<message>
<source>Versions for: %1</source>
<translation type="obsolete">Verzije za: %1</translation>
</message>
<message>
<source>Unable to create new version</source>
<translation type="obsolete">Nije moguฤe kreirati novu verziju</translation>
</message>
<message>
<source>Edit</source>
<translation type="obsolete">Izmena</translation>
</message>
<message>
<source>Copy and edit</source>
<translation type="obsolete">Kopiraj i izmeni</translation>
</message>
<message>
<source>Version history limit has been exceeded and no archived version can be removed by the system.</source>
<translation type="obsolete">Prekoraฤeno je ograniฤenje istorijata pojedine verzije te ni jedna saฤuvana verzija ne moลพe biti uklonjena iz sistema.</translation>
</message>
<message>
<source>You can change your version history settings in content.ini, remove draft versions or edit existing drafts.</source>
<translation type="obsolete">Moลพete promeniti svoja podeลกavanja istorijata verzija u content.ini, ukloni skice ili izmeni postojeฤe skice. </translation>
</message>
<message>
<source>Version %1 is not available for editing any more, only drafts can be edited.</source>
<translation type="obsolete">Verziju %1 nije viลกe moguฤe editovati, moguฤe je editovati samo skice.</translation>
</message>
<message>
<source>Status</source>
<translation type="obsolete">Status</translation>
</message>
<message>
<source>Translations</source>
<translation type="obsolete">Prevodi</translation>
</message>
<message>
<source>Creator</source>
<translation type="obsolete">Autor</translation>
</message>
<message>
<source>Modified</source>
<translation type="obsolete">Promenjeno</translation>
</message>
</context>
<context>
<name>design/standard/content/versions</name>
<message>
<source>This object does not have any versions.</source>
<translation type="obsolete">Objekt nema ni jednu verziju.</translation>
</message>
</context>
<context>
<name>design/standard/content/view</name>
<message>
<source>Select</source>
<translation>Oznaฤi</translation>
</message>
<message>
<source>My drafts</source>
<translation>Moje skice</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>You have no drafts</source>
<translation>Nemate skica</translation>
</message>
<message>
<source>Related objects</source>
<translation>Povezani objekti</translation>
</message>
<message>
<source>None</source>
<translation>Nema</translation>
</message>
<message>
<source>Change</source>
<translation>Promeni</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>Publish</source>
<translation>Objavi</translation>
</message>
<message>
<source>Versions</source>
<translation>Verzije</translation>
</message>
<message>
<source>Choose initial placement</source>
<translation>Izaberi prvobitno mesto</translation>
</message>
<message>
<source>My bookmarks</source>
<translation>Moje oznake u knjizi</translation>
</message>
<message>
<source>Add bookmarks</source>
<translation>Dodaj oznake za knjigu</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>You have no bookmarks</source>
<translation>Nemate oznaka za knjigu</translation>
</message>
<message>
<source>Choose items to bookmark</source>
<translation>Izaberite elemente koje ฤete oznaฤiti</translation>
</message>
<message>
<source>Choose new placement</source>
<translation>Izaberite novo mesto</translation>
</message>
<message>
<source>Choose placements</source>
<translation>Izaberite nova mesta</translation>
</message>
<message>
<source>Choose related objects</source>
<translation>Izaberite povezane objekte</translation>
</message>
<message>
<source>Empty Draft</source>
<translation>Prazna skica</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>Last modified</source>
<translation>Poslednja promena</translation>
</message>
<message>
<source>Current version</source>
<translation>Trenutna verzija</translation>
</message>
<message>
<source>Translation</source>
<translation>Prevod</translation>
</message>
<message>
<source>Placement</source>
<translation>Mesto</translation>
</message>
<message>
<source>Site Design</source>
<translation>Dizajn stranice</translation>
</message>
<message>
<source>Select all</source>
<translation>Oznaฤi sve</translation>
</message>
<message>
<source>Deselect all</source>
<translation>Odznaฤi sve</translation>
</message>
<message>
<source>My pending list</source>
<translation>Lista poslova koji me oฤekuju</translation>
</message>
<message>
<source>Your pending list is empty</source>
<translation>Vaลกa lista poslova koji Vas oฤekuju je prazna</translation>
</message>
<message>
<source>Choose node for default selection</source>
<translation>Izaberi ฤvor za osnovni izbor</translation>
</message>
<message>
<source>Collected info</source>
<translation>Prikupi podatke</translation>
</message>
<message>
<source>Choose new location for %objectname</source>
<translation>Izaberi novu lokaciju za objekt %object_name</translation>
</message>
<message>
<source>Upload file</source>
<translation>Uฤitaj datoteku</translation>
</message>
<message>
<source>Site Access</source>
<translation>Pristup stranici</translation>
</message>
<message>
<source>Please choose where you want the default selection of object relation to start from.
Select the placement then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose where you want to place the new %classname.
Select the placement then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>These are the objects you have bookmarked. Click on an object to view it or if you have permission you can edit the object by clicking the edit button.
If you want to add more objects to this list click the %emphasize_startAdd bookmarks%emphasize_stop button.
Removing objects will only remove them from this list.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose the items you want to add to your bookmark list.
Select your items then click the %buttonname button.
Using the recent and bookmark items for quick selection is also possible.
Click on item names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose a new location for the copy of %objectname</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose where you want to copy %objectname.
Select the new location then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose new location for the copy of subtree of node %node_name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose where you want to copy subtree of node %node_name.
Select the new location then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose where you want to place %objectname.
Select the new location then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose the new placement for %name.
The previous placement was in %placementname.
Select the placement then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose where you want to place %name.
Select your placements then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose objects which you want to relate to %name.
Select your objects then click the %buttonname button.
Using the recent and bookmark items for quick selection is also possible.
Click on object names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose the node to exchange for %objectname</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose which node you want to exchange %objectname with.
Select the node then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>These are the current objects you are working on. The drafts are owned by you and can only be seen by you.
You can either edit the drafts or remove them if you do not need them any more.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Language</source>
<translation type="unfinished">Jezik</translation>
</message>
<message>
<source>Choose a file from your locale machine then click the "Upload" button. An object will be created according to file type and placed in your chosen location.
</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/contentstructuremenu</name>
<message>
<source>Fold/Unfold</source>
<translation>Skupi/Raลกiri</translation>
</message>
<message>
<source>[%classname] Click on the icon to display a context-sensitive menu.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/design/templateadmin</name>
<message>
<source>Template edit</source>
<translation>Izmena ลกablona</translation>
</message>
<message>
<source>Save</source>
<translation>Snimi</translation>
</message>
<message>
<source>Discard</source>
<translation>Odbaci</translation>
</message>
</context>
<context>
<name>design/standard/design/templatecreate</name>
<message>
<source>Could not create template, permission denied.</source>
<translation>Nije bilo moguฤe kreirati ลกablon, uskraฤena dozvola.</translation>
</message>
<message>
<source>Invalid name. You can only use the characters a-z, numbers and _.</source>
<translation>Netaฤno ime. Moลพete koristiti iskljuฤivo znakove a-z, brojeve i_.</translation>
</message>
<message>
<source>Create new template override for <%template_name></source>
<translation>Kreiraj novi ลกablon za zaobilaลพenje <%template_name></translation>
</message>
<message>
<source>The newly created template file will be placed in</source>
<translation>Novo kreirana datoteka ลกablona biฤe saฤuvana u</translation>
</message>
<message>
<source>Filename</source>
<translation>Datoteka</translation>
</message>
<message>
<source>Override keys</source>
<translation>Kljuฤevi zaobilaska</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>All classes</source>
<translation>Sve klase</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>All sections</source>
<translation>Svi segmenti</translation>
</message>
<message>
<source>Node ID</source>
<translation>ฤvor ID</translation>
</message>
<message>
<source>Base template on</source>
<translation>Utemeljen ลกablon na</translation>
</message>
<message>
<source>Empty file</source>
<translation>Prazna datoteka</translation>
</message>
<message>
<source>Copy of default template</source>
<translation>Kopija osnovnog ลกablona</translation>
</message>
<message>
<source>Container (with children)</source>
<translation>Kontejner (sa decom)</translation>
</message>
<message>
<source>View (without children)</source>
<translation>Prikaz (bez dece)</translation>
</message>
<message>
<source>Any</source>
<translation>Bilo koji</translation>
</message>
<message>
<source>Object</source>
<translation>Objekt</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
</context>
<context>
<name>design/standard/design/templatelist</name>
<message>
<source>Complete template list</source>
<translation>Kompletna lista ลกablona</translation>
</message>
<message>
<source>Template</source>
<translation>ล ablon</translation>
</message>
<message>
<source>Design resource</source>
<translation>Izvor dizajna</translation>
</message>
<message>
<source>Most common templates</source>
<translation>Najuobiฤajeniji ลกabloni</translation>
</message>
</context>
<context>
<name>design/standard/design/templateview</name>
<message>
<source>Overrides for <%template_name> template in <%current_siteaccess> siteaccess [%override_count]</source>
<translation>Zaobilazni ลกabloni <%template_name> u tekuฤem <%current_siteaccess> [%override_count]</translation>
</message>
<message>
<source>Default template resource</source>
<translation>Osnovni izvor ลกablona</translation>
</message>
<message>
<source>Siteaccess</source>
<translation>Siteaccess</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>File</source>
<translation>Datoteka</translation>
</message>
<message>
<source>Match conditions</source>
<translation>Uskladi uslove</translation>
</message>
<message>
<source>Priority</source>
<translation>Prioritet</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>New override</source>
<translation>Novi zaobilazak</translation>
</message>
<message>
<source>Update priorities</source>
<translation>Aลพuriraj prioritete</translation>
</message>
</context>
<context>
<name>design/standard/design/toolbar</name>
<message>
<source>Tool List for Toolbar_%toolbar_position</source>
<translation>Lista alata za Toolbar_%toolbar_position</translation>
</message>
<message>
<source>Tool</source>
<translation>Alat</translation>
</message>
<message>
<source>Placement</source>
<translation>Mesto</translation>
</message>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>True</source>
<translation>Taฤno</translation>
</message>
<message>
<source>False</source>
<translation>Netaฤno</translation>
</message>
<message>
<source>Yes</source>
<translation>Da</translation>
</message>
<message>
<source>No</source>
<translation>Ne</translation>
</message>
<message>
<source>Update Placement</source>
<translation>Unapredi mesto</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Add Tool</source>
<translation>Dodaj alat</translation>
</message>
<message>
<source>Toolbar management</source>
<translation>Upravljanje alatnom trakom</translation>
</message>
<message>
<source>Current siteaccess</source>
<translation>Trenutni SiteAccess</translation>
</message>
<message>
<source>Select siteaccess</source>
<translation>Odaderi siteaccess</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Available toolbars</source>
<translation>Dostupne alatne trake</translation>
</message>
<message>
<source>Siteaccess</source>
<translation type="unfinished">Siteaccess</translation>
</message>
</context>
<context>
<name>design/standard/edit/</name>
<message>
<source>Siteaccess</source>
<translation type="unfinished">Siteaccess</translation>
</message>
<message>
<source>Global (override)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/error/kernel</name>
<message>
<source>Access denied</source>
<translation>Uskraฤen pristup</translation>
</message>
<message>
<source>Click the Login button to login.</source>
<translation>Izaberite dugme za prijavu da biste se prijavili.</translation>
</message>
<message>
<source>Not found</source>
<translation>Nije pronaฤen</translation>
</message>
<message>
<source>Module not found</source>
<translation>Modul nije pronaฤen</translation>
</message>
<message>
<source>View not found</source>
<translation>Prikaz nije pronaฤen</translation>
</message>
<message>
<source>View is disabled</source>
<translation>Prikaz je onemoguฤen</translation>
</message>
<message>
<source>Module is disabled</source>
<translation>Modul je onemoguฤen</translation>
</message>
<message>
<source>Your current user does not have the proper privileges to access this page.</source>
<translation>Korisnik nema odgovarajuฤa ovlaลกฤenja za pristup ovoj stranici.</translation>
</message>
<message>
<source>The resource you requested was not found.</source>
<translation>Izvor koji ste zatraลพili nije pronaฤen.</translation>
</message>
<message>
<source>The the id or name of the resource was misspelled, try changing it.</source>
<translation>Identifikacija ili ime izvora je pogreลกno napisano, pokuลกajte ga promeniti. </translation>
</message>
<message>
<source>The resource no longer exists on the site.</source>
<translation>Izvor viลกe ne postoji na ovoj stranici. </translation>
</message>
<message>
<source>The requested module %module could not be found.</source>
<translation>Navedeni modul %module nije pronaฤen.</translation>
</message>
<message>
<source>The module does not exist on this site.</source>
<translation>Na ovoj stranici ne postoji navedeni modul.</translation>
</message>
<message>
<source>The requested view %view could not be found in module %module</source>
<translation>Zatraลพeni prikaz %view nije pronaฤen u modulu %module</translation>
</message>
<message>
<source>The view does not exist for the module %module.</source>
<translation>Za modul %module prikaz ne postoji.</translation>
</message>
<message>
<source>The view %module/%view is disabled and cannot be accessed.</source>
<translation>Prikaz %module/%view je onemoguฤen te mu se ne moลพe pristupiti.</translation>
</message>
<message>
<source>The module %module is disabled and cannot be accessed.</source>
<translation>Modul %modul je onemoguฤen te mu se ne moลพe pristupiti.</translation>
</message>
<message>
<source>Object is unavailable</source>
<translation>Objekt nije dostupan</translation>
</message>
<message>
<source>The object you requested is not currently available.</source>
<translation>Objekt koji ste zatraลพili tenutno nije dostupan.</translation>
</message>
<message>
<source>The id or name of the object was misspelled, try changing it.</source>
<translation>Identifikacija ili ime objekta je pogreลกno napisano, probajte ga promeniti. </translation>
</message>
<message>
<source>The object is no longer available on the site.</source>
<translation>Objekt viลกe nije dostupan na stranici.</translation>
</message>
<message>
<source>Object moved</source>
<translation>Objekt je premeลกten</translation>
</message>
<message>
<source>The object is no longer available at this URL.</source>
<translation>Objekt nije viลกe dostupan na tom URL-u.</translation>
</message>
<message>
<source>You should automatically be redirected to the new location. If not click %url.</source>
<translation>Trebali biste automatski biti preusmereni na novu lokaciju. Ako niste pritisnite %url.</translation>
</message>
<message>
<source>You are currently not logged in to the site, to get proper access create a new user or login with an existing user.</source>
<translation>Trenutno niste prijavljeni na %sitename, logujte se sa svojim loginom i lozinkom.</translation>
</message>
<message>
<source>Permission required</source>
<translation>Potrebna dozvola</translation>
</message>
<message>
<source>Module : </source>
<translation>Modul:</translation>
</message>
<message>
<source>Function : </source>
<translation>Funkcija:</translation>
</message>
<message>
<source>You misspelled some parts of your URL, try changing it.</source>
<translation>Pogreลกno ste napisali URL, proverite taฤnost.</translation>
</message>
<message>
<source>Login</source>
<comment>Button</comment>
<translation>Prijava</translation>
</message>
<message>
<source>The module name was misspelled, try changing the URL.</source>
<translation>Naziv modula je pogreลกno napisan.</translation>
</message>
<message>
<source>The view name was misspelled, try changing the URL.</source>
<translation>Naziv prikaza je pogreลกno napisan.</translation>
</message>
<message>
<source>Possible reasons for this are</source>
<translation>Moguฤi razlozi za to su</translation>
</message>
<message>
<source>You do not have permission to access this area.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This site uses siteaccess matching in the URL and you did not supply one, try inserting a siteaccess name before the module in the URL .</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/error/shop</name>
<message>
<source>Not a product</source>
<translation>Nije proizvod</translation>
</message>
<message>
<source>The requested object is not a product and cannot be used by the shop module.</source>
<translation>Zatraลพeni objekt nije proizvod i ne moลพe biti koriลกฤen u webprodavnici.</translation>
</message>
<message>
<source>Incompatible product type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The requested object and current basket have incompatible price datatypes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid preferred currency</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'%1' currency does not exist.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'%1' cannot be used because it is inactive.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/ezinfo/about</name>
<message>
<source>eZ Publish information: %version</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>What is eZ Publish?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>License</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contributors</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Copyright Notice</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Third-Party Software</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Extensions</source>
<translation type="unfinished">Ekstenzije</translation>
</message>
</context>
<context>
<name>design/standard/form</name>
<message>
<source>Thank you for your feedback</source>
<translation type="obsolete">Hvala Vam na povratnoj informaciji</translation>
</message>
<message>
<source>Your information was successfully received.</source>
<translation type="obsolete">Vaลกi podaci su primljeni.</translation>
</message>
</context>
<context>
<name>design/standard/gui</name>
<message>
<source>Delete</source>
<translation>Obriลกi</translation>
</message>
</context>
<context>
<name>design/standard/layout</name>
<message>
<source>To log in enter a valid login and password.</source>
<translation>Da bi se prijavili unesite ispravan login i lozinku.</translation>
</message>
<message>
<source>Search</source>
<translation>Pretraลพi</translation>
</message>
<message>
<source>Login</source>
<translation>Prijava</translation>
</message>
<message>
<source>Logout</source>
<translation>Odjava</translation>
</message>
<message>
<source>Printable version</source>
<translation type="obsolete">Verzija za ispis</translation>
</message>
<message>
<source>Advanced search</source>
<translation>Napredno pretraลพivanje</translation>
</message>
<message>
<source>Frontpage</source>
<translation>Prva stranica</translation>
</message>
<message>
<source>Sitemap</source>
<translation>Sitemap</translation>
</message>
<message>
<source>Personal</source>
<translation>Liฤno</translation>
</message>
<message>
<source>Trash</source>
<translation>Smeฤe</translation>
</message>
<message>
<source>Change Password</source>
<translation>Promena lozinke</translation>
</message>
<message>
<source>Redirect</source>
<translation>Preusmeri</translation>
</message>
<message>
<source>Module load failed</source>
<translation>Uฤitavanje u modul nije uspelo</translation>
</message>
<message>
<source>Undefined module: </source>
<translation>Nedefinisan modul:</translation>
</message>
<message>
<source>%sitetitle front page</source>
<translation>%sitetitle poฤetna stranica</translation>
</message>
<message>
<source>Search %sitetitle</source>
<translation>Traลพi %sitetitle</translation>
</message>
<message>
<source>Redirecting to %url</source>
<translation>Preusmeri na %url</translation>
</message>
<message>
<source>New</source>
<translation>Novi</translation>
</message>
<message>
<source>Filter</source>
<translation type="unfinished">Filtar</translation>
</message>
<message>
<source>Welcome to eZ Publish administration</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish redirection - %url</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/location</name>
<message>
<source>Removal of locations</source>
<translation>Uklanjanje lokacija</translation>
</message>
<message>
<source>Some of the locations you tried to remove has children, are you really sure you want to remove those locations?
If you do all the children will be removed as well.</source>
<translation>Neke od lokacija koje ลพelite ukloniti imaju decu, jeste li sigurni da ลพelite ukloniti lokacije?
Ako uklonite lokacije ukloniฤete i decu.</translation>
</message>
<message>
<source>Path</source>
<translation>Putanja</translation>
</message>
<message>
<source>Count</source>
<translation>Zbir</translation>
</message>
<message>
<source>Remove locations</source>
<translation>Ukloni lokacije</translation>
</message>
<message>
<source>Cancel removal</source>
<translation>Poniลกti uklanjanje</translation>
</message>
<message>
<source>Please wait while your content is being published</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your content has been published successfully</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>View the published item</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Publishing has been deferred to crontab and will be published when the operation resumes. The object is also listed in your dashboard under pending items.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>View your pending content</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/menuconfig</name>
<message>
<source>Menu management</source>
<translation>Upravljanje menijem</translation>
</message>
<message>
<source>Current siteaccess</source>
<translation>Trenutni SiteAccess</translation>
</message>
<message>
<source>Select siteaccess</source>
<translation>Izaberite siteaccess</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Menu positioning</source>
<translation>Pozicija menija</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Siteaccess</source>
<translation type="unfinished">Siteaccess</translation>
</message>
</context>
<context>
<name>design/standard/navigator</name>
<message>
<source>Previous</source>
<translation>Nazad</translation>
</message>
<message>
<source>Next</source>
<translation>Napred</translation>
</message>
</context>
<context>
<name>design/standard/node</name>
<message>
<source>Are you sure you want to remove %1 from node %2?</source>
<translation>Jeste li sigurni da ลพelite ukloniti %1 iz ฤvora %2?</translation>
</message>
<message>
<source>Confirm</source>
<translation>Potvrdi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Note:</source>
<translation>Pazi:</translation>
</message>
<message>
<source>Removed nodes can be retrieved later. You will find them in the trash.</source>
<translation>Uklonjeni ฤvorovi mogu biti pronaฤeni kasnije. Pronaฤi ฤete ih u smeฤu.</translation>
</message>
<message>
<source>Removing node assignment of %1</source>
<translation>Ukloni node zadatak %1</translation>
</message>
<message>
<source>Removing this assignment will also remove its %1 children.</source>
<translation>Uklanjanjem zadatka ujedno ฤe se ukloniti i %1 dete.</translation>
</message>
<message>
<source>Are you sure you want to remove these items?</source>
<translation type="obsolete">Jeste li sigurni da ลพelite ukloniti navedene elemente?</translation>
</message>
<message>
<source>%nodename and its %childcount children. %additionalwarning</source>
<translation>%nodename i njegovu %childcount decu. %additionalwarning</translation>
</message>
<message>
<source>%nodename %additionalwarning</source>
<translation>%nodename %additionalwarning</translation>
</message>
<message>
<source>Move to trash</source>
<translation>Premesti u smeฤe</translation>
</message>
<message>
<source>Note</source>
<translation>Napomena</translation>
</message>
<message>
<source>Are you sure you want to remove the following translations from object <%1>?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If %trashname is checked you will find the removed items in the trash afterward.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/node/view</name>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>User</source>
<translation>Korisnik</translation>
</message>
<message>
<source>User group</source>
<translation>Grupa korisnika</translation>
</message>
<message>
<source>Document</source>
<translation>Dokument</translation>
</message>
<message>
<source>Copy</source>
<translation>Kopiraj</translation>
</message>
<message>
<source>Update</source>
<translation>Aลพuriraj</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Site map</source>
<translation>Mapa sajta</translation>
</message>
<message>
<source>Create here</source>
<translation>Kreiraj ovde</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Priority</source>
<translation>Prioritet</translation>
</message>
<message>
<source>Add to Bookmarks</source>
<translation>Dodaj oznakama za knjigu</translation>
</message>
<message>
<source>Notify me about updates</source>
<translation>Obavesti me o novostima</translation>
</message>
<message>
<source>Preview</source>
<translation>Pregled</translation>
</message>
<message>
<source>Select all</source>
<translation>Izaberi sve</translation>
</message>
<message>
<source>Deselect all</source>
<translation>Odznaฤi sve</translation>
</message>
<message>
<source>Click to create a custom template</source>
<translation>Izaberi da bi kreirao svoj ลกablon</translation>
</message>
<message>
<source>Default object view.</source>
<translation>Osnovni prikaz objekta.</translation>
</message>
<message>
<source>Node ID</source>
<translation>Identifikacija ฤvora</translation>
</message>
<message>
<source>Object ID</source>
<translation>Objekt ID</translation>
</message>
<message>
<source>Missing or invalid input</source>
<translation>Unos nedostaje ili je netaฤan</translation>
</message>
<message>
<source>Placed in</source>
<translation>Smeลกten u</translation>
</message>
</context>
<context>
<name>design/standard/notification</name>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>%sitename notification system</source>
<translation>%sitename sistem obaveลกtavanja</translation>
</message>
<message>
<source>[%sitename] New collaboration item</source>
<translation>[%sitename] Nova stavka za saradnju</translation>
</message>
<message>
<source>Receive all messages combined in one digest</source>
<translation>Primi sve poruke objedinjene u jedan kratki pregled</translation>
</message>
<message>
<source>[%sitename] Digest for %date</source>
<translation>[%sitename] kratki pregled za %date</translation>
</message>
<message>
<source>Do you want to receive messages combined in digest</source>
<translation>ลพelite li primati poruke u obliku kratkog pregleda</translation>
</message>
<message>
<source>Digest settings</source>
<translation>Podeลกavanja kratkog pregleda</translation>
</message>
<message>
<source>Day of the week</source>
<translation>Dan u nedelji</translation>
</message>
<message>
<source>New</source>
<translation>Novi</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Cancel</source>
<translation type="obsolete">Odustani</translation>
</message>
<message>
<source>Notification admin</source>
<translation>Administracija obaveลกtenja</translation>
</message>
<message>
<source>Time event was spawned</source>
<translation>Vremenski event je stvoren</translation>
</message>
<message>
<source>Run notification filter</source>
<translation>Ukljuฤi filtar za obaveลกtenja</translation>
</message>
<message>
<source>Run</source>
<translation>Ukljuฤi</translation>
</message>
<message>
<source>Spawn time event</source>
<translation>Stvori vremenski dogaฤaj</translation>
</message>
<message>
<source>Spawn</source>
<translation>Stvori</translation>
</message>
<message>
<source>Notification settings</source>
<translation>Podeลกavanja obaveลกtenja</translation>
</message>
<message>
<source>"%name" was updated</source>
<translation>''%name'' je aลพurirano</translation>
</message>
<message>
<source>The item can be viewed by using the URL below.</source>
<translation>Ovaj element prikazan je koriลกฤenjem niลพe navedenog URL-a.</translation>
</message>
<message>
<source>"%name" was published</source>
<translation>''%name'' je objavljen</translation>
</message>
<message>
<source>Daily</source>
<translation>Dnevno</translation>
</message>
<message>
<source>If the day of month number you have chosen is larger than the number of days in the current month, then the last day of the current month will be used instead.</source>
<translation>Ako je odabrani broj dana u mesecu veฤi od stvarnog broja dana, zadnji dan u tekuฤem mesecu ฤe biti izabran.</translation>
</message>
<message>
<source>Time of day</source>
<translation>Vreme</translation>
</message>
<message>
<source>Weekly, day of week</source>
<translation>Nedeljno, dan u nedelji</translation>
</message>
<message>
<source>Monthly, day of month</source>
<translation>Meseฤno, dan u mesecu</translation>
</message>
<message>
<source>Node notification</source>
<translation>Obaveลกtenje ฤvora</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Select</source>
<translation>Izaberi</translation>
</message>
<message>
<source>Notification filter processed all available notification events</source>
<translation>Izvrลกeno je filtriranje obaveลกtenja svih dostupnih dogaฤaja.</translation>
</message>
<message>
<source>If you do not want to continue receiving these notifications,
change your settings at:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This email is to inform you that a new collaboration item is awaiting your attention at %sitename.
The item be can viewed by using the URL below.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This digest email is to inform you on new items at %sitename.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This email is to inform you on news at %sitename.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This email is to inform you that an updated item has been published at %sitename.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This email is to inform you that a new item has been published at %sitename.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This email is to inform you that a new collaboration item is awaiting your attention at %sitename.
The item can viewed by using the URL below.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/notification/addingresult</name>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Add to my notifications</source>
<translation>Dodaj u moje obaveลกtenja</translation>
</message>
<message>
<source>Notification for node <%node_name> already exists.</source>
<translation>Obavลกtenje za ฤvor <%node_name> veฤ postoji.</translation>
</message>
<message>
<source>Notification for node <%node_name> was added successfully.</source>
<translation>Obaveลกtenje za ฤvor <%node_name> je uspeลกno dodano.</translation>
</message>
</context>
<context>
<name>design/standard/notification/collaboration</name>
<message>
<source>Collaboration notification</source>
<translation>Obaveลกtenje o saradnji</translation>
</message>
<message>
<source>Choose which collaboration items you want to get notifications for.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/package</name>
<message>
<source>Packages</source>
<translation>Paketi</translation>
</message>
<message>
<source>The following packages are available on this system</source>
<translation>Sledeฤi paketi dostupni su u ovom sistemu</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>Summary</source>
<translation>Ukratko</translation>
</message>
<message>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<source>Upload package</source>
<translation>Uฤitaj paket</translation>
</message>
<message>
<source>Install package</source>
<translation>Instaliraj paket</translation>
</message>
<message>
<source>Please provide information on the changes.</source>
<translation>Molimo dostavite podatke o promenama.</translation>
</message>
<message>
<source>Changes</source>
<translation>Promene</translation>
</message>
<message>
<source>Package name</source>
<translation>Ime paketa</translation>
</message>
<message>
<source>Description</source>
<translation>Opis</translation>
</message>
<message>
<source>Package host</source>
<translation>Host paketa</translation>
</message>
<message>
<source>Packager</source>
<translation>Packager</translation>
</message>
<message>
<source>Name</source>
<comment>Maintainer name</comment>
<translation>Ime</translation>
</message>
<message>
<source>Role</source>
<comment>Maintainer role</comment>
<translation>Uloga</translation>
</message>
<message>
<source>Create package</source>
<translation>Kreiraj paket</translation>
</message>
<message>
<source>Available wizards</source>
<translation>Dostupni ฤarobnjaci</translation>
</message>
<message>
<source>Choose one of the following wizards for creating a package</source>
<translation>Izaberi jednog od sledeฤih ฤarobnjaka za kreiranje paketa</translation>
</message>
<message>
<source>Class list</source>
<translation>Lista klasa</translation>
</message>
<message>
<source>Currently added image files</source>
<translation>Trenutno dodane grafiฤke datoteke</translation>
</message>
<message>
<source>Package wizard: %wizardname</source>
<translation>ฤarobnjak paketa: %wizardname</translation>
</message>
<message>
<source>Install items</source>
<translation>Instaliraj elemente</translation>
</message>
<message>
<source>Skip installation</source>
<translation>Preskoฤi instaliranje</translation>
</message>
<message>
<source>Removal of packages</source>
<translation>Uklanjanje paketa</translation>
</message>
<message>
<source>Confirm removal</source>
<translation>Potvrdi uklanjanje</translation>
</message>
<message>
<source>Keep packages</source>
<translation>Zadrลพi pakete</translation>
</message>
<message>
<source>Selection</source>
<translation>Izbor</translation>
</message>
<message>
<source>Installed</source>
<translation>Instalirano</translation>
</message>
<message>
<source>Not installed</source>
<translation>Nije instalirano</translation>
</message>
<message>
<source>Imported</source>
<translation>Uvezeno</translation>
</message>
<message>
<source>Remove package</source>
<translation>Ukloni paket</translation>
</message>
<message>
<source>Import package</source>
<translation>Uvezi paket</translation>
</message>
<message>
<source>Next %arrowright</source>
<translation>Sledeฤi %arrowright</translation>
</message>
<message>
<source>Finish</source>
<translation>Zavrลกi</translation>
</message>
<message>
<source>Uninstall package</source>
<translation>Ukloni paket</translation>
</message>
<message>
<source>Uninstall items</source>
<translation>Ukloni elemente</translation>
</message>
<message>
<source>Skip uninstallation</source>
<translation>Preskoฤi uklanjanje</translation>
</message>
<message>
<source>Files [%collectionname]</source>
<translation>Datoteke (%collectionname)</translation>
</message>
<message>
<source>Details</source>
<translation>Detalji</translation>
</message>
<message>
<source>Uninstall</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Install</source>
<translation>Instaliraj</translation>
</message>
<message>
<source>Export to file</source>
<translation>Izvezi u datoteku</translation>
</message>
<message>
<source>State</source>
<translation>Drลพava</translation>
</message>
<message>
<source>Maintainers</source>
<translation>Odrลพavaoci</translation>
</message>
<message>
<source>Documents</source>
<translation>Dokumenti</translation>
</message>
<message>
<source>Changelog</source>
<translation>Datoteka izmena</translation>
</message>
<message>
<source>File list</source>
<translation>Lista datoteka</translation>
</message>
<message>
<source>Selected nodes</source>
<translation>Izabrani ฤvorovi</translation>
</message>
<message>
<source>Please select the site CSS file to be included in the package.</source>
<translation>Molimo izaberite datoteku CSS stranice da bi je ukljuฤili u paket.</translation>
</message>
<message>
<source>Please select the classes CSS file to be included in the package.</source>
<translation>Molimo izaberite datoteku CSS da bi je ukljuฤili u paket.</translation>
</message>
<message>
<source>Package install wizard: %wizardname</source>
<translation>ฤarobnjak za instaliranje paketa: %wizardname</translation>
</message>
<message>
<source>You must now choose which siteaccess the package contents should be installed to.
The chosen siteaccess determines where design files and settings are written to.
If unsure choose the siteaccess which reflects the user part of your site, i.e. not admin.</source>
<translation>Morate izabrati na koji pristup stranici ลพelite da sadrลพaj paketa bude instaliran.
Izabrani pristup stranici odreฤuje gde su upisane datoteke dizajna i podeลกavanja.
Ako niste sigurni izaberite pristup stranici koji ocrtava korisniฤki deo vaลกe stranice, a ne administrativni. </translation>
</message>
<message>
<source>Select siteaccess</source>
<translation>Izaberi pristup stranici</translation>
</message>
<message>
<source>Please select where you want to place the imported items.</source>
<translation>Molimo odredite gde ลพelite smestiti uvezene elemente.</translation>
</message>
<message>
<source>Place %object_name in node %node_placement</source>
<translation>Smjestite %object_name u ฤvor %node_placement</translation>
</message>
<message>
<source>Choose placement for %object_name</source>
<translation>Izaberi mesto za %object_name</translation>
</message>
<message>
<source>All</source>
<translation>Sve</translation>
</message>
<message>
<source>Change repository</source>
<translation>Promeni skladiลกte</translation>
</message>
<message>
<source>Node</source>
<translation>ฤvor</translation>
</message>
<message>
<source>Export type</source>
<translation>Vrsta izvoza</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Add subtree</source>
<translation>Dodaj podstablo</translation>
</message>
<message>
<source>Add node</source>
<translation>Dodaj ฤvor</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Map %siteaccess_name to</source>
<translation>Odredi %siteaccess_name na</translation>
</message>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>Repositories</source>
<translation>Skladiลกta</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Please select a thumbnail file to be included in the package,
if you do not want to have a thumbnail simply click Next.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Installing package</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose action:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this choice for all the items</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unhandled installation error has occurred.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Continue</source>
<translation type="unfinished">Nastavi</translation>
</message>
<message>
<source>Cancel installation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Uninstalling package</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unhandled uninstallation error has occurred.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel uninstallation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Email</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Start an entry with a marker ( %emstart-%emend (dash) or %emstart*%emend (asterisk) ) at the beginning of the line.
The change will continue to the next change marker.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Provide some basic information for your package.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>License</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Provide information about the maintainer of the package.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose the content classes you want to be included in the package.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose the objects to include in the package.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please select the extensions to be exported.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select an image file to be included in the package then click Next.
When you are done with adding images click Next without choosing an image.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The package can be installed on your system. Installing the package will copy files, create content classes etc., depending on the package.
If you do not want to install the package at this time, you can do so later on the view page for the package.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this choice for all items</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you want to change the placement click the browse button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the following packages?
The packages will be lost forever.
Note: The packages will not be uninstalled.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Package removal was canceled.</source>
<translation type="unfinished">Uklanjanje paketa je poniลกteno.</translation>
</message>
<message>
<source>The package can be uninstalled from your system. Uninstalling the package will remove any installed files, content classes etc., depending on the package.
If you do not want to uninstall the package at this time, you can do so later on the view page for the package.
You can also remove the package without uninstalling it from the package list.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the file containing the package then click the upload button</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Regarding eZ Publish package '%packagename'</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Send email to the maintainer</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use content object modification and publication dates from the package.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/package/creators/ezcontentobject</name>
<message>
<source>Please choose the node(s) you wish to export.</source>
<translation>Molimo izaberite ฤvor(ove) koje ลพelite izvesti.</translation>
</message>
<message>
<source>Please choose the subtree(s) you wish to export.</source>
<translation>Molimo izaberite podstablo(a) koja ลพelite izvesti.</translation>
</message>
<message>
<source>Choose node for export</source>
<translation>Izaberite ฤvor za izvoz</translation>
</message>
<message>
<source>Choose subtree for export</source>
<translation>Izaberite podstablo za izvoz</translation>
</message>
<message>
<source>Miscellaneous</source>
<translation>Razno</translation>
</message>
<message>
<source>Include class definitions.</source>
<translation>Ukljuฤi definicije klasa.</translation>
</message>
<message>
<source>Select templates from the following siteaccesses</source>
<translation>Izaberi ลกablone sa sledeฤih stranica</translation>
</message>
<message>
<source>Versions</source>
<translation>Verzije</translation>
</message>
<message>
<source>Published version</source>
<translation>Objavljena verzija</translation>
</message>
<message>
<source>All versions</source>
<translation>Sve verzije</translation>
</message>
<message>
<source>Languages</source>
<translation>Jezici</translation>
</message>
<message>
<source>Select languages to export</source>
<translation>Izaberi jezik za izvoz</translation>
</message>
<message>
<source>Node assignments</source>
<translation>Funkcije ฤvora</translation>
</message>
<message>
<source>Keep all in selected nodes</source>
<translation>Zadrลพi sve u izabranim ฤvorovima</translation>
</message>
<message>
<source>Main only</source>
<translation>Samo glavni</translation>
</message>
<message>
<source>Related objects</source>
<translation>Povezani objekti</translation>
</message>
<message>
<source>None</source>
<translation>Ni jedan</translation>
</message>
<message>
<source>Specify export properties. Default settings will probably be suitable for your needs.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Include templates related to exported objects.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/package/installers/ezcontentobject</name>
<message>
<source>Choose parent node</source>
<translation>Izaberite roditeljski ฤvor</translation>
</message>
<message>
<source>Select parent node for new node.</source>
<translation>Izaberite roditeljski ฤvor za novi ฤvor.</translation>
</message>
</context>
<context>
<name>design/standard/pagelayout</name>
<message>
<source>All caches</source>
<translation>Sav cache</translation>
</message>
<message>
<source>Content</source>
<translation>Sadrลพaj</translation>
</message>
<message>
<source>Content - node</source>
<translation>Sadrลพaj - ฤvor</translation>
</message>
<message>
<source>Content - subtree</source>
<translation>Sadrลพaj - podstablo</translation>
</message>
<message>
<source>Template</source>
<translation>ล ablon</translation>
</message>
<message>
<source>Template & content</source>
<translation>ล ablon & sadrลพaj</translation>
</message>
<message>
<source>Ini settings</source>
<translation>Ini podeลกavanja</translation>
</message>
<message>
<source>Static</source>
<translation>Statiฤno</translation>
</message>
<message>
<source>Clear</source>
<translation>Oฤisti</translation>
</message>
</context>
<context>
<name>design/standard/pdf/list</name>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Creator</source>
<translation>Kreirao</translation>
</message>
<message>
<source>Created</source>
<translation>Kreirano</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>PDF exports</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New export</source>
<translation type="unfinished">Novi izvoz</translation>
</message>
</context>
<context>
<name>design/standard/reference/ez</name>
<message>
<source>No generated documentation found</source>
<translation>Nije pronaฤena sastavljena dokumentacija</translation>
</message>
<message>
<source>To create the reference documentation you must do the following step</source>
<translation>Da bi kreirali referentnu dokumentaciju morate uฤiniti sledeฤe</translation>
</message>
<message>
<source>Download and install doxygen</source>
<translation>Uฤitaj i instaliraj Doxygen</translation>
</message>
<message>
<source>Generate the documentation by running the following command</source>
<translation>Sastavi dokumentaciju izdavanjem sledeฤe naredbe</translation>
</message>
<message>
<source>Download doxygen from %doxygenurl.</source>
<translation>Uฤitaj Doxygen sa %doxygenurl.</translation>
</message>
<message>
<source>Main</source>
<translation>Glavni</translation>
</message>
<message>
<source>Modules</source>
<translation>Moduli</translation>
</message>
<message>
<source>Class hierarchy</source>
<translation>Hijerarhija klasa</translation>
</message>
<message>
<source>Compound list</source>
<translation></translation>
</message>
<message>
<source>File list</source>
<translation>Lista datoteka</translation>
</message>
<message>
<source>Compound members</source>
<translation></translation>
</message>
<message>
<source>File members</source>
<translation>ฤlanovi datoteke</translation>
</message>
<message>
<source>Related pages</source>
<translation>Povezane stranice</translation>
</message>
<message>
<source>Introduction</source>
<translation>Uvod</translation>
</message>
<message>
<source>All reference documentation has been made with %doxygenurl</source>
<translation>Sva dokumentacija za referencu je sastavljena %doxygenurl </translation>
</message>
<message>
<source>The Reference Documentation for eZ Publish consists of multiple sections which
each have a different view on the documentation. The sections can be accessed at
menu on the top.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The documentation will give an overview of the API of eZ Publish.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/role</name>
<message>
<source>Create policy for</source>
<translation>Kreiraj politiku za</translation>
</message>
<message>
<source>Step 1</source>
<translation>Prvi korak</translation>
</message>
<message>
<source>Every module</source>
<translation>Svaki modul</translation>
</message>
<message>
<source>Allow all</source>
<translation>Dozvoli sve</translation>
</message>
<message>
<source>Allow limited</source>
<translation>Dozvoli ograniฤeno</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Limited</source>
<translation>Ograniฤeno</translation>
</message>
<message>
<source>Go back to step 1</source>
<translation>Vrati se na prvi korak</translation>
</message>
<message>
<source>You are not able to give access to limited functions of module</source>
<translation>Niste u moguฤnosti dozvoliti pristup ograniฤenim funkcijama modula</translation>
</message>
<message>
<source>because function list for it is not defined.</source>
<translation>jer lista funkcija nije definisana.</translation>
</message>
<message>
<source>Step 2</source>
<translation>Drugi korak</translation>
</message>
<message>
<source>Specify function in module</source>
<translation>Odredi funkciju u modulu</translation>
</message>
<message>
<source>Go back to step 2</source>
<translation>Vrati se na drugi korak</translation>
</message>
<message>
<source>Step 3</source>
<translation>Treฤi korak</translation>
</message>
<message>
<source>Any</source>
<translation>Bilo koji</translation>
</message>
<message>
<source>Ok</source>
<translation>OK</translation>
</message>
<message>
<source>New</source>
<translation>Nova</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Discard changes</source>
<translation>Odbaci promene</translation>
</message>
<message>
<source>Role list</source>
<translation>Lista uloga</translation>
</message>
<message>
<source>Role view</source>
<translation>Prikaz uloga</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>Role policies</source>
<translation>Politike uloga</translation>
</message>
<message>
<source>Users and groups assigned to this role</source>
<translation>Korisnici i grupe dodeljeni toj ulozi</translation>
</message>
<message>
<source>Assign</source>
<translation>Dodeli</translation>
</message>
<message>
<source>Give access to module</source>
<translation>Dozvoli pristup modulu</translation>
</message>
<message>
<source>Module</source>
<translation>Modul</translation>
</message>
<message>
<source>Access</source>
<translation>Pristup</translation>
</message>
<message>
<source>Function</source>
<translation>Funkcija</translation>
</message>
<message>
<source>Specify limitations for function %functionname in module %modulename. 'Any' means no limitation by this parameter</source>
<translation>Odredi ograniฤenja za funkciju %functionname u modulu %modulename. 'Bilo koji' ne predstavlja nikakvo ograniฤenje prema ovom parametru</translation>
</message>
<message>
<source>Limitations</source>
<translation>Ograniฤenja</translation>
</message>
<message>
<source>Role edit %1</source>
<translation>Izmena uloge %1</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Current policies</source>
<translation>Trenutne politike</translation>
</message>
<message>
<source>Edit policy</source>
<translation>Izmeni politiku</translation>
</message>
<message>
<source>Policy</source>
<translation>Politika</translation>
</message>
<message>
<source>Node</source>
<translation>ฤvor</translation>
</message>
<message>
<source>Not specified.</source>
<translation>Nije odreฤeno.</translation>
</message>
<message>
<source>Subtree</source>
<translation>Podstablo</translation>
</message>
<message>
<source>Update</source>
<translation>Aลพuriranje</translation>
</message>
<message>
<source>Role</source>
<translation>Uloga</translation>
</message>
<message>
<source>Limitation</source>
<translation>Ograniฤenje</translation>
</message>
<message>
<source>User</source>
<translation>Korisnik</translation>
</message>
<message>
<source>Find</source>
<translation>Traลพi</translation>
</message>
<message>
<source>Remove selected policies</source>
<translation>Ukloni izabrane politike</translation>
</message>
<message>
<source>Edit role</source>
<translation>Izmeni ulogu</translation>
</message>
<message>
<source>Assign role to user or group</source>
<translation>Dodeli ulogu korisniku ili grupi</translation>
</message>
<message>
<source>Remove selected roles</source>
<translation>Ukloni izabrane uloge</translation>
</message>
<message>
<source>Edit current role</source>
<translation>Izmeni trenutnu ulogu</translation>
</message>
<message>
<source>Remove selected assignments</source>
<translation>Ukloni izabrane zadatke</translation>
</message>
<message>
<source>Assign role to user or group to subtree</source>
<translation>Dodeli ulogu korisniku ili grupu podstablu</translation>
</message>
<message>
<source>Assign limited</source>
<translation>Dodeli ograniฤenja</translation>
</message>
<message>
<source>Section</source>
<translation>Sekcija</translation>
</message>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Copy</source>
<translation>Kopiraj</translation>
</message>
<message>
<source>Copy role</source>
<translation>Kopiraj ulogu</translation>
</message>
</context>
<context>
<name>design/standard/rss</name>
<message>
<source>Choose export node</source>
<translation>Izaberi izvozni node</translation>
</message>
<message>
<source>Select</source>
<translation>Izaberi</translation>
</message>
<message>
<source>Choose import destination</source>
<translation>Izaberi odrediลกte uvoza</translation>
</message>
<message>
<source>Choose RSS image</source>
<translation>Izaberi RSS sliku</translation>
</message>
<message>
<source>Choose export source</source>
<translation>Izaberi izvozni izvor</translation>
</message>
<message>
<source>Choose owner of imported objects</source>
<translation>Izaberite vlasnika za uvezene objekte</translation>
</message>
<message>
<source>RSS export is locked</source>
<translation>RSS izvoz je zakljuฤan</translation>
</message>
<message>
<source>The RSS export %name is currently locked by %user and was last modified on %datetime.</source>
<translation>RSS izvoz %name je trenutno zakljuฤan od %user i menjan je %datetime.</translation>
</message>
<message>
<source>The RSS export will be available for editing once it is stored by the modifier or when it is automatically unlocked on %datetime.</source>
<translation>RSS izvoz ฤe biti dostupan za editovanje kad ga onaj koji menja snimi ili kad se automatski otkljuฤa na %datetime.</translation>
</message>
<message>
<source>Retry</source>
<translation>Ponovi</translation>
</message>
<message>
<source>RSS import is locked</source>
<translation>RSS uvoz je zakljuฤan</translation>
</message>
<message>
<source>The RSS import %name is currently locked by %user and was last modified on %datetime.</source>
<translation>RSS uvoz je trenutno zakljuฤan od strane %user i menjan je %datetime.</translation>
</message>
<message>
<source>The RSS import will be available for editing once it is stored by the modifier or when it is automatically unlocked on %datetime.</source>
<translation>RSS uvoz ฤe biti dostupan za menjane kada ga korisnik snimi ili kad proฤe vreme za otkljuฤavanje na %datetime.</translation>
</message>
<message>
<source>Please choose where to export from.
Select your placements then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose where to store imported items.
Select your placements then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose image to use in RSS export.
Select your placements then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please select the owner of the objects to import
Select the user then click the %buttonname button.
Using the recent and bookmark items for quick selection is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/rss/edit</name>
<message>
<source>Display frontpage</source>
<translation>Prikaลพite prvu stranicu</translation>
</message>
<message>
<source>RSS Export</source>
<translation>RSS izvoz</translation>
</message>
<message>
<source>Title</source>
<translation>Naziv</translation>
</message>
<message>
<source>Description</source>
<translation>Opis</translation>
</message>
<message>
<source>Site URL</source>
<translation>URL stranice</translation>
</message>
<message>
<source>Image</source>
<translation>Slika</translation>
</message>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>Site Access</source>
<translation>Pristup stranici</translation>
</message>
<message>
<source>RSS version</source>
<translation>RSS verzija</translation>
</message>
<message>
<source>Active</source>
<translation>Aktivno</translation>
</message>
<message>
<source>Access URL</source>
<translation>Pristup URL-u</translation>
</message>
<message>
<source>Source path</source>
<translation>Put od izvora</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Update</source>
<translation>Aลพuriraj</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Add Source</source>
<translation>Dodaj izvor</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Remove Source</source>
<translation>Ukloni izvor</translation>
</message>
<message>
<source>PDF Export</source>
<translation>PDF izvoz</translation>
</message>
<message>
<source>Intro text</source>
<translation>Uvodni tekst</translation>
</message>
<message>
<source>Sub text</source>
<translation>Podtekst</translation>
</message>
<message>
<source>Source node</source>
<translation>Izvorni ฤvor</translation>
</message>
<message>
<source>Export structure</source>
<translation>Izvoz strukture</translation>
</message>
<message>
<source>Tree</source>
<translation>Stablo</translation>
</message>
<message>
<source>Node</source>
<translation>ฤvor</translation>
</message>
<message>
<source>Export classes</source>
<translation>Izvozne klase</translation>
</message>
<message>
<source>Export destination</source>
<translation>Odrediลกte izvoza</translation>
</message>
<message>
<source>Export to URL</source>
<translation>Izvoz u URL</translation>
</message>
<message>
<source>Export for direct download</source>
<translation>Izvoz za direktno uฤitavanje</translation>
</message>
<message>
<source>Export</source>
<translation>Izvoz</translation>
</message>
<message>
<source>Number of objects</source>
<translation>Broj objekata</translation>
</message>
<message>
<source>Main node only</source>
<translation>Samo glavni ฤvor</translation>
</message>
<message>
<source>Check if you want to only feed the object from the main node.</source>
<translation>Izaberite ako ลพelite da feed bude samo iz glavnog ฤvora.</translation>
</message>
<message>
<source>Subnodes</source>
<translation>Podฤvorovi</translation>
</message>
<message>
<source>Use this field to enter the base URL of your site. It is used to produce the URLs in the export, composed by the Site URL (e.g. "http://www.example.com/index.php") and the path to the object (e.g. "/articles/my_article"). The Site URL depends on your Web server and eZ Publish configuration.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this drop-down to select the maximum number of objects included in the RSS feed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Activate this checkbox if objects from the subnodes of the source should also be fed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Category</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>optional</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Skip</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enclosure (media)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/rss/list</name>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Version</source>
<translation>Verzija</translation>
</message>
<message>
<source>Active</source>
<translation>Aktivno</translation>
</message>
<message>
<source>Modifier</source>
<translation>Modifikator</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Yes</source>
<translation>Da</translation>
</message>
<message>
<source>No</source>
<translation>Ne</translation>
</message>
<message>
<source>RSS feeds</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>RSS exports</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New export</source>
<translation type="unfinished">Novi izvoz</translation>
</message>
<message>
<source>RSS imports</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New import</source>
<translation type="unfinished">Novi uvoz</translation>
</message>
</context>
<context>
<name>design/standard/search</name>
<message>
<source>Search statistics</source>
<translation>Statistika pretraลพivanja</translation>
</message>
<message>
<source>Most frequent search phrases</source>
<translation>Najฤeลกฤi oblici pri pretraลพivanju</translation>
</message>
<message>
<source>Phrase</source>
<translation>Oblici i sintagme</translation>
</message>
<message>
<source>Number of phrases</source>
<translation>Broj sintagmi</translation>
</message>
<message>
<source>Average result returned</source>
<translation>Proseฤni ostvareni rezultat</translation>
</message>
<message>
<source>Reset statistics</source>
<translation>Voฤenje statistike ispoฤetka</translation>
</message>
</context>
<context>
<name>design/standard/section</name>
<message>
<source>Assign section to node</source>
<translation>Dodeli segment ฤvoru</translation>
</message>
<message>
<source>Are you sure you want to remove these sections?</source>
<translation>Jeste li sigurni da ลพelite ukloniti ove segmente?</translation>
</message>
<message>
<source>Confirm</source>
<translation>Potvrdi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Section edit</source>
<translation>Izmena segmenta</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Section list</source>
<translation>Lista segmenata</translation>
</message>
<message>
<source>New</source>
<translation>Nova</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Choose section assignment</source>
<translation>Izaberi zadatke segmenta</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>ID</source>
<translation>Identifikacija</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>Assign</source>
<translation>Dodeli</translation>
</message>
<message>
<source>Assign section - %section</source>
<translation>Dodeli segment - %section</translation>
</message>
<message>
<source>Remove selected sections</source>
<translation>Ukloni izabrane segmente</translation>
</message>
<message>
<source>Please choose where you want to start the section assignment for section %sectionname.
Select the placements then click the %buttonname button.
Using the recent and bookmark items for quick placement is also possible.
Click on placement names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing these sections can corrupt permissions, site designs, and other things in the system. Do not do this unless you know exactly what you are doing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Navigation part</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>About navigation parts</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The eZ Publish Administration Interface is divided into navigation parts. This is a way to group different areas of the site administration. Select the navigation part that should be active when this section is browsed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Denied</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/setup</name>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Path</source>
<translation>Putanja</translation>
</message>
<message>
<source>Cache admin</source>
<translation>Administracija cache-a</translation>
</message>
<message>
<source>Content view cache was cleared.</source>
<translation>Predmemorija(cache) prikaza sadrลพaja je oฤiลกฤena.</translation>
</message>
<message>
<source>Ini file cache was cleared.</source>
<translation>Cache Ini datoteke je oฤiลกฤen.</translation>
</message>
<message>
<source>Template cache was cleared.</source>
<translation>Predmemorija(cache) ลกablona je oฤiลกฤena.</translation>
</message>
<message>
<source>View cache is enabled.</source>
<translation>Prikaz cache-a(cache) je ukljuฤen.</translation>
</message>
<message>
<source>View cache is disabled.</source>
<translation>Prikaz cache-a(cache) je iskljuฤen.</translation>
</message>
<message>
<source>Clear</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Ini cache</source>
<translation>Ini cache</translation>
</message>
<message>
<source>Ini cache is always enabled.</source>
<translation>Ini cache je uvek ukljuฤen.</translation>
</message>
<message>
<source>Template cache</source>
<translation>Predmemorija(cache) ลกablona</translation>
</message>
<message>
<source>Datatype wizard</source>
<translation>ฤarobnjak vrste podataka</translation>
</message>
<message>
<source>Start</source>
<comment>Datatype start</comment>
<translation>Zapoฤni</translation>
</message>
<message>
<source>Basic information</source>
<translation>Osnovni podaci</translation>
</message>
<message>
<source>Name of datatype</source>
<comment>Datatype</comment>
<translation>Ime vrste podataka</translation>
</message>
<message>
<source>Descriptive name of datatype</source>
<comment>Datatype</comment>
<translation>Opisno ime vrste podataka</translation>
</message>
<message>
<source>Settings</source>
<comment>Datatype</comment>
<translation>Podeลกavanja</translation>
</message>
<message>
<source>Handle input on class level</source>
<comment>Datatype</comment>
<translation>Obradi unos na nivou klase</translation>
</message>
<message>
<source>Next</source>
<comment>Datatype next</comment>
<translation>Sledeฤi</translation>
</message>
<message>
<source>Restart</source>
<comment>Datatype restart</comment>
<translation>Ponovo zapoฤni</translation>
</message>
<message>
<source>Optional information</source>
<translation>Dodatni podaci</translation>
</message>
<message>
<source>Name of class</source>
<comment>Datatype</comment>
<translation>Ime klase</translation>
</message>
<message>
<source>The creator of the datatype</source>
<comment>Datatype</comment>
<translation>Dizajner vrste podataka </translation>
</message>
<message>
<source>Description of your datatype</source>
<comment>Datatype</comment>
<translation>Opis Vaลกe vrste podataka</translation>
</message>
<message>
<source>The first line will be used as the brief description and the rest are operator documentation.</source>
<comment>Datatype</comment>
<translation>Prvi red koristiฤe se kao kratak opis dok je ostatak dokumentacija operatera.</translation>
</message>
<message>
<source>Handles the datatype %datatypename
By using %datatypename you can ...</source>
<comment>Datatype default description</comment>
<translation>Handles the datatype %datatypename (new line)
By using %datatypename you can ...</translation>
</message>
<message>
<source>Once the download button is clicked the code will be generated and the browser will ask you to store the generated file.</source>
<comment>Datatype</comment>
<translation>Kad pritisnete na dugme za uฤitavanje biฤe kreiran kod te ฤe Vas pretraลพivaฤ zatraลพiti da snimite kreiranu datoteku.
</translation>
</message>
<message>
<source>Download</source>
<comment>Datatype download</comment>
<translation>Uฤitaj</translation>
</message>
<message>
<source>Extension setup</source>
<translation>Podeลกavanja ekstenzije</translation>
</message>
<message>
<source>Available extensions</source>
<translation>Raspoloลพive ekstenzije</translation>
</message>
<message>
<source>System information</source>
<translation>Podaci o sistemu</translation>
</message>
<message>
<source>Version</source>
<comment>PHP version</comment>
<translation>Verzije</translation>
</message>
<message>
<source>Extensions</source>
<comment>PHP extensions</comment>
<translation>Ekstenzije</translation>
</message>
<message>
<source>Safe mode is on.</source>
<translation>Sigurnosni naฤin rada je omoguฤen.</translation>
</message>
<message>
<source>Safe mode is off.</source>
<translation>Sigurnosni naฤin rada je onemoguฤen.</translation>
</message>
<message>
<source>Basedir restriction is on and set to %1.</source>
<translation>Basedir restriction is on and set to %1.</translation>
</message>
<message>
<source>Basedir restriction is off.</source>
<translation>Basedir restriction is off.</translation>
</message>
<message>
<source>Global variable registration is on.</source>
<translation>Registracija globalnih varijabli je ukljuฤena.</translation>
</message>
<message>
<source>Global variable registration is off.</source>
<translation>Registracija globalnih varijabli je iskljuฤena.</translation>
</message>
<message>
<source>File uploading is enabled.</source>
<translation>Uฤitavanje datoteke je omoguฤeno.</translation>
</message>
<message>
<source>File uploading is disabled.</source>
<translation>Uฤitavanje datoteke je onemoguฤeno.</translation>
</message>
<message>
<source>Maximum size of post data (text and files) is %1.</source>
<translation>Maksimalna veliฤina podataka (teksta i datoteka) je %1.</translation>
</message>
<message>
<source>Script memory limit is %1.</source>
<translation>Ograniฤenje memorije je %1.</translation>
</message>
<message>
<source>Maximum execution time is %1 seconds.</source>
<translation>Maksimalno vreme izvrลกenja je %1 sekundi.</translation>
</message>
<message>
<source>Database</source>
<translation>Baza podataka</translation>
</message>
<message>
<source>Type</source>
<comment>Database type</comment>
<translation>Vrsta</translation>
</message>
<message>
<source>Charset</source>
<comment>Database charset</comment>
<translation>Kodna stranica</translation>
</message>
<message>
<source>Rapid Application Development Tools</source>
<translation>Rapid Application Development alati</translation>
</message>
<message>
<source>Tools</source>
<comment>RAD Tools</comment>
<translation>Alati</translation>
</message>
<message>
<source>Template operator wizard</source>
<translation>ฤarobnjak za ลกablone</translation>
</message>
<message>
<source>Create new template override for</source>
<translation>Kreiraj novi ลกablon za zaobilaลพenje </translation>
</message>
<message>
<source>Could not create template, permission denied.</source>
<translation>Nije bilo moguฤe kreirati ลกablon, uskraฤena dozvola.</translation>
</message>
<message>
<source>Invalid name. You can only use the characters a-z, numbers and _.</source>
<translation>Netaฤno ime. Moลพete koristiti iskljuฤivo znakove a-z, brojeve i_.</translation>
</message>
<message>
<source>Template will be placed in</source>
<translation>ล ablon ฤe biti smeลกten u</translation>
</message>
<message>
<source>Template name</source>
<translation>Ime ลกablona</translation>
</message>
<message>
<source>Override keys</source>
<translation>Zaobiฤi kljuฤeve</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>Node</source>
<translation>ฤvor</translation>
</message>
<message>
<source>Base template on</source>
<translation>Utemelji ลกablon na</translation>
</message>
<message>
<source>Empty file</source>
<translation>Isprazni datoteku</translation>
</message>
<message>
<source>Copy of default template</source>
<translation>Kopija osnovnog ลกablona</translation>
</message>
<message>
<source>Container ( with children )</source>
<translation>Kontejner ( sa decom )</translation>
</message>
<message>
<source>View ( without children )</source>
<translation>Prikaz (bez dece)</translation>
</message>
<message>
<source>Object</source>
<translation>Objekt</translation>
</message>
<message>
<source>Template list</source>
<translation>Lista ลกablona</translation>
</message>
<message>
<source>Most common templates</source>
<translation>Najuobiฤajeniji ลกabloni</translation>
</message>
<message>
<source>Template</source>
<translation>ล ablon</translation>
</message>
<message>
<source>Design Resource</source>
<translation>Izvor dizajna</translation>
</message>
<message>
<source>Complete template list</source>
<translation>Kompletna lista ลกablona</translation>
</message>
<message>
<source>Start</source>
<comment>Template operator start</comment>
<translation>Pokreni</translation>
</message>
<message>
<source>Name of operator</source>
<comment>Template operator</comment>
<translation>Ime operatera</translation>
</message>
<message>
<source>Settings</source>
<comment>Template operator</comment>
<translation>Podeลกavanja</translation>
</message>
<message>
<source>One operator in class</source>
<comment>Template operator</comment>
<translation>Jedan operator u klasi</translation>
</message>
<message>
<source>Handles operator input</source>
<comment>Template operator</comment>
<translation>Upravlja unosom operatora</translation>
</message>
<message>
<source>Generates operator output</source>
<comment>Template operator</comment>
<translation>Generiลกe izlazni rezultat operatora</translation>
</message>
<message>
<source>Parameter handling</source>
<comment>Template operator</comment>
<translation>Upravljanje parametrima</translation>
</message>
<message>
<source>Next</source>
<comment>Template operator next</comment>
<translation>Sledeฤi</translation>
</message>
<message>
<source>Restart</source>
<comment>Template operator restart</comment>
<translation>Ponovo pokreni</translation>
</message>
<message>
<source>Name of class</source>
<comment>Template operator</comment>
<translation>Ime klase</translation>
</message>
<message>
<source>The creator of the operator</source>
<comment>Template operator</comment>
<translation>Kreator operatora</translation>
</message>
<message>
<source>Description of your operator</source>
<comment>Template operator</comment>
<translation>Opis Vaลกeg operatera</translation>
</message>
<message>
<source>The first line will be used as the brief description and the rest are operator documentation.</source>
<comment>Template operator</comment>
<translation>Prvi red koristiฤe se kao kratak opis dok je ostatak dokumentacija operatera.</translation>
</message>
<message>
<source>Handles template operator %operatorname
By using %operatorname you can ...</source>
<comment>Template operator default description</comment>
<translation>Barata sa operatorom %operatorname ลกablona
Koristeฤi %operatorname moลพete ...</translation>
</message>
<message>
<source>Example code</source>
<comment>Template operator</comment>
<translation>Primer koda</translation>
</message>
<message>
<source>Once the download button is clicked the code will be generated and the browser will ask you to store the generated file.</source>
<comment>Template operator</comment>
<translation>Kad pritisnete na dugme za uฤitavanje biฤe kreiran kod te ฤe Vas pretraลพivaฤ zatraลพiti da snimite kreiranu datoteku.
</translation>
</message>
<message>
<source>Download</source>
<comment>Template operator download</comment>
<translation>Uฤitaj</translation>
</message>
<message>
<source>Template view</source>
<translation>Prikaz ลกablona</translation>
</message>
<message>
<source>Default template resource</source>
<translation>Osnovni izvor ลกablona</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Override</source>
<translation>Zaobiฤi</translation>
</message>
<message>
<source>File</source>
<translation>Datoteka</translation>
</message>
<message>
<source>Match conditions</source>
<translation>Uskladi uslove</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Create new</source>
<translation>Kreiraj novo</translation>
</message>
<message>
<source>Version</source>
<comment>PHP Accelerator version</comment>
<translation>Verzija</translation>
</message>
<message>
<source>There is no known PHP accelerator active.</source>
<translation>Nema prepoznatog PHP acceleratora koji je aktivan. </translation>
</message>
<message>
<source>&percent% completed</source>
<translation>&percent% je zavrลกeno</translation>
</message>
<message>
<source>Help</source>
<translation>Pomoฤ</translation>
</message>
<message>
<source>Summary</source>
<translation>Ukratko</translation>
</message>
<message>
<source>Name</source>
<comment>PHP Accelerator name</comment>
<translation>Ime</translation>
</message>
<message>
<source>Could not detect version</source>
<translation>Nije moguฤe pronaฤi verziju</translation>
</message>
<message>
<source>The PHP Accelerator is enabled.</source>
<translation>PHP Accelerator je ukljuฤen. </translation>
</message>
<message>
<source>The PHP Accelerator is disabled.</source>
<translation>PHP Accelerator je iskljuฤen.</translation>
</message>
<message>
<source>Server</source>
<comment>Database server</comment>
<translation>Server</translation>
</message>
<message>
<source>Socket path</source>
<comment>Database socket path</comment>
<translation>Putanja socket </translation>
</message>
<message>
<source>Database</source>
<comment>Database name</comment>
<translation>Baza podataka</translation>
</message>
<message>
<source>Connection retry count</source>
<comment>Database retry count</comment>
<translation>Brojaฤ ponovljenih konekcija na bazu</translation>
</message>
<message>
<source>Internal</source>
<translation>Interni</translation>
</message>
<message>
<source>Current read-only database (Slave)</source>
<translation>Trenutna baza podataka koja dozvoljava samo ฤitanje podataka (Slave)</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Priority</source>
<translation>Prioritet</translation>
</message>
<message>
<source>Update</source>
<translation>Aลพuriranje</translation>
</message>
<message>
<source>All caches were cleared.</source>
<translation>Sav cache je oฤiลกฤen.</translation>
</message>
<message>
<source>Cache collections</source>
<translation>Kolekcija cache-a</translation>
</message>
<message>
<source>Click a button to clear a collection of caches.</source>
<translation>Pritisni dugme za praลพnjenje kolekcije cache-a.</translation>
</message>
<message>
<source>All caches.</source>
<translation>Sav cache.</translation>
</message>
<message>
<source>All caches</source>
<translation>Sav cache</translation>
</message>
<message>
<source>All caches are disabled</source>
<translation>Sva cache-iranja su iskljuฤena</translation>
</message>
<message>
<source>Content views and template blocks.</source>
<translation>Prikaz sadrลพaja i blokova ลกablona.</translation>
</message>
<message>
<source>Content caches</source>
<translation>Cache sadrลพaja</translation>
</message>
<message>
<source>Content caches is disabled</source>
<translation>Cache sadrลพaja je iskljuฤen</translation>
</message>
<message>
<source>Template overrides and template compiling.</source>
<translation>Zaobilaลพenje ลกablona i sastavljanje ลกablona.</translation>
</message>
<message>
<source>Template caches</source>
<translation>Predmemorija(cache) ลกablona</translation>
</message>
<message>
<source>Template caches are disabled</source>
<translation>Predmemorija(cache) ลกablona je iskljuฤena</translation>
</message>
<message>
<source>Selection</source>
<translation>Izbor</translation>
</message>
<message>
<source>Disabled</source>
<translation>Onemoguฤen</translation>
</message>
<message>
<source>Clear selected</source>
<translation>Izbriลกi izabrano</translation>
</message>
<message>
<source>Content view cache</source>
<translation>Predmemorija(cache) sadrลพaja</translation>
</message>
<message>
<source>System upgrade</source>
<translation>Unapreฤivanje sistema</translation>
</message>
<message>
<source>File consistency check OK</source>
<translation>Provera konzistentnosti datoteka - U redu</translation>
</message>
<message>
<source>Click a button to check file consistency.</source>
<translation>Pritisni dugme radi provere konzistentnosti datoteke. </translation>
</message>
<message>
<source>Check files</source>
<translation>Proveri datoteke</translation>
</message>
<message>
<source>warning, this might take a while</source>
<translation>upozorenje, to bi moglo potrajati</translation>
</message>
<message>
<source>%name was cleared.</source>
<translation>%name je uklonjen.</translation>
</message>
<message>
<source>Current siteaccess</source>
<translation>Trenutni pristup stranici</translation>
</message>
<message>
<source>Select siteaccess</source>
<translation>Izaberi pristup stranici</translation>
</message>
<message>
<source>Database check OK</source>
<translation>Provera baze podataka - u redu</translation>
</message>
<message>
<source>Warning, your database is not consistent with the distribution database.</source>
<translation>Upozorenje, Vaลกa baza podataka nije ista kao distrubiciona baza podataka. </translation>
</message>
<message>
<source>Click a button to check database consistency.</source>
<translation>Pritisni dugme radi provere konzistentnosti baze. </translation>
</message>
<message>
<source>Check database</source>
<translation>Proveri bazu podataka</translation>
</message>
<message>
<source>Any</source>
<translation>Bilo koji</translation>
</message>
<message>
<source>Create</source>
<translation>Kreiraj</translation>
</message>
<message>
<source>Here you can activate/deactivate you extensions. Only system wide extensions can be activated, for site access specific extensions, modify these configuration files.</source>
<translation>Ovde moลพete aktivirati/deaktivirati ekstenzije. Samo ekstenzije na nivou sistema mogu biti aktivirane. Za siteaccess ekstenzije izmeniti konfiguracione datoteke.</translation>
</message>
<message>
<source>Operating System</source>
<translation>Operativni sistem</translation>
</message>
<message>
<source>CPU</source>
<comment>Database type</comment>
<translation>CPU</translation>
</message>
<message>
<source>Memory</source>
<comment>Database server</comment>
<translation>Memorija</translation>
</message>
<message>
<source>No information on the operating system could be determined.</source>
<translation>Operativni sistem nije detektovan.</translation>
</message>
<message>
<source>System</source>
<translation>Sistem</translation>
</message>
<message>
<source>Image system</source>
<translation>Grafiฤki sistem</translation>
</message>
<message>
<source>Mail</source>
<translation>Mail</translation>
</message>
<message>
<source>Language</source>
<translation>Jezik</translation>
</message>
<message>
<source>Site</source>
<translation>Site</translation>
</message>
<message>
<source>To revert your database to distribution setup, run the following SQL queries</source>
<translation>Pokrenite ove SQL upite ako ลพelite da vratite bazu podataka na distribucioni setup.</translation>
</message>
<message>
<source>Activate extensions</source>
<translation>Aktivirajte ekstenzije</translation>
</message>
<message>
<source>Template edit</source>
<translation>Izmena ลกablona</translation>
</message>
<message>
<source>Save</source>
<translation>Snimi</translation>
</message>
<message>
<source>Discard</source>
<translation>Odbaci</translation>
</message>
<message>
<source>Toolbar management</source>
<translation>Upravljanje alatnom trakom</translation>
</message>
<message>
<source>Available toolbars</source>
<translation>Dostupne alatne trake</translation>
</message>
<message>
<source>Ini caches.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ini caches</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ini cache is disabled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class constant name</source>
<comment>Datatype</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version</source>
<comment>eZ Publish version</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>SVN revision</source>
<comment>eZ Publish version</comment>
<translation type="obsolete">SVN revizija </translation>
</message>
<message>
<source>Extensions</source>
<comment>eZ Publish extensions</comment>
<translation type="unfinished">Ekstenzije</translation>
</message>
<message>
<source>Web server</source>
<comment>Web server title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<comment>Web server name</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version</source>
<comment>Web server version</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Modules</source>
<comment>Web server modules</comment>
<translation type="unfinished">Moduli</translation>
</message>
<message>
<source>Web server modules could not be detected</source>
<comment>Web server modules</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>No known information on the web server</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Details for site</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The rapid application development (RAD) tools allow you to easily get started with creating new functionality for eZ Publish.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Warning: it is not safe to upgrade without checking the modifications done to the following files </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you want you can add some example code to explain how your operator should work.
The default code was made from the basic parameters you chose.</source>
<comment>Template operator</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Siteaccess</source>
<translation type="unfinished">Siteaccess</translation>
</message>
</context>
<context>
<name>design/standard/setup/datatypecode</name>
<message>
<source>Constructor</source>
<translation>Konstruisao</translation>
</message>
</context>
<context>
<name>design/standard/setup/db</name>
<message>
<source>If you are having problems connecting to your database you should take a look at</source>
<translation>Ako imate problema pri spajanju sa svojom bazom podataka pogledajte</translation>
</message>
<message>
<source>at</source>
<translation>u</translation>
</message>
<message>
<source>MySQL</source>
<translation>MySQL</translation>
</message>
<message>
<source>Introduction</source>
<translation>Uvod</translation>
</message>
<message>
<source>MySQL is a database management system created by MySQL AB.</source>
<translation>MySQL je sistem upravljanja bazama podataka koji je kreirao MySQLAB.</translation>
</message>
<message>
<source>MySQL is the world's most popular Open Source Database, designed for speed, power and precision in mission critical, heavy load use.</source>
<translation>MySQL je najpopularnija Open Source baza podataka, koja pruลพa brzinu snagu i preciznost pri koriลกฤenju pod velikim optereฤenjem. </translation>
</message>
<message>
<source>More information can be found on</source>
<translation>Viลกe podataka moลพete pronaฤi na </translation>
</message>
<message>
<source>Details</source>
<translation>Detalji</translation>
</message>
<message>
<source>Installation</source>
<translation>Instaliranje</translation>
</message>
<message>
<source>By using the</source>
<translation>Koriลกฤenjem</translation>
</message>
<message>
<source>configuration option you enable PHP to access MySQL databases. If you use this option without specifying the path to MySQL, PHP will use the built-in MySQL client libraries.</source>
<translation>konfiguracione opcije vi omoguฤujete PHP-u pristup MySQL bazama podataka. Ako koristite ovu opciju bez odreฤivanja puta do MySQL, PHP ฤe koristiti ugraฤene MySQL biblioteke klijenata. </translation>
</message>
<message>
<source>More information on the MySQL extension can be found at</source>
<translation>Viลกe o MySQL ekstenziji moลพete pronaฤi na</translation>
</message>
<message>
<source>PostgreSQL</source>
<translation></translation>
</message>
<message>
<source>PostgreSQL is a database management system developed at the University of California at Berkeley Computer Science Department.</source>
<translation>PostgreSQL je sistem upravljana bazom podataka razvijen na University of California, Berkeley Computer Science Department.</translation>
</message>
<message>
<source>PostgreSQL is a sophisticated Object-Relational DBMS, supporting almost all SQL constructs, including subselects, transactions, and user-defined types and functions. It is the most advanced open-source database available anywhere.</source>
<translation>PostgreSQL je sofisticirani Object-Relational DBMS, koji podrลพava gotovo sve SQL konstrukcije, ukljuฤujuฤi podselekte, transakcije i korisniฤki definisane tipove i funkcije. </translation>
</message>
<message>
<source>PostgreSQL is a good choice for handling most languages, including Unicode, but may require some configuration to get good speed.</source>
<translation>PostgreSQL je dobar izbor pri obradi veฤine jezika, ukljuฤujuฤi i Unicode jezike, ali zahteva dobru konfiguraciju da bi ostvario dobru brzinu. </translation>
</message>
<message>
<source>In order to enable PostgreSQL support,</source>
<translation>Da bi ukljuฤili PostgreSQL podrลกku, </translation>
</message>
<message>
<source>is required when you compile PHP.</source>
<translation>je potreban kad sastavljate PHP.</translation>
</message>
<message>
<source>More information on the PostgreSQL extension can be found at</source>
<translation>Viลกe o PostgreSQL ekstenziji moลพete pronaฤi na</translation>
</message>
<message>
<source>From their homepage</source>
<translation>Sa njihovog web-a</translation>
</message>
<message>
<source>MySQL is a good choice for handling most western languages, and as of version 4.1 it also supports Unicode.</source>
<translation>MySQL je dobar izbor za koriลกฤenje veฤine zapadnih jezika, a od 4.1 verzije podrลพava Unicode.</translation>
</message>
<message>
<source>It is one of the most popular databases in the Open Source community and most often on by default in PHP.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MySQL Improved</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>configuration option you enable PHP to access MySQL databases through the MySQL Improved extension. If you use this option without specifying the path to MySQL, PHP will use the built-in MySQL client libraries.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>More information on the MySQLi extension can be found at</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is a very popular database in the Open Source community and provides highly advanced database functionality.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/setup/extensions</name>
<message>
<source>Regenerate autoload arrays for extensions</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Click this button to regenerate the autoload arrays used by the system for extensions.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Problems detected during autoload generation:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/setup/init</name>
<message>
<source>Install demo data?</source>
<translation>Instaliraj demonstracioni prikaz?</translation>
</message>
<message>
<source>Cannot install demo data, the zlib extension is missing from your PHP installation.</source>
<translation>Nije moguฤe instalirati podatke za prikaz jer u vaลกoj PHP instalaciji nedostaje zlib ekstenzija.</translation>
</message>
<message>
<source>does not support installing demo data at this point.</source>
<translation>ne podrลพava instaliranje podataka demonstracionog prikaza u ovoj fazi.</translation>
</message>
<message>
<source>Demo data failure</source>
<translation>Demonstracioni prikaz ne radi</translation>
</message>
<message>
<source>Could not unpack the demo data.</source>
<translation>Nije mogao otpakovati podatke demo prikaza.</translation>
</message>
<message>
<source>You should try to install without demo data.</source>
<translation>Pokuลกajte instalaciju bez demonstracionog prikaza.</translation>
</message>
<message>
<source>Initialization failed</source>
<translation>Inicijalizacija nije uspela</translation>
</message>
<message>
<source>The database could not be properly initialized.</source>
<translation>Nije bilo moguฤe inicirati bazu podataka.</translation>
</message>
<message>
<source>Warning</source>
<translation>Upozorenje</translation>
</message>
<message>
<source>Your database already contains data.</source>
<translation>Vaลกa baza podataka veฤ sadrลพi podatke. </translation>
</message>
<message>
<source>The setup can continue with the initialization but may damage the present data.</source>
<translation>Setup moลพe nastaviti inicijalizaciju ali to ฤe moลพda uniลกtiti postojeฤe podatke. </translation>
</message>
<message>
<source>What do you want the setup to do?</source>
<translation>ลกta ลพelite da setup uฤini?</translation>
</message>
<message>
<source>Continue but leave the data as it is.</source>
<translation>Nastavi, ali ne menjaj podatke.</translation>
</message>
<message>
<source>Let me choose a new database.</source>
<translation>Izabiram novu bazu podataka. </translation>
</message>
<message>
<source>Language Options</source>
<translation>Jeziฤne opcije</translation>
</message>
<message>
<source>no</source>
<translation>ne</translation>
</message>
<message>
<source>yes</source>
<translation>da</translation>
</message>
<message>
<source>Configure</source>
<translation>Konfiguriลกi</translation>
</message>
<message>
<source>button.</source>
<translation>dugme.</translation>
</message>
<message>
<source>No finetuning is required on your system, you can continue by clicking the</source>
<translation>Vaลกem sistemu nije potrebno fino podeลกavanje, moลพete nastaviti izborom </translation>
</message>
<message>
<source>Next</source>
<translation>Sledeฤi</translation>
</message>
<message>
<source>The system check found some issues that, when resolved, may give improved performance or more features. Please have a look through the results below for more information on what might be done. Each issue will give you instructions on how to do the finetuning.</source>
<translation>Provera sistema ukazala je na neke probleme koji, kad se reลกe, mogu poboljลกati uฤinak ili viลกe dati viลกe karakteristika. Molimo pregledajte niลพe navedene rezultate da bi saznali ลกta je moguฤe uฤiniti. Svako ฤe Vam pitanje dati uputstvo kako izvesti fino podeลกavanje. </translation>
</message>
<message>
<source>After you have fixed the problems click the</source>
<translation>Nakon ลกto ste reลกili problem izaberite</translation>
</message>
<message>
<source>button to re-run the system checking. This is recommended after system changes to check for critical failures. You can also click the</source>
<translation>dugme da bi ponovo obavili proveru sistema. To je preporuฤljivo nakon promena na sistemu radi identifikovanja kritiฤnih greลกaka. Moลพete takoฤe pritisnuti </translation>
</message>
<message>
<source>Check Again</source>
<translation>Proveri ponovo</translation>
</message>
<message>
<source>Issues</source>
<translation>Pitanja</translation>
</message>
<message>
<source>Failed writing</source>
<translation>Pisanje nije uspelo</translation>
</message>
<message>
<source>The setup could not write to the file.</source>
<translation>Setup nije mogao pisati u fajl.</translation>
</message>
<message>
<source>The setup could not get write access to the</source>
<translation>Setup nije mogao dobiti pristup za pisanje u</translation>
</message>
<message>
<source>directory. This is required to disable the initialization. Following the instructions found in</source>
<translation>direktorijum. To je potrebno da bi se onemoguฤilo pokretanje. Prema uputstvima pronaฤenim u </translation>
</message>
<message>
<source>Try Again</source>
<translation>Pokuลกaj ponovo</translation>
</message>
<message>
<source>Change the second line from</source>
<translation>Promeni drugi red iz</translation>
</message>
<message>
<source>to</source>
<translation>u</translation>
</message>
<message>
<source>The setup is now disabled, click</source>
<translation>Setup je onemoguฤen, pritisnite</translation>
</message>
<message>
<source>to get back to the site.</source>
<translation>za povratak na stranicu.</translation>
</message>
<message>
<source>You can choose from either</source>
<translation>Moลพete izabrati izmeฤu</translation>
</message>
<message>
<source>sendmail</source>
<translation>sendmail</translation>
</message>
<message>
<source>SMTP</source>
<translation>SMTP</translation>
</message>
<message>
<source>Password</source>
<translation>Lozinka</translation>
</message>
<message>
<source>Done</source>
<translation>Napravljeno</translation>
</message>
<message>
<source>Summary</source>
<translation>Ukratko</translation>
</message>
<message>
<source>button, or the</source>
<translation>dugme ili</translation>
</message>
<message>
<source>Language Details</source>
<translation>Detalji o jeziku</translation>
</message>
<message>
<source>button to select language variations.</source>
<translation>dugme da bi izabrao jeziฤne varijacije.</translation>
</message>
<message>
<source>The languages you choose will help determine the charset to use on the site.</source>
<translation>Jezici koje ste odabrali pomoฤi ฤe Vam pri izboru znakova koje ฤete koristiti na stranici. </translation>
</message>
<message>
<source>Language name</source>
<translation>Ime jezika</translation>
</message>
<message>
<source>Selection</source>
<translation>Izbor</translation>
</message>
<message>
<source>Default</source>
<translation>Osnovni</translation>
</message>
<message>
<source>Comments</source>
<translation>Komentari</translation>
</message>
<message>
<source>Send Registration</source>
<translation>Poลกalji registraciju</translation>
</message>
<message>
<source>Skip Registration</source>
<translation>Preskoฤi registraciju</translation>
</message>
<message>
<source>What kind of language support should this site have. The type of support determines the language selection and charset.</source>
<translation>Koju vrstu jeziฤne podrลกke treba imati ova stranica? Vrsta podrลกke odreฤuje izbor jezika i znakova. </translation>
</message>
<message>
<source>Monolingual (one language)</source>
<translation>Jednojeziฤna (jedan jezik)</translation>
</message>
<message>
<source>Multilingual (multiple languages with one charset)</source>
<translation>Viลกejeziฤna (viลกe jezika s jednim setom znakova)</translation>
</message>
<message>
<source>Multilingual (Unicode, no limit)</source>
<translation>Viลกejeziฤan (Unicode, bez ograniฤenja)</translation>
</message>
<message>
<source>Regional Options</source>
<translation>Regionalne opcije</translation>
</message>
<message>
<source>Here you will see a summary of the basic settings for your site. If you are satisfied with the settings you can click the</source>
<translation>Ovde moลพete videti saลพetak osnovnih podeลกavanja vaลกe stranice. Ako ste zadovoljni izabranim podeลกavanjima pritisnite</translation>
</message>
<message>
<source>Setup Database</source>
<translation>Podesi bazu podataka</translation>
</message>
<message>
<source>However if you want to change your settings click the</source>
<translation>Ako ลพelite promeniti podeลกavanja izaberite </translation>
</message>
<message>
<source>Start Over</source>
<translation>Kreni ispoฤetka</translation>
</message>
<message>
<source>button which will restart the collecting of information (Existing settings are kept).</source>
<translation>dugme, ลกto ฤe ponovo zapoฤeti prikupljanje podataka (postojeฤa podeลกavanja biฤe zadrลพana).</translation>
</message>
<message>
<source>Database settings</source>
<translation>Podeลกavanja baze podataka</translation>
</message>
<message>
<source>Database</source>
<translation>Baza podataka</translation>
</message>
<message>
<source>Driver</source>
<translation>Drajver</translation>
</message>
<message>
<source>Unicode support</source>
<translation>Unicode podrลกka</translation>
</message>
<message>
<source>Language settings</source>
<translation>Podeลกavanja jezika</translation>
</message>
<message>
<source>Language type</source>
<translation>Vrsta jezika</translation>
</message>
<message>
<source>Monolingual</source>
<translation>Jednojeziฤan</translation>
</message>
<message>
<source>Multilingual</source>
<translation>Viลกejeziฤan</translation>
</message>
<message>
<source>Languages</source>
<translation>Jezici</translation>
</message>
<message>
<source>No problems was found with your system, you can continue by clicking the</source>
<translation>U vaลกem sistemu nisu pronaฤeni problemi, moลพete nastaviti tako ลกto ฤete izabrati</translation>
</message>
<message>
<source>Finetune System</source>
<translation>Fino podeลกavanje</translation>
</message>
<message>
<source>Please have a look through the results below for more information on what the problems are.</source>
<translation>Molimo pregledajte niลพe navedene rezultate da biste saznali o kojim se problemima radi. </translation>
</message>
<message>
<source>Each problem will give you instructions on how to fix the problem.</source>
<translation>Uz svaki problem dobiฤete uputstvo kako reลกiti problem.</translation>
</message>
<message>
<source>The database is ready for initialization, click the %1 button when ready.</source>
<translation>Baza podataka spremna je za inicijalizaciju, kad budete spremni pritisnite dugme %1.</translation>
</message>
<message>
<source>Continue</source>
<translation>Nastavi</translation>
</message>
<message>
<source>Continue but remove the data first.</source>
<translation>Nastavi, ali prvo ukloni podatke.</translation>
</message>
<message>
<source>Keep data and skip database initialization.</source>
<translation>Zadrลพi podatke i preskoฤi iniciranje baze podataka.</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Click the %1 button to start the configuration process.</source>
<translation>Pritisnite dugme %1 da bi zapoฤeli proces konfiguracije.</translation>
</message>
<message>
<source>Servername</source>
<translation>Naziv servera</translation>
</message>
<message>
<source>Username</source>
<translation>Korisniฤko ime</translation>
</message>
<message>
<source>Confirm password</source>
<translation>Potvrdi lozinku</translation>
</message>
<message>
<source>which must be available on the server or</source>
<translation>koja mora biti dostupna na serveru ili</translation>
</message>
<message>
<source>ez.no</source>
<translation>ez.no</translation>
</message>
<message>
<source>Click on the URL to access your new %ezlink or click the %donebutton button. Enjoy one of the most successful web content management systems!</source>
<translation>Pritisnite na URL da bi pristupili svojoj novoj %ezlink ili pritisnite dugme %donebutton. Uลพivajte u jednom od najuspeลกnijih CMS-ova! </translation>
</message>
<message>
<source>Change the second line from %false to %true.</source>
<translation>Promeni drugi red iz %false u %true.</translation>
</message>
<message>
<source>The default username for the administrator is %1 and the default password is %2.</source>
<translation>Osnovno korisniฤko ime za administratora je %1, a osnovna lozinka %2.</translation>
</message>
<message>
<source>Database choice</source>
<translation>Izbor baze podataka</translation>
</message>
<message>
<source>The database would not accept the connection, please review your settings and try again.</source>
<translation type="unfinished">Baza podataka nije prihvatila vezu, molimo pregledajte svoja podeลกavanja i pokuลกajte ponovo. </translation>
</message>
<message>
<source>Password entries did not match.</source>
<translation type="unfinished">Unesene lozinke nisu odgovarale.</translation>
</message>
<message>
<source>The selected database was not empty, please choose from the alternatives below.</source>
<translation type="unfinished">Odabrana baza podataka nije bila prazna, molimo izaberite meฤu niลพe ponuฤenim alternativama. </translation>
</message>
<message>
<source>Database initalization</source>
<translation type="unfinished">Iniciranje baze podataka</translation>
</message>
<message>
<source>Email settings</source>
<translation type="unfinished">Podeลกavanja elektronske poลกte</translation>
</message>
<message>
<source>Finished</source>
<translation>Zavrลกen</translation>
</message>
<message>
<source>Language options</source>
<translation type="unfinished">Jeziฤne moguฤnosti</translation>
</message>
<message>
<source>Registration</source>
<translation type="unfinished">Registracija</translation>
</message>
<message>
<source>Securing site</source>
<translation type="unfinished">Zaลกtita stranice</translation>
</message>
<message>
<source>Site access</source>
<translation type="unfinished">Pristup stranici</translation>
</message>
<message>
<source>Site details</source>
<translation>Detalji stranice</translation>
</message>
<message>
<source>Site template selection</source>
<translation type="unfinished">Izbor ลกablona stranice</translation>
</message>
<message>
<source>System check</source>
<translation>Provera sistema</translation>
</message>
<message>
<source>Choose database system</source>
<translation>Izaberi sistem baze podataka</translation>
</message>
<message>
<source>Next</source>
<comment>next button in installation</comment>
<translation>Sledeฤi</translation>
</message>
<message>
<source>here</source>
<comment>link to unicode info</comment>
<translation>ovde</translation>
</message>
<message>
<source>Database initialization</source>
<translation>Iniciranje baze podataka</translation>
</message>
<message>
<source>Socket (optional)</source>
<translation>Socket (opcija)</translation>
</message>
<message>
<source>If you are using MySQL and do not know what to enter in the socket field, leave it blank</source>
<translation>Ako se koristite MySQL-om i ne znate ลกta upisati u socket polje ostavite to polje prazno</translation>
</message>
<message>
<source>Title</source>
<translation>Naziv</translation>
</message>
<message>
<source>URL</source>
<translation>URL</translation>
</message>
<message>
<source>User site</source>
<translation>Korisniฤka stranica</translation>
</message>
<message>
<source>Admin site</source>
<translation>Administratorska stranica</translation>
</message>
<message>
<source>Make sure to visit the %1 and the %2 web site.</source>
<translation>Obavezno posetite internet stranicu %1 i %2.</translation>
</message>
<message>
<source>No Unicode support</source>
<translation>Ne podrลพava Unicode</translation>
</message>
<message>
<source>The database server you connected to does not support Unicode which means that you cannot choose all the languages as you did.
To fix this problem you must do one of the following:</source>
<translation>Server baze podataka koji ste odabrali ne podrลพava Unicode, ลกto znaฤi da ne moลพete izabrati sve jezike koje ste odabrali.
Da bi reลกili taj problem morate uฤiniti sledeฤe:</translation>
</message>
<message>
<source>Make sure the database server is configured to use Unicode or that it has the latest software which supports Unicode.</source>
<translation>Pobrinite se da je server baze podataka konfigurisan za koriลกฤenje Unicode-a ili da ima najnovije raฤunarske programe koji podrลพavaju Unicode. </translation>
</message>
<message>
<source>These and other additional languages can also be installed later.</source>
<translation>Ovi i drugi dodatni jezici mogu biti instalirani kasnije.</translation>
</message>
<message>
<source>documentation</source>
<comment>language information link</comment>
<translation>dokumentacija</translation>
</message>
<message>
<source>Site registration</source>
<translation>Registracija stranice</translation>
</message>
<message>
<source>Site access configuration</source>
<translation>Konfiguracija pristupa stranici</translation>
</message>
<message>
<source>URL (recommended)</source>
<translation>URL (preporuฤen)</translation>
</message>
<message>
<source>Port. Note: Requires web server configuration </source>
<translation>Ulaz. Pazi: Zahteva konfiguraciju servera</translation>
</message>
<message>
<source>Hostname. Note: Requires DNS setup.</source>
<translation>Hostname. Pazi: Potreban je DNS setup. </translation>
</message>
<message>
<source>The path determines access.</source>
<translation>Putanja odreฤuje pristup.</translation>
</message>
<message>
<source>e.g. %adminsite and %usersite</source>
<translation>npr. %adminsite i %usersite</translation>
</message>
<message>
<source>Port</source>
<translation>Ulaz</translation>
</message>
<message>
<source>The port number determines access.*</source>
<translation>Broj ulaza odreฤuje pristup.*</translation>
</message>
<message>
<source>Hostname</source>
<translation>Ime hosta</translation>
</message>
<message>
<source>The hostname determines access.*</source>
<translation>Ime hosta odreฤuje pristup.*</translation>
</message>
<message>
<source>online documentation</source>
<comment>site access documentation link</comment>
<translation>dokumentacija na internetu</translation>
</message>
<message>
<source>You have chosen the same database for two or more site templates. Please change where indicated by *</source>
<translation>Odabrali ste istu bazu podataka za dva ili viลกe ลกablona. Molimo unesite promene gde je oznaฤeno *</translation>
</message>
<message>
<source>Site url</source>
<translation>URL stranice</translation>
</message>
<message>
<source>Leave the data and add new</source>
<translation>Ostavi podatke i dodaj nove</translation>
</message>
<message>
<source>Remove existing data</source>
<translation>Uklonite postojeฤe podatke</translation>
</message>
<message>
<source>Leave the data and do nothing</source>
<translation>Ostavite podatke i ne ฤinite niลกta</translation>
</message>
<message>
<source>documentation</source>
<comment>site access documentation link</comment>
<translation>Dokumentacija</translation>
</message>
<message>
<source>Select which sites you would like to install on your system.</source>
<translation>Izaberite stranice koje bi ลพeleli instalirati u svoj sistem.</translation>
</message>
<message>
<source>After you have fixed the problems click the %1 button to re-run the system checking. You may also ignore specific tests by clicking the check boxes.</source>
<translation>Nakon ลกto ste otklonili probleme pritisnite dugme%1 da bi ponovo proverili sistem. Moลพete zanemariti pojedine testove izborom kontrolnih okvira. </translation>
</message>
<message>
<source>Ignore this test</source>
<translation>Zanemarite ovaj test</translation>
</message>
<message>
<source>which will relay the emails. If unsure what to use, ask your webhost. Some webhosts do not support</source>
<translation>koji ฤe prenositi E-mailove. Ako niste sigurni ลกta koristiti, upitajte svog webhost. Neki webhosts ne podrลพavaju</translation>
</message>
<message>
<source>Back</source>
<comment>back button in installation</comment>
<translation>Nazad</translation>
</message>
<message>
<source>Refresh</source>
<comment>Refresh button in installation</comment>
<translation>Osveลพi</translation>
</message>
<message>
<source>The system check found some issues that need to be resolved before the setup can continue.</source>
<translation>Provera sistema ukazala je na neke probleme koje treba razreลกiti pre nego ลกto setup moลพe nastaviti.</translation>
</message>
<message>
<source>This section will contain information/help about each step in the setup wizard.</source>
<translation>Ovaj segment sadrลพi podatke/pomoฤ u vezi s svakim korakom unutar ฤarobnjaka za podeลกavanja.</translation>
</message>
<message>
<source>The summary section below will contain information about configured settings.</source>
<translation>Niลพe navedeni saลพetak ฤe sadrลพati podatke o konfigurisanim podeลกavanjima. </translation>
</message>
<message>
<source>here</source>
<comment>manual installation link</comment>
<translation>ovde</translation>
</message>
<message>
<source>Both MySQL and PostgreSQL support was detected on your system. Please choose the database system you would like to use.</source>
<translation>U Vaลกem sistemu pronaฤena je i MySQL i PostgreSQL podrลกka. Molimo izaberite bazu podataka koju ลพelite koristiti. </translation>
</message>
<message>
<source>Please input database access information in the form below.</source>
<translation>Molimo da unesete podatke o pristupu bazi podataka u niลพe navedeni obrazac. </translation>
</message>
<message>
<source>SMTP is recommended for MS Windows users.</source>
<translation>Za korisnike MS Windows-a preporuฤujemo SMTP. </translation>
</message>
<message>
<source>Server name: </source>
<translation>Ime servera:</translation>
</message>
<message>
<source>Username (optional): </source>
<translation>Korisniฤko ime (nije obavezno):</translation>
</message>
<message>
<source>Password (optional): </source>
<translation>Lozinka (nije obvezna):</translation>
</message>
<message>
<source>Email is used for sending out important notices such as user registration and content approval.</source>
<translation>Elektronska poลกta koristi se za slanje vaลพnih obaveลกtenja kao ลกto je registracija korisnika ili odobrenje sadrลพaja. </translation>
</message>
<message>
<source>Most Unix systems support sendmail, while windows users must choose SMTP.</source>
<translation>Veฤina Unix sistema podrลพava sendmail komandu, dok korisnici Windows-a moraju izabrati SMTP.</translation>
</message>
<message>
<source>forums</source>
<comment>forum link</comment>
<translation>forumi</translation>
</message>
<message>
<source>Language support</source>
<translation>Jeziฤna podrลกka</translation>
</message>
<message>
<source>The selected languages are used to determine character sets, date / number formats, etc.</source>
<translation>Izabrani jezici koriste se da bi se odredili skupovi znakova, format datuma/ brojeva itd. </translation>
</message>
<message>
<source>For more information about language customization, please refer to the %1.</source>
<translation>Za viลกe podataka o prilagoฤavanju jezika molimo da pogledate %1.</translation>
</message>
<message>
<source>Send registration</source>
<translation>Poลกalji registraciju</translation>
</message>
<message>
<source>System details (OS type, etc)</source>
<translation>Detalji o sistemu (vrsta OS, itd.)</translation>
</message>
<message>
<source>The test results</source>
<translation>Rezultati testa</translation>
</message>
<message>
<source>The database type</source>
<translation>Vrsta baze podataka</translation>
</message>
<message>
<source>The site name</source>
<translation>Ime stranice</translation>
</message>
<message>
<source>The url of the site</source>
<translation>URL stranice</translation>
</message>
<message>
<source>Languages chosen</source>
<translation>Izabrani jezik</translation>
</message>
<message>
<source>Site security</source>
<translation>Sigurnost stranice</translation>
</message>
<message>
<source>If you do not have shell access, you will have to copy the file using an FTP client or ask your hosting provider to do this for you.</source>
<translation>Ako nemate pristup shellu, moraฤete kopirati datoteku koristeฤi se FTP klijentom ili zatraลพiti Vaลกeg hosting provjadera da to obavi za Vas.</translation>
</message>
<message>
<source>This security tweak takes care of protecting configuration files and other important files.</source>
<translation>Ovaj sigurnosni tweak brine se za zaลกtitu konfiguracionih i ostalih vaลพnih datoteka.</translation>
</message>
<message>
<source>Port*</source>
<translation>Ulaz*</translation>
</message>
<message>
<source>* Requires web server setup.</source>
<translation>*Traลพi setup web servera.</translation>
</message>
<message>
<source>Hostname*</source>
<translation>Ime hosta*</translation>
</message>
<message>
<source>* Requires DNS setup.</source>
<translation>* Traลพi DNS setup.</translation>
</message>
<message>
<source>User path</source>
<translation>Korisniฤka putanja</translation>
</message>
<message>
<source>User port</source>
<translation>Korisniฤki ulaz</translation>
</message>
<message>
<source>User hostname</source>
<translation>Ime hosta</translation>
</message>
<message>
<source>Admin path</source>
<translation>Administratorska putanja</translation>
</message>
<message>
<source>Admin port</source>
<translation>Administratorski ulaz</translation>
</message>
<message>
<source>Admin hostname</source>
<translation>Administratorski hostname</translation>
</message>
<message>
<source>You may modify the details for each site.</source>
<translation>Moลพete izmeniti detalje za svaku stranicu. </translation>
</message>
<message>
<source>Use the refresh button to update the database listing.</source>
<translation>Pritisnite dugme Osveลพi da bi aลพurirali listu baze podataka. </translation>
</message>
<message>
<source>Next &gt;</source>
<translation>Sledeฤi &gt;</translation>
</message>
<message>
<source>There are some important issues that have to be resolved. A list of issues / problems is presented below. Each section contains a description and a suggested / recommended solution.</source>
<translation>Postoje vaลพna pitanja koja je potrebno reลกiti. Niลพe je navedena lista pitanja/problema. Svaki segment sadrลพi opis i preporuฤeno reลกenje. </translation>
</message>
<message>
<source>Once the problems / issues are fixed, you may click the <i>Next</i> button to continue. The system check will be run again. If everything is okay, the setup will go to the next stage. If there are problems, the system check page will reappear.</source>
<translation>Jednom kad su problemi reลกeni, moลพete izabrati dugme <i>Sledeฤi</i> za nastavak. Provera sistema biฤe ponovo obavljena. Ako je sve u redu, setup ฤe nastaviti na sledeฤoj stranici, a ako i dalje postoje problemi stranica provere sistema ฤe se ponovo pojaviti.</translation>
</message>
<message>
<source>Some issues may be ignored by checking the <i>Ignore this test</i> checkbox(es); however, this is not recommended.</source>
<translation>Neka od pitanja moguฤe je zanemariti prilikom provere </i> checkbox(es); meฤutim, to nije preporuฤljivo.</translation>
</message>
<message>
<source>The system check page is being displayed. This means that there are some problems/issues present.</source>
<translation>Prikazana je stranica provere sistema. To znaฤi da postoje neki problemi/pitanja. </translation>
</message>
<message>
<source>No data will be stored in the database until the final step of the setup.</source>
<translation>Nikakvi podaci neฤe biti smeลกteni u bazi podataka do konaฤnog koraka podeลกavanja.</translation>
</message>
<message>
<source>System finetuning</source>
<translation>Fino podeลกavanje sistema</translation>
</message>
<message>
<source>Finetune</source>
<comment>Finetune button in installation</comment>
<translation>Fino podesiti</translation>
</message>
<message>
<source>Your passwords do not match.</source>
<translation>Vaลกe lozinke ne odgovaraju.</translation>
</message>
<message>
<source>First name</source>
<translation>Ime</translation>
</message>
<message>
<source>Last name</source>
<translation>Prezime</translation>
</message>
<message>
<source>Site packages</source>
<translation>Site paketi</translation>
</message>
<message>
<source>Each package will create a unique web site.</source>
<translation>Svaki paket ฤe kreirati jedinstvenu internet stranicu.</translation>
</message>
<message>
<source>Since each web site is unique, each package requires a unique database.</source>
<translation>Buduฤi da je svaka internet stranica jedinstvena, svaki paket zahteva jedinstvenu bazu podataka. </translation>
</message>
<message>
<source>It is also possible to do some finetuning of your system, click <i>Finetune</i> instead <i>Next</i> if you want to see the finetuning hints.</source>
<translation>Moguฤe je i fino podeลกavanje Vaลกeg sistema, pritisnite <i>Finetune</i> umjesto <i>Sledeฤi</i> ako ลพelite videti uputstva za fino podeลกavanje.</translation>
</message>
<message>
<source>There are some issues that should be resolved to get maximum performance and features. A list of issues is presented below. Each section contains a description and a suggested / recommended solution.</source>
<translation>Postoje neka pitanja koja treba reลกiti da bi se ostvarila maksimalna performansa i najbolje karakteristike. Lista tih pitanja navedena je niลพe. Svako pitanje sadrลพi opis i moguฤe/preporuฤeno reลกenje. </translation>
</message>
<message>
<source>Once the issues are handled, you may click the <i>Finetune</i> button to continue. The system check will be run again. If everything is okay, the setup will go to the next stage. If the issues are not solved the system finetune page will reappear.</source>
<translation>Jednom kad su ta pitanja reลกena, moลพete pritisnuti dugme <i>Finetune</i> za nastavak. Provera sistema biฤe ponovo obavljena. Ako je sve u redu. Setup ฤe nastaviti na sledeฤoj stranici. Ako neka pitanja nisu reลกena ponovo ฤe se pojaviti stranica za fino podeลกavanje. </translation>
</message>
<message>
<source>If you do not want to fix these issues just click <i>Next</i>.</source>
<translation>Ako ne ลพelite popraviti navedeno pritisnite <i>Sledeฤi</i>.</translation>
</message>
<message>
<source>The system finetune page is being displayed. This means that there are some issues which can be solved to improve the performance or features.</source>
<translation>Prikazana je stranica za fino podeลกavanje. To znaฤi da postoje neki problemi koje je moguฤe reลกiti kako bi se poboljลกao uฤinak ili karakteristike sistema. </translation>
</message>
<message>
<source>Site administrator</source>
<translation>Administrator stranice</translation>
</message>
<message>
<source>Site functionality</source>
<translation>Funkcionalnosti stranice</translation>
</message>
<message>
<source>Site selection</source>
<translation type="unfinished">Izbor stranice</translation>
</message>
<message>
<source>You need to fill in the first name.</source>
<translation>Morate upisati ime.</translation>
</message>
<message>
<source>You need to fill in the last name.</source>
<translation>Morate upisati prezime.</translation>
</message>
<message>
<source>You need to fill in a password.</source>
<translation>Morate upisati lozinku.</translation>
</message>
<message>
<source>Administrator settings</source>
<translation>Administratorska podeลกavanja</translation>
</message>
<message>
<source>Login</source>
<translation>Prijava</translation>
</message>
<message>
<source>The login name is fixed and cannot be changed.
After the setup is done you can login with %admin_login and your password.</source>
<translation>Ime prijave je zadano i nije ga moguฤe promeniti.
Nakon setup-a moลพete se prijaviti %admin_login i Vaลกom lozinkom. </translation>
</message>
<message>
<source>Your database already contain data.
The setup can continue with the initialization but may damage the present data.</source>
<translation>Vaลกa baza podataka veฤ sadrลพi podatke.
Setup moลพe nastaviti inicijalizaciju, ali moลพe oลกtetiti postojeฤe podatke. </translation>
</message>
<message>
<source>Select what to do from the drop-down box.</source>
<translation>Izaberite ลกta treba uฤiniti iz okvira s ponuฤenim moguฤnostima. </translation>
</message>
<message>
<source>Action: </source>
<translation>Aktivnost:</translation>
</message>
<message>
<source>Current site functionality</source>
<translation>Trenutna funkcija stranice</translation>
</message>
<message>
<source>Please select additional functionality</source>
<translation>Molimo izaberite dodatnu funkciju</translation>
</message>
<message>
<source>The type of site will choose some basic settings for toolbars, menus, color and functionality.
It is possible to change these settings at a later time.</source>
<translation>Vrsta stranica povezana je s osnovnim podeลกavanjima alatne trake, menija, boja i funkcija.
Moguฤe je naknadno izmeniti te podeลกavanja. </translation>
</message>
<message>
<source>First time users are advised to install the demo data.</source>
<translation>Korisnici koji koriste prvi put EZ se savetuju da instaliraju demo podatke.</translation>
</message>
<message>
<source>Note</source>
<translation>Napomena</translation>
</message>
<message>
<source>PostgreSQL username and password is not tested until database names are selected.</source>
<translation>PostgreSQL login i lozinka nije testiran dok se ne izabere bata podataka.</translation>
</message>
<message>
<source>Optionally you may disable this manually, edit the <i>settings/site.ini</i> file and look for a line that says</source>
<translation>Opciono ovo moลพete onemoguฤiti ruฤno, izmenite <i>settings/site.ini</i> fajl i potraลพite liniju na kojoj piลกe</translation>
</message>
<message>
<source>Failed to send the registration email using</source>
<translation>Neuspeลกno slanje registracionog emaila koristeฤi</translation>
</message>
<message>
<source>If you ever want to restart this setup, edit the file %filename and look for a line that says</source>
<translation>Ako nekad poลพelite da ponovo pokrenete setup, izmenite fajl %filename i potraลพite liniju na kojoj piลกe</translation>
</message>
<message>
<source>Creating sites</source>
<translation>Kreiranje sajtova</translation>
</message>
<message>
<source>Please make sure that the username and the password is correct. Verify that your PostgreSQL database is configured correctly.<br>See the PHP documentation for more information about this.<br>Remember to start postmaster with the -i option.<br>Note that PostgreSQL 7.2 is not supported.</source>
<translation type="unfinished">Molimo proverite da li su korisniฤko ime i lozinka ispravni. Proverite da li je vaลกa PostgreSQL baza podataka ispravno konfigurisana.<br>Pogledajte PHP dokumentaciju za viลกe informacija o ovome.<br>Zapamtite da pokrenete postmaster sa -i opcijom.<br>Znajte da PostgreSQL 7.2 nije podrลพan.</translation>
</message>
<message>
<source>Your database version %version does not fit the minimum requirement which is %req_version.</source>
<translation type="unfinished">Verzija %version vaลกe baze podataka ne ispunjava minimum zahteva koje zahteva %req_version.</translation>
</message>
<message>
<source>The setup wizard was not able to complete the creation of your selected sites.</source>
<translation>Setup ฤarobnjak nije bio u moguฤnosti da zavrลกi kreiranje vaลกih izabranih sajtova.</translation>
</message>
<message>
<source>The setup wizard failed to create the sites.</source>
<translation>Setup ฤarobnjak nije uspeo da kreira sajtove.</translation>
</message>
<message>
<source>Retry</source>
<comment>Retry button in installation</comment>
<translation>Ponovi</translation>
</message>
<message>
<source>The following errors were detected</source>
<translation>Sledeฤe greลกke su pronaฤene</translation>
</message>
<message>
<source>There are two options:<br>- Direct delivery through transfer agent (must be available on the server).<br>- Indirect delivery using an SMTP relay server.</source>
<translation>Postoje dve opcije:<br>- Direktno slanje preko agenta za prenos (mora biti dostupno na serveru).<br>- Posredno slanje koriลกฤenjem SMTP servera.</translation>
</message>
<message>
<source>Sendmail/MTA</source>
<translation>Sendmail/MTA</translation>
</message>
<message>
<source><b>Sendmail/MTA:</b><br>Mail is delivered directly using the mail transfer agent. The most common agent, sendmail, is usually available on most Linux/UNIX systems. If a mail transfer agent is not available then SMTP should be used.</source>
<translation><b>Sendmail/MTA:</b><br>Mail je poslan koristeฤi mail agent za transfer. Najฤeลกฤe koriลกฤeni agent, sendmail, je obiฤno dostupan na veฤini Linux/UNIX sistema. Ako mail transfer agent nije dostupan onda bi trebali koristiti SMTP.</translation>
</message>
<message>
<source>Package language options</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you think you have fixed the errors you can try then click the "Retry" button.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If possible try to fix these errors then click "Retry".</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you want you can let the setup add some demo data to your database, this demo data will give a good demonstration of the capabilities of eZ Publish</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The setup will not do an upgrade from older eZ Publish versions (such as 2.2.7) if you leave the data as it is. This is only meant for people who have existing data that they don't want to lose. If you have existing eZ Publish 4.0 data (such as from an RC release) you should skip DB initialization, however you will then need to do a manual upgrade.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It can take some time to initialize the database so please be patient and wait until the new page is finished.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish supports both MySQL and PostgreSQL.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>PostgreSQL or MySQL >= 4.1 are required for unicode support in eZ Publish.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>More information about eZ Publish and unicode support can be found %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The database was successfully initialized. You are now ready for some post configuration of the site.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you don't have access to a database, you should obtain access now. eZ Publish is capable of running multiple sites, each site needs its own database. This means that you need to create several databases if you plan to run multiple sites. Please refer to the database system user manual if you're unsure about how to create a database.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Re-run System Check</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>button to re-run the finetuning checks. However if you want you can skip straight to the next step by clicking the</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>to enable write access then click the</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Outgoing Email</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This section is used to configure how eZ Publish delivers its outgoing Email.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Email delivery</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The eZ Publish system uses email to send out important notices such as user registration and content approval. On Linux/UNIX: try to use sendmail. On Windows: use an SMTP server.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source><b>SMTP:</b><br>Mail is delivered through an SMTP server. At the minimum, the hostname of the SMTP server must be specified. Hint: check the SMTP settings in your email application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source><b>SMTP</b>: If you are unsure what to enter, refer to the settings in your email application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish has been installed with your select site setup. You will find the username mentioned in the details below.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The first time the user or admin site is accessed it will take some time (30 to 60 seconds). This is because eZ Publish prepares the site for your machine.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Tip: Store this page as an html file by clicking Save-As in your web browser menu, alternatively you may write down the URLs for your sites.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish</source>
<comment>eZ Publish link</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sending email failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Congratulations, eZ Publish should now run on your system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you need help with eZ Publish, you can go to %ezlink and get help in the forums.
If you find a bug (error), please go to %buglink and report it.
With your help we can fix the errors eZ Publish might have and implement new features.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish bug reports</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish website</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use the radio buttons to choose the default language, and the checkboxes to choose additional languages. You will be able to use any of the selected languages for translating your content. The default language will determine the locale settings and will be used as the most prioritized language for your site.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose only languages that use similar characters, for instance: English and Norwegian will work together while English and Russian will not work.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default/Additional</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish supports multiple languages.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Language mapping</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The languages you have chose for site do not match languages in chosen packages. To resolve conflict please select language mapping:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Language</source>
<translation type="unfinished">Jezik</translation>
</message>
<message>
<source>Action</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Skip content in this language</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create language</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Map to </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the language this site should support.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select your language then click the</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the languages this site should support. Select your primary language and check any additional languages.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Once you are done, click the</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is now possible to select a variation for your language. A variation does small adjustments to the language, such as adding Euro support or date format changes. Using variations are optional so you may safely skip this step. Once your are done click the</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is now possible to select variations for your languages. Variations do small adjustments to the language, such as adding Euro support or date format changes. Using variations are optional so you may safely skip this step. Once you are done click the</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you want, you can register this installation by sending some information to eZ Systems. No confidential data will be transmitted and eZ Systems will not use or sell your details for unsolicited emails.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The registration email</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you want, you can also add some comments, which will be included in the registration email.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sending out the email and generating your site will take about 10 to 30 seconds depending on your machine. Please wait until the next page loads. Clicking the button again will only send out duplicate emails, and may corrupt the installation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>By sending registration the following data will be sent to eZ Systems</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This data will help to improve future releases of eZ Publish.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your site is not running in a virtual host mode, this is insecure. It is recommended to run eZ Publish in virtual host mode. If you do not have the possibility to use virtual host mode, you should follow the instructions below about how to install an .htaccess file. The .htaccess file tells the web server to restrict the access to certain files.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you have shell access, you can run the following commands.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose the access method you want to use for your site. The access method determines how the site will be accessed from within a web browser. If unsure: choose URL.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Access method</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>For more detailed information on site access, refer to the %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This page lets you modify the administrator for your site. This ensures that your site is secure and has proper name and email set.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You need to fill in an email address.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You need to fill in a valid email address.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The password is too short.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Email address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This page lets you modify information about the site you have chosen to install. In addition, it also lets you choose a database for the site.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'User path' and 'Admin path' should only contain letters ('a-zA-Z'), digits ('0-9') and underscores ('_'). The access values must not be named 'admin' or 'user' and each value must be unique. Please change invalid values on site indicated by *</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'User port' and 'Admin port' should only contain digits ('0-9'). Please change invalid values on site indicated by *</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'User hostname' and 'Admin hostname' should only contain letters ('a-zA-Z'), digits ('0-9'), dashes ('-'), dots ('.') and colons (':'). Please change invalid values on site indicated by *</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>I have chosen a new database</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>For more information about how to configure site access, refer to the %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose what kind of functionality you want on your site.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Each site comes with a predefined set of functionality, however it is possible to add extra functionality.
This functionality is also available at a later time from the Administration Interface.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose one or more of the demo sites you would like to test or base your sites on. Use Plain if you want to start from scratch.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Site package</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose a site package you would like to test or base your site on.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error</source>
<translation type="unfinished">Greลกka</translation>
</message>
<message>
<source>Imported</source>
<translation type="unfinished">Uvezeno</translation>
</message>
<message>
<source>Not imported</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No dependencies</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Upload package</source>
<translation type="unfinished">Uฤitaj paket</translation>
</message>
<message>
<source>Upload</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>These issues have to be resolved/fixed, or else, eZ Publish will not function properly.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The problems are usually file-system related and can be easily fixed by copy / paste / running the suggested commands in a system shell.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>These issues do not need to be resolved/fixed. eZ Publish will function properly without them.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Welcome to eZ Publish %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Welcome to the eZ Publish content management system and development framework. This wizard will help you set up eZ Publish.<br>Your system is not optimal, if you wish you can click the <i>Finetune</i> button. This will present hints on how to fix these issues.<br/> Click <i>Next</i> to continue without finetuning.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Welcome to the eZ Publish content management system and development framework. This wizard will help you set up eZ Publish.<br>Click <i>Next</i> to continue.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select installation language</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Information about how to set up eZ Publish manually is available %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MySQL support was detected on your system. Please choose the database driver you would like to use.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>PostgreSQL support was detected on your system. Please choose the database driver you would like to use.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The selected user has not got access to any databases. Change user or create a database for the user.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The 'digest' function is not available in your database, you cannot run eZ Publish without this. See the documentation for more information.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The database [%database_name] cannot be used, the setup wizard wants to create the site in [%req_charset] but the database has been created using character set [%charset]. You will have to choose a database having support for [%req_charset] or modify [%database_name] .</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No packages chosen.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No templates chosen.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot write to file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed to copy %url to local file %filename</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Download of package '%pkg' failed. You may upload the package manually.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid package</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No package selected for upload</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Failed fetching upload package file</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Uploaded file is not an eZ Publish package</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No site package chosen.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Package '%packageName' and it's dependencies have been downloaded successfully. Press 'Next' to continue.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Retrieving remote site packages list failed. You may upload packages manually.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Welcome to eZ Publish</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/setup/operatorcode</name>
<message>
<source>Example</source>
<translation>Primer</translation>
</message>
<message>
<source>Constructor, does nothing by default.</source>
<translation>Po osnovnoj postavci konstruktor ne ฤini niลกta.</translation>
</message>
<message>
<source>Executes the PHP function for the operator cleanup and modifies \a $operatorValue.</source>
<translation>Izvrลกava PHP funkciju za operatora ฤiลกฤenja i menja \a $operatorValue.</translation>
</message>
<message>
<source>\\return an array with the template operator name.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Example code. This code must be modified to do what the operator should do. Currently it only trims text.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/setup/session</name>
<message>
<source>Session admin</source>
<translation>Administrator sesija</translation>
</message>
<message>
<source>The sessions were successfully removed.</source>
<translation>Sesije su uspeลกno uklonjene.</translation>
</message>
<message>
<source>Sessions</source>
<translation>Sesije</translation>
</message>
<message>
<source>Use the buttons below to delete the session entries that are present in the database.</source>
<translation>Upotrebite niลพe navedenu dugmad kako bi obrisali unose koji su prisutni u bazi podataka.</translation>
</message>
<message>
<source>WARNING! When removing sessions, users that are logged in will be thrown out from the system.</source>
<translation>UPOZORENJE! Pri uklanjanju sesija, moลพe se dogoditi da prijavljeni korisnici budu izbaฤeni iz sistema. </translation>
</message>
<message>
<source>Remove all sessions</source>
<translation>Ukloni sve sesije</translation>
</message>
<message>
<source>Remove timed out / old sessions</source>
<translation>Ukloni istekle/ stare sesije</translation>
</message>
<message>
<source>Login</source>
<translation>Prijava</translation>
</message>
<message>
<source>Full name</source>
<translation>Ime i prezime</translation>
</message>
<message>
<source>Idle time</source>
<translation>Vreme tokom kojeg nije niลกta raฤeno</translation>
</message>
<message>
<source>Idle since</source>
<translation>Miruje od</translation>
</message>
<message>
<source>Time skew detected</source>
<translation>Detektovan vremenski paradoks</translation>
</message>
<message>
<source>Total number of sessions</source>
<translation>Ukupan broj sesija</translation>
</message>
<message>
<source>Displaying sessions for %username</source>
<translation>Prikaลพi sesije za korisnika %username</translation>
</message>
<message>
<source>Show from all users</source>
<translation>Prikaลพi od svih korisnika</translation>
</message>
<message>
<source>Filter sessions</source>
<translation>Filtriraj sesije</translation>
</message>
<message>
<source>Everyone</source>
<translation>Svi</translation>
</message>
<message>
<source>Registered users</source>
<translation>Registrovani korisnici</translation>
</message>
<message>
<source>Anonymous users</source>
<translation>Anonimni korisnici</translation>
</message>
<message>
<source>Include inactive users</source>
<translation>Ukljuฤi neaktivne korisnike</translation>
</message>
<message>
<source>Update list</source>
<translation>Obnovi listu</translation>
</message>
<message>
<source>Count</source>
<translation>Zbir</translation>
</message>
<message>
<source>There are %logged_in_count registered and %anonymous_count anonymous users online.</source>
<translation>Postoji %logged_in_count registrovanih i %anonymous_count anonimnih korisnika na mreลพi. </translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Email</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Not all timed out sessions were successfully removed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your alternatives are to:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repeat the operation several times to complete it.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Clear the timed out session data from command-line using: &gt;php bin/php/ezsessiongc.php</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Install the session cleanup cronjob 'session_gc.php' and run on nightly intervals (see cronjob.ini or doc for how)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The operation was cut short in order to avoid execution timeout.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your current session handler does not support session administration.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/setup/tests</name>
<message>
<source>Missing database handlers</source>
<translation>Nedostaju upravljaฤi baze</translation>
</message>
<message>
<source>Also some databases has more advanced features, such as charset, than others.</source>
<translation>Takoฤe neke baze podataka imaju naprednije karakteristike, kao ลกto su npr. setovi znakova, nego ostale. </translation>
</message>
<message>
<source>To obtain more database support you need to recompile PHP, the exact recompile options are specified below.</source>
<translation>Za dodatne baze morate prekompajlirati PHP.</translation>
</message>
<message>
<source>Missing database handler</source>
<translation>Nedostaje upravljaฤ baze</translation>
</message>
<message>
<source>To obtain database support you need to recompile PHP, the exact recompile options are specified below.</source>
<translation>Za koriลกฤenje baze morate prekompajlirati PHP.</translation>
</message>
<message>
<source>Insufficient directory permissions</source>
<translation>Nedovoljna ovlaลกฤenja</translation>
</message>
<message>
<source>It's recommended that you fix this by running the commands below.</source>
<translation>Preporuฤujemo da to ispravite zadavanjem niลพe navedenih naredbi. </translation>
</message>
<message>
<source>Shell commands</source>
<translation>Naredbe ljuske</translation>
</message>
<message>
<source>File uploading is disabled</source>
<translation>Uฤitavanje datoteke je onemoguฤeno</translation>
</message>
<message>
<source>Configuration</source>
<translation>Konfiguracija</translation>
</message>
<message>
<source>Enabling file uploads is done by setting %1 in php.ini. Refer to the PHP manual for how to set configuration switches</source>
<translation>Uฤitavanje datoteka omoguฤuje se postavljanjem %1 u php.ini. Da bi saznali kako postaviti konfiguracione prekidaฤe pogledajte PHP priruฤnik</translation>
</message>
<message>
<source>More information on enabling the extension can be found by reading %1 and %2</source>
<translation>Viลกe o postavljanju ekstenzije moลพete pronaฤi ฤitajuฤi %1 i %2</translation>
</message>
<message>
<source>Missing image conversion support</source>
<translation>Nedostaje podrลกka za pretvaranje slika</translation>
</message>
<message>
<source>template operator will not be available.</source>
<translation>operator ลกablona neฤe biti dostupan. </translation>
</message>
<message>
<source>Note:</source>
<translation>Pazi:</translation>
</message>
<message>
<source>Missing ImageMagick program</source>
<translation>Nedostaje program Image Magic </translation>
</message>
<message>
<source>If you known where the program is installed (the executable is called</source>
<translation type="obsolete">Ako znate gde je program instaliran (izvลกni kod naziva se</translation>
</message>
<message>
<source>or</source>
<translation>ili</translation>
</message>
<message>
<source>)then enter the directory in the input field below and do a recheck (Separate multiple directories with a</source>
<translation>)zatim unesi direktorijum u niลพe prikazano polje za unos i obavi ponovnu proveru (odvoji viลกestruke direktorijume s</translation>
</message>
<message>
<source>colon</source>
<translation>dvotaฤka</translation>
</message>
<message>
<source>semicolon</source>
<translation>taฤka-zarez</translation>
</message>
<message>
<source>Installation</source>
<translation>Instalacija</translation>
</message>
<message>
<source>ImageMagick may be downloaded from</source>
<translation>ImageMagic moลพe biti presnimljen sa</translation>
</message>
<message>
<source>Missing MBString extension</source>
<translation>Nedostaje MBString ekstenzija</translation>
</message>
<message>
<source>Installation of the mbstring extension is done by compiling PHP with the</source>
<translation>Instalacija mbstring ekstenzije obavlja se kompiliranjem PHP-a s </translation>
</message>
<message>
<source>option.</source>
<translation>opcija.</translation>
</message>
<message>
<source>More information on enabling the extension can be found at</source>
<translation>Viลกe o aktiviranju ekstencije moลพete pronaฤi u </translation>
</message>
<message>
<source>PHP option</source>
<translation>PHP opcija</translation>
</message>
<message>
<source>is enabled</source>
<translation>je omoguฤena</translation>
</message>
<message>
<source>normal</source>
<translation>normalno</translation>
</message>
<message>
<source>Insufficient PHP version</source>
<translation>Nedovoljna PHP verzija</translation>
</message>
<message>
<source>Your PHP version, which is </source>
<translation>Vaลกa PHP verzija, koja je</translation>
</message>
<message>
<source>, does not meet the minimum requirements of</source>
<translation>ne zadovoljava minimalnim zahtevima </translation>
</message>
<message>
<source>A newer version of PHP can be download at</source>
<translation>Novija verzija PHP-a moลพe se uฤitati s</translation>
</message>
<message>
<source>You must upgrade to at least version </source>
<translation>Morate unaprediti svoj program na najmanje verziju</translation>
</message>
<message>
<source>directory, without this the setup cannot disable itself.</source>
<translation>direktorijum, bez toga setup se ne moลพe deaktivirati. </translation>
</message>
<message>
<source>Missing zlib extension</source>
<translation>Nedostaje zlib ekstenzija</translation>
</message>
<message>
<source>To enable zlib you need to recompile PHP with support for it. You will need to configure PHP with</source>
<translation>To enable zlib you need to recompile PHP with support for it. You will need to configure PHP with</translation>
</message>
<message>
<source>More information on that subject is available at</source>
<translation>Detaljnije o toj temi moลพete proฤitati u</translation>
</message>
<message>
<source>More information on the subject can be found at %1.</source>
<translation>Detaljnije o toj temi moลพete proฤitati u %1.</translation>
</message>
<message>
<source>PHP option %1 is enabled</source>
<translation>PHP opcija %1 je aktivirana</translation>
</message>
<message>
<source>It's recommended that the option is turned off. To turn it off edit your %1 configuration and set %2 to %3.</source>
<translation>Preporuฤujemo da iskljuฤite tu opciju. Da bi je iskljuฤili izmenite svoju %1 konfiguraciju i postavite %2 na %3. </translation>
</message>
<message>
<source>PHP safe mode is enabled</source>
<translation>Aktivirana je PHP sigurnosna funkcija</translation>
</message>
<message>
<source>It's highly recommended that you fix this.</source>
<translation>Preporuฤujemo da to popravite. </translation>
</message>
<message>
<source>Locate the php.ini settings file for your PHP installation. On unix systems, this is normally located at /etc/php.ini, on windows systems check the PHP installation path.</source>
<translation>Pronaฤite php.ini datoteku podeลกavanja za instalaciju svog PHP-a. Kod unix sistema, ona je obiฤno smeลกtena u /etc/php/.ini, a kod windows sistema proverite PHP instalacionu putanju. </translation>
</message>
<message>
<source>Open the php.ini file and change the max_execution_time value to at least %1, and press %2</source>
<translation>Otvorite php.ini datoteku te promenite max_execution_time vrednost na najmanje %1, te pritisnite %2</translation>
</message>
<message>
<source>Next</source>
<translation>Sledeฤi</translation>
</message>
<message>
<source>Open the php.ini file and change the memory_limit value to at least %1, and press %2</source>
<translation>Otvorite php.ini datoteku i promenite vrednost memory_limit na najmanje %1, te pritisnite %2</translation>
</message>
<message>
<source>To turn it off edit your %phpini configuration and set %magic_quotes_runtime to %offtext.</source>
<translation>Da bi ga iskljuฤili izmenite svoju %phpini konfiguraciju i postavite %magic_quotes_runtime to %offtext.</translation>
</message>
<message>
<source>Unstable PHP version</source>
<translation>Nestabilna PHP verzija</translation>
</message>
<message>
<source>, is known to be unstable</source>
<translation>poznato je da je nestabilan</translation>
</message>
<message>
<source>Another version of PHP can be download at</source>
<translation>Druga verzija PHP-a moลพe se uฤitati sa</translation>
</message>
<message>
<source>AcceptPathInfo disabled or running in CGI mode</source>
<translation>AcceptPathInfo je deaktiviran ili radi u CGI-u </translation>
</message>
<message>
<source>enter the following into your httpd.conf file.</source>
<translation>unesite sledeฤe u svoju httpd.conf datoteku.</translation>
</message>
<message>
<source>Remember to restart your web server afterwards.</source>
<translation>Setite se posle ponovo pokrenuti svoj web server.</translation>
</message>
<message>
<source>Missing imagegd2 extension</source>
<translation>Nedostaje imagegd2 ekstenzija</translation>
</message>
<message>
<source>To enable imagegd2 you need to recompile PHP with support for it, more information on that subject is available at</source>
<translation></translation>
</message>
<message>
<source>Missing text creation functions</source>
<translation>Nedostaju funkcije kreiranja teksta</translation>
</message>
<message>
<source>The PHP functions ImageTTFText and ImageTTFBBox is missing. Without these functions it is not possible to use the texttoimage template operator.</source>
<translation>Nedostaju PHP funkcije Image TTFText i Image TTFBB. Bez tih funkcija nije moguฤe koristiti texttoimage operatora ลกablona.</translation>
</message>
<message>
<source>To enable these functions you need to recompile PHP with support for it, more information on that subject is available at</source>
<translation></translation>
</message>
<message>
<source>Missing Session Extension</source>
<translation>Nedostaje ekstenzija za sesije</translation>
</message>
<message>
<source>To enable session support you will have recompile your PHP module without the %session_disable switch.</source>
<translation>Za aktiviranje sesija mora se prekompajlirati PHP.</translation>
</message>
<message>
<source>If your site is on shared-hosting you must contact the system administrator of the hosting company.</source>
<translation>Ako je vaลก sajt na deljenom hostingu morate kontaktirati administratora hosting kompanije.</translation>
</message>
<message>
<source>The affected directories are: %dir_list</source>
<translation>Pogoฤeni direktorijumi su: %dir_list</translation>
</message>
<message>
<source>Alternative shell commands</source>
<translation>Alternativne komande</translation>
</message>
<message>
<source>If you don't have permissions to change the ownership you can try these commands.</source>
<translation>Ako nemate ovlaฤฤenja da izmenite vlasnika, moลพete pokuลกati sa ovim komandama.</translation>
</message>
<message>
<source>Note</source>
<translation>Napomena</translation>
</message>
<message>
<source>File uploading is not possible</source>
<translation>Upload fajla nije moguฤ</translation>
</message>
<message>
<source>Create the directory %upload_dir on your system. If you do not have the possibility to create this yourself ask the administrator to create it for you.</source>
<translation>Kreirajte direktorijum %upload_dir na vaลกem sistemu. Ako nemate moguฤnosti da ga sami kreirate, traลพite od administratora da ga kreira za vas.</translation>
</message>
<message>
<source>The upload directory is currently placed in the directory of the root user.
This is a security problem and should be changed to another global temporary directory</source>
<translation>Upload direktorijum je trenutno smeลกten u direktorijumu root korisnika.
Ovo je bezbedonosni problem i trebao bi biti promenjen na drugi globalni privremeni direktorijum</translation>
</message>
<message>
<source>This shell command will create the upload directory.</source>
<translation>Ova komanda ฤe vam kreirati upload direktorijum.</translation>
</message>
<message>
<source>You must change the permission on the directory %upload_dir. If you do not have the possibility to create this yourself ask the administrator to do this for you.</source>
<translation>Morate promeniti dozvole na direktorijumu %upload_dir. Ako niste u moguฤnosti da sami to uradite, traลพite od administratora da to uradi.</translation>
</message>
<message>
<source>These shell commands will give proper permission to the upload directory.</source>
<translation>Ova komanda ฤe vam dati odgovarajuฤe privilegije za upload direktorijum.</translation>
</message>
<message>
<source>If you don't have permissions to change the ownership you can try this command.</source>
<translation>Ako nemate pravo da menjate vlasnika, moลพete pokuลกati sa ovom komandom.</translation>
</message>
<message>
<source>This shell command will give proper permission to the upload directory.</source>
<translation>Ova komanda ฤe vam dati odgovarajuฤe dozvole za upload direktorijum.</translation>
</message>
<message>
<source>The complete list of charsets mbstring supports are</source>
<translation>Kompletna lista kodnih rasporeda koje podrลพava mbstring je</translation>
</message>
<message>
<source>php.ini example</source>
<translation>primer php.ini</translation>
</message>
<message>
<source>.htaccess example</source>
<translation>.htaccess primer</translation>
</message>
<message>
<source>You need to enable AcceptPathInfo in your Apache config file, if you're using apache 2.x.</source>
<translation>Morate da omoguฤite AcceptPathInfo u vaลกem Apache config fajlu, ako koristite apache 2.x.</translation>
</message>
<message>
<source>allow_url_fopen ini setting is disabled</source>
<translation>allow_url_fopen podeลกavanje je onemoguฤeno</translation>
</message>
<message>
<source>You need to alter your PHP settings, and enable the 'allow_url_fopen' setting in your php.ini file.</source>
<translation>Moลพete da izmenite PHP podeลกavanja, i omoguฤite 'allow_url_fopen' podeลกavanje u vaลกem php.ini fajlu.</translation>
</message>
<message>
<source>Note : Failure here will also cause failure to the accept_path_info test.</source>
<translation>Paลพnja: Ako ovde ne uspe, takoฤe neฤe uspeti na accept_path_info testu.</translation>
</message>
<message>
<source>If you're running apache 1.3, eZ Publish will not run in CGI mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish cannot write to the</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>directory.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your PHP does not have support for all databases that eZ Publish support.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Although eZ Publish will work without it, it might be that you want to have support for this database.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No supported database handlers were found. eZ Publish requires a database to store it's data, without one the system will fail.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish cannot write to some important directories, without this the setup cannot finish and parts of eZ Publish will fail.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>These shell commands will give proper permission to the web server.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish could not detect the user and group of the web server.
If you know the user and group of the web server it is recommended to change the ownership of the files to match this user and group.
To do this you need to change the %chown commands under Alternative shell commands.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>These commands will setup the permission more correctly, but require knowledge about the running web server.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The %user_expr must be changed to your web server username and groupname.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Missed some directories</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish cannot create some important directories, without this the setup cannot finish and parts of eZ Publish will fail.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The nonexistent directories are: %dir_list</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You can try the following shell commands to create necessary directories:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Files instead necessary directories</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish cannot create some important directories, because there are an files instead of these directories in the same places with the same names.
You should replace these files with appropriate directories and give necessary permissions to them.
Without this the setup cannot finish and parts of eZ Publish will fail.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The affected directories (files) are: %dir_list</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Missing DOM extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The DOM extension is not available to eZ Publish. Without it eZ Publish will not work.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>In most cases, the DOM extension is enabled by default because it is included in the PHP core. However, some Linux distributions have PHP without compiled-in support for DOM. Instead, they provide DOM as a shared module in a separate RPM package called "php-xml".</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Insufficient execution time allowed to install eZ Publish</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish will not work correctly with a execution time limit of %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you are running eZ Publish in a shared host environment, contant your ISP to perform the changes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File uploading is not enabled which means that it's impossible for eZ Publish to handle file uploading. All other parts of eZ Publish will still work fine but it's recommended to enable file uploads.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The PHP upload directory %upload_dir does not exists or is not accessible, without this you will not be able to upload files or images to eZ Publish.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The PHP upload directory %upload_dir is not writeable. This means that it will be impossible to upload files or images to eZ Publish.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish could not detect the user and group of the web server.
If you know the user and group of the web server it is recommended to change the ownership of the upload directory to match this user and group.
To do this you need to change the %chown commands under Alternative shell commands.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you know the user and group of the web server you can try this command. Replace apache:apache with the user and group.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No image conversion capabilities was detected, this means that eZ Publish cannot scale any images or detect their type. This is vital functionality in eZ Publish and must be supported.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The imagegd2 extension is not available to eZ Publish. Without it eZ Publish will only be able to do conversion using ImageMagick and the</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Future releases of eZ Publish will have more advanced image support by using the imagegd extension.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The ImageMagick program is not available to eZ Publish. Without it eZ Publish will not be able to do image conversion unless the imagegd extension is available.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish comes with a good list of supported charsets by default, however they can be a bit slow due to being made in pure PHP code. Luckily eZ Publish supports the mbstring extension for handling some of the charsets.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>By enabling the mbstring extension eZ Publish will have access to more charsets and also be able to process some of them faster, such as Unicode and iso-8859-*. This is recommended for multilingual sites and sites with more exotic charsets.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do not enable mbstring function overloading, eZ Publish will only use the extension whenever it's needed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Insufficient memory allocated to install eZ Publish</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish will not work correctly with a memory limit of %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish will work with this option on however it will lead to some minor performance issues since all input variables need to be be converted back to</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is recommended that the option is turned off. To turn it off edit your %phpini configuration and set %magic_quotes_gpc and %magic_quotes_runtime to %offtext.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Alternatively you may create a file called %1 in your eZ Publish root folder and add the following</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish will not work properly with this option on.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZ Publish will work with this option on however it will lead to some minor performance issues since all input variables will be made global on each script execution.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your PHP module does not have session support, without this eZ Publish will not work properly.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>, but the latest released PHP 4.4.x version is highly recommended.</source>
<translation type="obsolete">, ali poslednja izdata PHP verzija PHP 4.3.x je preporuฤljiva. {4.4.?}</translation>
</message>
<message>
<source>eZ Publish may work with safe mode on, however there might be several features that will be unavailable. Some of the things that might occur are</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The zlib extension is not available to eZ Publish. Without it eZ Publish will not be able to install the demo data, however if you do not wish the demo data you can safely ignore this.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Missing cURL extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>It is recommended to enable the PHP cURL extension, otherwise some features requiring a proxy or SSL will not work.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>To enable the PHP cURL functions you need to compile PHP with support for it. Configure PHP with</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>More information on this subject is available at</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Wrong eZ Components version detected</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Missing eZ Components dependancy</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The minimum required eZ Components version is</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Download instructions for both regular download and PEAR are provided at</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Missing iconv extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The iconv extension is not available to eZ Publish. Without it eZ Publish will not work.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>In most cases, the iconv extension is enabled by default because it is included in the PHP core. However, some Linux distributions have PHP without compiled-in support for iconv. Instead, they provide iconv as a shared module in a separate RPM package called "php-iconv" (or "php5-iconv").</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you know where the program is installed (the executable is called</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>, but the latest released stable PHP version is always recommended.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time zone configuration</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You are using the default time zone, UTC. It is important that you set your time zone to make sure date and time is handled correctly. To do this, set the <strong>date.timezone</strong> setting in <strong>php.ini</strong>.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Example <strong>php.ini</strong> configuration:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>For a list of valid time zones see the <a href="http://php.net/timezones">List of Supported Time zones</a> in the PHP documentation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Alternatively, if you do not have access to modify <strong>php.ini</strong>, you can change the time zone in <strong>config.php</strong>. Time zone set in <strong>config.php</strong> will override the <strong>php.ini</strong> time zone setting.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Example <strong>config.php</strong> configuration:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you want to keep UTC as your time zone, check <strong>Ignore this test</strong> below to proceed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>PHP does not register environment variables</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>PHP is currently not configured to register environment variables in the global variable $_ENV.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Since some extensions might use $_ENV it is recommended to fix it unless you have full control over all extensions you use!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>To fix this, edit your php.ini configuration and add E to the variables_order setting and restart your webserver.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/setup/toolbar</name>
<message>
<source>Tool</source>
<translation>Alat</translation>
</message>
<message>
<source>Placement</source>
<translation>Mesto</translation>
</message>
<message>
<source>Update Placement</source>
<translation>Unapredi mesto</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>True</source>
<translation>Taฤno</translation>
</message>
<message>
<source>False</source>
<translation>Netaฤno</translation>
</message>
<message>
<source>Yes</source>
<translation>Da</translation>
</message>
<message>
<source>No</source>
<translation>Ne</translation>
</message>
<message>
<source>Tool List for Toolbar_%toolbar_position</source>
<translation>Lista alata za Toolbar_%toolbar_position</translation>
</message>
<message>
<source>Add Tool</source>
<translation>Dodaj alat</translation>
</message>
</context>
<context>
<name>design/standard/shop</name>
<message>
<source>Basket</source>
<translation>Korpa</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Continue shopping</source>
<translation>Nastavi kupovinu</translation>
</message>
<message>
<source>Checkout</source>
<translation>Provera</translation>
</message>
<message>
<source>You have no products in your basket</source>
<translation>Nemate proizvoda u korpi</translation>
</message>
<message>
<source>Confirm order</source>
<translation>Potvrdi narudลพbu</translation>
</message>
<message>
<source>Product items</source>
<translation>Proizvodi</translation>
</message>
<message>
<source>Confirm</source>
<translation>Potvrdi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>New</source>
<translation>Novo</translation>
</message>
<message>
<source>Discard</source>
<translation>Odbaci</translation>
</message>
<message>
<source>Group view</source>
<translation>Prikaz grupe</translation>
</message>
<message>
<source>Percent</source>
<translation>Procenat</translation>
</message>
<message>
<source>Add Rule</source>
<translation>Dodaj pravilo</translation>
</message>
<message>
<source>Remove Rule</source>
<translation>Ukloni pravilo</translation>
</message>
<message>
<source>Customers</source>
<translation>Klijenti</translation>
</message>
<message>
<source>Add customer</source>
<translation>Dodaj klijenta</translation>
</message>
<message>
<source>Remove customer</source>
<translation>Ukloni klijenta</translation>
</message>
<message>
<source>Editing rule</source>
<translation>Pravilo editovanja</translation>
</message>
<message>
<source>Any</source>
<translation>Bilo koji</translation>
</message>
<message>
<source>Order</source>
<translation>Narudลพba</translation>
</message>
<message>
<source>Subtotal of items</source>
<translation>Meฤuzbir proizvoda</translation>
</message>
<message>
<source>Order list</source>
<translation>Lista narudลพbi</translation>
</message>
<message>
<source>ID</source>
<translation>Identifikacija</translation>
</message>
<message>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<source>Customer</source>
<translation>Klijent</translation>
</message>
<message>
<source>Total ex. VAT</source>
<translation>Ukupno bez PDV-a</translation>
</message>
<message>
<source>Total inc. VAT</source>
<translation>Ukupno sa PDV-om</translation>
</message>
<message>
<source>The order list is empty</source>
<translation>Lista narudลพbi je prazna</translation>
</message>
<message>
<source>Register account information</source>
<translation>Registruj podatke o raฤunu</translation>
</message>
<message>
<source>Input did not validate, fill in all fields</source>
<translation>Unos nije odobren, ispuni sva polja</translation>
</message>
<message>
<source>Wish list</source>
<translation>Lista ลพelja</translation>
</message>
<message>
<source>Empty wish list</source>
<translation>Isprazni listu ลพelja</translation>
</message>
<message>
<source>Find</source>
<translation>Traลพi</translation>
</message>
<message>
<source>Product</source>
<translation>Proizvod</translation>
</message>
<message>
<source>Count</source>
<translation>Zbir</translation>
</message>
<message>
<source>VAT</source>
<translation>PDV</translation>
</message>
<message>
<source>Price ex. VAT</source>
<translation>Cena bez PDV-a</translation>
</message>
<message>
<source>Price inc. VAT</source>
<translation>Cena sa PDV-om</translation>
</message>
<message>
<source>Discount</source>
<translation>Popust</translation>
</message>
<message>
<source>Discount groups</source>
<translation>Grupe popusta</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Edit discount group - %1</source>
<translation>Izmeni grupu popusta - %1</translation>
</message>
<message>
<source>Group Name</source>
<translation>Ime grupe</translation>
</message>
<message>
<source>Defined rules</source>
<translation>Definisana pravila</translation>
</message>
<message>
<source>Apply to</source>
<translation>Primeni na</translation>
</message>
<message>
<source>Name</source>
<comment>Customer name</comment>
<translation>Ime</translation>
</message>
<message>
<source>Attributes</source>
<translation>Atributi</translation>
</message>
<message>
<source>Discount percent</source>
<translation>Procenat popusta</translation>
</message>
<message>
<source>Rule settings</source>
<translation>Podeลกavanja pravila</translation>
</message>
<message>
<source>Choose which classes, sections or objects ( products ) applied to this sub rule, 'Any' means the rule will applied to all.</source>
<translation>Odredi koje se klase, segmenti ili objekti (proizvodi) odnose na ovo subordinisano pravilo, 'Bilo koji' znaฤi da ฤe se pravilo primenjivati na sve. </translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Section</source>
<translation>Deo</translation>
</message>
<message>
<source>Object</source>
<translation>Objekt</translation>
</message>
<message>
<source>Not specified.</source>
<translation>Nije odreฤen.</translation>
</message>
<message>
<source>Sort</source>
<translation>Poredaj</translation>
</message>
<message>
<source>Order total</source>
<translation>Ukupno narudลพbe</translation>
</message>
<message>
<source>First name</source>
<translation>Ime</translation>
</message>
<message>
<source>Last name</source>
<translation>Prezime</translation>
</message>
<message>
<source>Email</source>
<translation>E-mail</translation>
</message>
<message>
<source>Address</source>
<translation>Adresa</translation>
</message>
<message>
<source>Order summary</source>
<translation>Ukratko narudลพbe</translation>
</message>
<message>
<source>Sort Result by</source>
<translation>Poredaj rezultate po</translation>
</message>
<message>
<source>Order Time</source>
<translation>Vreme narudลพbe</translation>
</message>
<message>
<source>User Name</source>
<translation>Ime korisnika</translation>
</message>
<message>
<source>Order ID</source>
<translation>Identifikacioni broj narudลพbe</translation>
</message>
<message>
<source>Ascending</source>
<translation>Uzlazno</translation>
</message>
<message>
<source>Sort ascending</source>
<translation>Poredaj uzlazno</translation>
</message>
<message>
<source>Descending</source>
<translation>Silazno</translation>
</message>
<message>
<source>Sort descending</source>
<translation>Poredaj silazno</translation>
</message>
<message>
<source>Remove items</source>
<translation>Ukloni elemente</translation>
</message>
<message>
<source>Customer list</source>
<translation>Lista klijenata</translation>
</message>
<message>
<source>Number of orders</source>
<translation>Broj narudลพbi</translation>
</message>
<message>
<source>The customer list is empty</source>
<translation>Lista klijenata je prazna</translation>
</message>
<message>
<source>Customer Information</source>
<translation>Podaci o klijentu</translation>
</message>
<message>
<source>Purchase list</source>
<translation>Kupovna lista</translation>
</message>
<message>
<source>Amount</source>
<translation>Iznos</translation>
</message>
<message>
<source>View</source>
<translation>Prikaz</translation>
</message>
<message>
<source>Are you sure you want to remove order: </source>
<translation>Jeste li sigurni da ลพelite ukloniti narudลพbu:</translation>
</message>
<message>
<source>Selected options</source>
<translation>Izabrane opcije</translation>
</message>
<message>
<source>Statistics</source>
<translation>Statistika</translation>
</message>
<message>
<source>Your account information</source>
<translation>Podaci o Vaลกem raฤunu</translation>
</message>
<message>
<source>Input did not validate, all fields marked with * must be filled in</source>
<translation>Unos nije potvrฤen, sva polja oznaฤena sa* moraju biti ispunjena</translation>
</message>
<message>
<source>All fields marked with * must be filled in.</source>
<translation>Sva polja oznaฤena * moraju biti popunjena. </translation>
</message>
<message>
<source>Customer information</source>
<translation>Podaci o kupcu</translation>
</message>
<message>
<source>Shipping address</source>
<translation>Adresa dostave</translation>
</message>
<message>
<source>Company</source>
<translation>Firma</translation>
</message>
<message>
<source>Street</source>
<translation>Ulica</translation>
</message>
<message>
<source>Zip</source>
<translation>PB</translation>
</message>
<message>
<source>Place</source>
<translation>Mesto</translation>
</message>
<message>
<source>State</source>
<translation>Regija</translation>
</message>
<message>
<source>Comment</source>
<translation>Komentar</translation>
</message>
<message>
<source>Continue</source>
<translation>Nastavi</translation>
</message>
<message>
<source>Attempted to add object without price to basket.</source>
<translation>Pokuลกaj dodavanja proizvoda bez cene u korpu.</translation>
</message>
<message>
<source>Your payment was aborted.</source>
<translation>Vaลกe plaฤanje je prekinuto.</translation>
</message>
<message>
<source>Order %order_id [%order_status]</source>
<translation>Narudลพba %order_id [%order_status]</translation>
</message>
<message>
<source>Order history</source>
<translation>Istorijat narudลพbe</translation>
</message>
<message>
<source>We did not get a confirmation from the payment server.</source>
<translation>Nismo dobili potvrdu sa servera za naplatu.</translation>
</message>
<message>
<source>Waiting for a response from the payment server. This can take some time.</source>
<translation>ฤekam odgovor sa servera za naplatu. Ovo moลพe potrajati.</translation>
</message>
<message>
<source>Retrying to get a valid response.</source>
<translation>Pokuลกavam da dobijem ispravan odgovor.</translation>
</message>
<message>
<source>Retry </source>
<translation>Ponovi</translation>
</message>
<message>
<source>out of </source>
<translation>od</translation>
</message>
<message>
<source>If your page does not automatically refresh then press the refresh button manually.</source>
<translation>Ako vam se stranica automatski ne osveลพi moลพete pritisnuti refresh dugme.</translation>
</message>
<message>
<source>Order status</source>
<translation>Status narudลพbe</translation>
</message>
<message>
<source>Active</source>
<translation>Aktivno</translation>
</message>
<message>
<source>Is active</source>
<translation>Je aktivno</translation>
</message>
<message>
<source>Is inactive</source>
<translation>Je neaktivno</translation>
</message>
<message>
<source>Please contact the owner of the webshop and provide your order ID</source>
<translation>Molimo kontaktirajte vlasnika web prodavnice i dajte mu ID narudลพbe</translation>
</message>
<message>
<source>Incorrect quantity! The quantity of the product(s) must be numeric and not less than 1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have chosen invalid combination of options</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Country/region</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Archive list</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unarchive</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The following items were removed from your basket because the products were changed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT is unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT percentage is not yet known for some of the items being purchased.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This probably means that some information about you is not yet available and will be obtained during checkout.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Total price ex. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Total price inc. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>unknown</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Subtotal ex. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Subtotal inc. VAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Payment was canceled for an unknown reason. Please try to buy again.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back</source>
<translation type="unfinished">Nazad</translation>
</message>
<message>
<source>Archive</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All Years</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All Months</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SUM:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/shop/currencynames</name>
<message>
<source>Argentine peso</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Australian dollar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bulgarian lev</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Brazilian real</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Canadian dollar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Swiss franc</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Chinese yuan renminbi</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cyprus pound</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Czech koruna</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Danish krone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Estonian kroon</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>European euro</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Pound sterling</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hong Kong dollar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Croatian kuna</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Hungarian forint</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Icelandic krona</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Japanese yen</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>South Korean won</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lithuanian litas</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Latvian lats</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Maltese lira</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Mexican peso</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Norwegian Krone</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New Zealand dollar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Polish zloty</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New Romanian leu</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Russian rouble</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Swedish krona</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Singapore dollar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Slovenian tolar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Slovak koruna</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New Turkish lira</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Ukrainian hryvnia</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>U.S.dollar</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/shop/preferredcurrency</name>
<message>
<source>Unknown currency name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Set</source>
<translation type="unfinished">Postavi</translation>
</message>
<message>
<source>Set the selected currency as preferred.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/shop/productsoverview</name>
<message>
<source>Products overview</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Price</source>
<translation type="unfinished">Cena</translation>
</message>
<message>
<source>Show 10 items per page.</source>
<translation type="unfinished">Prikaลพi 10 elemenata po stranici.</translation>
</message>
<message>
<source>Show 50 items per page.</source>
<translation type="unfinished">Prikaลพi 50 elemenata po stranici.</translation>
</message>
<message>
<source>Show 25 items per page.</source>
<translation type="unfinished">Prikaลพi 25 elemenata po stranici.</translation>
</message>
<message>
<source>The product list is empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select product class.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show products</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show products of selected class.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select sorting field.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select sorting order.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Descending</source>
<translation type="unfinished">Silazno</translation>
</message>
<message>
<source>Ascending</source>
<translation type="unfinished">Uzlazno</translation>
</message>
<message>
<source>Sort products</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sort products.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/shop/view</name>
<message>
<source>Choose customers</source>
<translation>Izaberi klijente</translation>
</message>
<message>
<source>Choose product for discount</source>
<translation>Izaberi proizvode za popust</translation>
</message>
<message>
<source>Please choose the customers you want to add to discount group %groupname.
Select your customers then click the %buttonname button.
Using the recent and bookmark items for quick selection is also possible.
Click on object names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose the products you want to add to discount rule %discountname in discount group %groupname.
Select your products then click the %buttonname button.
Using the recent and bookmark items for quick selection is also possible.
Click on product names to change the browse listing.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/simplified_treemenu</name>
<message>
<source>Fold/Unfold</source>
<translation>Skupi/Raลกiri</translation>
</message>
</context>
<context>
<name>design/standard/state/edit</name>
<message>
<source>Identifier:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default language:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Description:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/state/group</name>
<message>
<source>ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier</source>
<translation type="unfinished">Identifikator</translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Description</source>
<translation type="unfinished">Opis</translation>
</message>
</context>
<context>
<name>design/standard/state/group_edit</name>
<message>
<source>Identifier:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default language:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Description:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/toolbar</name>
<message>
<source>Toolbar management</source>
<translation type="unfinished">Upravljanje alatnom trakom</translation>
</message>
<message>
<source>There are %logged_in_count registered and %anonymous_count anonymous users online.</source>
<translation>Postoji %logged_in_count registrovanih i %anonymous_count anonimnih korisnika na mreลพi. </translation>
</message>
<message>
<source>Shopping basket</source>
<translation>Korpa za kupovinu</translation>
</message>
<message>
<source>View all details</source>
<translation>Prikaลพi detalje</translation>
</message>
<message>
<source>Your basket is empty</source>
<translation>Vaลกa korpa je prazna</translation>
</message>
<message>
<source>Best sellers</source>
<translation>Najbolje prodavani proizvodi</translation>
</message>
<message>
<source>Calendar</source>
<translation>Kalendar</translation>
</message>
<message>
<source>My drafts</source>
<translation>Moje skice</translation>
</message>
<message>
<source>Account</source>
<translation>Raฤun</translation>
</message>
<message>
<source>Not logged in</source>
<translation>Niste prijavljeni</translation>
</message>
<message>
<source>Logged in as: %username</source>
<translation>Prijavljen kao: %username</translation>
</message>
<message>
<source>Edit account</source>
<translation>Izmeni raฤun</translation>
</message>
<message>
<source>Change password</source>
<translation>Promeni lozinku</translation>
</message>
<message>
<source>Logout</source>
<translation>Odjava</translation>
</message>
<message>
<source>Login</source>
<translation>Prijava</translation>
</message>
<message>
<source>Password</source>
<translation>Lozinka</translation>
</message>
<message>
<source>Not registered?</source>
<translation>Niste registrovani?</translation>
</message>
<message>
<source>Forgot your password?</source>
<translation>Zaboravili ste lozinku?</translation>
</message>
<message>
<source>Notification</source>
<translation>Obaveลกtenje</translation>
</message>
<message>
<source>User information</source>
<translation>Podaci o korisniku</translation>
</message>
<message>
<source>View basket</source>
<translation>Prikaลพi korpu</translation>
</message>
<message>
<source>Online: %logged_in_count:%anonymous_count</source>
<comment>Short user information</comment>
<translation>Online: %logged_in_count:%anonymous_count</translation>
</message>
<message>
<source>Username</source>
<translation>Korisniฤko ime</translation>
</message>
<message>
<source>My notifications</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Preferred currency</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Set</source>
<translation type="unfinished">Postavi</translation>
</message>
<message>
<source>Set the selected currency as preferred.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no available currencies</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your country</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/toolbar/search</name>
<message>
<source>Search</source>
<translation>Traลพi</translation>
</message>
<message>
<source>Global</source>
<translation>celi site</translation>
</message>
<message>
<source>From here</source>
<translation>Odavde</translation>
</message>
<message>
<source>Search: </source>
<translation>Traลพi:</translation>
</message>
</context>
<context>
<name>design/standard/toolbar/user_country</name>
<message>
<source>Not specified</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Apply</source>
<translation type="unfinished">Primeni</translation>
</message>
<message>
<source>Use the selected country for VAT charging.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/trigger</name>
<message>
<source>No workflow</source>
<translation>Nema radnih tokova</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Trigger list</source>
<translation>Lista okidaฤa</translation>
</message>
<message>
<source>Workflow</source>
<translation>Radni tok</translation>
</message>
<message>
<source>Module name</source>
<translation>Ime modula</translation>
</message>
<message>
<source>Function name</source>
<translation>Ime funkcije</translation>
</message>
<message>
<source>Connect type</source>
<translation>Vrsta konekcije</translation>
</message>
</context>
<context>
<name>design/standard/url</name>
<message>
<source>All</source>
<translation>Svi</translation>
</message>
<message>
<source>Valid</source>
<translation>Vaลพeฤi</translation>
</message>
<message>
<source>Invalid</source>
<translation>Nevaลพeฤi</translation>
</message>
<message>
<source>The URL points to %1.</source>
<translation>URL upuฤuje na %1.</translation>
</message>
<message>
<source>Last modified at %1</source>
<translation>Poslednja promena u %1</translation>
</message>
<message>
<source>URL has no modification date</source>
<translation>URL nema datuma promene</translation>
</message>
<message>
<source>Last checked at %1</source>
<translation>Poslednja provera u %1</translation>
</message>
<message>
<source>URL has not been checked</source>
<translation>URL nije proveren</translation>
</message>
<message>
<source>Filter</source>
<translation>Filtar</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena</translation>
</message>
<message>
<source>URL</source>
<translation>URL</translation>
</message>
<message>
<source>Last checked</source>
<translation>Poslednja provera</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>Popup</source>
<translation>Popup</translation>
</message>
<message>
<source>Never</source>
<translation>Nikad</translation>
</message>
<message>
<source>Unknown</source>
<translation>Nepoznat</translation>
</message>
<message>
<source>All links</source>
<translation type="obsolete">Svi URL-ovi</translation>
</message>
<message>
<source>Invalid links</source>
<translation type="obsolete">Nevaลพeฤi URL-ovi</translation>
</message>
<message>
<source>Valid links</source>
<translation type="obsolete">Vaลพeฤi URL-ovi</translation>
</message>
<message>
<source>Information on URL</source>
<translation>Podaci o URL-ovima</translation>
</message>
<message>
<source>Objects which use this link</source>
<translation>Objekti koji se sluลพe ovom vezom</translation>
</message>
<message>
<source>No object available</source>
<translation>Nema raspoloลพivih objekata</translation>
</message>
<message>
<source>version</source>
<translation>verzija</translation>
</message>
<message>
<source>The URL is not considered valid any more.</source>
<translation>Ovaj URL viลกe se ne smatra vaลพeฤim.</translation>
</message>
<message>
<source>This means that the URL is no longer available or has been moved.</source>
<translation>To znaฤi da URL viลกe nije dostupan ili je premeลกten.</translation>
</message>
<message>
<source>All URLs</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid URLs</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Valid URLs</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/url/edit</name>
<message>
<source>Editing URL - %1</source>
<translation>Izmena URL - %1</translation>
</message>
<message>
<source>URL</source>
<translation>URL</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
</context>
<context>
<name>design/standard/user</name>
<message>
<source>Login</source>
<translation>Korisnik</translation>
</message>
<message>
<source>Activate account</source>
<translation>Aktiviranje raฤuna</translation>
</message>
<message>
<source>Cancel</source>
<translation>Poniลกti</translation>
</message>
<message>
<source>Could not login</source>
<translation>Prijava nije bila moguฤa</translation>
</message>
<message>
<source>A valid username and password is required to login.</source>
<translation>Unesite ispravno korisniฤko ime i lozinku.</translation>
</message>
<message>
<source>Access not allowed</source>
<translation>Nije dozvoljen pristup</translation>
</message>
<message>
<source>You are not allowed to access %1.</source>
<translation>Nije vam dozvoljen pristup %1.</translation>
</message>
<message>
<source>Change password for user</source>
<translation>Promena lozinke za korisnika</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Register user</source>
<translation>Registracija korisnika</translation>
</message>
<message>
<source>Input did not validate</source>
<translation>Unos nije potvrฤen</translation>
</message>
<message>
<source>Input was stored successfully</source>
<translation>Unos je uspeลกno smeลกten</translation>
</message>
<message>
<source>Register</source>
<translation>Registruj se</translation>
</message>
<message>
<source>Discard</source>
<translation>Odbaci</translation>
</message>
<message>
<source>User setting</source>
<translation>Korisniฤka podeลกavanja</translation>
</message>
<message>
<source>Maximum login</source>
<translation>Maksimalan broj prijava</translation>
</message>
<message>
<source>Is enabled</source>
<translation>je omoguฤen</translation>
</message>
<message>
<source>Update</source>
<translation>Aลพuriraj</translation>
</message>
<message>
<source>User registered</source>
<translation>Korisnik registrovan</translation>
</message>
<message>
<source>Your account was successfully created.</source>
<translation>Vaลก raฤun je uspeลกno otvoren.</translation>
</message>
<message>
<source>Login</source>
<comment>Button</comment>
<translation>Prijava</translation>
</message>
<message>
<source>User profile</source>
<translation>Profil korisnika</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Password</source>
<translation>Lozinka</translation>
</message>
<message>
<source>Sign Up</source>
<comment>Button</comment>
<translation>Prijavite se</translation>
</message>
<message>
<source>Please retype your old password.</source>
<translation>Molimo ponovo upiลกite staru lozinku.</translation>
</message>
<message>
<source>Password successfully updated.</source>
<translation>Lozinka je uspeลกno aลพurirana.</translation>
</message>
<message>
<source>Edit profile</source>
<translation>Izmeni profil</translation>
</message>
<message>
<source>Change password</source>
<translation>Promeni lozinku</translation>
</message>
<message>
<source>Change setting</source>
<translation>Promeni podeลกavanja</translation>
</message>
<message>
<source>Old password</source>
<translation>Stara lozinka</translation>
</message>
<message>
<source>New password</source>
<translation>Nova lozinka</translation>
</message>
<message>
<source>Retype password</source>
<translation>Ponovo upiลกite lozinku</translation>
</message>
<message>
<source>Forgot your password?</source>
<translation>Zaboravili ste lozinku?</translation>
</message>
<message>
<source>Your account is now activated.</source>
<translation>Vaลก raฤun je aktiviran.</translation>
</message>
<message>
<source>Sorry, the key submitted was not a valid key. Account was not activated.</source>
<translation>Naลพalost, uneseni kljuฤ nije odgovarajuฤi kljuฤ. Raฤun nije aktiviran.</translation>
</message>
<message>
<source>Username</source>
<translation>Korisniฤko ime</translation>
</message>
<message>
<source>Username</source>
<comment>User name</comment>
<translation>Korisniฤko ime</translation>
</message>
<message>
<source>Unable to register new user</source>
<translation>Nije moguฤe registrovati novog korisnika</translation>
</message>
<message>
<source>Back</source>
<translation>Nazad</translation>
</message>
<message>
<source>The node (%1) specified in [UserSettings].DefaultUserPlacement setting in site.ini does not exist!</source>
<translation type="unfinished">ฤvor (%1) naveden u [UserSettings].DefaultUserPlacement podeลกavanju u site.ini ne postoji!</translation>
</message>
<message>
<source>Your account is already active.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Email</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Password did not match. Please retype your new password.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your account was successfully created. An email will be sent to the specified
email address. Follow the instructions in that mail to activate
your account.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please note that your browser must use and support cookies to register a new user.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your browser does not seem to support cookies, to register a new user, cookies need to be supported and enabled!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Try again</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The new password must be at least %1 characters long. Please retype your new password.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your email address has been confirmed. An administrator needs to approve your sign up request, before your login becomes valid.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/user/forgotpassword</name>
<message>
<source>Have you forgotten your password?</source>
<translation>Zaboravili ste lozinku?</translation>
</message>
<message>
<source>Generate new password</source>
<translation>Kreiraj novu lozinku</translation>
</message>
<message>
<source>Your account information</source>
<translation>Podaci o Vaลกem raฤunu</translation>
</message>
<message>
<source>Password was successfully generated and sent to: %1</source>
<translation>Lozinka je uspeลกno kreirana i poslana na e-mail: %1</translation>
</message>
<message>
<source>The key is invalid or has been used. </source>
<translation>Kljuฤ je neispravan ili je veฤ koriลกฤen.</translation>
</message>
<message>
<source>%siteurl new password</source>
<translation>%siteurl nova lozinka</translation>
</message>
<message>
<source>Click here to get new password</source>
<translation>Kliknite tu za novu lozinku</translation>
</message>
<message>
<source>New password</source>
<translation>Nova lozinka</translation>
</message>
<message>
<source>A mail has been sent to the following email address: %1. This email contains a link you need to click so that we can confirm that the correct user is getting the new password.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There is no registered user with that email address.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>If you have forgotten your password we can generate a new one for you. All you need to do is to enter your email address and we will create a new password for you.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Email</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/user/register</name>
<message>
<source>%1 registration info</source>
<translation>%1 podaci o registraciji</translation>
</message>
<message>
<source>Email</source>
<translation>Elektronska poลกta</translation>
</message>
<message>
<source>Click the following URL to confirm your account</source>
<translation>Kliknite na sledeฤi URL da bi potvrdili vaลก korisniฤki raฤun</translation>
</message>
<message>
<source>New user registered at %siteurl</source>
<translation>Novi korisnik registrovan na %siteurl</translation>
</message>
<message>
<source>A new user has registered.</source>
<translation>Registrovao se novi korisnik.</translation>
</message>
<message>
<source>Account information.</source>
<translation>Podaci o raฤunu.</translation>
</message>
<message>
<source>Link to user information</source>
<translation>Link na informacije o korisniku</translation>
</message>
<message>
<source>Thank you for registering at %siteurl.</source>
<translation>Hvala Vam ลกto ste se registrovali na %siteurl.</translation>
</message>
<message>
<source>Your account information</source>
<translation>Podaci o Vaลกem raฤunu</translation>
</message>
<message>
<source>Password</source>
<translation>Lozinka</translation>
</message>
<message>
<source>Username</source>
<translation>Korisniฤko ime</translation>
</message>
<message>
<source>Username</source>
<comment>Login name</comment>
<translation>Korisniฤko ime</translation>
</message>
<message>
<source>Your registration has been approved. You can login with your account %username.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Click the following URL to login:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/visual/menuconfig</name>
<message>
<source>Menu management</source>
<translation>Upravljanje menijem</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Menu positioning</source>
<translation>Pozicija menija</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Click here to store the changes if you have modified the menu settings above.</source>
<translation>Kliknite ovde za snimanje izmena.</translation>
</message>
<message>
<source>Siteaccess</source>
<translation type="unfinished">Siteaccess</translation>
</message>
</context>
<context>
<name>design/standard/visual/templatecreate</name>
<message>
<source>Could not create template, permission denied.</source>
<translation>Nije bilo moguฤe kreirati ลกablon, uskraฤena dozvola.</translation>
</message>
<message>
<source>Invalid name. You can only use the characters a-z, numbers and _.</source>
<translation>Neispravno ime. Moลพete koristiti iskljuฤivo znakove a-z, brojeve i _.</translation>
</message>
<message>
<source>Create new template override for <%template_name></source>
<translation>Kreiraj novi ลกablon za zaobilazak <%template_name></translation>
</message>
<message>
<source>The newly created template file will be placed in</source>
<translation>Novokreirani ลกablon biฤe smeลกten u</translation>
</message>
<message>
<source>Filename</source>
<translation>Datoteka</translation>
</message>
<message>
<source>Override keys</source>
<translation>Kljuฤevi zaobilaska</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>All classes</source>
<translation>Sve klase</translation>
</message>
<message>
<source>Section</source>
<translation>Segment</translation>
</message>
<message>
<source>All sections</source>
<translation>Svi segmenti</translation>
</message>
<message>
<source>Node ID</source>
<translation>ฤvor ID</translation>
</message>
<message>
<source>Base template on</source>
<translation>Utemeljen ลกablon na</translation>
</message>
<message>
<source>Empty file</source>
<translation>Prazna datoteka</translation>
</message>
<message>
<source>Copy of default template</source>
<translation>Kopija osnovnog ลกablona</translation>
</message>
<message>
<source>Container (with children)</source>
<translation>Kontejner (sa decom)</translation>
</message>
<message>
<source>View (without children)</source>
<translation>Prikaz (bez dece)</translation>
</message>
<message>
<source>Any</source>
<translation>Bilo koji</translation>
</message>
<message>
<source>Object</source>
<translation>Objekt</translation>
</message>
<message>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Extension</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/visual/templateedit</name>
<message>
<source>Edit template: <%template></source>
<translation>Izmeni ลกablon: <%template></translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Click this button to save the contents of the text field above to the template file.</source>
<translation>Kliknite na dugme za snimanje sadrลพaja tekstualnog polja u datoteku ลกablona.</translation>
</message>
<message>
<source>Back to overrides</source>
<translation>Povratak na zaobilaske</translation>
</message>
<message>
<source>Back to override overview.</source>
<translation>Nazad na pregled zaobilazaka.</translation>
</message>
<message>
<source>The web server does not have write access to the requested template.</source>
<translation>Web server nema ovlaลกฤenja pisanja u zatraลพeni ลกablon.</translation>
</message>
<message>
<source>The web server does not have read access to the requested template.</source>
<translation>Web server nema ovlaลกฤenja ฤitanja zatraลพenog ลกablon.</translation>
</message>
<message>
<source>The requested template does not exist or is not being used as an override.</source>
<translation>Zatraลพeni ลกablon ne postoji ili nije zaobilazni ลกablon.</translation>
</message>
<message>
<source>Edit <%template_name> [Template]</source>
<translation>Izmeni <%template_name> [ล ablon]</translation>
</message>
<message>
<source>Requested template</source>
<translation>Zatraลพen ลกablon</translation>
</message>
<message>
<source>Siteaccess</source>
<translation>Siteaccess</translation>
</message>
<message>
<source>Open as read only</source>
<translation>Otvori samo za ฤitanje</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>You do not have permission to save the contents of the text field above to the template file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The template cannot be edited.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Override template</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/visual/templatelist</name>
<message>
<source>Complete template list</source>
<translation>Kompletna lista ลกablona</translation>
</message>
<message>
<source>Template</source>
<translation>ล ablon</translation>
</message>
<message>
<source>Design resource</source>
<translation>Izvor dizajna</translation>
</message>
<message>
<source>Manage overrides for template.</source>
<translation>Upravljanje zaobilascima ลกablona.</translation>
</message>
<message>
<source>Most common templates</source>
<translation>Najuobiฤajeniji ลกabloni</translation>
</message>
</context>
<context>
<name>design/standard/visual/templateview</name>
<message>
<source>The overrides could not be removed.</source>
<translation>Zaobilasci ne mogu biti uklonjeni.</translation>
</message>
<message>
<source>The following files and override rules could not be removed because of insufficient file permissions</source>
<translation>Nemate odgovarajuฤa ovlaลกฤenja za uklanjanje datoteka i zaobilaznih uloga</translation>
</message>
<message>
<source>Overrides for <%template_name> template in <%current_siteaccess> siteaccess [%override_count]</source>
<translation>Zaobilazni ลกablon <%template_name> u tekuฤem <%current_siteaccess> [%override_count]</translation>
</message>
<message>
<source>Default template resource</source>
<translation>Osnovni izvor ลกablona</translation>
</message>
<message>
<source>Siteaccess</source>
<translation>Siteaccess</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Invert selection.</source>
<translation>Obrnuti izbor.</translation>
</message>
<message>
<source>Name</source>
<translation>Naziv</translation>
</message>
<message>
<source>File</source>
<translation>Datoteka</translation>
</message>
<message>
<source>Match conditions</source>
<translation>Uskladi uslove</translation>
</message>
<message>
<source>Priority</source>
<translation>Prioritet</translation>
</message>
<message>
<source>No file matched</source>
<translation>Datoteka nije pronaฤena</translation>
</message>
<message>
<source>Edit override template.</source>
<translation>Izmeni zaobilazni ลกablon.</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Remove selected template overrides.</source>
<translation>Ukloni odabrani zaobilazni ลกablon.</translation>
</message>
<message>
<source>New override</source>
<translation>Novi zaobilazak</translation>
</message>
<message>
<source>Create a new template override.</source>
<translation>Kreiraj novi zaobilazni ลกablon.</translation>
</message>
<message>
<source>Update priorities</source>
<translation>Aลพuriraj prioritete</translation>
</message>
<message>
<source>The override.ini file could not be modified because of insufficient permission.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There are no overrides for the <%template_name> template.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/visual/toolbar</name>
<message>
<source>Browse</source>
<translation>Listaj</translation>
</message>
<message>
<source>True</source>
<translation>Taฤno</translation>
</message>
<message>
<source>False</source>
<translation>Netaฤno</translation>
</message>
<message>
<source>Yes</source>
<translation>Da</translation>
</message>
<message>
<source>No</source>
<translation>Ne</translation>
</message>
<message>
<source>There are currently no tools in this toolbar</source>
<translation>Trenutno nema alata u alatnoj traci</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Update priorities</source>
<translation>Aลพuriraj prioritete</translation>
</message>
<message>
<source>Add Tool</source>
<translation>Dodaj alat</translation>
</message>
<message>
<source>Apply changes</source>
<translation>Primeni izmene</translation>
</message>
<message>
<source>Click this button to store changes if you have modified the parameters above.</source>
<translation>Kliknite na dugme za ฤuvanje izmena ako ste izmenili bilo koje polje.</translation>
</message>
<message>
<source>Back to toolbars</source>
<translation>Nazad na alatnu traku</translation>
</message>
<message>
<source>Go back to the toolbar list.</source>
<translation>Nazad na listu alata.</translation>
</message>
<message>
<source>Toolbar management</source>
<translation>Upravljanje alatnom trakom</translation>
</message>
<message>
<source>Current siteaccess</source>
<translation>Trenutni SiteAccess</translation>
</message>
<message>
<source>Select siteaccess</source>
<translation>Izaberite siteaccess</translation>
</message>
<message>
<source>Set</source>
<translation>Postavi</translation>
</message>
<message>
<source>Available toolbars for the <%siteaccess> siteaccess</source>
<translation>Dostupne alatne trake za <%siteaccess></translation>
</message>
<message>
<source>Tool list for <Toolbar_%toolbar_position></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Siteaccess</source>
<translation type="unfinished">Siteaccess</translation>
</message>
</context>
<context>
<name>design/standard/workflow</name>
<message>
<source>Remove</source>
<translation>Ukloni</translation>
</message>
<message>
<source>Editing workflow</source>
<translation>Izmena radnog toka</translation>
</message>
<message>
<source>Workflow stored</source>
<translation>Radni tok je smeลกten</translation>
</message>
<message>
<source>Data requires fixup</source>
<translation>Podaci zahtevaju popravljanje</translation>
</message>
<message>
<source>Groups</source>
<translation>Grupe</translation>
</message>
<message>
<source>Events</source>
<translation>Dogaฤaji</translation>
</message>
<message>
<source>New</source>
<translation>Novi</translation>
</message>
<message>
<source>Store</source>
<translation>Snimi</translation>
</message>
<message>
<source>Discard</source>
<translation>Odbaci</translation>
</message>
<message>
<source>on</source>
<translation>na</translation>
</message>
<message>
<source>Modified by</source>
<translation>Izmena:</translation>
</message>
<message>
<source>Edit</source>
<translation>Izmena </translation>
</message>
<message>
<source>Workflow process</source>
<translation>Proces radnog toka</translation>
</message>
<message>
<source>Workflow process was created at</source>
<translation>Proces radnog toka bio je kreiran u</translation>
</message>
<message>
<source>and modified at</source>
<translation>i modifikovan u </translation>
</message>
<message>
<source>Workflow</source>
<translation>radni tok</translation>
</message>
<message>
<source>Using workflow</source>
<translation>koristi radni tok</translation>
</message>
<message>
<source>for processing.</source>
<translation>za obradu.</translation>
</message>
<message>
<source>User</source>
<translation>Korisnik</translation>
</message>
<message>
<source>This workflow is running for user</source>
<translation>Radni tok teฤe za korisnika</translation>
</message>
<message>
<source>Content object</source>
<translation>Objekt sadrลพaja</translation>
</message>
<message>
<source>Workflow was created for content</source>
<translation>Radni tijek je kreiran za sadrลพaj</translation>
</message>
<message>
<source>using version</source>
<translation>koristi verziju</translation>
</message>
<message>
<source>in parent</source>
<translation>u roditeljskom</translation>
</message>
<message>
<source>Workflow event</source>
<translation>Dogaฤaj radnog toka</translation>
</message>
<message>
<source>Workflow has not started yet, number of main events in workflow is</source>
<translation>Radni tok nije joลก zapoฤeo, broj glavnih dogaฤaja u radnom toku je</translation>
</message>
<message>
<source>Current event position is</source>
<translation>Trenutna pozicija dogaฤaja je</translation>
</message>
<message>
<source>Event to be run is</source>
<translation>Dogaฤaj koji treba izvesti je</translation>
</message>
<message>
<source>event</source>
<translation>dogaฤaj</translation>
</message>
<message>
<source>Last event returned status</source>
<translation>Status poslednjeg vraฤenog dogaฤaja</translation>
</message>
<message>
<source>Workflow event list</source>
<translation>Popis dogaฤaja radnog toka</translation>
</message>
<message>
<source>Reset</source>
<translation>Ponovo postavi</translation>
</message>
<message>
<source>Next step</source>
<translation>Sledeฤi korak</translation>
</message>
<message>
<source>Workflow event log</source>
<translation>Dnevnik dogaฤaja radnog toka</translation>
</message>
<message>
<source>Name</source>
<translation>Ime</translation>
</message>
<message>
<source>Description</source>
<translation>Opis</translation>
</message>
<message>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<source>Information</source>
<translation>Podaci</translation>
</message>
<message>
<source>Pos</source>
<translation>Pos</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Workflow groups</source>
<translation>Grupe radnog toka</translation>
</message>
<message>
<source>New group</source>
<translation>Nova grupa</translation>
</message>
<message>
<source>Workflows in %1</source>
<comment>%1 is workflow group</comment>
<translation>Radni tokovi u %1</translation>
</message>
<message>
<source>Modifier</source>
<translation>Modifikator</translation>
</message>
<message>
<source>Modified</source>
<translation>Promenjeno</translation>
</message>
<message>
<source>New workflow</source>
<translation>Novi radni tok</translation>
</message>
<message>
<source>Add group</source>
<translation>Dodaj grupu</translation>
</message>
<message>
<source>Editing workflow group - %1</source>
<translation>Izmena grupe radnog toka - %1</translation>
</message>
<message>
<source>Modified by %username on %time</source>
<translation>Promenu izvrลกio %username u %time</translation>
</message>
<message>
<source>Edit workflow</source>
<translation>Izmeni radni tok</translation>
</message>
<message>
<source>Remove selected workflows</source>
<translation>Ukloni oznaฤene radne tokove</translation>
</message>
<message>
<source>Workflow process was created at %creation and modified at %modification.</source>
<translation>Proces radnog toka kreiran je u %creation i modifikovan at %modification. </translation>
</message>
<message>
<source>Select gateway</source>
<translation>Izaberi gateway</translation>
</message>
<message>
<source>Select</source>
<translation>Izaberi</translation>
</message>
<message>
<source>Cancel</source>
<translation>Odustani</translation>
</message>
<message>
<source>Additional information</source>
<translation>Dodatni podaci</translation>
</message>
<message>
<source>Input did not validate</source>
<translation>Unos nije ispravan</translation>
</message>
</context>
<context>
<name>design/standard/workflow/eventtype/edit</name>
<message>
<source>Any</source>
<translation>Bilo koji</translation>
</message>
<message>
<source>Sections</source>
<translation>Segmenti</translation>
</message>
<message>
<source>Classes to run workflow</source>
<translation>Klase za radni tok</translation>
</message>
<message>
<source>Users without workflow IDs</source>
<translation>Korisnici bez identifikacije radnog toka</translation>
</message>
<message>
<source>Workflow to run</source>
<translation>Radni tok koji treba izvrลกiti</translation>
</message>
<message>
<source>Class</source>
<translation>Klasa</translation>
</message>
<message>
<source>Remove selected</source>
<translation>Ukloni izabrano</translation>
</message>
<message>
<source>Load attributes</source>
<translation>Unesi atribute</translation>
</message>
<message>
<source>Modify publish date</source>
<translation>Promeni datum izdavanja</translation>
</message>
<message>
<source>Add entry</source>
<translation>Dodaj unos</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Affected languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class attributes</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>design/standard/workflow/eventtype/view</name>
<message>
<source>Sections</source>
<translation>Segmenti</translation>
</message>
<message>
<source>Any</source>
<translation>Bilo koji</translation>
</message>
<message>
<source>Users without approval</source>
<translation>Korisnici bez dozvole</translation>
</message>
<message>
<source>Classes to run workflow</source>
<translation>Klase za radni tok</translation>
</message>
<message>
<source>Users without workflow IDs</source>
<translation>Korisnici bez identifikacija radnog toka</translation>
</message>
<message>
<source>Workflow to run</source>
<translation>Radni tok koji treba izvrลกiti</translation>
</message>
<message>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<source>Publish date will be modified.</source>
<translation>Datum objave biฤe izmenjen.</translation>
</message>
<message>
<source>Publish date will not be modified.</source>
<translation>Datum objave neฤe biti izmenjen.</translation>
</message>
<message>
<source>Approver users</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Approver groups</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Language</source>
<translation type="unfinished">Jezik</translation>
</message>
</context>
<context>
<name>design/starndard/node</name>
<message>
<source>Are you sure you want to remove these items?</source>
<translation type="unfinished">Jeste li sigurni da ลพelite ukloniti navedene elemente?</translation>
</message>
</context>
<context>
<name>extension/oauth</name>
<message>
<source>Application authorization</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The application %application_name% has requested access to this website on your behalf.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>extension/oauth/authorize</name>
<message>
<source>Authorize</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Deny</source>
<translation type="unfinished">Odbij</translation>
</message>
</context>
<context>
<name>extension/oauthadmin</name>
<message>
<source>New REST application</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>oAuth admin</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Confirm removal</source>
<translation type="unfinished">Potvrdi uklanjanje</translation>
</message>
<message>
<source>Application <%application_name></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Last modified</source>
<translation type="unfinished">Poslednja promena</translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Description</source>
<translation type="unfinished">Opis</translation>
</message>
<message>
<source>Client identifier</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Client secret</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Endpoint URI</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit this application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete</source>
<translation type="unfinished">Obriลกi</translation>
</message>
<message>
<source>Delete this application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove this application?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove these applications?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Confirm</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Confirm removal of these applications.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit application <%application_name></source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this field to set the application name.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this field to set the informal application description.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use this field to set the application endpoint URI.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OK</source>
<translation type="unfinished">OK</translation>
</message>
<message>
<source>REST applications (%applications_count)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of applications</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invert selection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Modifier</source>
<translation type="unfinished">Modifikator</translation>
</message>
<message>
<source>Modified</source>
<translation type="unfinished">Promenjeno</translation>
</message>
<message>
<source>Select application for removal.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit the <%application_name> application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove selected</source>
<translation type="unfinished">Ukloni izabrano</translation>
</message>
<message>
<source>Remove the selected applications.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New application</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create a new application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Back</source>
<translation type="unfinished">Nazad</translation>
</message>
</context>
<context>
<name>kernel/cache</name>
<message>
<source>Content view cache</source>
<translation type="unfinished">Cache prikaza sadrลพaja</translation>
</message>
<message>
<source>Global INI cache</source>
<translation type="unfinished">Globalni INI cache</translation>
</message>
<message>
<source>INI cache</source>
<translation type="unfinished">INI cache</translation>
</message>
<message>
<source>Codepage cache</source>
<translation type="unfinished">Cache jezika</translation>
</message>
<message>
<source>Class identifier cache</source>
<translation type="unfinished">Cache identifikatora klasa</translation>
</message>
<message>
<source>Sort key cache</source>
<translation type="unfinished">Cache sortiranja</translation>
</message>
<message>
<source>URL alias cache</source>
<translation type="unfinished">Cache URL</translation>
</message>
<message>
<source>Image alias</source>
<translation type="unfinished">Alijas slike</translation>
</message>
<message>
<source>Template cache</source>
<translation type="unfinished">Cache ลกablona</translation>
</message>
<message>
<source>Template block cache</source>
<translation type="unfinished">Cache bloka ลกablona</translation>
</message>
<message>
<source>Template override cache</source>
<translation type="unfinished">Cache zaobiฤenih ลกablona</translation>
</message>
<message>
<source>RSS cache</source>
<translation type="unfinished">Cache RSS</translation>
</message>
<message>
<source>Character transformation cache</source>
<translation type="unfinished">Cache karaktera</translation>
</message>
<message>
<source>User info cache</source>
<translation type="unfinished">Cache podataka korisnika</translation>
</message>
<message>
<source>Text to image cache</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Content tree menu (browser cache)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>State limitations cache</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Design base cache</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Active extensions cache</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>TS Translation cache</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/class</name>
<message>
<source>Class list of group</source>
<translation type="unfinished">Lista klasa unutar grupe</translation>
</message>
<message>
<source>Class group list</source>
<translation type="unfinished">Lista grupa klasa</translation>
</message>
<message>
<source>Remove class</source>
<translation type="unfinished">Ukloni klasu</translation>
</message>
<message>
<source>Class edit</source>
<translation type="obsolete">Ureฤenje klase</translation>
</message>
<message>
<source>Classes</source>
<translation type="obsolete">Klase</translation>
</message>
<message>
<source>Class list</source>
<translation type="unfinished">Lista klasa</translation>
</message>
<message>
<source>(no classes)</source>
<translation type="unfinished">(nema klasa)</translation>
</message>
<message>
<source>Remove class groups</source>
<translation type="unfinished">Ukloni grupe klasa</translation>
</message>
<message>
<source>You have to have at least one group that the class belongs to!</source>
<translation type="unfinished">Morate imati barem jednu grupu kojoj klasa pripada!</translation>
</message>
<message>
<source>Remove classes %class_id</source>
<translation type="unfinished">Ukloni klase %class_id</translation>
</message>
<message>
<source>Copy of %class_name</source>
<translation type="unfinished">Kopija %class_name</translation>
</message>
<message>
<source>The class should have nonempty 'Name' attribute.</source>
<translation type="unfinished">Klasa ne sme imati prazan 'Naziv' atribut.</translation>
</message>
<message>
<source>The class should have at least one attribute.</source>
<translation type="unfinished">Klasa mora imati barem jedan atribut.</translation>
</message>
<message>
<source>There is a class already having the same identifier.</source>
<translation type="unfinished">Veฤ postoji klasa sa istim identifikatorom.</translation>
</message>
<message>
<source>Class groups</source>
<translation type="unfinished">Grupe klasa</translation>
</message>
<message>
<source>Could not load datatype: </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Editing this content class may cause data corruption in your system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Press "Cancel" to safely exit this operation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please contact your eZ Publish administrator to solve this problem.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>duplicate attribute placement</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>duplicate attribute identifier</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove classes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove translation</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/class/edit</name>
<message>
<source>New Class</source>
<translation type="unfinished">Nova klasa</translation>
</message>
<message>
<source>new attribute</source>
<translation type="unfinished">novi atribut</translation>
</message>
</context>
<context>
<name>kernel/class/groupedit</name>
<message>
<source>New Group</source>
<translation type="unfinished">Nova grupa</translation>
</message>
</context>
<context>
<name>kernel/classes</name>
<message>
<source>Approval</source>
<translation type="unfinished">Odobrenje</translation>
</message>
<message>
<source>Standard</source>
<translation type="unfinished">Standardno</translation>
</message>
<message>
<source>Observer</source>
<translation type="unfinished">Posmatraฤ</translation>
</message>
<message>
<source>Owner</source>
<translation type="unfinished">Vlasnik</translation>
</message>
<message>
<source>Approver</source>
<translation type="unfinished">Odobrio</translation>
</message>
<message>
<source>Author</source>
<translation type="unfinished">Autor</translation>
</message>
<message>
<source>Inbox</source>
<translation type="unfinished">Ulazna poลกta</translation>
</message>
<message>
<source>No state yet</source>
<translation type="unfinished">Bez stanja</translation>
</message>
<message>
<source>Workflow running</source>
<translation type="unfinished">Trenutni radni tok</translation>
</message>
<message>
<source>Workflow done</source>
<translation type="unfinished">Radni tok izvrลกen</translation>
</message>
<message>
<source>Workflow failed an event</source>
<translation type="unfinished">Dogaฤaj radnog toka nije uspeo</translation>
</message>
<message>
<source>Workflow event deferred to cron job</source>
<translation type="unfinished">Dogaฤaj radnog toka odgoฤen za cron job</translation>
</message>
<message>
<source>Workflow was reset for reuse</source>
<translation type="unfinished">Radni tok je ponovo pokrenut za ponovo koriลกฤenje</translation>
</message>
<message>
<source>Accepted event</source>
<translation type="unfinished">Prihvaฤen dogaฤaj</translation>
</message>
<message>
<source>Rejected event</source>
<translation type="unfinished">Odbaฤen dogaฤaj</translation>
</message>
<message>
<source>Event deferred to cron job</source>
<translation type="unfinished">Dogaฤaj odgoฤen za cron job</translation>
</message>
<message>
<source>Event deferred to cron job, event will be rerun</source>
<translation type="unfinished">Dogaฤaj odgoฤen za cron job, dogaฤaj ฤe biti ponovljen</translation>
</message>
<message>
<source>Event runs a sub event</source>
<translation type="unfinished">Dogaฤaj izvrลกava niลพe rangirani dogaฤaj</translation>
</message>
<message>
<source>Workflow fetches template</source>
<translation type="unfinished">Radni tok obuhvata ลกablon</translation>
</message>
<message>
<source>Workflow redirects user view</source>
<translation type="unfinished">Radni tok preusmerava na korisniฤki prikaz</translation>
</message>
<message>
<source>New RSS Export</source>
<translation type="unfinished">Novi RSS izvoz</translation>
</message>
<message>
<source>Replace existing object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Skip object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Keep existing and create a new one</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Update existing object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Workflow was canceled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Canceled whole workflow</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/classes/datatypes</name>
<message>
<source>Missing date input.</source>
<translation type="unfinished">Nedostaje datum.</translation>
</message>
<message>
<source>Missing datetime input.</source>
<translation type="unfinished">Nedostaje datum i sat.</translation>
</message>
<message>
<source>At least one author is required.</source>
<translation type="unfinished">Potrebno je upisati barem jednog autora. </translation>
</message>
<message>
<source>A valid file is required.</source>
<translation type="unfinished">Potrebno je uneti ispravnu datoteku.</translation>
</message>
<message>
<source>Checkbox</source>
<comment>Datatype name</comment>
<translation type="unfinished">Checkbox</translation>
</message>
<message>
<source>Enum</source>
<comment>Datatype name</comment>
<translation type="unfinished">Broj</translation>
</message>
<message>
<source>At least one field should be chosen.</source>
<translation type="unfinished">Najmanje jedno polje mora biti izabrano.</translation>
</message>
<message>
<source>Float</source>
<comment>Datatype name</comment>
<translation type="unfinished">Float</translation>
</message>
<message>
<source>Image</source>
<comment>Datatype name</comment>
<translation type="unfinished">Slika</translation>
</message>
<message>
<source>Integer</source>
<comment>Datatype name</comment>
<translation type="unfinished">Integer</translation>
</message>
<message>
<source>ISBN</source>
<comment>Datatype name</comment>
<translation type="unfinished">ISBN</translation>
</message>
<message>
<source>Matrix</source>
<comment>Datatype name</comment>
<translation type="unfinished">Matrica</translation>
</message>
<message>
<source>Media</source>
<comment>Datatype name</comment>
<translation type="unfinished">Media</translation>
</message>
<message>
<source>Object relation</source>
<comment>Datatype name</comment>
<translation type="unfinished">Relacioni objekt</translation>
</message>
<message>
<source>Option</source>
<comment>Datatype name</comment>
<translation type="unfinished">Moguฤnost</translation>
</message>
<message>
<source>At least one option is required.</source>
<translation type="unfinished">Potrebno je odrediti barem jednu moguฤnost.</translation>
</message>
<message>
<source>Price</source>
<comment>Datatype name</comment>
<translation type="unfinished">Cena</translation>
</message>
<message>
<source>Add to basket</source>
<translation type="unfinished">Dodaj u korpu</translation>
</message>
<message>
<source>Add to wish list</source>
<translation type="unfinished">Dodaj na listu ลพelja</translation>
</message>
<message>
<source>Range option</source>
<comment>Datatype name</comment>
<translation type="unfinished">Izbor opsega</translation>
</message>
<message>
<source>Selection</source>
<comment>Datatype name</comment>
<translation type="unfinished">Izbor</translation>
</message>
<message>
<source>Text line</source>
<comment>Datatype name</comment>
<translation type="unfinished">Tekst red</translation>
</message>
<message>
<source>Subtree subscription</source>
<comment>Datatype name</comment>
<translation type="unfinished">Subtree subscription</translation>
</message>
<message>
<source>URL</source>
<comment>Datatype name</comment>
<translation type="unfinished">URL</translation>
</message>
<message>
<source>User account</source>
<comment>Datatype name</comment>
<translation type="unfinished">Korisniฤki raฤun</translation>
</message>
<message>
<source>A user with this email already exists.</source>
<translation type="unfinished">Veฤ postoji korisnik s istom e-mail adresom. </translation>
</message>
<message>
<source>Identifier</source>
<comment>Datatype name</comment>
<translation type="unfinished">Identifikator</translation>
</message>
<message>
<source>image</source>
<comment>Default image name</comment>
<translation type="unfinished">slika</translation>
</message>
<message>
<source>Ini Setting</source>
<comment>Datatype name</comment>
<translation type="unfinished">Ini postavka</translation>
</message>
<message>
<source>Package</source>
<comment>Datatype name</comment>
<translation type="unfinished">Paket</translation>
</message>
<message>
<source>Send</source>
<comment>Datatype information collector action</comment>
<translation type="unfinished">Poลกalji</translation>
</message>
<message>
<source>Missing objectrelation input.</source>
<translation type="unfinished">Nedostaje unos relacije objekta.</translation>
</message>
<message>
<source>Invalid time.</source>
<translation type="unfinished">Pogreลกno vreme.</translation>
</message>
<message>
<source>The author name must be provided.</source>
<translation type="unfinished">Potrebno je upisati ime autora.</translation>
</message>
<message>
<source>The email address is not valid.</source>
<translation type="unfinished">Email adresa nije ispravna.</translation>
</message>
<message>
<source>File uploading is not enabled. Please contact the site administrator to enable it.</source>
<translation type="unfinished">Uvoz datoteka nije dozvoljen. Molimo kontaktirajte administratora.</translation>
</message>
<message>
<source>The size of the uploaded file exceeds the limit set by the upload_max_filesize directive in php.ini.</source>
<translation type="unfinished">Veliฤina uvezene datoteke veฤa je od dopuลกtene u php.ini datoteci.</translation>
</message>
<message>
<source>The size of the uploaded file exceeds the maximum upload size: %1 bytes.</source>
<translation type="unfinished">Veliฤina slike premaลกuje zadano ograniฤenje: %1 bytova.</translation>
</message>
<message>
<source>The email address is empty.</source>
<translation type="unfinished">E-mail adresa je prazna.</translation>
</message>
<message>
<source>The given input is not a floating point number.</source>
<translation type="unfinished">Unos nije decimalni broj.</translation>
</message>
<message>
<source>The input must be greater than %1</source>
<translation type="unfinished">Unos mora biti veฤi od %1</translation>
</message>
<message>
<source>The input must be less than %1</source>
<translation type="unfinished">Unos mora biti manji od %1</translation>
</message>
<message>
<source>The input is not in defined range %1 - %2</source>
<translation type="unfinished">Unos nije u zadanom rasponu %1-%2</translation>
</message>
<message>
<source>A valid image file is required.</source>
<translation type="unfinished">Potrebno je uneti ispravnu grafiฤku datoteku.</translation>
</message>
<message>
<source>The size of the uploaded image exceeds limit set by upload_max_filesize directive in php.ini. Please contact the site administrator.</source>
<translation type="unfinished">Veliฤina uvezene slike prelazi ograniฤenje podeลกeno u php.ini datoteci.</translation>
</message>
<message>
<source>The size of the uploaded file exceeds the limit set for this site: %1 bytes.</source>
<translation type="unfinished">Veliฤina slike premaลกuje zadano ograniฤenje: %1 bytova.</translation>
</message>
<message>
<source>Could not locate the ini file.</source>
<translation type="unfinished">Nije moguฤe locirati ini datoteku.</translation>
</message>
<message>
<source>The input is not a valid integer.</source>
<translation type="unfinished">Unos nije celi broj.</translation>
</message>
<message>
<source>The number must be greater than %1</source>
<translation type="unfinished">Broj mora biti veฤi od %1</translation>
</message>
<message>
<source>The number must be less than %1</source>
<translation type="unfinished">Broj mora biti manji od %1</translation>
</message>
<message>
<source>The number is not within the required range %1 - %2</source>
<translation type="unfinished">Broj nije u rasponu od %1-%2</translation>
</message>
<message>
<source>The ISBN number is not correct. Please check the input for mistakes.</source>
<translation type="unfinished">ISBN broj nije ispravan. Molimo ispravite unos.</translation>
</message>
<message>
<source>A valid media file is required.</source>
<translation type="unfinished">Potrebno je uneti ispravnu multimedijalnu datoteku.</translation>
</message>
<message>
<source>The size of the uploaded file exceeds the limit set by upload_max_filesize directive in php.ini. Please contact the site administrator.</source>
<translation type="unfinished">Veliฤina uvezene datoteke prelazi ograniฤenje podeลกeno u php.ini datoteci.</translation>
</message>
<message>
<source>The size of the uploaded file exceeds site maximum: %1 bytes.</source>
<translation type="unfinished">Veliฤina uvezene datoteke premaลกuje zadano ograniฤenje: %1 bytova.</translation>
</message>
<message>
<source>The option value must be provided.</source>
<translation type="unfinished">Mora biti ponuฤena neka vrednost.</translation>
</message>
<message>
<source>The additional price for the multioption value is not valid.</source>
<translation type="unfinished">Dodatna cena za multioption vrednost nije dobra.</translation>
</message>
<message>
<source>The Additional price value is not valid.</source>
<translation type="unfinished">Dodatna vrednost cene nije dobra.</translation>
</message>
<message>
<source>Input required.</source>
<translation type="unfinished">Potreban je unos.</translation>
</message>
<message>
<source>The input text is too long. The maximum number of characters allowed is %1.</source>
<translation type="unfinished">Uneseni tekst je predug. Maksimalan broj uneลกeni znakova iznosi %1.</translation>
</message>
<message>
<source>Time input required.</source>
<translation type="unfinished">Potrebno je uneti vreme.</translation>
</message>
<message>
<source>The username must be specified.</source>
<translation type="unfinished">Nije uneseno korisniฤko ime.</translation>
</message>
<message>
<source>The username already exists, please choose another one.</source>
<translation type="unfinished">Takvo korisniฤko ime veฤ postoji, molimo izaberite neko drugo.</translation>
</message>
<message>
<source>The passwords do not match.</source>
<comment>eZUserType</comment>
<translation type="unfinished">Lozinke se ne podudaraju.</translation>
</message>
<message>
<source>Cannot remove the account:</source>
<translation type="unfinished">Nije moguฤe ukloniti ovaj korisniฤki raฤun:</translation>
</message>
<message>
<source>The account owner is currently logged in.</source>
<translation type="unfinished">Vlasnik korisniฤkog raฤuna je prijavljen na sistem.</translation>
</message>
<message>
<source>The account is currently used by the anonymous user.</source>
<translation type="unfinished">Raฤun trenutno koristi anonimni korisnik.</translation>
</message>
<message>
<source>Multi-option</source>
<comment>Datatype name</comment>
<translation type="unfinished">Multi-option</translation>
</message>
<message>
<source>Authors</source>
<comment>Datatype name</comment>
<translation type="unfinished">Autori</translation>
</message>
<message>
<source>File</source>
<comment>Datatype name</comment>
<translation type="unfinished">Datoteka</translation>
</message>
<message>
<source>Date</source>
<comment>Datatype name</comment>
<translation type="unfinished">Datum</translation>
</message>
<message>
<source>Date and time</source>
<comment>Datatype name</comment>
<translation type="unfinished">Datum i sat</translation>
</message>
<message>
<source>Keywords</source>
<comment>Datatype name</comment>
<translation type="unfinished">Kljuฤne reฤi</translation>
</message>
<message>
<source>Object relations</source>
<comment>Datatype name</comment>
<translation type="unfinished">Relacioni objekti</translation>
</message>
<message>
<source>Text block</source>
<comment>Datatype name</comment>
<translation type="unfinished">Tekstualni blok</translation>
</message>
<message>
<source>Time</source>
<comment>Datatype name</comment>
<translation type="unfinished">Vreme</translation>
</message>
<message>
<source>XML block</source>
<comment>Datatype name</comment>
<translation type="unfinished">XML blok</translation>
</message>
<message>
<source>Object %1 can not be embeded to itself.</source>
<translation type="unfinished">Objekt %1 ne moลพe biti ukljuฤen u samoga sebe.</translation>
</message>
<message>
<source>Date is not valid.</source>
<translation type="unfinished">Datum nije ispravan.</translation>
</message>
<message>
<source>The image file must have non-zero size.</source>
<translation type="unfinished">Slika mora imati ne-nula veliฤinu.</translation>
</message>
<message>
<source>Invalid price.</source>
<translation type="unfinished">Neispravna cena.</translation>
</message>
<message>
<source>Missing matrix input.</source>
<translation type="unfinished">Nedostaje unos matrice.</translation>
</message>
<message>
<source>Missing objectrelation list input.</source>
<translation type="unfinished">Nedostaje unos liste u relaciji objekta.</translation>
</message>
<message>
<source>NAME is required.</source>
<translation type="unfinished">IME je obavezno.</translation>
</message>
<message>
<source>Country</source>
<comment>Datatype name</comment>
<translation type="unfinished">Zemlja</translation>
</message>
<message>
<source>Time is not valid.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Email</source>
<comment>Datatype name</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Missing email input.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Wrong text field value.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The registrant element of the ISBN number does not exist.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The ISBN number has a incorrect registration group number.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The group element of the ISBN number does not exist.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%1 is not a valid prefix of the ISBN number.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All ISBN 13 characters need to be numeric</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>13 digit ISBN must start with 978 or 979</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>ISBN length is invalid</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bad checksum, last digit should be %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The ISBN number should be ISBN13, but seems to be ISBN10.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The ISBN number is not correct. </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Option set name is required.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Multi-option2</source>
<comment>Datatype name</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot choose option value "%1" from "%2" because it is unselectable </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot choose option value "%1" from "%2"
if you selected option "%3" from "%4" </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Multi-price</source>
<comment>Datatype name</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dynamic VAT cannot be included.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid price for '%currencyCode' currency </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Input required</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Product category</source>
<comment>Datatype name</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>Missing range option input.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The password cannot be empty.</source>
<comment>eZUserType</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>The password must be at least %1 characters long.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The password must not be "password".</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The account is currently used the administrator user.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You cannot remove the last class holding user accounts.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Content required</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid reference in &lt;embed&gt; tag. Note that <embed> tag supports only 'eznode' and 'ezobject' protocols.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The emails do not match.</source>
<comment>eZUserType</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/classes/datatypes/ezbinaryfile</name>
<message>
<source>Failed to store file %filename. Please contact the site administrator.</source>
<translation type="unfinished">Datoteka %filename nije snimljena. Molimo %1kontaktirajte2% administratora.</translation>
</message>
</context>
<context>
<name>kernel/classes/datatypes/ezimage</name>
<message>
<source>Failed to fetch Image Handler. Please contact the site administrator.</source>
<translation type="unfinished">Slika nije uzeta. Molimo %1kontaktirajte2% administratora.</translation>
</message>
</context>
<context>
<name>kernel/classes/datatypes/ezmedia</name>
<message>
<source>Failed to store media file %filename. Please contact the site administrator.</source>
<translation type="unfinished">Multimedijalna datoteka %filename nije snimljena. Molimo %1kontaktirajte2% administratora.</translation>
</message>
</context>
<context>
<name>kernel/classes/datatypes/ezxmltext</name>
<message>
<source>Node '%1' does not exist.</source>
<translation type="unfinished">ฤvor '%1' ne postoji.</translation>
</message>
<message>
<source>Object %1 can not be embeded to itself.</source>
<translation type="unfinished">Objekt %1 ne moลพe biti ukljuฤen u samoga sebe.</translation>
</message>
<message>
<source>Wrong closing tag</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Wrong closing tag : &lt;/%1&gt;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Wrong opening tag</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown tag: &lt;%1&gt;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Can't convert tag's name: &lt;%1&gt;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class '%1' is not allowed for element &lt;%2&gt; (check content.ini).</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Required attribute '%1' is not presented in tag &lt;%2&gt;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Custom tag '%1' is not allowed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;%1&gt; tag can't be empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%1 is not allowed to be a child of &lt;%2&gt;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attribute '%1' is not allowed in &lt;%2&gt; element.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Incorrect headers nesting</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Using scripts in links is not allowed, link '%1' has been removed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid e-mail address: '%1'</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%count invalid character(s) have been found and replaced by a space</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/collaboration</name>
<message>
<source>Collaboration custom action</source>
<translation type="unfinished">Akcija saradnje</translation>
</message>
<message>
<source>Collaboration</source>
<translation type="unfinished">Saradnja</translation>
</message>
</context>
<context>
<name>kernel/content</name>
<message>
<source>Search</source>
<translation type="unfinished">Traลพi</translation>
</message>
<message>
<source>Advanced</source>
<translation type="unfinished">Napredno pretraลพivanje</translation>
</message>
<message>
<source>No main node selected, please select one.</source>
<translation type="unfinished">Nije izabran glavni ฤvor, molimo izaberite neki ฤvor.</translation>
</message>
<message>
<source>Content</source>
<translation type="unfinished">Sadrลพaj</translation>
</message>
<message>
<source>Copy</source>
<translation type="unfinished">Kopiraj</translation>
</message>
<message>
<source>My drafts</source>
<translation type="unfinished">Moje skice</translation>
</message>
<message>
<source>Remove editing version</source>
<translation type="unfinished">Ukloni verziju za editovanje</translation>
</message>
<message>
<source>Remove object</source>
<translation type="unfinished">Ukloni objekt</translation>
</message>
<message>
<source>Translation</source>
<translation type="unfinished">Prevod</translation>
</message>
<message>
<source>Content translations</source>
<translation type="unfinished">Prevodi sadrลพaja</translation>
</message>
<message>
<source>Trash</source>
<translation type="unfinished">Smeฤe</translation>
</message>
<message>
<source>Versions</source>
<translation type="obsolete">Verzije</translation>
</message>
<message>
<source>My bookmarks</source>
<translation type="unfinished">Moje oznake za knjigu</translation>
</message>
<message>
<source>Tip from %1: %2</source>
<translation type="unfinished">Obaveลกtenje od %1: %2</translation>
</message>
<message>
<source>The email address of the sender is not valid</source>
<translation type="unfinished">Adresa elektronske poลกte poลกiljaoca nije ispravna</translation>
</message>
<message>
<source>The email address of the receiver is not valid</source>
<translation type="unfinished">Adresa elektronske poลกte primaoca nije ispravna</translation>
</message>
<message>
<source>Tip a friend</source>
<translation type="unfinished">Poลกaljite na mail</translation>
</message>
<message>
<source>My pending list</source>
<translation type="unfinished">Moja lista ฤekanja</translation>
</message>
<message>
<source>Keywords</source>
<translation type="unfinished">Kljuฤne reฤi</translation>
</message>
<message>
<source>Media</source>
<translation type="unfinished">Multimedija</translation>
</message>
<message>
<source>New content</source>
<translation type="unfinished">Novi sadrลพaj</translation>
</message>
<message>
<source>Remove location</source>
<translation type="unfinished">Ukloni lokaciju</translation>
</message>
<message>
<source>You are not allowed to place this object under: %1</source>
<translation type="unfinished">Nemate ovlaลกฤenja za stavljanje ovog objekta unutar: %1</translation>
</message>
<message>
<source>Top Level Nodes</source>
<translation type="unfinished">ฤvorovi glavnog nivoa</translation>
</message>
<message>
<source>Hidden</source>
<translation type="unfinished">Skriven</translation>
</message>
<message>
<source>Hidden by superior</source>
<translation type="unfinished">Sakriveno od </translation>
</message>
<message>
<source>Visible</source>
<translation type="unfinished">Vidljivo</translation>
</message>
<message>
<source>A node in the node assignment list has been deleted.</source>
<translation type="unfinished">ฤvor u listi ฤvorova za dodelu je obrisan.</translation>
</message>
<message>
<source>"$contentObjectName": Sub items that are used by other objects</source>
<translation type="unfinished">"$contentObjectName": Podelementi koje koriste drugi objekti</translation>
</message>
<message>
<source>Class identifier</source>
<translation type="unfinished">Identifikator klase</translation>
</message>
<message>
<source>Class name</source>
<translation type="unfinished">Naziv klase</translation>
</message>
<message>
<source>Depth</source>
<translation type="unfinished">Dubina</translation>
</message>
<message>
<source>Modified</source>
<translation type="unfinished">Promenjeno</translation>
</message>
<message>
<source>Priority</source>
<translation type="unfinished">Prioritet</translation>
</message>
<message>
<source>Published</source>
<translation type="unfinished">Objavljeno</translation>
</message>
<message>
<source>Languages</source>
<translation type="unfinished">Jezici</translation>
</message>
<message>
<source>Error</source>
<translation type="unfinished">Greลกka</translation>
</message>
<message>
<source>The request sent to the server was too big to be accepted. This probably means that you uploaded a file which was too big. The maximum allowed request size is %max_size_string.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Copy subtree</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dashboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Path String</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Section</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>History</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The receiver has already received the maximum number of tipafriend mails the last hours</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You do not have enough rights to access the requested node</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Version preview</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have already sent a tipafriend mail to this receiver regarding '%1' content</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Publishing queue</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/content/copysubtree</name>
<message>
<source>Cannot publish object (ID = %1).</source>
<translation type="obsolete">Ne moลพe se objaviti objekat (ID = %1).</translation>
</message>
<message>
<source>Fatal error: cannot get subtree main node (ID = %1).</source>
<translation type="unfinished">Greลกka: ne moลพe se dobiti podstablo glavnog ฤvora (ID = %1).</translation>
</message>
<message>
<source>Fatal error: cannot get destination node (ID = %1).</source>
<translation type="unfinished">Greลกka: ne moลพe se dobiti ciljni ฤvor (ID = %1).</translation>
</message>
<message>
<source>Number of nodes of source subtree - %1</source>
<translation type="unfinished">Broj ฤvorova izvornog podstabla - %1</translation>
</message>
<message>
<source>Subtree was not copied.</source>
<translation type="unfinished">Podstablo nije kopirano.</translation>
</message>
<message>
<source>Number of copied nodes - %1</source>
<translation type="unfinished">Broj kopiranih ฤvorova - %1</translation>
</message>
<message>
<source>Number of copied contentobjects - %1</source>
<translation type="unfinished">Broj kopiranih objekata sadrลพaja - %1</translation>
</message>
<message>
<source>Cannot create instance of eZDB to fix local links (related objects).</source>
<translation type="unfinished">Ne mogu kreirati instancu eZDB da bi popravio lokalne linkove (povezane objekte).</translation>
</message>
<message>
<source>You are trying to copy a subtree that contains more than the maximum possible nodes for subtree copying. You can copy this subtree using Subtree Copy script.</source>
<translation type="unfinished">Pokuลกavate kopirati podstablo koje sadrลพi viลกe od maksimalnog dozvoljenog broja ฤvorova za kopiranje podstabla. Moลพete kopirati podstablo koristeฤi skriptu za kopiranje podstabla.</translation>
</message>
<message>
<source>Object (ID = %1) was not copied: you do not have permission to read the object.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Node (ID = %1) was not copied: you do not have permission to read object (ID = %2).</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Node (ID = %1) was not copied: parent node (ID = %2) was not copied.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Node (ID = %1) was not copied: you do not have permission to create.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object (ID = %1) was not copied: no one nodes of object was not copied.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Successfully DONE.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Cannot publish object (Name: %1, ID: %2).</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/content/removenode</name>
<message>
<source>child</source>
<comment>1 child</comment>
<translation type="unfinished">dete</translation>
</message>
<message>
<source>children</source>
<comment>several children</comment>
<translation type="unfinished">deca</translation>
</message>
</context>
<context>
<name>kernel/content/restore</name>
<message>
<source>Restore object</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/content/upload</name>
<message>
<source>The file %filename does not exist, cannot insert file.</source>
<translation type="unfinished">Fajl %filename ne potoji, ne mogu uneti fajl.</translation>
</message>
<message>
<source>No matching class identifier found.</source>
<translation type="unfinished">Nije pronaฤen identifikator klase.</translation>
</message>
<message>
<source>The class %class_identifier does not exist.</source>
<translation type="unfinished">Identifikator klase %class_identifier ne postoji.</translation>
</message>
<message>
<source>Was not able to figure out placement of object.</source>
<translation type="unfinished">Nemoguฤe odluฤivanje o smeลกtanju objekta.</translation>
</message>
<message>
<source>No configuration group in upload.ini for class identifier %class_identifier.</source>
<translation type="unfinished">Nema konfigracione grupe u upload.ini za identifikator klase %class_identifier.</translation>
</message>
<message>
<source>No matching file attribute found, cannot create content object without this.</source>
<translation type="unfinished">Nije pronaฤen atribut fajla, ne moลพe se kreirati objekat bez ovoga.</translation>
</message>
<message>
<source>No matching name attribute found, cannot create content object without this.</source>
<translation type="unfinished">Nije pronaฤen naziv atributa, no moลพe se kreirati objekat sadrลพaja bez ovoga.</translation>
</message>
<message>
<source>The attribute %class_identifier does not support regular file storage.</source>
<translation type="unfinished">Atribut %class_identifier ne podrลพava regularno smeลกtanje fajlova.</translation>
</message>
<message>
<source>The attribute %class_identifier does not support simple string storage.</source>
<translation type="unfinished">Atribut %class_identifier ne podrลพava jednostavno smeลกtanje stringova.</translation>
</message>
<message>
<source>The attribute %class_identifier does not support HTTP file storage.</source>
<translation type="unfinished">Atribut %class_identifier ne podrลพava HTTP smeลกtanje fajlova.</translation>
</message>
<message>
<source>Publishing of content object was halted.</source>
<translation type="unfinished">Objavljivanje objekta sadrลพaja je prekinuto.</translation>
</message>
<message>
<source>Publish process was cancelled.</source>
<translation type="unfinished">Proces objavljivanja je prekinut.</translation>
</message>
<message>
<source>A file is required for upload, no file were found.</source>
<translation type="unfinished">Fajl je potreban za upload, nije pronaฤen fajl.</translation>
</message>
<message>
<source>Expected a eZHTTPFile object but got nothing.</source>
<translation type="unfinished">Oฤekivan je objekat eZHTTPFile ali nije niลกta naฤeno.</translation>
</message>
<message>
<source>No HTTP file found, cannot fetch uploaded file.</source>
<translation type="unfinished">Nije naฤen HTTP fajl, ne mogu uฤitati uploadovan fajl.</translation>
</message>
<message>
<source>Permission denied</source>
<translation type="unfinished">Dozvola nije omoguฤena</translation>
</message>
<message>
<source>There was an error trying to instantiate content upload handler.</source>
<translation type="unfinished">Doลกlo je do greลกke kod pokuลกaja instanciranja hendlera za upload sadrลพaja.</translation>
</message>
<message>
<source>Could not find content upload handler '%handler_name'</source>
<translation type="unfinished">Nisam mogao naฤi hendler za upload sadrลพaja '%handler_name'</translation>
</message>
<message>
<source>The size of the uploaded file exceeds the limit set for this site: %1 bytes.</source>
<translation type="unfinished">Veliฤina slike premaลกuje zadano ograniฤenje: %1 bytova.</translation>
</message>
<message>
<source>The uploaded file size is above the maximum limit.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>A system error occured while writing the uploaded file.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/content/urlalias_global</name>
<message>
<source>Global URL aliases</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/content/urlalias_wildcard</name>
<message>
<source>URL wildcard aliases</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/contentclass</name>
<message>
<source>New %1</source>
<translation type="unfinished">Novo: %1</translation>
</message>
<message>
<source>Cannot remove class '%class_name':</source>
<translation type="unfinished">Ne mogu ukloniti klasu '%class_name':</translation>
</message>
<message>
<source>The class is used by a top-level node and cannot be removed.</source>
<translation type="unfinished">Klasu koristi glavni ฤvor i ne moลพe biti uklonjena.</translation>
</message>
</context>
<context>
<name>kernel/design</name>
<message>
<source>Template list</source>
<translation type="unfinished">Lista ลกablona</translation>
</message>
<message>
<source>Template view</source>
<translation type="unfinished">Prikaz ลกablona</translation>
</message>
<message>
<source>Create new template</source>
<translation type="unfinished">Kreiraj novi ลกablon</translation>
</message>
<message>
<source>Template edit</source>
<translation type="unfinished">Izmena ลกablona</translation>
</message>
<message>
<source>Toolbar list</source>
<translation type="unfinished">Lista alatne trake</translation>
</message>
</context>
<context>
<name>kernel/error</name>
<message>
<source>Error</source>
<translation type="unfinished">Greลกka</translation>
</message>
</context>
<context>
<name>kernel/ezinfo</name>
<message>
<source>Info</source>
<translation type="unfinished">Informacije</translation>
</message>
<message>
<source>About</source>
<translation type="unfinished">O</translation>
</message>
<message>
<source>Copyright</source>
<translation type="unfinished">Autorska prava</translation>
</message>
</context>
<context>
<name>kernel/form</name>
<message>
<source>Form processing</source>
<translation type="obsolete">Obrada formulara</translation>
</message>
</context>
<context>
<name>kernel/infocollector</name>
<message>
<source>Collected information</source>
<translation type="unfinished">Skupljene informacije</translation>
</message>
</context>
<context>
<name>kernel/navigationpart</name>
<message>
<source>Content structure</source>
<comment>Navigation part</comment>
<translation type="unfinished">Struktura sadrลพaja</translation>
</message>
<message>
<source>Media library</source>
<comment>Navigation part</comment>
<translation type="unfinished">Biblioteka medija</translation>
</message>
<message>
<source>User accounts</source>
<comment>Navigation part</comment>
<translation type="unfinished">Korisniฤki raฤuni</translation>
</message>
<message>
<source>Webshop</source>
<comment>Navigation part</comment>
<translation type="unfinished">Web prodavnica</translation>
</message>
<message>
<source>Design</source>
<comment>Navigation part</comment>
<translation type="unfinished">Dizajn</translation>
</message>
<message>
<source>Setup</source>
<comment>Navigation part</comment>
<translation type="unfinished">Setup</translation>
</message>
<message>
<source>My account</source>
<comment>Navigation part</comment>
<translation type="unfinished">Moj raฤun</translation>
</message>
</context>
<context>
<name>kernel/notification</name>
<message>
<source>Notification settings</source>
<translation type="unfinished">Podeลกavanja obaveลกtenja</translation>
</message>
</context>
<context>
<name>kernel/oauthadmin</name>
<message>
<source>oAuth admin</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit REST application</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Registered REST applications</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>REST application: %application_name%</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/package</name>
<message>
<source>Packages</source>
<translation type="unfinished">Paketi</translation>
</message>
<message>
<source>Upload</source>
<translation type="unfinished">Uฤitati</translation>
</message>
<message>
<source>Package information</source>
<translation type="unfinished">Podaci o paketu</translation>
</message>
<message>
<source>Package maintainer</source>
<translation type="unfinished">Odrลพavanje paketa</translation>
</message>
<message>
<source>Package changelog</source>
<translation type="unfinished">Informacije o izmenama paketa</translation>
</message>
<message>
<source>Package thumbnail</source>
<translation type="unfinished">Minijatura paketa</translation>
</message>
<message>
<source>Package name</source>
<translation type="unfinished">Ime paketa</translation>
</message>
<message>
<source>Package name is missing</source>
<translation type="unfinished">Nedostaje ime paketa</translation>
</message>
<message>
<source>A package named %packagename already exists, please give another name</source>
<translation type="unfinished">Paket pod imenom %packagename veฤ postoji, molimo dodelite drugo ime</translation>
</message>
<message>
<source>Summary</source>
<translation type="unfinished">Ukratko</translation>
</message>
<message>
<source>Summary is missing</source>
<translation type="unfinished">Nedostaje saลพetak</translation>
</message>
<message>
<source>Version</source>
<translation type="unfinished">Verzija</translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished">Ime</translation>
</message>
<message>
<source>You must enter a name for the changelog</source>
<translation type="unfinished">Morate uneti ime za datoteku izmena</translation>
</message>
<message>
<source>Changelog</source>
<translation type="unfinished">Datoteka izmena</translation>
</message>
<message>
<source>You must supply some text for the changelog entry</source>
<translation type="unfinished">Morate uneti neki tekst kao unos u datoteku izmena</translation>
</message>
<message>
<source>You must enter a name of the maintainer</source>
<translation type="unfinished">Morate uneti ime odrลพavaoca</translation>
</message>
<message>
<source>Content classes to include</source>
<translation type="unfinished">Klase sadrลพaja koje treba ukljuฤiti</translation>
</message>
<message>
<source>Content class export</source>
<translation type="unfinished">Izvoz sadrลพaja klasa</translation>
</message>
<message>
<source>Class list</source>
<translation type="unfinished">Lista klasa</translation>
</message>
<message>
<source>You must select at least one class for inclusion</source>
<translation type="unfinished">Morate izabrati barem jednu klasu </translation>
</message>
<message>
<source>CSS file</source>
<translation type="unfinished">CSS datoteka</translation>
</message>
<message>
<source>Image files</source>
<translation type="unfinished">Datoteke sa slikama</translation>
</message>
<message>
<source>Site style</source>
<translation type="unfinished">Stil stranice</translation>
</message>
<message>
<source>File did not have a .css suffix, this is most likely not a CSS file</source>
<translation type="unfinished">Datoteka nije imala nastavak .css pa se najverovatnije ne radi o CSS datoteci</translation>
</message>
<message>
<source>Create package</source>
<translation type="unfinished">Kreiraj paket</translation>
</message>
<message>
<source>Install</source>
<translation type="unfinished">Instaliraj</translation>
</message>
<message>
<source>Uninstall</source>
<translation type="unfinished">Ukloni</translation>
</message>
<message>
<source>Package %packagename already exists, cannot import the package</source>
<translation type="unfinished">Paket %packagename veฤ postoji, nije moguฤe uvesti paket</translation>
</message>
<message>
<source>Local</source>
<translation type="unfinished">Lokalan</translation>
</message>
<message>
<source>The version must only contain numbers (optionally followed by text) and must be delimited by dots (.), e.g. 1.0, 3.4.0beta1</source>
<translation type="unfinished">Verzija moลพe samo sadrลพati brojeve (koje moลพe pratiti tekst) te mora biti razgraniฤena taฤkama (.), npr. 1.0,
3.4.0beta1</translation>
</message>
<message>
<source>Content objects to include</source>
<translation type="unfinished">Objekti sadrลพaja koje treba ukljuฤiti</translation>
</message>
<message>
<source>Content object limits</source>
<translation type="unfinished">Ograniฤenja objekata sadrลพaja</translation>
</message>
<message>
<source>Content object export</source>
<translation type="unfinished">Izvoz objekata sadrลพaja</translation>
</message>
<message>
<source>Selected nodes</source>
<translation type="unfinished">Izabrani ฤvorovi</translation>
</message>
<message>
<source>You must select one or more node(s)/subtree(s) for export.</source>
<translation type="unfinished">Potrebno je izabrati jedan ili viลกe ฤvorova/podstabala za izvoz.</translation>
</message>
<message>
<source>You must choose one or more languages.</source>
<translation type="unfinished">Potrebno je izabrati jedan ili viลกe jezika.</translation>
</message>
<message>
<source>You must choose one or more site access.</source>
<translation type="unfinished">Potrebno je izabrati jedan ili viลกe pristupa stranici.</translation>
</message>
<message>
<source>CSS files</source>
<translation type="unfinished">CSS datoteke</translation>
</message>
<message>
<source>You must upload both CSS files</source>
<translation type="unfinished">Morate uฤitati obe CSS datoteke</translation>
</message>
<message>
<source>Content object %objectname</source>
<translation type="unfinished">Objekt sadrลพaja %objectname</translation>
</message>
<message>
<source>Site access mapping</source>
<translation type="unfinished">Podeลกavanja pristupa</translation>
</message>
<message>
<source>Top node placements</source>
<translation type="unfinished">Mesta glavnog ฤvora</translation>
</message>
<message>
<source>Content object import</source>
<translation type="unfinished">Uvoz objekata sadrลพaja</translation>
</message>
<message>
<source>Select parent nodes</source>
<translation type="unfinished">Izaberite roditeljske ฤvorove</translation>
</message>
<message>
<source>You must assign all nodes to new parent nodes.</source>
<translation type="unfinished">Potrebno je prikljuฤiti sve ฤvorove novim roditeljskim ฤvorovima.</translation>
</message>
<message>
<source>Lead</source>
<translation type="unfinished">Glavni</translation>
</message>
<message>
<source>Developer</source>
<translation type="unfinished">Developer</translation>
</message>
<message>
<source>Designer</source>
<translation type="unfinished">Dizajner</translation>
</message>
<message>
<source>Contributor</source>
<translation type="unfinished">Saradnik</translation>
</message>
<message>
<source>Tester</source>
<translation type="unfinished">Tester</translation>
</message>
<message>
<source>The package name %packagename is not valid, it can only contain characters in the range a-z, 0-9 and underscore.</source>
<translation type="unfinished">Naziv paketa %packagename nije ispravan, naziv sme sadrลพati samo karaktere od a-z, 0-9 i donju crtu.</translation>
</message>
<message>
<source>Remove</source>
<translation type="unfinished">Ukloni</translation>
</message>
<message>
<source>Email</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You must enter an email for the changelog</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You must enter an email address of the maintainer</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Extensions to include</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Extension export</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Extension list</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You must select at least one extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Content class '%classname' (%classidentifier)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Removing class '%classname' will result in the removal of %objectscount object(s) of this class and all their sub-items. Are you sure you want to uninstall it?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Class '%classname' already exists.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Replace existing class</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(Warning! $objectsCount content object(s) and their sub-items will be removed)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Skip installing this class</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Keep existing and create a new one</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%number content objects</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object '%objectname' has been modified since installation. Are you sure you want to remove it?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Keep object</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Object '%objectname' has %childrencount sub-item(s) that will be removed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove object and its sub-item(s)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Extension '%extensionname'</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Package contains an invalid extension name: %extensionname</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Extension '%extensionname' already exists.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Replace extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Skip</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Install script: %description</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Advanced options</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The package name %packagename is invalid, cannot import the package</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/pdf</name>
<message>
<source>PDF Export</source>
<translation type="unfinished">PDF izvoz</translation>
</message>
<message>
<source>An export with such filename already exists.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/pdfexport</name>
<message>
<source>New PDF Export</source>
<translation type="unfinished">Novi PDF izvoz</translation>
</message>
</context>
<context>
<name>kernel/reference</name>
<message>
<source>Reference documentation</source>
<translation type="obsolete">Referentna dokumentacija</translation>
</message>
</context>
<context>
<name>kernel/role</name>
<message>
<source>Role list</source>
<translation type="unfinished">Lista uloga</translation>
</message>
<message>
<source>Editing policy</source>
<translation type="unfinished">Izmena politike </translation>
</message>
<message>
<source>Limit on section</source>
<translation type="unfinished">Ograniฤi na segmentu</translation>
</message>
<message>
<source>Create new policy, step 2: select function</source>
<translation type="unfinished">Kreiranje nove politike, korak 2: izaberi funkciju</translation>
</message>
<message>
<source>Create new policy, step three: set function limitations</source>
<translation type="unfinished">Kreiranje nove politike, korak treฤi: odredi ograniฤenja funkcije</translation>
</message>
<message>
<source>Create new policy, step two: select function</source>
<translation type="unfinished">Kreiranje nove politike, korak drugi: izaberi funkciju</translation>
</message>
<message>
<source>Create new policy, step one: select module</source>
<translation type="unfinished">Kreiranje nove politike, korak prvi: izaberi modul</translation>
</message>
</context>
<context>
<name>kernel/role/edit</name>
<message>
<source>New role</source>
<translation type="unfinished">Nova uloga</translation>
</message>
<message>
<source>Copy of %rolename</source>
<translation type="unfinished">Kopija uloge %rolename</translation>
</message>
</context>
<context>
<name>kernel/rss</name>
<message>
<source>Really Simple Syndication</source>
<translation type="unfinished">RSS</translation>
</message>
<message>
<source>New RSS Export</source>
<translation type="unfinished">Novi RSS izvoz</translation>
</message>
<message>
<source>New RSS Import</source>
<translation type="unfinished">Novi RSS uvoz</translation>
</message>
</context>
<context>
<name>kernel/rss/edit_export</name>
<message>
<source>Selected class does not exist</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid selection for title class %1 does not have attribute "%2"</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid selection for description class %1 does not have attribute "%2"</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid selection for category class %1 does not have attribute "%2"</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/search</name>
<message>
<source>Search stats</source>
<translation type="unfinished">Statistike pretraลพivanja</translation>
</message>
</context>
<context>
<name>kernel/section</name>
<message>
<source>Edit Section</source>
<translation type="obsolete">Izmeni odlomak</translation>
</message>
<message>
<source>Sections</source>
<translation type="unfinished">Segmenti</translation>
</message>
<message>
<source>View section</source>
<translation type="obsolete">Prikaลพi segment</translation>
</message>
<message>
<source>New section</source>
<translation type="unfinished">Novi segment</translation>
</message>
<message>
<source>Assign section</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/setup</name>
<message>
<source>Cache admin</source>
<translation type="unfinished">Administracija cache-a</translation>
</message>
<message>
<source>Template operator wizard</source>
<translation type="unfinished">ฤarobnjak za ลกablone</translation>
</message>
<message>
<source>Extension configuration</source>
<translation type="unfinished">Konfiguracija ekstenzija</translation>
</message>
<message>
<source>System information</source>
<translation type="unfinished">Podaci o sistemu</translation>
</message>
<message>
<source>Rapid Application Development</source>
<translation type="unfinished">Rapid Application Development</translation>
</message>
<message>
<source>Setup menu</source>
<translation type="unfinished">Setup menu</translation>
</message>
<message>
<source>System Upgrade</source>
<translation type="unfinished">Unapreฤivanje sistema</translation>
</message>
<message>
<source>Session admin</source>
<translation type="unfinished">Administrator sesija</translation>
</message>
<message>
<source>File %1 does not exist. You should copy it from the recent eZ Publish distribution.</source>
<translation type="unfinished">Datoteka %1 ne postoji. Moraลก je kopirati sa zadnje eZ Publish distribucije.</translation>
</message>
<message>
<source>Datatype wizard</source>
<translation type="unfinished">Datatip ฤarobnjak</translation>
</message>
</context>
<context>
<name>kernel/shop</name>
<message>
<source>Basket</source>
<translation type="unfinished">Korpa</translation>
</message>
<message>
<source>Confirm order</source>
<translation type="unfinished">Potvrdi narudลพbu</translation>
</message>
<message>
<source>Discount group</source>
<translation type="unfinished">Grupa popusta</translation>
</message>
<message>
<source>Group view of discount rule</source>
<translation type="unfinished">Grupni prikaz discount uloge</translation>
</message>
<message>
<source>Editing rule</source>
<translation type="unfinished">Pravilo editovanja</translation>
</message>
<message>
<source>Order list</source>
<translation type="unfinished">Lista narudลพbi</translation>
</message>
<message>
<source>Enter account information</source>
<translation type="unfinished">Unesi podatke o raฤunu</translation>
</message>
<message>
<source>VAT types</source>
<translation type="unfinished">Vrste PDV-a</translation>
</message>
<message>
<source>Checkout</source>
<translation type="unfinished">Provera</translation>
</message>
<message>
<source>Customer list</source>
<translation type="unfinished">Lista klijenata</translation>
</message>
<message>
<source>Remove order</source>
<translation type="unfinished">Ukloni narudลพbu</translation>
</message>
<message>
<source>Statistics</source>
<translation type="unfinished">Statistika</translation>
</message>
<message>
<source>VAT type</source>
<translation type="unfinished">Vrsta PDV-a</translation>
</message>
<message>
<source>Classes</source>
<translation type="unfinished">Klase</translation>
</message>
<message>
<source>Any class</source>
<translation type="unfinished">Sve klase</translation>
</message>
<message>
<source>in sections</source>
<translation type="unfinished">u segmentima</translation>
</message>
<message>
<source>in any section</source>
<translation type="unfinished">u svim segmentima</translation>
</message>
<message>
<source>Products</source>
<translation type="unfinished">Proizvodi</translation>
</message>
<message>
<source>Any product</source>
<translation type="unfinished">Svi proizvodi</translation>
</message>
<message>
<source>Order status</source>
<translation type="unfinished">Status narudลพbe</translation>
</message>
<message>
<source>Undefined</source>
<translation type="unfinished">Nedefinisano</translation>
</message>
<message>
<source>The confirm order operation was canceled. Try to checkout again.</source>
<translation type="unfinished">Potvrda narudลพbe je prekinuta. Pokuลกajte da naruฤite ponovo.</translation>
</message>
<message>
<source>Order #%order_id</source>
<translation type="unfinished">Narudลพba #%order_id</translation>
</message>
<message>
<source>New order status was successfully added.</source>
<translation type="unfinished">Novi status narudลพbe je uspeลกno dodan.</translation>
</message>
<message>
<source>Changes to order status were successfully stored.</source>
<translation type="unfinished">Promene statusa narudลพbe su uspeลกno saฤuvane.</translation>
</message>
<message>
<source>Selected order statuses were successfully removed.</source>
<translation type="unfinished">Izabrani statusi narudลพbi su uspeลกno uklonjeni.</translation>
</message>
<message>
<source>Internal orders cannot be removed.</source>
<translation type="unfinished">Interne narudลพbe ne mogu biti uklonjene.</translation>
</message>
<message>
<source>Status</source>
<translation type="unfinished">Status</translation>
</message>
<message>
<source>Customer order view</source>
<translation type="unfinished">Pregled klijentske narudลพbe</translation>
</message>
<message>
<source>Any</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'Autorates' were retrieved successfully</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown body format in HTTP response. Expected 'text/xml'</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid HTTP response</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unable to send http request: %1:%2/%3</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>eZExchangeRatesUpdateHandler: you should reimplement 'requestRates' method</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'Auto' prices were updated successfully.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'Auto' rates were updated successfully.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unable to calculate cross-rate for currency-pair '%1'/'%2'</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unable to determine currency for retrieved rates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Retrieved empty list of rates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unable to create handler to update auto rates.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changes were stored successfully.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Available currency list</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit currency</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create new currency</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'%value' is not a valid custom rate value (positive number expected)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>'%value' is not a valid rate_factor value (positive number expected)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error checking out</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unable to calculate VAT percentage because your country is unknown. You can either fill country manually in your account information (if you are a registered user) or contact site administrator.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Preferred currency</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Products overview</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Wishlist</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/shop/classes/ezcurrencydata</name>
<message>
<source>Invalid characters in currency code.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Currency already exists.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/shop/discountgroup</name>
<message>
<source>New discount group</source>
<translation type="unfinished">Nova grupa popusta</translation>
</message>
<message>
<source>New Discount Rule</source>
<translation type="unfinished">Novo pravilo popusta</translation>
</message>
</context>
<context>
<name>kernel/shop/editvatrule</name>
<message>
<source>Invalid data entered</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose a country.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Choose a VAT type.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Conflicting rule</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Default rule for any country already exists.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Rule not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit VAT charging rule</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create new VAT charging rule</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/shop/productcategories</name>
<message>
<source>Product category</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Empty category names are not allowed (corrected).</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Product categories</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/shop/vatrules</name>
<message>
<source>No default rule found. Please add rule having "Any" country and "Any" category.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>VAT rules</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/shop/vattype</name>
<message>
<source>Empty VAT type names are not allowed (corrected).</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Wrong VAT percentage (corrected).</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/state</name>
<message>
<source>Assign</source>
<translation type="unfinished">Dodeli</translation>
</message>
<message>
<source>Groups</source>
<translation type="unfinished">Grupe</translation>
</message>
<message>
<source>New group</source>
<translation type="unfinished">Nova grupa</translation>
</message>
<message>
<source>Group edit</source>
<translation type="unfinished">Izmena grupe</translation>
</message>
<message>
<source>State</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/state/edit</name>
<message>
<source>Identifier: input required</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier: invalid, it can only consist of characters in the range a-z, 0-9 and underscore.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier: invalid, maximum %max characters allowed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier: a content object state group with this identifier already exists, please give another identifier</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%language_name: this language is the default but neither name or description were provided for this language</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translations: you need to add at least one localization</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translations: there are multiple localizations but you did not specify which is the default one</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Identifier: identifiers starting with "ez" are reserved.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name in %language_name is too long. Maximum 45 characters allowed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Name in %language_name: input required</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/trigger</name>
<message>
<source>Trigger</source>
<translation type="unfinished">Obaraฤ</translation>
</message>
<message>
<source>List</source>
<translation type="unfinished">Lista</translation>
</message>
</context>
<context>
<name>kernel/url</name>
<message>
<source>URL</source>
<translation type="unfinished">URL</translation>
</message>
<message>
<source>List</source>
<translation type="unfinished">Lista</translation>
</message>
<message>
<source>View</source>
<translation type="unfinished">Prikaz</translation>
</message>
<message>
<source>URL edit</source>
<translation type="unfinished">Izmena URL-a</translation>
</message>
</context>
<context>
<name>kernel/user</name>
<message>
<source>User</source>
<translation type="unfinished">Korisnik</translation>
</message>
<message>
<source>Login</source>
<translation type="unfinished">Prijava</translation>
</message>
<message>
<source>Change password</source>
<translation type="unfinished">Promeni lozinku</translation>
</message>
<message>
<source>Register</source>
<translation type="unfinished">Registracija</translation>
</message>
<message>
<source>Forgot password</source>
<translation type="unfinished">Zaboravljena lozinka</translation>
</message>
<message>
<source>User profile</source>
<translation type="unfinished">Profil korisnika</translation>
</message>
<message>
<source>Setting</source>
<translation type="unfinished">Podeลกavanje</translation>
</message>
<message>
<source>Activate</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Success</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>oAuth</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>authorization</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/user/register</name>
<message>
<source>Registration info</source>
<translation type="unfinished">Podaci o registraciji</translation>
</message>
<message>
<source>New user registered</source>
<translation type="unfinished">Registrovan novi korisnik</translation>
</message>
<message>
<source>User registration approved</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/workflow</name>
<message>
<source>Edit workflow</source>
<translation type="unfinished">Izmeni radni tok</translation>
</message>
<message>
<source>Workflow</source>
<translation type="unfinished">Radni tok</translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished">Izmena</translation>
</message>
<message>
<source>Edit workflow group</source>
<translation type="unfinished">Izmeni grupu radnog toka</translation>
</message>
<message>
<source>Group edit</source>
<translation type="unfinished">Izmena grupe</translation>
</message>
<message>
<source>Workflow group list</source>
<translation type="unfinished">Grupna lista radnog toka</translation>
</message>
<message>
<source>Group list</source>
<translation type="unfinished">Lista grupe</translation>
</message>
<message>
<source>Workflow list</source>
<translation type="unfinished">Popis radnog dogaฤaja</translation>
</message>
<message>
<source>Workflow list of group</source>
<translation type="unfinished">Popis radnog dogaฤaja grupe</translation>
</message>
<message>
<source>List</source>
<translation type="unfinished">Lista</translation>
</message>
<message>
<source>View</source>
<translation type="unfinished">Prikaz</translation>
</message>
<message>
<source>You have to have at least one group that the workflow belongs to!</source>
<translation type="unfinished">Morate imati barem jednu grupu kojoj radni tok pripada!</translation>
</message>
<message>
<source>Process list</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/workflow/edit</name>
<message>
<source>New Workflow</source>
<translation type="unfinished">Novi radni tok</translation>
</message>
</context>
<context>
<name>kernel/workflow/event</name>
<message>
<source>Event</source>
<translation type="unfinished">Dogaฤaj</translation>
</message>
<message>
<source>Approve</source>
<translation type="unfinished">Odobri</translation>
</message>
<message>
<source>Multiplexer</source>
<translation type="unfinished">Multiplexer</translation>
</message>
<message>
<source>Simple shipping</source>
<translation type="unfinished">Jednostavna otprema</translation>
</message>
<message>
<source>Wait until date</source>
<translation type="unfinished">Priฤekajte do </translation>
</message>
<message>
<source>Payment Gateway</source>
<translation type="unfinished">gateway za plaฤanje</translation>
</message>
<message>
<source>Finish User Registration</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>kernel/workflow/group</name>
<message>
<source>Group</source>
<translation type="unfinished">Grupa</translation>
</message>
</context>
<context>
<name>kernel/workflow/groupedit</name>
<message>
<source>New WorkflowGroup</source>
<translation type="unfinished">Nova grupa radnih tokova</translation>
</message>
</context>
<context>
<name>lib/ezpdf/classes</name>
<message>
<source>Contents</source>
<comment>Table of contents</comment>
<translation type="unfinished">Sadrลพaj</translation>
</message>
<message>
<source>Index</source>
<comment>Keyword index name</comment>
<translation type="unfinished">Indeks</translation>
</message>
</context>
<context>
<name>lib/eztemplate</name>
<message>
<source>Some template errors occurred, see debug for more information.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>lib/template</name>
<message>
<source>The maximum nesting level of %max has been reached. The execution is stopped to avoid infinite recursion.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>pdf/edit</name>
<message>
<source>PDF Export</source>
<translation type="unfinished">Izvoz PDF-a</translation>
</message>
</context>
<context>
<name>settings/edit</name>
<message>
<source>Settings</source>
<translation type="unfinished">Podeลกavanja </translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished">Izmena</translation>
</message>
</context>
<context>
<name>settings/view</name>
<message>
<source>Settings</source>
<translation type="unfinished">Podeลกavanja</translation>
</message>
<message>
<source>View</source>
<translation type="unfinished">Prikaz</translation>
</message>
</context>
<context>
<name>shop</name>
<message>
<source>Remove orders</source>
<translation type="unfinished">Ukloni naredbe</translation>
</message>
</context>
<context>
<name>simplified_treemenu/show_simplified_menu</name>
<message>
<source>Node ID: %node_id Visibility: %visibility</source>
<translation>ฤvor ID: %node_id Vidljivost: %visibility</translation>
</message>
</context>
</TS>
| gpl-2.0 |
madisodr/legacy-core | src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp | 1632 | /*
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This placeholder for the instance is needed for dungeon finding to be able
to give credit after the boss defined in lastEncounterDungeon is killed.
Without it, the party doing random dungeon won't get satchel of spoils and
gets instead the deserter debuff.
*/
#include "ScriptMgr.h"
#include "InstanceScript.h"
class instance_the_underbog : public InstanceMapScript
{
public:
instance_the_underbog() : InstanceMapScript("instance_the_underbog", 546) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_the_underbog_InstanceMapScript(map);
}
struct instance_the_underbog_InstanceMapScript : public InstanceScript
{
instance_the_underbog_InstanceMapScript(Map* map) : InstanceScript(map) { }
};
};
void AddSC_instance_the_underbog()
{
new instance_the_underbog();
}
| gpl-2.0 |
tuxis-ie/nsedit | jquery-ui/tests/unit/position/position_core.js | 14514 | (function( $ ) {
var win = $( window ),
scrollTopSupport = function() {
var support = win.scrollTop( 1 ).scrollTop() === 1;
win.scrollTop( 0 );
scrollTopSupport = function() {
return support;
};
return support;
};
module( "position", {
setup: function() {
win.scrollTop( 0 ).scrollLeft( 0 );
}
});
TestHelpers.testJshint( "position" );
test( "my, at, of", function() {
expect( 4 );
$( "#elx" ).position({
my: "left top",
at: "left top",
of: "#parentx",
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 40, left: 40 }, "left top, left top" );
$( "#elx" ).position({
my: "left top",
at: "left bottom",
of: "#parentx",
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 60, left: 40 }, "left top, left bottom" );
$( "#elx" ).position({
my: "left",
at: "bottom",
of: "#parentx",
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 55, left: 50 }, "left, bottom" );
$( "#elx" ).position({
my: "left foo",
at: "bar baz",
of: "#parentx",
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 45, left: 50 }, "left foo, bar baz" );
});
test( "multiple elements", function() {
expect( 3 );
var elements = $( "#el1, #el2" ),
result = elements.position({
my: "left top",
at: "left bottom",
of: "#parent",
collision: "none"
}),
expected = { top: 10, left: 4 };
deepEqual( result, elements );
elements.each(function() {
deepEqual( $( this ).offset(), expected );
});
});
test( "positions", function() {
expect( 18 );
var offsets = {
left: 0,
center: 3,
right: 6,
top: 0,
bottom: 6
},
start = { left: 4, top: 4 },
el = $( "#el1" );
$.each( [ 0, 1 ], function( my ) {
$.each( [ "top", "center", "bottom" ], function( vindex, vertical ) {
$.each( [ "left", "center", "right" ], function( hindex, horizontal ) {
var _my = my ? horizontal + " " + vertical : "left top",
_at = !my ? horizontal + " " + vertical : "left top";
el.position({
my: _my,
at: _at,
of: "#parent",
collision: "none"
});
deepEqual( el.offset(), {
top: start.top + offsets[ vertical ] * (my ? -1 : 1),
left: start.left + offsets[ horizontal ] * (my ? -1 : 1)
}, "Position via " + QUnit.jsDump.parse({ my: _my, at: _at }) );
});
});
});
});
test( "of", function() {
expect( 9 + (scrollTopSupport() ? 1 : 0) );
var event;
$( "#elx" ).position({
my: "left top",
at: "left top",
of: "#parentx",
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 40, left: 40 }, "selector" );
$( "#elx" ).position({
my: "left top",
at: "left bottom",
of: $( "#parentx"),
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 60, left: 40 }, "jQuery object" );
$( "#elx" ).position({
my: "left top",
at: "left top",
of: $( "#parentx" )[ 0 ],
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 40, left: 40 }, "DOM element" );
$( "#elx" ).position({
my: "right bottom",
at: "right bottom",
of: document,
collision: "none"
});
deepEqual( $( "#elx" ).offset(), {
top: $( document ).height() - 10,
left: $( document ).width() - 10
}, "document" );
$( "#elx" ).position({
my: "right bottom",
at: "right bottom",
of: $( document ),
collision: "none"
});
deepEqual( $( "#elx" ).offset(), {
top: $( document ).height() - 10,
left: $( document ).width() - 10
}, "document as jQuery object" );
win.scrollTop( 0 );
$( "#elx" ).position({
my: "right bottom",
at: "right bottom",
of: window,
collision: "none"
});
deepEqual( $( "#elx" ).offset(), {
top: win.height() - 10,
left: win.width() - 10
}, "window" );
$( "#elx" ).position({
my: "right bottom",
at: "right bottom",
of: win,
collision: "none"
});
deepEqual( $( "#elx" ).offset(), {
top: win.height() - 10,
left: win.width() - 10
}, "window as jQuery object" );
if ( scrollTopSupport() ) {
win.scrollTop( 500 ).scrollLeft( 200 );
$( "#elx" ).position({
my: "right bottom",
at: "right bottom",
of: window,
collision: "none"
});
deepEqual( $( "#elx" ).offset(), {
top: win.height() + 500 - 10,
left: win.width() + 200 - 10
}, "window, scrolled" );
win.scrollTop( 0 ).scrollLeft( 0 );
}
event = $.extend( $.Event( "someEvent" ), { pageX: 200, pageY: 300 } );
$( "#elx" ).position({
my: "left top",
at: "left top",
of: event,
collision: "none"
});
deepEqual( $( "#elx" ).offset(), {
top: 300,
left: 200
}, "event - left top, left top" );
event = $.extend( $.Event( "someEvent" ), { pageX: 400, pageY: 600 } );
$( "#elx" ).position({
my: "left top",
at: "right bottom",
of: event,
collision: "none"
});
deepEqual( $( "#elx" ).offset(), {
top: 600,
left: 400
}, "event - left top, right bottom" );
});
test( "offsets", function() {
expect( 9 );
var offset;
$( "#elx" ).position({
my: "left top",
at: "left+10 bottom+10",
of: "#parentx",
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 70, left: 50 }, "offsets in at" );
$( "#elx" ).position({
my: "left+10 top-10",
at: "left bottom",
of: "#parentx",
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 50, left: 50 }, "offsets in my" );
$( "#elx" ).position({
my: "left top",
at: "left+50% bottom-10%",
of: "#parentx",
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 58, left: 50 }, "percentage offsets in at" );
$( "#elx" ).position({
my: "left-30% top+50%",
at: "left bottom",
of: "#parentx",
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 65, left: 37 }, "percentage offsets in my" );
$( "#elx" ).position({
my: "left-30.001% top+50.0%",
at: "left bottom",
of: "#parentx",
collision: "none"
});
offset = $( "#elx" ).offset();
equal( Math.round( offset.top ), 65, "decimal percentage offsets in my" );
equal( Math.round( offset.left ), 37, "decimal percentage offsets in my" );
$( "#elx" ).position({
my: "left+10.4 top-10.6",
at: "left bottom",
of: "#parentx",
collision: "none"
});
offset = $( "#elx" ).offset();
equal( Math.round( offset.top ), 49, "decimal offsets in my" );
equal( Math.round( offset.left ), 50, "decimal offsets in my" );
$( "#elx" ).position({
my: "left+right top-left",
at: "left-top bottom-bottom",
of: "#parentx",
collision: "none"
});
deepEqual( $( "#elx" ).offset(), { top: 60, left: 40 }, "invalid offsets" );
});
test( "using", function() {
expect( 10 );
var count = 0,
elems = $( "#el1, #el2" ),
of = $( "#parentx" ),
expectedPosition = { top: 60, left: 60 },
expectedFeedback = {
target: {
element: of,
width: 20,
height: 20,
left: 40,
top: 40
},
element: {
width: 6,
height: 6,
left: 60,
top: 60
},
horizontal: "left",
vertical: "top",
important: "vertical"
},
originalPosition = elems.position({
my: "right bottom",
at: "rigt bottom",
of: "#parentx",
collision: "none"
}).offset();
elems.position({
my: "left top",
at: "center+10 bottom",
of: "#parentx",
using: function( position, feedback ) {
deepEqual( this, elems[ count ], "correct context for call #" + count );
deepEqual( position, expectedPosition, "correct position for call #" + count );
deepEqual( feedback.element.element[ 0 ], elems[ count ] );
delete feedback.element.element;
deepEqual( feedback, expectedFeedback );
count++;
}
});
elems.each(function() {
deepEqual( $( this ).offset(), originalPosition, "elements not moved" );
});
});
function collisionTest( config, result, msg ) {
var elem = $( "#elx" ).position( $.extend({
my: "left top",
at: "right bottom",
of: "#parent"
}, config ) );
deepEqual( elem.offset(), result, msg );
}
function collisionTest2( config, result, msg ) {
collisionTest( $.extend({
my: "right bottom",
at: "left top"
}, config ), result, msg );
}
test( "collision: fit, no collision", function() {
expect( 2 );
collisionTest({
collision: "fit"
}, {
top: 10,
left: 10
}, "no offset" );
collisionTest({
collision: "fit",
at: "right+2 bottom+3"
}, {
top: 13,
left: 12
}, "with offset" );
});
// Currently failing in IE8 due to the iframe used by TestSwarm
if ( !/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ) ) {
test( "collision: fit, collision", function() {
expect( 2 + (scrollTopSupport() ? 1 : 0) );
collisionTest2({
collision: "fit"
}, {
top: 0,
left: 0
}, "no offset" );
collisionTest2({
collision: "fit",
at: "left+2 top+3"
}, {
top: 0,
left: 0
}, "with offset" );
if ( scrollTopSupport() ) {
win.scrollTop( 300 ).scrollLeft( 200 );
collisionTest({
collision: "fit"
}, {
top: 300,
left: 200
}, "window scrolled" );
win.scrollTop( 0 ).scrollLeft( 0 );
}
});
}
test( "collision: flip, no collision", function() {
expect( 2 );
collisionTest({
collision: "flip"
}, {
top: 10,
left: 10
}, "no offset" );
collisionTest({
collision: "flip",
at: "right+2 bottom+3"
}, {
top: 13,
left: 12
}, "with offset" );
});
test( "collision: flip, collision", function() {
expect( 2 );
collisionTest2({
collision: "flip"
}, {
top: 10,
left: 10
}, "no offset" );
collisionTest2({
collision: "flip",
at: "left+2 top+3"
}, {
top: 7,
left: 8
}, "with offset" );
});
test( "collision: flipfit, no collision", function() {
expect( 2 );
collisionTest({
collision: "flipfit"
}, {
top: 10,
left: 10
}, "no offset" );
collisionTest({
collision: "flipfit",
at: "right+2 bottom+3"
}, {
top: 13,
left: 12
}, "with offset" );
});
test( "collision: flipfit, collision", function() {
expect( 2 );
collisionTest2({
collision: "flipfit"
}, {
top: 10,
left: 10
}, "no offset" );
collisionTest2({
collision: "flipfit",
at: "left+2 top+3"
}, {
top: 7,
left: 8
}, "with offset" );
});
test( "collision: none, no collision", function() {
expect( 2 );
collisionTest({
collision: "none"
}, {
top: 10,
left: 10
}, "no offset" );
collisionTest({
collision: "none",
at: "right+2 bottom+3"
}, {
top: 13,
left: 12
}, "with offset" );
});
test( "collision: none, collision", function() {
expect( 2 );
collisionTest2({
collision: "none"
}, {
top: -6,
left: -6
}, "no offset" );
collisionTest2({
collision: "none",
at: "left+2 top+3"
}, {
top: -3,
left: -4
}, "with offset" );
});
test( "collision: fit, with margin", function() {
expect( 2 );
$( "#elx" ).css({
marginTop: 6,
marginLeft: 4
});
collisionTest({
collision: "fit"
}, {
top: 10,
left: 10
}, "right bottom" );
collisionTest2({
collision: "fit"
}, {
top: 6,
left: 4
}, "left top" );
});
test( "collision: flip, with margin", function() {
expect( 3 );
$( "#elx" ).css({
marginTop: 6,
marginLeft: 4
});
collisionTest({
collision: "flip"
}, {
top: 10,
left: 10
}, "left top" );
collisionTest2({
collision: "flip"
}, {
top: 10,
left: 10
}, "right bottom" );
collisionTest2({
collision: "flip",
my: "left top"
}, {
top: 0,
left: 4
}, "right bottom" );
});
test( "within", function() {
expect( 7 );
collisionTest({
within: document
}, {
top: 10,
left: 10
}, "within document" );
collisionTest({
within: "#within",
collision: "fit"
}, {
top: 4,
left: 2
}, "fit - right bottom" );
collisionTest2({
within: "#within",
collision: "fit"
}, {
top: 2,
left: 0
}, "fit - left top" );
collisionTest({
within: "#within",
collision: "flip"
}, {
top: 10,
left: -6
}, "flip - right bottom" );
collisionTest2({
within: "#within",
collision: "flip"
}, {
top: 10,
left: -6
}, "flip - left top" );
collisionTest({
within: "#within",
collision: "flipfit"
}, {
top: 4,
left: 0
}, "flipfit - right bottom" );
collisionTest2({
within: "#within",
collision: "flipfit"
}, {
top: 4,
left: 0
}, "flipfit - left top" );
});
test( "with scrollbars", function() {
expect( 4 );
$( "#scrollx" ).css({
width: 100,
height: 100,
left: 0,
top: 0
});
collisionTest({
of: "#scrollx",
collision: "fit",
within: "#scrollx"
}, {
top: 90,
left: 90
}, "visible" );
$( "#scrollx" ).css({
overflow: "scroll"
});
var scrollbarInfo = $.position.getScrollInfo( $.position.getWithinInfo( $( "#scrollx" ) ) );
collisionTest({
of: "#scrollx",
collision: "fit",
within: "#scrollx"
}, {
top: 90 - scrollbarInfo.height,
left: 90 - scrollbarInfo.width
}, "scroll" );
$( "#scrollx" ).css({
overflow: "auto"
});
collisionTest({
of: "#scrollx",
collision: "fit",
within: "#scrollx"
}, {
top: 90,
left: 90
}, "auto, no scroll" );
$( "#scrollx" ).css({
overflow: "auto"
}).append( $("<div>").height(300).width(300) );
collisionTest({
of: "#scrollx",
collision: "fit",
within: "#scrollx"
}, {
top: 90 - scrollbarInfo.height,
left: 90 - scrollbarInfo.width
}, "auto, with scroll" );
});
test( "fractions", function() {
expect( 1 );
$( "#fractions-element" ).position({
my: "left top",
at: "left top",
of: "#fractions-parent",
collision: "none"
});
deepEqual( $( "#fractions-element" ).offset(), $( "#fractions-parent" ).offset(), "left top, left top" );
});
test( "bug #5280: consistent results (avoid fractional values)", function() {
expect( 1 );
var wrapper = $( "#bug-5280" ),
elem = wrapper.children(),
offset1 = elem.position({
my: "center",
at: "center",
of: wrapper,
collision: "none"
}).offset(),
offset2 = elem.position({
my: "center",
at: "center",
of: wrapper,
collision: "none"
}).offset();
deepEqual( offset1, offset2 );
});
test( "bug #8710: flip if flipped position fits more", function() {
expect( 3 );
// Positions a 10px tall element within 99px height at top 90px.
collisionTest({
within: "#bug-8710-within-smaller",
of: "#parentx",
collision: "flip",
at: "right bottom+30"
}, {
top: 0,
left: 60
}, "flip - top fits all" );
// Positions a 10px tall element within 99px height at top 92px.
collisionTest({
within: "#bug-8710-within-smaller",
of: "#parentx",
collision: "flip",
at: "right bottom+32"
}, {
top: -2,
left: 60
}, "flip - top fits more" );
// Positions a 10px tall element within 101px height at top 92px.
collisionTest({
within: "#bug-8710-within-bigger",
of: "#parentx",
collision: "flip",
at: "right bottom+32"
}, {
top: 92,
left: 60
}, "no flip - top fits less" );
});
}( jQuery ) );
| gpl-2.0 |
NorthFacing/step-by-Java | java-base/sourceCodeBak/Thinking in Java/initialization/VarArgs.java | 601 | //: initialization/VarArgs.java
// Using array syntax to create variable argument lists.
class A {
}
public class VarArgs {
static void printArray(Object[] args) {
for (Object obj : args)
System.out.print(obj + " ");
System.out.println();
}
public static void main(String[] args) {
printArray(new Object[]{
new Integer(47), new Float(3.14), new Double(11.11)
});
printArray(new Object[]{"one", "two", "three"});
printArray(new Object[]{new A(), new A(), new A()});
}
} /* Output: (Sample)
47 3.14 11.11
one two three
A@1a46e30 A@3e25a5 A@19821f
*///:~
| gpl-2.0 |
smarr/Truffle | sdk/src/org.graalvm.collections/src/org/graalvm/collections/EconomicMapImpl.java | 29404 | /*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
*
* Subject to the condition set forth below, permission is hereby granted to any
* person obtaining a copy of this software, associated documentation and/or
* data (collectively the "Software"), free of charge and under any and all
* copyright rights in the Software, and any and all patent rights owned or
* freely licensable by each licensor hereunder covering either (i) the
* unmodified Software as contributed to or provided by such licensor, or (ii)
* the Larger Works (as defined below), to deal in both
*
* (a) the Software, and
*
* (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
* one is included with the Software each a "Larger Work" to which the Software
* is contributed by such licensors),
*
* without restriction, including without limitation the rights to copy, create
* derivative works of, display, perform, and distribute the Software and make,
* use, sell, offer for sale, import, export, have made, and have sold the
* Software and the Larger Work(s), and to sublicense the foregoing rights on
* either these or other terms.
*
* This license is subject to the following condition:
*
* The above copyright notice and either this complete permission notice or at a
* minimum a reference to the UPL must be included in all copies or substantial
* portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.graalvm.collections;
import java.util.Iterator;
import java.util.function.BiFunction;
/**
* Implementation of a map with a memory-efficient structure that always preserves insertion order
* when iterating over keys. Particularly efficient when number of entries is 0 or smaller equal
* {@link #INITIAL_CAPACITY} or smaller 256.
*
* The key/value pairs are kept in an expanding flat object array with keys at even indices and
* values at odd indices. If the map has smaller or equal to {@link #HASH_THRESHOLD} entries, there
* is no additional hash data structure and comparisons are done via linear checking of the
* key/value pairs. For the case where the equality check is particularly cheap (e.g., just an
* object identity comparison), this limit below which the map is without an actual hash table is
* higher and configured at {@link #HASH_THRESHOLD_IDENTITY_COMPARE}.
*
* When the hash table needs to be constructed, the field {@link #hashArray} becomes a new hash
* array where an entry of 0 means no hit and otherwise denotes the entry number in the
* {@link #entries} array. The hash array is interpreted as an actual byte array if the indices fit
* within 8 bit, or as an array of short values if the indices fit within 16 bit, or as an array of
* integer values in other cases.
*
* Hash collisions are handled by chaining a linked list of {@link CollisionLink} objects that take
* the place of the values in the {@link #entries} array.
*
* Removing entries will put {@code null} into the {@link #entries} array. If the occupation of the
* map falls below a specific threshold, the map will be compressed via the
* {@link #maybeCompress(int)} method.
*/
final class EconomicMapImpl<K, V> implements EconomicMap<K, V>, EconomicSet<K> {
/**
* Initial number of key/value pair entries that is allocated in the first entries array.
*/
private static final int INITIAL_CAPACITY = 4;
/**
* Maximum number of entries that are moved linearly forward if a key is removed.
*/
private static final int COMPRESS_IMMEDIATE_CAPACITY = 8;
/**
* Minimum number of key/value pair entries added when the entries array is increased in size.
*/
private static final int MIN_CAPACITY_INCREASE = 8;
/**
* Number of entries above which a hash table is created.
*/
private static final int HASH_THRESHOLD = 4;
/**
* Number of entries above which a hash table is created when equality can be checked with
* object identity.
*/
private static final int HASH_THRESHOLD_IDENTITY_COMPARE = 8;
/**
* Maximum number of entries allowed in the map.
*/
private static final int MAX_ELEMENT_COUNT = Integer.MAX_VALUE >> 1;
/**
* Number of entries above which more than 1 byte is necessary for the hash index.
*/
private static final int LARGE_HASH_THRESHOLD = ((1 << Byte.SIZE) << 1);
/**
* Number of entries above which more than 2 bytes are are necessary for the hash index.
*/
private static final int VERY_LARGE_HASH_THRESHOLD = (LARGE_HASH_THRESHOLD << Byte.SIZE);
/**
* Total number of entries (actual entries plus deleted entries).
*/
private int totalEntries;
/**
* Number of deleted entries.
*/
private int deletedEntries;
/**
* Entries array with even indices storing keys and odd indices storing values.
*/
private Object[] entries;
/**
* Hash array that is interpreted either as byte or short or int array depending on number of
* map entries.
*/
private byte[] hashArray;
/**
* The strategy used for comparing keys or {@code null} for denoting special strategy
* {@link Equivalence#IDENTITY}.
*/
private final Equivalence strategy;
/**
* Intercept method for debugging purposes.
*/
private static <K, V> EconomicMapImpl<K, V> intercept(EconomicMapImpl<K, V> map) {
return map;
}
public static <K, V> EconomicMapImpl<K, V> create(Equivalence strategy, boolean isSet) {
return intercept(new EconomicMapImpl<>(strategy, isSet));
}
public static <K, V> EconomicMapImpl<K, V> create(Equivalence strategy, int initialCapacity, boolean isSet) {
return intercept(new EconomicMapImpl<>(strategy, initialCapacity, isSet));
}
public static <K, V> EconomicMapImpl<K, V> create(Equivalence strategy, UnmodifiableEconomicMap<K, V> other, boolean isSet) {
return intercept(new EconomicMapImpl<>(strategy, other, isSet));
}
public static <K, V> EconomicMapImpl<K, V> create(Equivalence strategy, UnmodifiableEconomicSet<K> other, boolean isSet) {
return intercept(new EconomicMapImpl<>(strategy, other, isSet));
}
private EconomicMapImpl(Equivalence strategy, boolean isSet) {
if (strategy == Equivalence.IDENTITY) {
this.strategy = null;
} else {
this.strategy = strategy;
}
this.isSet = isSet;
}
private EconomicMapImpl(Equivalence strategy, int initialCapacity, boolean isSet) {
this(strategy, isSet);
init(initialCapacity);
}
private EconomicMapImpl(Equivalence strategy, UnmodifiableEconomicMap<K, V> other, boolean isSet) {
this(strategy, isSet);
if (!initFrom(other)) {
init(other.size());
putAll(other);
}
}
private EconomicMapImpl(Equivalence strategy, UnmodifiableEconomicSet<K> other, boolean isSet) {
this(strategy, isSet);
if (!initFrom(other)) {
init(other.size());
addAll(other);
}
}
@SuppressWarnings("unchecked")
private boolean initFrom(Object o) {
if (o instanceof EconomicMapImpl) {
EconomicMapImpl<K, V> otherMap = (EconomicMapImpl<K, V>) o;
// We are only allowed to directly copy if the strategies of the two maps are the same.
if (strategy == otherMap.strategy) {
totalEntries = otherMap.totalEntries;
deletedEntries = otherMap.deletedEntries;
if (otherMap.entries != null) {
entries = otherMap.entries.clone();
}
if (otherMap.hashArray != null) {
hashArray = otherMap.hashArray.clone();
}
return true;
}
}
return false;
}
private void init(int size) {
if (size > INITIAL_CAPACITY) {
entries = new Object[size << 1];
}
}
/**
* Links the collisions. Needs to be immutable class for allowing efficient shallow copy from
* other map on construction.
*/
private static final class CollisionLink {
CollisionLink(Object value, int next) {
this.value = value;
this.next = next;
}
final Object value;
/**
* Index plus one of the next entry in the collision link chain.
*/
final int next;
}
@SuppressWarnings("unchecked")
@Override
public V get(K key) {
checkKeyNonNull(key);
int index = find(key);
if (index != -1) {
return (V) getValue(index);
}
return null;
}
private int find(K key) {
if (hasHashArray()) {
return findHash(key);
} else {
return findLinear(key);
}
}
private int findLinear(K key) {
for (int i = 0; i < totalEntries; i++) {
Object entryKey = entries[i << 1];
if (entryKey != null && compareKeys(key, entryKey)) {
return i;
}
}
return -1;
}
private boolean compareKeys(Object key, Object entryKey) {
if (key == entryKey) {
return true;
}
if (strategy != null && strategy != Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE) {
if (strategy == Equivalence.DEFAULT) {
return key.equals(entryKey);
} else {
return strategy.equals(key, entryKey);
}
}
return false;
}
private int findHash(K key) {
int index = getHashArray(getHashIndex(key)) - 1;
if (index != -1) {
Object entryKey = getKey(index);
if (compareKeys(key, entryKey)) {
return index;
} else {
Object entryValue = getRawValue(index);
if (entryValue instanceof CollisionLink) {
return findWithCollision(key, (CollisionLink) entryValue);
}
}
}
return -1;
}
private int findWithCollision(K key, CollisionLink initialEntryValue) {
int index;
Object entryKey;
CollisionLink entryValue = initialEntryValue;
while (true) {
CollisionLink collisionLink = entryValue;
index = collisionLink.next;
entryKey = getKey(index);
if (compareKeys(key, entryKey)) {
return index;
} else {
Object value = getRawValue(index);
if (value instanceof CollisionLink) {
entryValue = (CollisionLink) getRawValue(index);
} else {
return -1;
}
}
}
}
private int getHashArray(int index) {
if (entries.length < LARGE_HASH_THRESHOLD) {
return (hashArray[index] & 0xFF);
} else if (entries.length < VERY_LARGE_HASH_THRESHOLD) {
int adjustedIndex = index << 1;
return (hashArray[adjustedIndex] & 0xFF) | ((hashArray[adjustedIndex + 1] & 0xFF) << 8);
} else {
int adjustedIndex = index << 2;
return (hashArray[adjustedIndex] & 0xFF) | ((hashArray[adjustedIndex + 1] & 0xFF) << 8) | ((hashArray[adjustedIndex + 2] & 0xFF) << 16) | ((hashArray[adjustedIndex + 3] & 0xFF) << 24);
}
}
private void setHashArray(int index, int value) {
if (entries.length < LARGE_HASH_THRESHOLD) {
hashArray[index] = (byte) value;
} else if (entries.length < VERY_LARGE_HASH_THRESHOLD) {
int adjustedIndex = index << 1;
hashArray[adjustedIndex] = (byte) value;
hashArray[adjustedIndex + 1] = (byte) (value >> 8);
} else {
int adjustedIndex = index << 2;
hashArray[adjustedIndex] = (byte) value;
hashArray[adjustedIndex + 1] = (byte) (value >> 8);
hashArray[adjustedIndex + 2] = (byte) (value >> 16);
hashArray[adjustedIndex + 3] = (byte) (value >> 24);
}
}
private int findAndRemoveHash(Object key) {
int hashIndex = getHashIndex(key);
int index = getHashArray(hashIndex) - 1;
if (index != -1) {
Object entryKey = getKey(index);
if (compareKeys(key, entryKey)) {
Object value = getRawValue(index);
int nextIndex = -1;
if (value instanceof CollisionLink) {
CollisionLink collisionLink = (CollisionLink) value;
nextIndex = collisionLink.next;
}
setHashArray(hashIndex, nextIndex + 1);
return index;
} else {
Object entryValue = getRawValue(index);
if (entryValue instanceof CollisionLink) {
return findAndRemoveWithCollision(key, (CollisionLink) entryValue, index);
}
}
}
return -1;
}
private int findAndRemoveWithCollision(Object key, CollisionLink initialEntryValue, int initialIndexValue) {
int index;
Object entryKey;
CollisionLink entryValue = initialEntryValue;
int lastIndex = initialIndexValue;
while (true) {
CollisionLink collisionLink = entryValue;
index = collisionLink.next;
entryKey = getKey(index);
if (compareKeys(key, entryKey)) {
Object value = getRawValue(index);
if (value instanceof CollisionLink) {
CollisionLink thisCollisionLink = (CollisionLink) value;
setRawValue(lastIndex, new CollisionLink(collisionLink.value, thisCollisionLink.next));
} else {
setRawValue(lastIndex, collisionLink.value);
}
return index;
} else {
Object value = getRawValue(index);
if (value instanceof CollisionLink) {
entryValue = (CollisionLink) getRawValue(index);
lastIndex = index;
} else {
return -1;
}
}
}
}
private int getHashIndex(Object key) {
int hash;
if (strategy != null && strategy != Equivalence.DEFAULT) {
if (strategy == Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE) {
hash = System.identityHashCode(key);
} else {
hash = strategy.hashCode(key);
}
} else {
hash = key.hashCode();
}
hash = hash ^ (hash >>> 16);
return hash & (getHashTableSize() - 1);
}
@SuppressWarnings("unchecked")
@Override
public V put(K key, V value) {
checkKeyNonNull(key);
int index = find(key);
if (index != -1) {
Object oldValue = getValue(index);
setValue(index, value);
return (V) oldValue;
}
int nextEntryIndex = totalEntries;
if (entries == null) {
entries = new Object[INITIAL_CAPACITY << 1];
} else if (entries.length == nextEntryIndex << 1) {
grow();
assert entries.length > totalEntries << 1;
// Can change if grow is actually compressing.
nextEntryIndex = totalEntries;
}
setKey(nextEntryIndex, key);
setValue(nextEntryIndex, value);
totalEntries++;
if (hasHashArray()) {
// Rehash on collision if hash table is more than three quarters full.
boolean rehashOnCollision = (getHashTableSize() < (size() + (size() >> 1)));
putHashEntry(key, nextEntryIndex, rehashOnCollision);
} else if (totalEntries > getHashThreshold()) {
createHash();
}
return null;
}
/**
* Number of entries above which a hash table should be constructed.
*/
private int getHashThreshold() {
if (strategy == null || strategy == Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE) {
return HASH_THRESHOLD_IDENTITY_COMPARE;
} else {
return HASH_THRESHOLD;
}
}
private void grow() {
int entriesLength = entries.length;
int newSize = (entriesLength >> 1) + Math.max(MIN_CAPACITY_INCREASE, entriesLength >> 2);
if (newSize > MAX_ELEMENT_COUNT) {
throw new UnsupportedOperationException("map grown too large!");
}
Object[] newEntries = new Object[newSize << 1];
System.arraycopy(entries, 0, newEntries, 0, entriesLength);
entries = newEntries;
if ((entriesLength < LARGE_HASH_THRESHOLD && newEntries.length >= LARGE_HASH_THRESHOLD) ||
(entriesLength < VERY_LARGE_HASH_THRESHOLD && newEntries.length > VERY_LARGE_HASH_THRESHOLD)) {
// Rehash in order to change number of bits reserved for hash indices.
createHash();
}
}
/**
* Compresses the graph if there is a large number of deleted entries and returns the translated
* new next index.
*/
private int maybeCompress(int nextIndex) {
if (entries.length != INITIAL_CAPACITY << 1 && deletedEntries >= (totalEntries >> 1) + (totalEntries >> 2)) {
return compressLarge(nextIndex);
}
return nextIndex;
}
/**
* Compresses the graph and returns the translated new next index.
*/
private int compressLarge(int nextIndex) {
int size = INITIAL_CAPACITY;
int remaining = totalEntries - deletedEntries;
while (size <= remaining) {
size += Math.max(MIN_CAPACITY_INCREASE, size >> 1);
}
Object[] newEntries = new Object[size << 1];
int z = 0;
int newNextIndex = remaining;
for (int i = 0; i < totalEntries; ++i) {
Object key = getKey(i);
if (i == nextIndex) {
newNextIndex = z;
}
if (key != null) {
newEntries[z << 1] = key;
newEntries[(z << 1) + 1] = getValue(i);
z++;
}
}
this.entries = newEntries;
totalEntries = z;
deletedEntries = 0;
if (z <= getHashThreshold()) {
this.hashArray = null;
} else {
createHash();
}
return newNextIndex;
}
private int getHashTableSize() {
if (entries.length < LARGE_HASH_THRESHOLD) {
return hashArray.length;
} else if (entries.length < VERY_LARGE_HASH_THRESHOLD) {
return hashArray.length >> 1;
} else {
return hashArray.length >> 2;
}
}
private void createHash() {
int entryCount = size();
// Calculate smallest 2^n that is greater number of entries.
int size = getHashThreshold();
while (size <= entryCount) {
size <<= 1;
}
// Give extra size to avoid collisions.
size <<= 1;
if (this.entries.length >= VERY_LARGE_HASH_THRESHOLD) {
// Every entry has 4 bytes.
size <<= 2;
} else if (this.entries.length >= LARGE_HASH_THRESHOLD) {
// Every entry has 2 bytes.
size <<= 1;
} else {
// Entries are very small => give extra size to further reduce collisions.
size <<= 1;
}
hashArray = new byte[size];
for (int i = 0; i < totalEntries; i++) {
Object entryKey = getKey(i);
if (entryKey != null) {
putHashEntry(entryKey, i, false);
}
}
}
private void putHashEntry(Object key, int entryIndex, boolean rehashOnCollision) {
int hashIndex = getHashIndex(key);
int oldIndex = getHashArray(hashIndex) - 1;
if (oldIndex != -1 && rehashOnCollision) {
this.createHash();
return;
}
setHashArray(hashIndex, entryIndex + 1);
Object value = getRawValue(entryIndex);
if (oldIndex != -1) {
assert entryIndex != oldIndex : "this cannot happen and would create an endless collision link cycle";
if (value instanceof CollisionLink) {
CollisionLink collisionLink = (CollisionLink) value;
setRawValue(entryIndex, new CollisionLink(collisionLink.value, oldIndex));
} else {
setRawValue(entryIndex, new CollisionLink(getRawValue(entryIndex), oldIndex));
}
} else {
if (value instanceof CollisionLink) {
CollisionLink collisionLink = (CollisionLink) value;
setRawValue(entryIndex, collisionLink.value);
}
}
}
@Override
public int size() {
return totalEntries - deletedEntries;
}
@Override
public boolean containsKey(K key) {
return find(key) != -1;
}
@Override
public void clear() {
entries = null;
hashArray = null;
totalEntries = deletedEntries = 0;
}
private boolean hasHashArray() {
return hashArray != null;
}
@SuppressWarnings("unchecked")
@Override
public V removeKey(K key) {
checkKeyNonNull(key);
int index;
if (hasHashArray()) {
index = this.findAndRemoveHash(key);
} else {
index = this.findLinear(key);
}
if (index != -1) {
Object value = getValue(index);
remove(index);
return (V) value;
}
return null;
}
private void checkKeyNonNull(K key) {
if (key == null) {
throw new UnsupportedOperationException("null not supported as key!");
}
}
/**
* Removes the element at the specific index and returns the index of the next element. This can
* be a different value if graph compression was triggered.
*/
private int remove(int indexToRemove) {
int index = indexToRemove;
int entriesAfterIndex = totalEntries - index - 1;
int result = index + 1;
// Without hash array, compress immediately.
if (entriesAfterIndex <= COMPRESS_IMMEDIATE_CAPACITY && !hasHashArray()) {
while (index < totalEntries - 1) {
setKey(index, getKey(index + 1));
setRawValue(index, getRawValue(index + 1));
index++;
}
result--;
}
setKey(index, null);
setRawValue(index, null);
if (index == totalEntries - 1) {
// Make sure last element is always non-null.
totalEntries--;
while (index > 0 && getKey(index - 1) == null) {
totalEntries--;
deletedEntries--;
index--;
}
} else {
deletedEntries++;
result = maybeCompress(result);
}
return result;
}
private abstract class SparseMapIterator<E> implements Iterator<E> {
protected int current;
@Override
public boolean hasNext() {
return current < totalEntries;
}
@Override
public void remove() {
if (hasHashArray()) {
EconomicMapImpl.this.findAndRemoveHash(getKey(current - 1));
}
current = EconomicMapImpl.this.remove(current - 1);
}
}
@Override
public Iterable<V> getValues() {
return new Iterable<V>() {
@Override
public Iterator<V> iterator() {
return new SparseMapIterator<V>() {
@SuppressWarnings("unchecked")
@Override
public V next() {
Object result;
while (true) {
result = getValue(current);
if (result == null && getKey(current) == null) {
// values can be null, double-check if key is also null
current++;
} else {
current++;
break;
}
}
return (V) result;
}
};
}
};
}
@Override
public Iterable<K> getKeys() {
return this;
}
@Override
public boolean isEmpty() {
return this.size() == 0;
}
@Override
public MapCursor<K, V> getEntries() {
return new MapCursor<K, V>() {
int current = -1;
@Override
public boolean advance() {
current++;
if (current >= totalEntries) {
return false;
} else {
while (EconomicMapImpl.this.getKey(current) == null) {
// Skip over null entries
current++;
}
return true;
}
}
@SuppressWarnings("unchecked")
@Override
public K getKey() {
return (K) EconomicMapImpl.this.getKey(current);
}
@SuppressWarnings("unchecked")
@Override
public V getValue() {
return (V) EconomicMapImpl.this.getValue(current);
}
@Override
public void remove() {
if (hasHashArray()) {
EconomicMapImpl.this.findAndRemoveHash(EconomicMapImpl.this.getKey(current));
}
current = EconomicMapImpl.this.remove(current) - 1;
}
};
}
@SuppressWarnings("unchecked")
@Override
public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
for (int i = 0; i < totalEntries; i++) {
Object entryKey = getKey(i);
if (entryKey != null) {
Object newValue = function.apply((K) entryKey, (V) getValue(i));
setValue(i, newValue);
}
}
}
private Object getKey(int index) {
return entries[index << 1];
}
private void setKey(int index, Object newValue) {
entries[index << 1] = newValue;
}
private void setValue(int index, Object newValue) {
Object oldValue = getRawValue(index);
if (oldValue instanceof CollisionLink) {
CollisionLink collisionLink = (CollisionLink) oldValue;
setRawValue(index, new CollisionLink(newValue, collisionLink.next));
} else {
setRawValue(index, newValue);
}
}
private void setRawValue(int index, Object newValue) {
entries[(index << 1) + 1] = newValue;
}
private Object getRawValue(int index) {
return entries[(index << 1) + 1];
}
private Object getValue(int index) {
Object object = getRawValue(index);
if (object instanceof CollisionLink) {
return ((CollisionLink) object).value;
}
return object;
}
private final boolean isSet;
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(isSet ? "set(size=" : "map(size=").append(size()).append(", {");
String sep = "";
MapCursor<K, V> cursor = getEntries();
while (cursor.advance()) {
builder.append(sep);
if (isSet) {
builder.append(cursor.getKey());
} else {
builder.append("(").append(cursor.getKey()).append(",").append(cursor.getValue()).append(")");
}
sep = ",";
}
builder.append("})");
return builder.toString();
}
@Override
public Iterator<K> iterator() {
return new SparseMapIterator<K>() {
@SuppressWarnings("unchecked")
@Override
public K next() {
Object result;
while ((result = getKey(current++)) == null) {
// skip null entries
}
return (K) result;
}
};
}
@Override
public boolean contains(K element) {
return containsKey(element);
}
@SuppressWarnings("unchecked")
@Override
public boolean add(K element) {
return put(element, (V) element) == null;
}
@Override
public void remove(K element) {
removeKey(element);
}
}
| gpl-2.0 |
hdadler/sensetrace-src | com.ipv.sensetrace.RDFDatamanager/jena-2.11.0/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/nodetable/NodeTableLogger.java | 3051 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hp.hpl.jena.tdb.nodetable;
import java.util.Iterator ;
import org.apache.jena.atlas.lib.Pair ;
import org.slf4j.Logger ;
import org.slf4j.LoggerFactory ;
import com.hp.hpl.jena.graph.Node ;
import com.hp.hpl.jena.tdb.store.NodeId ;
public class NodeTableLogger implements NodeTable
{
private static Logger defaultLogger = LoggerFactory.getLogger(NodeTable.class) ;
private final Logger log ;
private final String label ;
private final NodeTable nodeTable ;
public NodeTableLogger(String label, NodeTable nodeTable)
{
this.nodeTable = nodeTable ;
this.label = label ;
log = defaultLogger ;
}
@Override
public NodeId getAllocateNodeId(Node node)
{
//info("getAllocateNodeId("+node+") =>") ;
NodeId nId = nodeTable.getAllocateNodeId(node) ;
info("getAllocateNodeId("+node+") => "+nId) ;
return nId ;
}
@Override
public NodeId getNodeIdForNode(Node node)
{
//info("getNodeIdForNode("+node+") =>") ;
NodeId nId = nodeTable.getNodeIdForNode(node) ;
info("getNodeIdForNode("+node+") => "+nId) ;
return nId ;
}
@Override
public Node getNodeForNodeId(NodeId id)
{
//info("getNodeForNodeId("+id+") =>") ;
Node n = nodeTable.getNodeForNodeId(id) ;
info("getNodeForNodeId("+id+") => "+n) ;
return n ;
}
@Override
public NodeId allocOffset()
{
NodeId nodeId = nodeTable.allocOffset() ;
info("allocOffset() => "+nodeId) ;
return nodeId ;
}
@Override
public Iterator<Pair<NodeId, Node>> all()
{
info("all()") ;
return nodeTable.all();
}
@Override
public boolean isEmpty()
{
boolean b = nodeTable.isEmpty() ;
info("isEmpty() => "+b) ;
return b ;
}
@Override
public void sync()
{
info("sync()") ;
nodeTable.sync() ;
}
@Override
public void close()
{
info("close()") ; ;
nodeTable.close() ;
}
private void info(String string)
{
if ( label != null )
string = label+": "+string ;
log.info(string) ;
}
}
| gpl-2.0 |
9r3i/quran2 | js/quran.js | 5042 | /*
* Al Qur'an
* quran.js created by Luthfie
*/
(function(){
var source = 'json/';
var locale = {"locale_english":"English","locale_indonesian":"Indonesian","locale_japanese":"Japanese","locale_korean":"Korean","locale_chinese":"Chinese","locale_tafsir":"Tafsir","locale_russian":"Rusian","locale_spanish":"Spanish","locale_french":"French"};
$('body').html('<div id="index"><div class="daftar-selector"><div id="title"></div><select id="daftar_suroh"></select><select id="daftar_locale"></select><div id="cari"></div></div><div class="isi-suroh"></div><div id="scroller">^</div><div id="kaki"></div></div>');
$("#cari").html('<div id="loader"></div><input type="text" value="Search..." id="milari" onfocus="if(this.value==\'Search...\') this.value=\'\';" onblur="if(this.value==\'\') this.value=\'Search...\';" list="cariin" />');
$.getJSON(source+"index.js",function(index){
$("#daftar_suroh").html('<option value="">-- Select a Suroh --</option>');
$("#cari").append('<datalist id="cariin"></div>');
for(key in index){
$("#cariin").append('<option value="'+index[key].name+'">');
$("#daftar_suroh").append('<option value="'+index[key].number+'">'+index[key].number+'. '+index[key].name+'</option>');
}
$.getJSON(source+"title.js",function(title){
$("#title").html(title.title);
});
});
$("#daftar_locale").append('<option value="">-- Locale --</option>');
for(key in locale){
$("#daftar_locale").append('<option value="'+key+'">'+locale[key]+'</option>');
}
var title = 'Al Qur\'an | Presented by Luthfie';
$("title").text(title);
$("select#daftar_suroh").change(function(){
var val = $(this).val();
load_suroh(val);
});
$("#kaki").html('Presented by Luthfie');
$("#daftar_locale").change(function(){
var val_locale = $(this).val();
set_locale(locale,val_locale);
});
$(window).scroll(function(){
if($(this).scrollTop()>1){
$("#scroller").fadeIn(500);
}else{
$("#scroller").fadeOut(500);
}
});
$("#scroller").click(function(){
resetScroller("index");
});
$("#milari").on("keyup",function(tombol){
var str = $(this).val();
var lcl = $("#daftar_locale").val();
var wilo = window.location.href;
if(tombol.which==13){
$(this).hide(500);
$("#loader").show(500);
if(!wilo.match(/http/gi)){
$(".isi-suroh").html('<div id="hasil_error">You need an Apache to run this search.</div>');
$("#loader").hide(500);
$("#milari").show(500);
return;
}
$.get('pilari.php?kata='+str+'&locale='+lcl,function(hasil){
$("#loader").hide(500);
$("#milari").show(500);
if(hasil.error!==undefined){
$(".isi-suroh").html('<div id="hasil_error">'+hasil.message+'</div>');
}
else if(hasil.data!==undefined){
load_suroh(hasil.data);
}
else{
$(".isi-suroh").html('<div id="hasil"></div>');
for(suroh in hasil){
for(ayat in hasil[suroh]){
$("#hasil").append('<div class="hasil-each" id="hasil_each_'+ayat+'">'+suroh+': '+hasil[suroh][ayat]+'</div>');
}
}
}
});
}
});
function set_locale(locale,one){
one = (one==undefined)?'locale_arabic':one;
$("div.each-locale").hide();
$("div#locale_arabic").show();
$("div#"+one).show();
}
function load_suroh(val){
$(".isi-suroh").html('<div id="suroh_name"></div><div id="ayat"></div>');
$.getJSON('json/'+val+".js",function(suroh){
$("title").text(dss(suroh.name)+" | "+title);
$("#suroh_name").html(suroh.name);
if(suroh.taud!==undefined){
$("#ayat").append('<div class="ayat-each" id="taud">'+suroh.taud+'</div>');
}
if(suroh.bismillah!==undefined){
$("#ayat").append('<div class="ayat-each" id="bismillah">'+suroh.bismillah+'</div>');
}
for(var i=0;i<suroh.ayat.length;i++){
$("#ayat").append('<div class="ayat-each" id="ayat_each_'+i+'"></div>');
for(key in suroh.ayat[i]){
$("#ayat_each_"+i).append('<div class="each-locale" id="locale_'+key+'">'+suroh.ayat[i][key]+'</div>');
}
}
var val_locale = $("#daftar_locale").val();
set_locale(locale,val_locale);
});
}
})();
var scrollY = 0;
var distance = 93;
var speed = 7;
function autoScrollTo(el){
var currentY = window.pageYOffset;
var targetY = document.getElementById(el).offsetTop;
var bodyHeight = document.body.offsetHeight;
var yPos = currentY + window.innerHeight;
var animator = setTimeout('autoScrollTo(\''+el+'\')',24);
if(yPos>bodyHeight){
clearTimeout(animator);
}else{
if(currentY < targetY-distance){
scrollY = currentY+distance;
window.scroll(0, scrollY);
}else{
clearTimeout(animator);
}
}
}
function resetScroller(el){
var currentY = window.pageYOffset;
var targetY = document.getElementById(el).offsetTop;
var animator = setTimeout('resetScroller(\''+el+'\')',speed);
if(currentY > targetY){
scrollY = currentY-distance;
window.scroll(0, scrollY);
}else{
clearTimeout(animator);
}
}
function ent_decode(str){
var ent = str.replace('/[\u00A0-\u9999<>\&]/gim',function(i){
return '&#'+i.charCodeAt(0)+';';
});
}
function dss(str){
return str.replace(/'/gi,'\'');
}
| gpl-2.0 |
mekolat/ManaPlus | src/resources/beingslot.cpp | 867 | /*
* The ManaPlus Client
* Copyright (C) 2011-2018 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "resources/beingslot.h"
#include "debug.h"
BeingSlot *emptyBeingSlot = nullptr;
| gpl-2.0 |
jasonmonsef/botosushi | wp-content/themes/botosushi/inc/modules/aboutus/aboutus.php | 2335 | <div id="aboutus">
<h2><span class="lrg-bracket">[</span>ABOUT <strong>US</strong><span class="lrg-bracket">]</span></h2>
<div class="one-third module-inner">
<h3>ADDRESS</h3>
<p>
11835 Carmel Mountain Rd<br>
Suite #1305<br>
San Diego, CA 92128 - <a href="https://www.google.com/maps/place/11835+Carmel+Mountain+Rd,+Carmel+Mountain+Ranch+Town+Center,+San+Diego,+CA+92128/@32.9798454,-117.0771351,17z/data=!3m1!4b1!4m2!3m1!1s0x80dbfa018664db7d:0xcc402e2514645ee1" target="_blank">Map it!</a><br>
Call Us - 858.451.7800
</p>
</div>
<div class="one-third module-inner">
<h3>HOURS</h3>
<p>
<strong>Mon-Th</strong> 11pm-9:30<br>
<strong>Fri-Sat</strong> 11pm-10pm<br>
<strong>Sun </strong> Closed<br>
Open Holidays
</p>
</div>
<div class="one-third module-inner">
<h3>BOTO IS...</h3>
<p>
Boto which means "boat" in Japanese, is inspired by its very name to take you away and set sail on an appetizing adventure. <a class="trigger-overlay" href="#">Read More...</a>
</p>
</div>
<div class="switch">
<div class="overlay-inner">
<div class="overlay-title"><a class="trigger-overlay close" style="display: none"><span>Close</span><img width="25px" src="<?php bloginfo('template_url') ?>/images/closex.png"/></a></div>
<h2>About<strong> Boto</strong></h2>
<p>Boto which means "boat" in Japanese, is inspired by its very name to take you away and set sail on an appetizing adventure.</p>
<p>Our talented chefs use fresh cuts of sushi along with seasonal ingredients to present unique rolls like the Seanile, Fantasea, and Row Sham Bow. They slice, squeeze, and sear all masterfully by hand to deliver you the most beautiful and delicious plates. We have explored our Asian roots and infused them with neighboring cultures to bring you menu items like ceviche, citrus prawn, and spicy Seoul chicken.</p>
<p>Come enjoy our spacious dining area, sushi bar, or private dining room with your family and friends. We proudly provide beautifully arranged sushi boats to serve the masses. Explore our local craft and international drafts along with our extensive sake and soju selection. </p>
<p>At Boto Sushi, we believe that serving the freshest sushi should not be an option, it should be the standard.</p>
</div><!-- .overlay-inner -->
</div><!-- .switch -->
</div> | gpl-2.0 |
techspark/citybuilder | components/com_bt_portfolio/views/portfolios/view.html.php | 4406 | <?php
/**
* @package bt_portfolio - BT Portfolio Component
* @version 1.2.6
* @created Feb 2012
* @author BowThemes
* @email [email protected]
* @website http://bowthemes.com
* @support Forum - http://bowthemes.com/forum/
* @copyright Copyright (C) 2012 Bowthemes. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
// No direct access
defined('_JEXEC') or die;
require_once(JPATH_ADMINISTRATOR.'/components/com_bt_portfolio/tables/portfolio.php');
class Bt_portfolioViewPortfolios extends BTView {
protected $items = null;
function display($tpl = null) {
// Initialise variables
$app = JFactory::getApplication();
$user = JFactory::getUser();
$items = $this->get('items');
$pagination = $this->get('pagination');
$category = $this->get('category');
$listCategories = $this->get('listCategories');
$gridCategories = $this->get('gridChildCategories');
$params = $this->get('params');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseWarning(500, implode("\n", $errors));
return false;
}
// Content plugin content
foreach ($items as $item){
$item->description = JHTML::_('content.prepare', $item->description);
$item->extra_fields = Bt_portfolioTablePortfolio::loadExtraFields($item->extra_fields,$item->catids);
}
$category_layout = $params->get('layout', 'default');
$show_voting = $params->get('show_voting');
$this->assignRef('params', $params);
$this->assignRef('pagination', $pagination);
$this->assignRef('gridCategories', $gridCategories);
$this->assignRef('items', $items);
$this->assignRef('show_voting', $show_voting);
$this->assignRef('user', $user);
$this->assignRef('listCategories', $listCategories);
$this->assignRef('category', $category);
$theme = $params->get('theme', 'default');
$this->_addPath('template', JPATH_COMPONENT . '/themes/default/layout/list');
$this->_addPath('template', JPATH_COMPONENT . '/themes/' . $theme . '/layout/list');
$this->_addPath('template', JPATH_SITE . '/templates/' . $app->getTemplate() . '/html/com_bt_portfolio/default/layout/list');
$this->_addPath('template', JPATH_SITE . '/templates/' . $app->getTemplate() . '/html/com_bt_portfolio/'. $theme . '/layout/list');
$this->setLayout($category_layout);
$this->_prepareDocument();
parent::display($tpl);
}
/**
* Prepares the document
*/
protected function _prepareDocument()
{
$app = JFactory::getApplication();
$menus = $app->getMenu();
$pathway = $app->getPathway();
$title = null;
$menu = $menus->getActive();
$id = (int) @$menu->query['catid'];
$title = $this->params->get('page_title', '');
if ($menu && ($menu->query['option'] != 'com_bt_portfolio' || $menu->query['view'] != 'portfolios' || $this->category->id != $id))
{
if($this->category->id != $id){
$pathway->addItem($this->category->title, '');
}
$newTitle = $this->category->params->get('page_title',$this->category->title);
if($newTitle) $title = $newTitle;
}
if (empty($title)) {
$title = $this->category->title;
}
if (empty($title)) {
$title = $app->getCfg('sitename');
}
elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
$title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
}
elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
$title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
}
$this->document->setTitle($title);
// META DATA
if ($this->params->get('metadesc'))
{
$this->document->setDescription($this->params->get('metadesc'));
}
elseif (!$this->params->get('metadesc') && $this->params->get('menu-meta_description'))
{
$this->document->setDescription($this->params->get('menu-meta_description'));
}
if ($this->params->get('metakey'))
{
$this->document->setMetadata('keywords', $this->params->get('metakey'));
}
elseif (!$this->params->get('metakey') && $this->params->get('menu-meta_keywords'))
{
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
if ($this->params->get('robots'))
{
$this->document->setMetadata('robots', $this->params->get('robots'));
}
elseif (!$this->params->get('robots') && $this->params->get('robots'))
{
$this->document->setMetadata('robots', $this->params->get('robots'));
}
}
} | gpl-2.0 |
hassankbrian/LoveItLocal | wp-content/plugins/wc-shortcodes/includes/mce/js/shortcodes_tinymce.js | 16564 | (function () {
"use strict";
tinymce.create('tinymce.plugins.wcShortcodeMce', {
init : function(ed, url){
tinymce.plugins.wcShortcodeMce.theurl = url;
},
createControl : function(btn, e) {
if ( btn === "wc_shortcodes_button" ) {
var a = this;
// out puts an js error when clicking on button
// btn = e.createSplitButton('wc_shortcodes_button', {
btn = e.createMenuButton('wc_shortcodes_button', {
title: "Insert Shortcode",
image: tinymce.plugins.wcShortcodeMce.theurl +"/images/shortcodes.png",
icons: false,
});
btn.onRenderMenu.add(function (c, b) {
b.add({title : 'WC Shortcodes', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
// Columns
c = b.addMenu({title:"Columns"});
a.render( c, "1/2 + 1/2", "half-half" );
a.render( c, "1/3 + 1/3 + 1/3", "third-third-third" );
a.render( c, "1/3 + 2/3", "third-twothird" );
a.render( c, "2/3 + 1/3", "twothird-third" );
a.render( c, "1/4 + 1/4 + 1/4 + 1/4", "fourth-fourth-fourth-fourth" );
a.render( c, "1/4 + 1/2 + 1/4", "fourth-half-fourth" );
a.render( c, "1/2 + 1/4 + 1/4", "half-fourth-fourth" );
a.render( c, "1/4 + 1/4 + 1/2", "fourth-fourth-half" );
a.render( c, "1/4 + 3/4", "fourth-three-fourth" );
a.render( c, "3/4 + 1/4", "three-fourth-fourth" );
b.addSeparator();
// Elements
c = b.addMenu({title:"Elements"});
a.render( c, "Posts", "posts" );
a.render( c, "Button", "button" );
a.render( c, "Google Map", "googlemap" );
a.render( c, "Heading", "heading" );
a.render( c, "Pricing Table", "pricing" );
a.render( c, "Skillbar", "skillbar" );
a.render( c, "Social Icon", "social" );
a.render( c, "Testimonial", "testimonial" );
a.render( c, "Image", "image" );
a.render( c, "Countdown", "countdown" );
a.render( c, "RSVP", "rsvp" );
a.render( c, "HTML", "html" );
b.addSeparator();
// Boxes
c = b.addMenu({title:"Boxes"});
a.render( c, "Primary", "primaryBox" );
a.render( c, "Secondary", "secondaryBox" );
a.render( c, "Inverse", "inverseBox" );
a.render( c, "Success", "successBox" );
a.render( c, "Warning", "warningBox" );
a.render( c, "Danger", "dangerBox" );
a.render( c, "Info", "infoBox" );
b.addSeparator();
// Highlights
c = b.addMenu({title:"Highlights"});
a.render( c, "Blue", "blueHighlight" );
a.render( c, "Gray", "grayHighlight" );
a.render( c, "Green", "greenHighlight" );
a.render( c, "Red", "redHighlight" );
a.render( c, "Yellow", "yellowHighlight" );
b.addSeparator();
// Dividers
c = b.addMenu({title:"Dividers"});
a.render( c, "Solid", "solidDivider" );
a.render( c, "Dashed", "dashedDivider" );
a.render( c, "Dotted", "dottedDivider" );
a.render( c, "Double", "doubleDivider" );
a.render( c, "Triple", "tripleDivider" );
a.render( c, "Image1", "imageDivider" );
a.render( c, "Image2", "imageDivider2" );
a.render( c, "Image3", "imageDivider3" );
b.addSeparator();
// jQuery
c = b.addMenu({title:"jQuery"});
a.render( c, "Accordion", "accordion" );
a.render( c, "Tabs", "tabs" );
a.render( c, "Toggle", "toggle" );
b.addSeparator();
// Helpers
c = b.addMenu({title:"Other"});
a.render( c, "Spacing", "spacing" );
a.render( c, "Clear Floats", "clear" );
a.render( c, "Center Content", "center" );
a.render( c, "Full Width", "fullwidth" );
a.render( c, "Code", "code" );
a.render( c, "Pre", "pre" );
});
return btn;
}
return null;
},
render : function(ed, title, id) {
ed.add({
title: title,
onclick: function () {
// Selected content
var mceSelected = tinyMCE.activeEditor.selection.getContent();
// Add highlighted content inside the shortcode when possible - yay!
var wcDummyContent;
if ( mceSelected ) {
wcDummyContent = mceSelected;
} else {
wcDummyContent = 'Sample Content';
}
var wcParagraphContent = '<p>Sample Content</p>';
// Accordion
if(id === "accordion") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_accordion collapse="0"]</p><p>[wc_accordion_section title="Section 1"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section]</p><p>[wc_accordion_section title="Section 2"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section]</p><p>[/wc_accordion]</p>');
}
// Boxes
if(id === "primaryBox") {
tinyMCE.activeEditor.selection.setContent('[wc_box color="primary" text_align="left"]' + wcDummyContent + '[/wc_box]');
}
if(id === "secondaryBox") {
tinyMCE.activeEditor.selection.setContent('[wc_box color="secondary" text_align="left"]' + wcDummyContent + '[/wc_box]');
}
if(id === "inverseBox") {
tinyMCE.activeEditor.selection.setContent('[wc_box color="inverse" text_align="left"]' + wcDummyContent + '[/wc_box]');
}
if(id === "successBox") {
tinyMCE.activeEditor.selection.setContent('[wc_box color="success" text_align="left"]' + wcDummyContent + '[/wc_box]');
}
if(id === "warningBox") {
tinyMCE.activeEditor.selection.setContent('[wc_box color="warning" text_align="left"]' + wcDummyContent + '[/wc_box]');
}
if(id === "dangerBox") {
tinyMCE.activeEditor.selection.setContent('[wc_box color="danger" text_align="left"]' + wcDummyContent + '[/wc_box]');
}
if(id === "infoBox") {
tinyMCE.activeEditor.selection.setContent('[wc_box color="info" text_align="left"]' + wcDummyContent + '[/wc_box]');
}
// Image
if(id === "image") {
tinyMCE.activeEditor.selection.setContent('[wc_image attachment_id="" size="" title="" alt="" caption="" link_to="post" url="" align="none" flag="For Sale" left="" top="" right="0" bottom="20" text_color="" background_color="" font_size=""][/wc_image]');
}
// Posts
if(id === "posts") {
tinyMCE.activeEditor.selection.setContent('[wc_posts author="" author_name="" p="" post__in="" order="DESC" orderby="date" post_status="publish" post_type="post" posts_per_page="10" taxonomy="" field="slug" terms="" title="yes" meta_all="yes" meta_author="yes" meta_date="yes" meta_comments="yes" thumbnail="yes" content="yes" paging="yes" size="large" filtering="yes" columns="3" gutter_space="0.020" heading_type="h2" layout="isotope"][/wc_posts]');
}
// Button
if(id === "button") {
tinyMCE.activeEditor.selection.setContent('[wc_button type="primary" url="http://www.wordpresscanvas.com" title="Visit Site" target="self" position="float"]' + wcDummyContent + '[/wc_button]');
}
// Clear Floats
if(id === "clear") {
tinyMCE.activeEditor.selection.setContent('[wc_clear_floats]');
}
// Columns
if(id === "half-half") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-half" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-half" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
}
if(id === "third-third-third") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-third" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-third"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-third" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
}
if(id === "third-twothird") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-third" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="two-third" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
}
if(id === "twothird-third") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="two-third" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-third" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
}
if(id === "fourth-fourth-fourth-fourth") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-fourth" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
}
if(id === "fourth-half-fourth") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-fourth" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-half"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
}
if(id === "half-fourth-fourth") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-half" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
}
if(id === "fourth-fourth-half") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-fourth" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-half" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
}
if(id === "fourth-three-fourth") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="one-fourth" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="three-fourth" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
}
if(id === "three-fourth-fourth") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_row][wc_column size="three-fourth" position="first"]</p>' + wcParagraphContent + '<p>[/wc_column][wc_column size="one-fourth" position="last"]</p>' + wcParagraphContent + '<p>[/wc_column][/wc_row]</p>');
}
// Divider
if(id === "solidDivider") {
tinyMCE.activeEditor.selection.setContent('[wc_divider style="solid" line="single" margin_top="" margin_bottom=""]');
}
if(id === "dashedDivider") {
tinyMCE.activeEditor.selection.setContent('[wc_divider style="dashed" line="single" margin_top="" margin_bottom=""]');
}
if(id === "dottedDivider") {
tinyMCE.activeEditor.selection.setContent('[wc_divider style="dotted" line="single" margin_top="" margin_bottom=""]');
}
if(id === "doubleDivider") {
tinyMCE.activeEditor.selection.setContent('[wc_divider style="solid" line="double" margin_top="" margin_bottom=""]');
}
if(id === "tripleDivider") {
tinyMCE.activeEditor.selection.setContent('[wc_divider style="solid" line="triple" margin_top="" margin_bottom=""]');
}
if(id === "imageDivider") {
tinyMCE.activeEditor.selection.setContent('[wc_divider style="image" margin_top="" margin_bottom=""]');
}
if(id === "imageDivider2") {
tinyMCE.activeEditor.selection.setContent('[wc_divider style="image2" margin_top="" margin_bottom=""]');
}
if(id === "imageDivider3") {
tinyMCE.activeEditor.selection.setContent('[wc_divider style="image3" margin_top="" margin_bottom=""]');
}
// Google Map
if(id === "googlemap") {
tinyMCE.activeEditor.selection.setContent('[wc_googlemap title="St. Paul\'s Chapel" location="209 Broadway, New York, NY 10007" zoom="10" height="250" title_on_load="no" class=""]');
}
// Heading
if(id === "heading") {
tinyMCE.activeEditor.selection.setContent('[wc_heading type="h1" title="' + wcDummyContent + '" text_align="left"]');
}
// Highlight
if(id === "blueHighlight") {
tinyMCE.activeEditor.selection.setContent('[wc_highlight color="blue"]' + wcDummyContent + '[/wc_highlight]');
}
if(id === "grayHighlight") {
tinyMCE.activeEditor.selection.setContent('[wc_highlight color="gray"]' + wcDummyContent + '[/wc_highlight]');
}
if(id === "greenHighlight") {
tinyMCE.activeEditor.selection.setContent('[wc_highlight color="green"]' + wcDummyContent + '[/wc_highlight]');
}
if(id === "redHighlight") {
tinyMCE.activeEditor.selection.setContent('[wc_highlight color="red"]' + wcDummyContent + '[/wc_highlight]');
}
if(id === "yellowHighlight") {
tinyMCE.activeEditor.selection.setContent('[wc_highlight color="yellow"]' + wcDummyContent + '[/wc_highlight]');
}
// Pricing
if(id === "pricing") {
tinyMCE.activeEditor.selection.setContent('[wc_pricing type="primary" featured="yes" plan="Basic" cost="$19.99" per="per month" button_url="#" button_text="Sign Up" button_target="self" button_rel="nofollow"]<ul><li>30GB Storage</li><li>512MB Ram</li><li>10 databases</li><li>1,000 Emails</li><li>25GB Bandwidth</li></ul>[/wc_pricing]');
}
//Spacing
if(id === "spacing") {
tinyMCE.activeEditor.selection.setContent('[wc_spacing size="40px"]');
}
//Social
if(id === "social") {
tinyMCE.activeEditor.selection.setContent('[wc_social_icons align="left" size="large" display="facebook,google,twitter,pinterest,instagram,bloglovin,flickr,rss,email,custom1,custom2,custom3,custom4,custom5"]');
}
//Skillbar
if(id === "skillbar") {
tinyMCE.activeEditor.selection.setContent('[wc_skillbar title="' + wcDummyContent + '" percentage="100" color="#6adcfa"]');
}
//Tabs
if(id === "tabs") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_tabgroup][wc_tab title="First Tab"]</p>'+wcParagraphContent+'<p>[/wc_tab][wc_tab title="Second Tab"]</p>'+wcParagraphContent+'<p>[/wc_tab][/wc_tabgroup]</p>');
}
//Testimonial
if(id === "testimonial") {
tinyMCE.activeEditor.selection.setContent('[wc_testimonial by="Wordpress Canvas" url="" position="left"]' + wcDummyContent + '[/wc_testimonial]');
}
//RSVP
if(id === "rsvp") {
tinyMCE.activeEditor.selection.setContent('[wc_rsvp columns="3" align="left" button_align="center"]');
}
//Countdown
if(id === "countdown") {
var d = new Date();
var year = d.getFullYear() + 1;
tinyMCE.activeEditor.selection.setContent('[wc_countdown date="July 23, '+year+', 6:00:00 PM" format="wdHMs" message="Your Message Here!" labels="Years,Months,Weeks,Days,Hours,Minutes,Seconds" labels1="Year,Month,Week,Day,Hour,Minute,Second"]');
}
//Toggle
if(id === "toggle") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_toggle title="This Is Your Toggle Title" padding="" border_width=""]</p>' + wcParagraphContent + '<p>[/wc_toggle]</p>');
}
if(id === "center") {
tinyMCE.activeEditor.selection.setContent('<p>[wc_center max_width="500px" text_align="left"]</p>' + wcParagraphContent + '<p>[/wc_center]</p>');
}
if(id === "fullwidth") {
tinyMCE.activeEditor.selection.setContent('[wc_fullwidth selector="#main"]' + wcDummyContent + '[/wc_fullwidth]');
}
if(id === "html") {
tinyMCE.activeEditor.selection.setContent('[wc_html name="Custom Field Name"]');
}
if(id === "code") {
tinyMCE.activeEditor.selection.setContent('[wc_code]' + wcDummyContent + '[/wc_code]');
}
if(id === "pre") {
tinyMCE.activeEditor.selection.setContent('[wc_pre color="1" wrap="0" scrollable="1" linenums="0" name="Custom Field Name"]');
}
return false;
}
});
}
});
tinymce.PluginManager.add("wc_shortcodes", tinymce.plugins.wcShortcodeMce);
})();
| gpl-2.0 |
hanslovsky/bigcat | src/main/java/bdv/bigcat/control/LabelFillController.java | 17775 | package bdv.bigcat.control;
import java.awt.Cursor;
import org.apache.commons.lang.math.NumberUtils;
import org.scijava.ui.behaviour.Behaviour;
import org.scijava.ui.behaviour.BehaviourMap;
import org.scijava.ui.behaviour.ClickBehaviour;
import org.scijava.ui.behaviour.InputTriggerAdder;
import org.scijava.ui.behaviour.InputTriggerMap;
import org.scijava.ui.behaviour.io.InputTriggerConfig;
import bdv.bigcat.label.FragmentSegmentAssignment;
import bdv.bigcat.label.IdPicker;
import bdv.bigcat.util.DirtyInterval;
import bdv.img.AccessBoxRandomAccessible;
import bdv.img.GrowingStoreRandomAccessibleSingletonAccess;
import bdv.labels.labelset.Label;
import bdv.labels.labelset.LabelMultisetType;
import bdv.labels.labelset.Multiset;
import bdv.util.Affine3DHelpers;
import bdv.viewer.ViewerPanel;
import net.imglib2.Localizable;
import net.imglib2.Point;
import net.imglib2.RandomAccess;
import net.imglib2.RandomAccessible;
import net.imglib2.RandomAccessibleInterval;
import net.imglib2.RealPoint;
import net.imglib2.algorithm.fill.Filter;
import net.imglib2.algorithm.fill.FloodFill;
import net.imglib2.algorithm.fill.TypeWriter;
import net.imglib2.algorithm.neighborhood.DiamondShape;
import net.imglib2.algorithm.neighborhood.Shape;
import net.imglib2.interpolation.randomaccess.NearestNeighborInterpolatorFactory;
import net.imglib2.realtransform.AffineGet;
import net.imglib2.realtransform.AffineRandomAccessible;
import net.imglib2.realtransform.AffineTransform3D;
import net.imglib2.realtransform.RealViews;
import net.imglib2.realtransform.Scale3D;
import net.imglib2.realtransform.Translation3D;
import net.imglib2.type.BooleanType;
import net.imglib2.type.NativeType;
import net.imglib2.type.logic.BitType;
import net.imglib2.type.numeric.integer.LongType;
import net.imglib2.util.Pair;
import net.imglib2.util.Util;
import net.imglib2.util.ValuePair;
import net.imglib2.view.IntervalView;
import net.imglib2.view.MixedTransformView;
import net.imglib2.view.RandomAccessiblePair;
import net.imglib2.view.Views;
/**
*
* @author Stephan Saalfeld <[email protected]>
* @author Philipp Hanslovsky <[email protected]>
*/
public class LabelFillController
{
final protected ViewerPanel viewer;
final protected RandomAccessibleInterval< LabelMultisetType > labels;
final protected RandomAccessibleInterval< LongType > paintedLabels;
final protected DirtyInterval dirtyLabelsInterval;
final protected AffineTransform3D labelTransform;
final protected FragmentSegmentAssignment assignment;
final protected SelectionController selectionController;
final protected RealPoint labelLocation;
final protected Shape shape;
// for behavioUrs
private final BehaviourMap behaviourMap = new BehaviourMap();
private final InputTriggerMap inputTriggerMap = new InputTriggerMap();
private final InputTriggerAdder inputAdder;
private final IdPicker idPicker;
public BehaviourMap getBehaviourMap()
{
return behaviourMap;
}
public InputTriggerMap getInputTriggerMap()
{
return inputTriggerMap;
}
private final double minLabelScale;
public LabelFillController(
final ViewerPanel viewer,
final RandomAccessibleInterval< LabelMultisetType > labels,
final RandomAccessibleInterval< LongType > paintedLabels,
final DirtyInterval dirtyLabelsInterval,
final AffineTransform3D labelTransform,
final FragmentSegmentAssignment assignment,
final SelectionController selectionController,
final Shape shape,
final IdPicker idPicker,
final InputTriggerConfig config )
{
this.viewer = viewer;
this.labels = labels;
this.paintedLabels = paintedLabels;
this.dirtyLabelsInterval = dirtyLabelsInterval;
this.labelTransform = labelTransform;
this.assignment = assignment;
this.selectionController = selectionController;
this.shape = shape;
this.idPicker = idPicker;
inputAdder = config.inputTriggerAdder( inputTriggerMap, "fill" );
labelLocation = new RealPoint( 3 );
minLabelScale = NumberUtils.min( new double[] { Affine3DHelpers.extractScale( labelTransform, 0 ), Affine3DHelpers.extractScale( labelTransform, 1 ), Affine3DHelpers.extractScale( labelTransform, 2 ) } );
new Fill( "fill", "M button1" ).register();
new Fill2D( "fill 2D", "shift M button1" ).register();
}
private void setCoordinates( final int x, final int y )
{
labelLocation.setPosition( x, 0 );
labelLocation.setPosition( y, 1 );
labelLocation.setPosition( 0, 2 );
viewer.displayToGlobalCoordinates( labelLocation );
labelTransform.applyInverse( labelLocation, labelLocation );
}
private abstract class SelfRegisteringBehaviour implements Behaviour
{
private final String name;
private final String[] defaultTriggers;
protected String getName()
{
return name;
}
public SelfRegisteringBehaviour( final String name, final String... defaultTriggers )
{
this.name = name;
this.defaultTriggers = defaultTriggers;
}
public void register()
{
behaviourMap.put( name, this );
inputAdder.put( name, defaultTriggers );
}
}
private class Fill extends SelfRegisteringBehaviour implements ClickBehaviour
{
public Fill( final String name, final String... defaultTriggers )
{
super( name, defaultTriggers );
}
@Override
public void click( final int x, final int y )
{
synchronized ( viewer )
{
if ( idPicker.getIdAtDisplayCoordinate( x, y ) == Label.OUTSIDE )
return;
viewer.setCursor( Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) );
setCoordinates( x, y );
System.out.println( "Filling " + labelLocation + " with " + selectionController.getActiveFragmentId() );
final Point p = new Point( Math.round( labelLocation.getDoublePosition( 0 ) ), Math.round( labelLocation.getDoublePosition( 1 ) ), Math.round( labelLocation.getDoublePosition( 2 ) ) );
final AccessBoxRandomAccessible< LongType > accessTrackingExtendedPaintedLabels =
new AccessBoxRandomAccessible<>(
Views.extendValue(
paintedLabels,
new LongType( Label.TRANSPARENT ) ) );
final RandomAccess< LongType > paintAccess = accessTrackingExtendedPaintedLabels.randomAccess();
paintAccess.setPosition( p );
final long seedPaint = paintAccess.get().getIntegerLong();
final long seedFragmentLabel = getBiggestLabel( labels, p );
final long t0 = System.currentTimeMillis();
FloodFill.fill(
Views.extendValue( labels, new LabelMultisetType() ),
accessTrackingExtendedPaintedLabels,
p,
new LabelMultisetType(),
new LongType( selectionController.getActiveFragmentId() ),
new DiamondShape( 1 ),
new SegmentAndPaintFilter1( seedPaint, seedFragmentLabel, assignment ) );
dirtyLabelsInterval.touch( accessTrackingExtendedPaintedLabels.createAccessInterval() );
final long t1 = System.currentTimeMillis();
System.out.println( "Filling took " + ( t1 - t0 ) + " ms" );
System.out.println( " modified box: " + Util.printInterval( dirtyLabelsInterval.getDirtyInterval() ) );
viewer.setCursor( Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR ) );
viewer.requestRepaint();
}
}
}
private class Fill2D extends SelfRegisteringBehaviour implements ClickBehaviour
{
public Fill2D( final String name, final String... defaultTriggers )
{
super( name, defaultTriggers );
}
@Override
public void click( final int x, final int y )
{
synchronized ( viewer )
{
if ( idPicker.getIdAtDisplayCoordinate( x, y ) == Label.OUTSIDE )
return;
final AffineTransform3D transform = new AffineTransform3D();
viewer.getState().getViewerTransform( transform );
final double scale = Affine3DHelpers.extractScale( transform, 0 ) * minLabelScale / Math.sqrt( 3 );
System.out.println( labelTransform );
final int xScale = ( int ) Math.round( x / scale );
final int yScale = ( int ) Math.round( y / scale );
final long[] initialMin = { xScale - 16, yScale - 16 };
final long[] initialMax = { xScale + 15, yScale + 15 };
viewer.setCursor( Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) );
setCoordinates( x, y );
System.out.println( "Filling " + labelLocation + " with " + selectionController.getActiveFragmentId() + " (2D)" );
final RealPoint rp = new RealPoint( 3 );
transform.apply( labelLocation, rp );
final Point p = new Point( xScale, yScale );
System.out.println( x + " " + y + " " + p + " " + rp );
final AffineTransform3D tf = labelTransform.copy();
tf.preConcatenate( transform );
tf.preConcatenate( new Scale3D( 1.0 / scale, 1.0 / scale, 1.0 / scale ) );
final AffineTransform3D tfFront = tf.copy().preConcatenate( new Translation3D( 0, 0, -1.0 / Math.sqrt( 3 ) ) );
final AffineTransform3D tfBack = tf.copy().preConcatenate( new Translation3D( 0, 0, 1.0 / Math.sqrt( 3 ) ) );
final long t0 = System.currentTimeMillis();
final BitType notVisited = new BitType( false );
final BitType fillLabel = new BitType( true );
final GrowingStoreRandomAccessibleSingletonAccess< BitType > tmpFillFront = fillMask( tfFront, initialMin, initialMax, p, notVisited.copy(), fillLabel.copy() );
final GrowingStoreRandomAccessibleSingletonAccess< BitType > tmpFillBack = fillMask( tfBack, initialMin, initialMax, p, notVisited.copy(), fillLabel.copy() );
final long label = selectionController.getActiveFragmentId();
writeMask( tmpFillFront, tfFront, label );
writeMask( tmpFillBack, tfBack, label );
final long t1 = System.currentTimeMillis();
System.out.println( "Filling took " + ( t1 - t0 ) + " ms" );
System.out.println( " modified box: " + Util.printInterval( dirtyLabelsInterval.getDirtyInterval() ) );
viewer.setCursor( Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR ) );
viewer.requestRepaint();
}
}
private < T extends BooleanType< T > & NativeType< T > > GrowingStoreRandomAccessibleSingletonAccess< T > fillMask( final AffineTransform3D tf, final long[] initialMin, final long[] initialMax, final Point p, final T notVisited, final T fillLabel )
{
return fillMask( tf, initialMin, initialMax, p, new GrowingStoreRandomAccessibleSingletonAccess.SimpleArrayImgFactory< T >( notVisited ), notVisited, fillLabel );
}
private < T extends BooleanType< T > > GrowingStoreRandomAccessibleSingletonAccess< T > fillMask( final AffineTransform3D tf, final long[] initialMin, final long[] initialMax, final Point p, final GrowingStoreRandomAccessibleSingletonAccess.Factory< T > factory, final T notVisited, final T fillLabel )
{
final GrowingStoreRandomAccessibleSingletonAccess< T > tmpFill = new GrowingStoreRandomAccessibleSingletonAccess<>( initialMin, initialMax, factory, notVisited.createVariable() );
final AccessBoxRandomAccessible< LongType > accessTrackingExtendedPaintedLabels = new AccessBoxRandomAccessible<>(
Views.extendValue(
paintedLabels,
new LongType( Label.TRANSPARENT ) ) );
final AffineRandomAccessible< LongType, AffineGet > transformedPaintedLabels =
RealViews.affine(
Views.interpolate(
accessTrackingExtendedPaintedLabels,
new NearestNeighborInterpolatorFactory<>() ),
tf );
final MixedTransformView< LongType > hyperSlice = Views.hyperSlice( Views.raster( transformedPaintedLabels ), 2, 0 );
final AffineRandomAccessible< LabelMultisetType, AffineGet > transformedLabels = RealViews.affine( Views.interpolate( Views.extendValue( labels, new LabelMultisetType() ), new NearestNeighborInterpolatorFactory<>() ), tf );
final MixedTransformView< LabelMultisetType > hyperSliceLabels = Views.hyperSlice( Views.raster( transformedLabels ), 2, 0 );
final RandomAccessiblePair< LabelMultisetType, LongType > labelsPaintedLabelsPair = new RandomAccessiblePair<>( hyperSliceLabels, hyperSlice );
final RandomAccessiblePair< LabelMultisetType, LongType >.RandomAccess pairAccess = labelsPaintedLabelsPair.randomAccess();
pairAccess.setPosition( p );
final long seedPaint = pairAccess.get().getB().getIntegerLong();
final long seedFragmentLabel = getBiggestLabel( pairAccess.getA() );
FloodFill.fill( labelsPaintedLabelsPair, tmpFill, p, new ValuePair< LabelMultisetType, LongType >( new LabelMultisetType(), new LongType( selectionController.getActiveFragmentId() ) ), fillLabel, new DiamondShape( 1 ), new SegmentAndPaintFilter2D< T >( seedPaint, seedFragmentLabel, assignment ), new TypeWriter<>() );
dirtyLabelsInterval.touch( accessTrackingExtendedPaintedLabels.createAccessInterval() );
return tmpFill;
}
private void writeMask( final GrowingStoreRandomAccessibleSingletonAccess< BitType > tmpFill, final AffineTransform3D tf, final long label )
{
final IntervalView< BitType > tmpFillInterval = Views.interval( tmpFill, tmpFill.getIntervalOfSizeOfStore() );
final AccessBoxRandomAccessible< LongType > accessTrackingExtendedPaintedLabels = new AccessBoxRandomAccessible<>(
Views.extendValue(
paintedLabels,
new LongType( Label.TRANSPARENT ) ) );
final AffineRandomAccessible< LongType, AffineGet > transformedPaintedLabels =
RealViews.affine(
Views.interpolate(
accessTrackingExtendedPaintedLabels,
new NearestNeighborInterpolatorFactory<>() ),
tf );
final MixedTransformView< LongType > hyperSlice = Views.hyperSlice( Views.raster( transformedPaintedLabels ), 2, 0 );
final net.imglib2.Cursor< BitType > s = tmpFillInterval.cursor();
final net.imglib2.Cursor< LongType > t = Views.interval( hyperSlice, tmpFillInterval ).cursor();
while ( s.hasNext() )
{
t.fwd();
if ( s.next().get() )
t.get().set( label );
}
dirtyLabelsInterval.touch( accessTrackingExtendedPaintedLabels.createAccessInterval() );
}
}
public static class SegmentAndPaintFilter1 implements Filter< Pair< LabelMultisetType, LongType >, Pair< LabelMultisetType, LongType > >
{
private final long comparison;
private final long[] fragmentsContainedInSeedSegment;
public SegmentAndPaintFilter1( final long seedPaint, final long seedFragmentLabel, final FragmentSegmentAssignment assignment )
{
this.comparison = seedPaint == Label.TRANSPARENT ? seedFragmentLabel : seedPaint;
this.fragmentsContainedInSeedSegment = assignment.getFragments( assignment.getSegment( comparison ) );
}
@Override
public boolean accept( final Pair< LabelMultisetType, LongType > current, final Pair< LabelMultisetType, LongType > reference )
{
final LabelMultisetType currentLabelSet = current.getA();
final long currentPaint = current.getB().getIntegerLong();
if ( currentPaint != Label.TRANSPARENT )
return currentPaint == comparison && currentPaint != reference.getB().getIntegerLong();
else
{
for ( final long fragment : this.fragmentsContainedInSeedSegment )
{
if ( currentLabelSet.contains( fragment ) )
return true;
}
}
return false;
}
}
public static class SegmentAndPaintFilter2D< T extends BooleanType< T > > implements Filter< Pair< Pair< LabelMultisetType, LongType >, T >, Pair< Pair< LabelMultisetType, LongType >, T > >
{
private final long comparison;
private final long[] fragmentsContainedInSeedSegment;
public SegmentAndPaintFilter2D( final long seedPaint, final long seedFragmentLabel, final FragmentSegmentAssignment assignment )
{
this.comparison = seedPaint == Label.TRANSPARENT ? seedFragmentLabel : seedPaint;
this.fragmentsContainedInSeedSegment = assignment.getFragments( assignment.getSegment( comparison ) );
System.out.println( "Comparison=" + this.comparison );
}
@Override
public boolean accept( final Pair< Pair< LabelMultisetType, LongType >, T > current, final Pair< Pair< LabelMultisetType, LongType >, T > reference )
{
final T currentTargetPair = current.getB();
if ( !currentTargetPair.get() )
{
final Pair< LabelMultisetType, LongType > currentSourcePair = current.getA();
// Pair<LabelMultisetType, LongType> referenceSourcePair =
// reference.getA();
final LabelMultisetType currentLabelSet = currentSourcePair.getA();
final long currentPaint = currentSourcePair.getB().getIntegerLong();
// System.out.println(currentPaint + " " +
// currentSourcePair.getB().getIntegerLong());
if ( currentPaint != Label.TRANSPARENT )
return currentPaint == comparison;
else if ( currentPaint != Label.OUTSIDE )
{
for ( final long fragment : this.fragmentsContainedInSeedSegment )
{
if ( currentLabelSet.contains( fragment ) )
return true;
}
}
}
return false;
}
}
public static class FragmentFilter implements Filter< Pair< LabelMultisetType, LongType >, Pair< LabelMultisetType, LongType > >
{
private final long seedLabel;
public FragmentFilter( final long seedLabel )
{
this.seedLabel = seedLabel;
}
@Override
public boolean accept( final Pair< LabelMultisetType, LongType > current, final Pair< LabelMultisetType, LongType > reference )
{
return ( current.getB().getIntegerLong() != reference.getB().getIntegerLong() ) && ( current.getA().contains( seedLabel ) );
}
}
public static long getBiggestLabel( final RandomAccessible< LabelMultisetType > accessible, final Localizable position )
{
final RandomAccess< LabelMultisetType > access = accessible.randomAccess();
access.setPosition( position );
return getBiggestLabel( access.get() );
}
public static long getBiggestLabel( final LabelMultisetType t )
{
int maxCount = Integer.MIN_VALUE;
long maxLabel = -1;
for ( final Multiset.Entry< Label > e : t.entrySet() )
{
final int c = e.getCount();
if ( c > maxCount )
{
maxLabel = e.getElement().id();
maxCount = c;
}
}
return maxLabel;
}
}
| gpl-2.0 |
koreapyj/openttd-yapp | src/newgrf.cpp | 301681 | /* $Id: newgrf.cpp 25168 2013-04-08 20:52:32Z rubidium $ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file newgrf.cpp Base of all NewGRF support. */
#include "stdafx.h"
#include <stdarg.h>
#include "debug.h"
#include "fileio_func.h"
#include "engine_func.h"
#include "engine_base.h"
#include "bridge.h"
#include "town.h"
#include "newgrf_engine.h"
#include "newgrf_text.h"
#include "fontcache.h"
#include "currency.h"
#include "landscape.h"
#include "newgrf_cargo.h"
#include "newgrf_house.h"
#include "newgrf_sound.h"
#include "newgrf_station.h"
#include "industrytype.h"
#include "newgrf_canal.h"
#include "newgrf_townname.h"
#include "newgrf_industries.h"
#include "newgrf_airporttiles.h"
#include "newgrf_airport.h"
#include "newgrf_object.h"
#include "rev.h"
#include "fios.h"
#include "strings_func.h"
#include "date_func.h"
#include "string_func.h"
#include "network/network.h"
#include <map>
#include "smallmap_gui.h"
#include "genworld.h"
#include "error.h"
#include "vehicle_func.h"
#include "language.h"
#include "vehicle_base.h"
#include "table/strings.h"
#include "table/build_industry.h"
/* TTDPatch extended GRF format codec
* (c) Petr Baudis 2004 (GPL'd)
* Changes by Florian octo Forster are (c) by the OpenTTD development team.
*
* Contains portions of documentation by TTDPatch team.
* Thanks especially to Josef Drexler for the documentation as well as a lot
* of help at #tycoon. Also thanks to Michael Blunck for his GRF files which
* served as subject to the initial testing of this codec. */
/** List of all loaded GRF files */
static SmallVector<GRFFile *, 16> _grf_files;
/** Miscellaneous GRF features, set by Action 0x0D, parameter 0x9E */
byte _misc_grf_features = 0;
/** 32 * 8 = 256 flags. Apparently TTDPatch uses this many.. */
static uint32 _ttdpatch_flags[8];
/** Indicates which are the newgrf features currently loaded ingame */
GRFLoadedFeatures _loaded_newgrf_features;
static const uint MAX_SPRITEGROUP = UINT8_MAX; ///< Maximum GRF-local ID for a spritegroup.
/** Temporary data during loading of GRFs */
struct GrfProcessingState {
private:
/** Definition of a single Action1 spriteset */
struct SpriteSet {
SpriteID sprite; ///< SpriteID of the first sprite of the set.
uint num_sprites; ///< Number of sprites in the set.
};
/** Currently referenceable spritesets */
std::map<uint, SpriteSet> spritesets[GSF_END];
public:
/* Global state */
GrfLoadingStage stage; ///< Current loading stage
SpriteID spriteid; ///< First available SpriteID for loading realsprites.
/* Local state in the file */
uint file_index; ///< File index of currently processed GRF file.
GRFFile *grffile; ///< Currently processed GRF file.
GRFConfig *grfconfig; ///< Config of the currently processed GRF file.
uint32 nfo_line; ///< Currently processed pseudo sprite number in the GRF.
byte grf_container_ver; ///< Container format of the current GRF file.
/* Kind of return values when processing certain actions */
int skip_sprites; ///< Number of psuedo sprites to skip before processing the next one. (-1 to skip to end of file)
/* Currently referenceable spritegroups */
SpriteGroup *spritegroups[MAX_SPRITEGROUP + 1];
/** Clear temporary data before processing the next file in the current loading stage */
void ClearDataForNextFile()
{
this->nfo_line = 0;
this->skip_sprites = 0;
for (uint i = 0; i < GSF_END; i++) {
this->spritesets[i].clear();
}
memset(this->spritegroups, 0, sizeof(this->spritegroups));
}
/**
* Records new spritesets.
* @param feature GrfSpecFeature the set is defined for.
* @param first_sprite SpriteID of the first sprite in the set.
* @param first_set First spriteset to define.
* @param numsets Number of sets to define.
* @param numents Number of sprites per set to define.
*/
void AddSpriteSets(byte feature, SpriteID first_sprite, uint first_set, uint numsets, uint numents)
{
assert(feature < GSF_END);
for (uint i = 0; i < numsets; i++) {
SpriteSet &set = this->spritesets[feature][first_set + i];
set.sprite = first_sprite + i * numents;
set.num_sprites = numents;
}
}
/**
* Check whether there are any valid spritesets for a feature.
* @param feature GrfSpecFeature to check.
* @return true if there are any valid sets.
* @note Spritesets with zero sprites are valid to allow callback-failures.
*/
bool HasValidSpriteSets(byte feature) const
{
assert(feature < GSF_END);
return !this->spritesets[feature].empty();
}
/**
* Check whether a specific set is defined.
* @param feature GrfSpecFeature to check.
* @param set Set to check.
* @return true if the set is valid.
* @note Spritesets with zero sprites are valid to allow callback-failures.
*/
bool IsValidSpriteSet(byte feature, uint set) const
{
assert(feature < GSF_END);
return this->spritesets[feature].find(set) != this->spritesets[feature].end();
}
/**
* Returns the first sprite of a spriteset.
* @param feature GrfSpecFeature to query.
* @param set Set to query.
* @return First sprite of the set.
*/
SpriteID GetSprite(byte feature, uint set) const
{
assert(IsValidSpriteSet(feature, set));
return this->spritesets[feature].find(set)->second.sprite;
}
/**
* Returns the number of sprites in a spriteset
* @param feature GrfSpecFeature to query.
* @param set Set to query.
* @return Number of sprites in the set.
*/
uint GetNumEnts(byte feature, uint set) const
{
assert(IsValidSpriteSet(feature, set));
return this->spritesets[feature].find(set)->second.num_sprites;
}
};
static GrfProcessingState _cur;
class OTTDByteReaderSignal { };
/** Class to read from a NewGRF file */
class ByteReader {
protected:
byte *data;
byte *end;
public:
ByteReader(byte *data, byte *end) : data(data), end(end) { }
inline byte ReadByte()
{
if (data < end) return *(data)++;
throw OTTDByteReaderSignal();
}
uint16 ReadWord()
{
uint16 val = ReadByte();
return val | (ReadByte() << 8);
}
uint16 ReadExtendedByte()
{
uint16 val = ReadByte();
return val == 0xFF ? ReadWord() : val;
}
uint32 ReadDWord()
{
uint32 val = ReadWord();
return val | (ReadWord() << 16);
}
uint32 ReadVarSize(byte size)
{
switch (size) {
case 1: return ReadByte();
case 2: return ReadWord();
case 4: return ReadDWord();
default:
NOT_REACHED();
return 0;
}
}
const char *ReadString()
{
char *string = reinterpret_cast<char *>(data);
size_t string_length = ttd_strnlen(string, Remaining());
if (string_length == Remaining()) {
/* String was not NUL terminated, so make sure it is now. */
string[string_length - 1] = '\0';
grfmsg(7, "String was not terminated with a zero byte.");
} else {
/* Increase the string length to include the NUL byte. */
string_length++;
}
Skip(string_length);
return string;
}
inline size_t Remaining() const
{
return end - data;
}
inline bool HasData(size_t count = 1) const
{
return data + count <= end;
}
inline byte *Data()
{
return data;
}
inline void Skip(size_t len)
{
data += len;
/* It is valid to move the buffer to exactly the end of the data,
* as there may not be any more data read. */
if (data > end) throw OTTDByteReaderSignal();
}
};
typedef void (*SpecialSpriteHandler)(ByteReader *buf);
static const uint MAX_STATIONS = 256;
/** Temporary engine data used when loading only */
struct GRFTempEngineData {
/** Summary state of refittability properties */
enum Refittability {
UNSET = 0, ///< No properties assigned. Default refit masks shall be activated.
EMPTY, ///< GRF defined vehicle as not-refittable. The vehicle shall only carry the default cargo.
NONEMPTY, ///< GRF defined the vehicle as refittable. If the refitmask is empty after translation (cargotypes not available), disable the vehicle.
};
uint16 cargo_allowed;
uint16 cargo_disallowed;
RailTypeLabel railtypelabel;
const GRFFile *defaultcargo_grf; ///< GRF defining the cargo translation table to use if the default cargo is the 'first refittable'.
Refittability refittability; ///< Did the newgrf set any refittability property? If not, default refittability will be applied.
bool prop27_set; ///< Did the NewGRF set property 27 (misc flags)?
uint8 rv_max_speed; ///< Temporary storage of RV prop 15, maximum speed in mph/0.8
uint32 ctt_include_mask; ///< Cargo types always included in the refit mask.
uint32 ctt_exclude_mask; ///< Cargo types always excluded from the refit mask.
/**
* Update the summary refittability on setting a refittability property.
* @param non_empty true if the GRF sets the vehicle to be refittable.
*/
void UpdateRefittability(bool non_empty)
{
if (non_empty) {
this->refittability = NONEMPTY;
} else if (this->refittability == UNSET) {
this->refittability = EMPTY;
}
}
};
static GRFTempEngineData *_gted; ///< Temporary engine data used during NewGRF loading
/**
* Contains the GRF ID of the owner of a vehicle if it has been reserved.
* GRM for vehicles is only used if dynamic engine allocation is disabled,
* so 256 is the number of original engines. */
static uint32 _grm_engines[256];
/** Contains the GRF ID of the owner of a cargo if it has been reserved */
static uint32 _grm_cargoes[NUM_CARGO * 2];
struct GRFLocation {
uint32 grfid;
uint32 nfoline;
GRFLocation(uint32 grfid, uint32 nfoline) : grfid(grfid), nfoline(nfoline) { }
bool operator<(const GRFLocation &other) const
{
return this->grfid < other.grfid || (this->grfid == other.grfid && this->nfoline < other.nfoline);
}
bool operator == (const GRFLocation &other) const
{
return this->grfid == other.grfid && this->nfoline == other.nfoline;
}
};
static std::map<GRFLocation, SpriteID> _grm_sprites;
typedef std::map<GRFLocation, byte*> GRFLineToSpriteOverride;
static GRFLineToSpriteOverride _grf_line_to_action6_sprite_override;
/**
* DEBUG() function dedicated to newGRF debugging messages
* Function is essentially the same as DEBUG(grf, severity, ...) with the
* addition of file:line information when parsing grf files.
* NOTE: for the above reason(s) grfmsg() should ONLY be used for
* loading/parsing grf files, not for runtime debug messages as there
* is no file information available during that time.
* @param severity debugging severity level, see debug.h
* @param str message in printf() format
*/
void CDECL grfmsg(int severity, const char *str, ...)
{
char buf[1024];
va_list va;
va_start(va, str);
vsnprintf(buf, sizeof(buf), str, va);
va_end(va);
DEBUG(grf, severity, "[%s:%d] %s", _cur.grfconfig->filename, _cur.nfo_line, buf);
}
/**
* Obtain a NewGRF file by its grfID
* @param grfid The grfID to obtain the file for
* @return The file.
*/
static GRFFile *GetFileByGRFID(uint32 grfid)
{
const GRFFile * const *end = _grf_files.End();
for (GRFFile * const *file = _grf_files.Begin(); file != end; file++) {
if ((*file)->grfid == grfid) return *file;
}
return NULL;
}
/**
* Obtain a NewGRF file by its filename
* @param filename The filename to obtain the file for.
* @return The file.
*/
static GRFFile *GetFileByFilename(const char *filename)
{
const GRFFile * const *end = _grf_files.End();
for (GRFFile * const *file = _grf_files.Begin(); file != end; file++) {
if (strcmp((*file)->filename, filename) == 0) return *file;
}
return NULL;
}
/** Reset all NewGRFData that was used only while processing data */
static void ClearTemporaryNewGRFData(GRFFile *gf)
{
/* Clear the GOTO labels used for GRF processing */
for (GRFLabel *l = gf->label; l != NULL;) {
GRFLabel *l2 = l->next;
free(l);
l = l2;
}
gf->label = NULL;
}
/**
* Disable a GRF
* @param message Error message or STR_NULL.
* @param config GRFConfig to disable, NULL for current.
* @return Error message of the GRF for further customisation.
*/
static GRFError *DisableGrf(StringID message = STR_NULL, GRFConfig *config = NULL)
{
GRFFile *file;
if (config != NULL) {
file = GetFileByGRFID(config->ident.grfid);
} else {
config = _cur.grfconfig;
file = _cur.grffile;
}
config->status = GCS_DISABLED;
if (file != NULL) ClearTemporaryNewGRFData(file);
if (config == _cur.grfconfig) _cur.skip_sprites = -1;
if (message != STR_NULL) {
delete config->error;
config->error = new GRFError(STR_NEWGRF_ERROR_MSG_FATAL, message);
if (config == _cur.grfconfig) config->error->param_value[0] = _cur.nfo_line;
}
return config->error;
}
typedef std::map<StringID *, uint32> StringIDToGRFIDMapping;
static StringIDToGRFIDMapping _string_to_grf_mapping;
/**
* Used when setting an object's property to map to the GRF's strings
* while taking in consideration the "drift" between TTDPatch string system and OpenTTD's one
* @param grfid Id of the grf file.
* @param str StringID that we want to have the equivalent in OoenTTD.
* @return The properly adjusted StringID.
*/
StringID MapGRFStringID(uint32 grfid, StringID str)
{
/* 0xD0 and 0xDC stand for all the TextIDs in the range
* of 0xD000 (misc graphics texts) and 0xDC00 (misc persistent texts).
* These strings are unique to each grf file, and thus require to be used with the
* grfid in which they are declared */
switch (GB(str, 8, 8)) {
case 0xD0: case 0xD1: case 0xD2: case 0xD3:
case 0xDC:
return GetGRFStringID(grfid, str);
case 0xD4: case 0xD5: case 0xD6: case 0xD7:
/* Strings embedded via 0x81 have 0x400 added to them (no real
* explanation why...) */
return GetGRFStringID(grfid, str - 0x400);
default: break;
}
return TTDPStringIDToOTTDStringIDMapping(str);
}
static std::map<uint32, uint32> _grf_id_overrides;
/**
* Set the override for a NewGRF
* @param source_grfid The grfID which wants to override another NewGRF.
* @param target_grfid The grfID which is being overridden.
*/
static void SetNewGRFOverride(uint32 source_grfid, uint32 target_grfid)
{
_grf_id_overrides[source_grfid] = target_grfid;
grfmsg(5, "SetNewGRFOverride: Added override of 0x%X to 0x%X", BSWAP32(source_grfid), BSWAP32(target_grfid));
}
/**
* Returns the engine associated to a certain internal_id, resp. allocates it.
* @param file NewGRF that wants to change the engine.
* @param type Vehicle type.
* @param internal_id Engine ID inside the NewGRF.
* @param static_access If the engine is not present, return NULL instead of allocating a new engine. (Used for static Action 0x04).
* @return The requested engine.
*/
static Engine *GetNewEngine(const GRFFile *file, VehicleType type, uint16 internal_id, bool static_access = false)
{
/* Hack for add-on GRFs that need to modify another GRF's engines. This lets
* them use the same engine slots. */
uint32 scope_grfid = INVALID_GRFID; // If not using dynamic_engines, all newgrfs share their ID range
if (_settings_game.vehicle.dynamic_engines) {
/* If dynamic_engies is enabled, there can be multiple independent ID ranges. */
scope_grfid = file->grfid;
uint32 override = _grf_id_overrides[file->grfid];
if (override != 0) {
scope_grfid = override;
const GRFFile *grf_match = GetFileByGRFID(override);
if (grf_match == NULL) {
grfmsg(5, "Tried mapping from GRFID %x to %x but target is not loaded", BSWAP32(file->grfid), BSWAP32(override));
} else {
grfmsg(5, "Mapping from GRFID %x to %x", BSWAP32(file->grfid), BSWAP32(override));
}
}
/* Check if the engine is registered in the override manager */
EngineID engine = _engine_mngr.GetID(type, internal_id, scope_grfid);
if (engine != INVALID_ENGINE) {
Engine *e = Engine::Get(engine);
if (e->grf_prop.grffile == NULL) e->grf_prop.grffile = file;
return e;
}
}
/* Check if there is an unreserved slot */
EngineID engine = _engine_mngr.GetID(type, internal_id, INVALID_GRFID);
if (engine != INVALID_ENGINE) {
Engine *e = Engine::Get(engine);
if (e->grf_prop.grffile == NULL) {
e->grf_prop.grffile = file;
grfmsg(5, "Replaced engine at index %d for GRFID %x, type %d, index %d", e->index, BSWAP32(file->grfid), type, internal_id);
}
/* Reserve the engine slot */
if (!static_access) {
EngineIDMapping *eid = _engine_mngr.Get(engine);
eid->grfid = scope_grfid; // Note: this is INVALID_GRFID if dynamic_engines is disabled, so no reservation
}
return e;
}
if (static_access) return NULL;
if (!Engine::CanAllocateItem()) {
grfmsg(0, "Can't allocate any more engines");
return NULL;
}
size_t engine_pool_size = Engine::GetPoolSize();
/* ... it's not, so create a new one based off an existing engine */
Engine *e = new Engine(type, internal_id);
e->grf_prop.grffile = file;
/* Reserve the engine slot */
assert(_engine_mngr.Length() == e->index);
EngineIDMapping *eid = _engine_mngr.Append();
eid->type = type;
eid->grfid = scope_grfid; // Note: this is INVALID_GRFID if dynamic_engines is disabled, so no reservation
eid->internal_id = internal_id;
eid->substitute_id = min(internal_id, _engine_counts[type]); // substitute_id == _engine_counts[subtype] means "no substitute"
if (engine_pool_size != Engine::GetPoolSize()) {
/* Resize temporary engine data ... */
_gted = ReallocT(_gted, Engine::GetPoolSize());
/* and blank the new block. */
size_t len = (Engine::GetPoolSize() - engine_pool_size) * sizeof(*_gted);
memset(_gted + engine_pool_size, 0, len);
}
if (type == VEH_TRAIN) {
_gted[e->index].railtypelabel = GetRailTypeInfo(e->u.rail.railtype)->label;
}
grfmsg(5, "Created new engine at index %d for GRFID %x, type %d, index %d", e->index, BSWAP32(file->grfid), type, internal_id);
return e;
}
/**
* Return the ID of a new engine
* @param file The NewGRF file providing the engine.
* @param type The Vehicle type.
* @param internal_id NewGRF-internal ID of the engine.
* @return The new EngineID.
* @note depending on the dynamic_engine setting and a possible override
* property the grfID may be unique or overwriting or partially re-defining
* properties of an existing engine.
*/
EngineID GetNewEngineID(const GRFFile *file, VehicleType type, uint16 internal_id)
{
uint32 scope_grfid = INVALID_GRFID; // If not using dynamic_engines, all newgrfs share their ID range
if (_settings_game.vehicle.dynamic_engines) {
scope_grfid = file->grfid;
uint32 override = _grf_id_overrides[file->grfid];
if (override != 0) scope_grfid = override;
}
return _engine_mngr.GetID(type, internal_id, scope_grfid);
}
/**
* Map the colour modifiers of TTDPatch to those that Open is using.
* @param grf_sprite Pointer to the structure been modified.
*/
static void MapSpriteMappingRecolour(PalSpriteID *grf_sprite)
{
if (HasBit(grf_sprite->pal, 14)) {
ClrBit(grf_sprite->pal, 14);
SetBit(grf_sprite->sprite, SPRITE_MODIFIER_OPAQUE);
}
if (HasBit(grf_sprite->sprite, 14)) {
ClrBit(grf_sprite->sprite, 14);
SetBit(grf_sprite->sprite, PALETTE_MODIFIER_TRANSPARENT);
}
if (HasBit(grf_sprite->sprite, 15)) {
ClrBit(grf_sprite->sprite, 15);
SetBit(grf_sprite->sprite, PALETTE_MODIFIER_COLOUR);
}
}
/**
* Read a sprite and a palette from the GRF and convert them into a format
* suitable to OpenTTD.
* @param buf Input stream.
* @param read_flags Whether to read TileLayoutFlags.
* @param invert_action1_flag Set to true, if palette bit 15 means 'not from action 1'.
* @param use_cur_spritesets Whether to use currently referenceable action 1 sets.
* @param feature GrfSpecFeature to use spritesets from.
* @param [out] grf_sprite Read sprite and palette.
* @param [out] max_sprite_offset Optionally returns the number of sprites in the spriteset of the sprite. (0 if no spritset)
* @param [out] max_palette_offset Optionally returns the number of sprites in the spriteset of the palette. (0 if no spritset)
* @return Read TileLayoutFlags.
*/
static TileLayoutFlags ReadSpriteLayoutSprite(ByteReader *buf, bool read_flags, bool invert_action1_flag, bool use_cur_spritesets, int feature, PalSpriteID *grf_sprite, uint16 *max_sprite_offset = NULL, uint16 *max_palette_offset = NULL)
{
grf_sprite->sprite = buf->ReadWord();
grf_sprite->pal = buf->ReadWord();
TileLayoutFlags flags = read_flags ? (TileLayoutFlags)buf->ReadWord() : TLF_NOTHING;
MapSpriteMappingRecolour(grf_sprite);
bool custom_sprite = HasBit(grf_sprite->pal, 15) != invert_action1_flag;
ClrBit(grf_sprite->pal, 15);
if (custom_sprite) {
/* Use sprite from Action 1 */
uint index = GB(grf_sprite->sprite, 0, 14);
if (use_cur_spritesets && (!_cur.IsValidSpriteSet(feature, index) || _cur.GetNumEnts(feature, index) == 0)) {
grfmsg(1, "ReadSpriteLayoutSprite: Spritelayout uses undefined custom spriteset %d", index);
grf_sprite->sprite = SPR_IMG_QUERY;
grf_sprite->pal = PAL_NONE;
} else {
SpriteID sprite = use_cur_spritesets ? _cur.GetSprite(feature, index) : index;
if (max_sprite_offset != NULL) *max_sprite_offset = use_cur_spritesets ? _cur.GetNumEnts(feature, index) : UINT16_MAX;
SB(grf_sprite->sprite, 0, SPRITE_WIDTH, sprite);
SetBit(grf_sprite->sprite, SPRITE_MODIFIER_CUSTOM_SPRITE);
}
} else if ((flags & TLF_SPRITE_VAR10) && !(flags & TLF_SPRITE_REG_FLAGS)) {
grfmsg(1, "ReadSpriteLayoutSprite: Spritelayout specifies var10 value for non-action-1 sprite");
DisableGrf(STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT);
return flags;
}
if (flags & TLF_CUSTOM_PALETTE) {
/* Use palette from Action 1 */
uint index = GB(grf_sprite->pal, 0, 14);
if (use_cur_spritesets && (!_cur.IsValidSpriteSet(feature, index) || _cur.GetNumEnts(feature, index) == 0)) {
grfmsg(1, "ReadSpriteLayoutSprite: Spritelayout uses undefined custom spriteset %d for 'palette'", index);
grf_sprite->pal = PAL_NONE;
} else {
SpriteID sprite = use_cur_spritesets ? _cur.GetSprite(feature, index) : index;
if (max_palette_offset != NULL) *max_palette_offset = use_cur_spritesets ? _cur.GetNumEnts(feature, index) : UINT16_MAX;
SB(grf_sprite->pal, 0, SPRITE_WIDTH, sprite);
SetBit(grf_sprite->pal, SPRITE_MODIFIER_CUSTOM_SPRITE);
}
} else if ((flags & TLF_PALETTE_VAR10) && !(flags & TLF_PALETTE_REG_FLAGS)) {
grfmsg(1, "ReadSpriteLayoutRegisters: Spritelayout specifies var10 value for non-action-1 palette");
DisableGrf(STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT);
return flags;
}
return flags;
}
/**
* Preprocess the TileLayoutFlags and read register modifiers from the GRF.
* @param buf Input stream.
* @param flags TileLayoutFlags to process.
* @param is_parent Whether the sprite is a parentsprite with a bounding box.
* @param dts Sprite layout to insert data into.
* @param index Sprite index to process; 0 for ground sprite.
*/
static void ReadSpriteLayoutRegisters(ByteReader *buf, TileLayoutFlags flags, bool is_parent, NewGRFSpriteLayout *dts, uint index)
{
if (!(flags & TLF_DRAWING_FLAGS)) return;
if (dts->registers == NULL) dts->AllocateRegisters();
TileLayoutRegisters ®s = const_cast<TileLayoutRegisters&>(dts->registers[index]);
regs.flags = flags & TLF_DRAWING_FLAGS;
if (flags & TLF_DODRAW) regs.dodraw = buf->ReadByte();
if (flags & TLF_SPRITE) regs.sprite = buf->ReadByte();
if (flags & TLF_PALETTE) regs.palette = buf->ReadByte();
if (is_parent) {
if (flags & TLF_BB_XY_OFFSET) {
regs.delta.parent[0] = buf->ReadByte();
regs.delta.parent[1] = buf->ReadByte();
}
if (flags & TLF_BB_Z_OFFSET) regs.delta.parent[2] = buf->ReadByte();
} else {
if (flags & TLF_CHILD_X_OFFSET) regs.delta.child[0] = buf->ReadByte();
if (flags & TLF_CHILD_Y_OFFSET) regs.delta.child[1] = buf->ReadByte();
}
if (flags & TLF_SPRITE_VAR10) {
regs.sprite_var10 = buf->ReadByte();
if (regs.sprite_var10 > TLR_MAX_VAR10) {
grfmsg(1, "ReadSpriteLayoutRegisters: Spritelayout specifies var10 (%d) exceeding the maximal allowed value %d", regs.sprite_var10, TLR_MAX_VAR10);
DisableGrf(STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT);
return;
}
}
if (flags & TLF_PALETTE_VAR10) {
regs.palette_var10 = buf->ReadByte();
if (regs.palette_var10 > TLR_MAX_VAR10) {
grfmsg(1, "ReadSpriteLayoutRegisters: Spritelayout specifies var10 (%d) exceeding the maximal allowed value %d", regs.palette_var10, TLR_MAX_VAR10);
DisableGrf(STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT);
return;
}
}
}
/**
* Read a spritelayout from the GRF.
* @param buf Input
* @param num_building_sprites Number of building sprites to read
* @param use_cur_spritesets Whether to use currently referenceable action 1 sets.
* @param feature GrfSpecFeature to use spritesets from.
* @param allow_var10 Whether the spritelayout may specifiy var10 values for resolving multiple action-1-2-3 chains
* @param no_z_position Whether bounding boxes have no Z offset
* @param dts Layout container to output into
* @return True on error (GRF was disabled).
*/
static bool ReadSpriteLayout(ByteReader *buf, uint num_building_sprites, bool use_cur_spritesets, byte feature, bool allow_var10, bool no_z_position, NewGRFSpriteLayout *dts)
{
bool has_flags = HasBit(num_building_sprites, 6);
ClrBit(num_building_sprites, 6);
TileLayoutFlags valid_flags = TLF_KNOWN_FLAGS;
if (!allow_var10) valid_flags &= ~TLF_VAR10_FLAGS;
dts->Allocate(num_building_sprites); // allocate before reading groundsprite flags
uint16 *max_sprite_offset = AllocaM(uint16, num_building_sprites + 1);
uint16 *max_palette_offset = AllocaM(uint16, num_building_sprites + 1);
MemSetT(max_sprite_offset, 0, num_building_sprites + 1);
MemSetT(max_palette_offset, 0, num_building_sprites + 1);
/* Groundsprite */
TileLayoutFlags flags = ReadSpriteLayoutSprite(buf, has_flags, false, use_cur_spritesets, feature, &dts->ground, max_sprite_offset, max_palette_offset);
if (_cur.skip_sprites < 0) return true;
if (flags & ~(valid_flags & ~TLF_NON_GROUND_FLAGS)) {
grfmsg(1, "ReadSpriteLayout: Spritelayout uses invalid flag 0x%x for ground sprite", flags & ~(valid_flags & ~TLF_NON_GROUND_FLAGS));
DisableGrf(STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT);
return true;
}
ReadSpriteLayoutRegisters(buf, flags, false, dts, 0);
if (_cur.skip_sprites < 0) return true;
for (uint i = 0; i < num_building_sprites; i++) {
DrawTileSeqStruct *seq = const_cast<DrawTileSeqStruct*>(&dts->seq[i]);
flags = ReadSpriteLayoutSprite(buf, has_flags, false, use_cur_spritesets, feature, &seq->image, max_sprite_offset + i + 1, max_palette_offset + i + 1);
if (_cur.skip_sprites < 0) return true;
if (flags & ~valid_flags) {
grfmsg(1, "ReadSpriteLayout: Spritelayout uses unknown flag 0x%x", flags & ~valid_flags);
DisableGrf(STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT);
return true;
}
seq->delta_x = buf->ReadByte();
seq->delta_y = buf->ReadByte();
if (!no_z_position) seq->delta_z = buf->ReadByte();
if (seq->IsParentSprite()) {
seq->size_x = buf->ReadByte();
seq->size_y = buf->ReadByte();
seq->size_z = buf->ReadByte();
}
ReadSpriteLayoutRegisters(buf, flags, seq->IsParentSprite(), dts, i + 1);
if (_cur.skip_sprites < 0) return true;
}
/* Check if the number of sprites per spriteset is consistent */
bool is_consistent = true;
dts->consistent_max_offset = 0;
for (uint i = 0; i < num_building_sprites + 1; i++) {
if (max_sprite_offset[i] > 0) {
if (dts->consistent_max_offset == 0) {
dts->consistent_max_offset = max_sprite_offset[i];
} else if (dts->consistent_max_offset != max_sprite_offset[i]) {
is_consistent = false;
break;
}
}
if (max_palette_offset[i] > 0) {
if (dts->consistent_max_offset == 0) {
dts->consistent_max_offset = max_palette_offset[i];
} else if (dts->consistent_max_offset != max_palette_offset[i]) {
is_consistent = false;
break;
}
}
}
/* When the Action1 sets are unknown, everything should be 0 (no spriteset usage) or UINT16_MAX (some spriteset usage) */
assert(use_cur_spritesets || (is_consistent && (dts->consistent_max_offset == 0 || dts->consistent_max_offset == UINT16_MAX)));
if (!is_consistent || dts->registers != NULL) {
dts->consistent_max_offset = 0;
if (dts->registers == NULL) dts->AllocateRegisters();
for (uint i = 0; i < num_building_sprites + 1; i++) {
TileLayoutRegisters ®s = const_cast<TileLayoutRegisters&>(dts->registers[i]);
regs.max_sprite_offset = max_sprite_offset[i];
regs.max_palette_offset = max_palette_offset[i];
}
}
return false;
}
/**
* Translate the refit mask.
*/
static uint32 TranslateRefitMask(uint32 refit_mask)
{
uint32 result = 0;
uint8 bit;
FOR_EACH_SET_BIT(bit, refit_mask) {
CargoID cargo = GetCargoTranslation(bit, _cur.grffile, true);
if (cargo != CT_INVALID) SetBit(result, cargo);
}
return result;
}
/**
* Converts TTD(P) Base Price pointers into the enum used by OTTD
* See http://wiki.ttdpatch.net/tiki-index.php?page=BaseCosts
* @param base_pointer TTD(P) Base Price Pointer
* @param error_location Function name for grf error messages
* @param[out] index If \a base_pointer is valid, \a index is assigned to the matching price; else it is left unchanged
*/
static void ConvertTTDBasePrice(uint32 base_pointer, const char *error_location, Price *index)
{
/* Special value for 'none' */
if (base_pointer == 0) {
*index = INVALID_PRICE;
return;
}
static const uint32 start = 0x4B34; ///< Position of first base price
static const uint32 size = 6; ///< Size of each base price record
if (base_pointer < start || (base_pointer - start) % size != 0 || (base_pointer - start) / size >= PR_END) {
grfmsg(1, "%s: Unsupported running cost base 0x%04X, ignoring", error_location, base_pointer);
return;
}
*index = (Price)((base_pointer - start) / size);
}
/** Possible return values for the FeatureChangeInfo functions */
enum ChangeInfoResult {
CIR_SUCCESS, ///< Variable was parsed and read
CIR_DISABLED, ///< GRF was disabled due to error
CIR_UNHANDLED, ///< Variable was parsed but unread
CIR_UNKNOWN, ///< Variable is unknown
CIR_INVALID_ID, ///< Attempt to modify an invalid ID
};
typedef ChangeInfoResult (*VCI_Handler)(uint engine, int numinfo, int prop, ByteReader *buf);
/**
* Define properties common to all vehicles
* @param ei Engine info.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult CommonVehicleChangeInfo(EngineInfo *ei, int prop, ByteReader *buf)
{
switch (prop) {
case 0x00: // Introduction date
ei->base_intro = buf->ReadWord() + DAYS_TILL_ORIGINAL_BASE_YEAR;
break;
case 0x02: // Decay speed
ei->decay_speed = buf->ReadByte();
break;
case 0x03: // Vehicle life
ei->lifelength = buf->ReadByte();
break;
case 0x04: // Model life
ei->base_life = buf->ReadByte();
break;
case 0x06: // Climates available
ei->climates = buf->ReadByte();
break;
case PROP_VEHICLE_LOAD_AMOUNT: // 0x07 Loading speed
/* Amount of cargo loaded during a vehicle's "loading tick" */
ei->load_amount = buf->ReadByte();
break;
default:
return CIR_UNKNOWN;
}
return CIR_SUCCESS;
}
/**
* Define properties for rail vehicles
* @param engine :ocal ID of the first vehicle.
* @param numinfo Number of subsequent IDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult RailVehicleChangeInfo(uint engine, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
for (int i = 0; i < numinfo; i++) {
Engine *e = GetNewEngine(_cur.grffile, VEH_TRAIN, engine + i);
if (e == NULL) return CIR_INVALID_ID; // No engine could be allocated, so neither can any next vehicles
EngineInfo *ei = &e->info;
RailVehicleInfo *rvi = &e->u.rail;
switch (prop) {
case 0x05: { // Track type
uint8 tracktype = buf->ReadByte();
if (tracktype < _cur.grffile->railtype_list.Length()) {
_gted[e->index].railtypelabel = _cur.grffile->railtype_list[tracktype];
break;
}
switch (tracktype) {
case 0: _gted[e->index].railtypelabel = rvi->engclass >= 2 ? RAILTYPE_ELECTRIC_LABEL : RAILTYPE_RAIL_LABEL; break;
case 1: _gted[e->index].railtypelabel = RAILTYPE_MONO_LABEL; break;
case 2: _gted[e->index].railtypelabel = RAILTYPE_MAGLEV_LABEL; break;
default:
grfmsg(1, "RailVehicleChangeInfo: Invalid track type %d specified, ignoring", tracktype);
break;
}
break;
}
case 0x08: // AI passenger service
/* Tells the AI that this engine is designed for
* passenger services and shouldn't be used for freight. */
rvi->ai_passenger_only = buf->ReadByte();
break;
case PROP_TRAIN_SPEED: { // 0x09 Speed (1 unit is 1 km-ish/h)
uint16 speed = buf->ReadWord();
if (speed == 0xFFFF) speed = 0;
rvi->max_speed = speed;
break;
}
case PROP_TRAIN_POWER: // 0x0B Power
rvi->power = buf->ReadWord();
/* Set engine / wagon state based on power */
if (rvi->power != 0) {
if (rvi->railveh_type == RAILVEH_WAGON) {
rvi->railveh_type = RAILVEH_SINGLEHEAD;
}
} else {
rvi->railveh_type = RAILVEH_WAGON;
}
break;
case PROP_TRAIN_RUNNING_COST_FACTOR: // 0x0D Running cost factor
rvi->running_cost = buf->ReadByte();
break;
case 0x0E: // Running cost base
ConvertTTDBasePrice(buf->ReadDWord(), "RailVehicleChangeInfo", &rvi->running_cost_class);
break;
case 0x12: { // Sprite ID
uint8 spriteid = buf->ReadByte();
/* TTD sprite IDs point to a location in a 16bit array, but we use it
* as an array index, so we need it to be half the original value. */
if (spriteid < 0xFD) spriteid >>= 1;
rvi->image_index = spriteid;
break;
}
case 0x13: { // Dual-headed
uint8 dual = buf->ReadByte();
if (dual != 0) {
rvi->railveh_type = RAILVEH_MULTIHEAD;
} else {
rvi->railveh_type = rvi->power == 0 ?
RAILVEH_WAGON : RAILVEH_SINGLEHEAD;
}
break;
}
case PROP_TRAIN_CARGO_CAPACITY: // 0x14 Cargo capacity
rvi->capacity = buf->ReadByte();
break;
case 0x15: { // Cargo type
_gted[e->index].defaultcargo_grf = _cur.grffile;
uint8 ctype = buf->ReadByte();
if (ctype == 0xFF) {
/* 0xFF is specified as 'use first refittable' */
ei->cargo_type = CT_INVALID;
} else if (_cur.grffile->grf_version >= 8) {
/* Use translated cargo. Might result in CT_INVALID (first refittable), if cargo is not defined. */
ei->cargo_type = GetCargoTranslation(ctype, _cur.grffile);
} else if (ctype < NUM_CARGO) {
/* Use untranslated cargo. */
ei->cargo_type = ctype;
} else {
ei->cargo_type = CT_INVALID;
grfmsg(2, "RailVehicleChangeInfo: Invalid cargo type %d, using first refittable", ctype);
}
break;
}
case PROP_TRAIN_WEIGHT: // 0x16 Weight
SB(rvi->weight, 0, 8, buf->ReadByte());
break;
case PROP_TRAIN_COST_FACTOR: // 0x17 Cost factor
rvi->cost_factor = buf->ReadByte();
break;
case 0x18: // AI rank
grfmsg(2, "RailVehicleChangeInfo: Property 0x18 'AI rank' not used by NoAI, ignored.");
buf->ReadByte();
break;
case 0x19: { // Engine traction type
/* What do the individual numbers mean?
* 0x00 .. 0x07: Steam
* 0x08 .. 0x27: Diesel
* 0x28 .. 0x31: Electric
* 0x32 .. 0x37: Monorail
* 0x38 .. 0x41: Maglev
*/
uint8 traction = buf->ReadByte();
EngineClass engclass;
if (traction <= 0x07) {
engclass = EC_STEAM;
} else if (traction <= 0x27) {
engclass = EC_DIESEL;
} else if (traction <= 0x31) {
engclass = EC_ELECTRIC;
} else if (traction <= 0x37) {
engclass = EC_MONORAIL;
} else if (traction <= 0x41) {
engclass = EC_MAGLEV;
} else {
break;
}
if (_cur.grffile->railtype_list.Length() == 0) {
/* Use traction type to select between normal and electrified
* rail only when no translation list is in place. */
if (_gted[e->index].railtypelabel == RAILTYPE_RAIL_LABEL && engclass >= EC_ELECTRIC) _gted[e->index].railtypelabel = RAILTYPE_ELECTRIC_LABEL;
if (_gted[e->index].railtypelabel == RAILTYPE_ELECTRIC_LABEL && engclass < EC_ELECTRIC) _gted[e->index].railtypelabel = RAILTYPE_RAIL_LABEL;
}
rvi->engclass = engclass;
break;
}
case 0x1A: // Alter purchase list sort order
AlterVehicleListOrder(e->index, buf->ReadExtendedByte());
break;
case 0x1B: // Powered wagons power bonus
rvi->pow_wag_power = buf->ReadWord();
break;
case 0x1C: // Refit cost
ei->refit_cost = buf->ReadByte();
break;
case 0x1D: { // Refit cargo
uint32 mask = buf->ReadDWord();
_gted[e->index].UpdateRefittability(mask != 0);
ei->refit_mask = TranslateRefitMask(mask);
_gted[e->index].defaultcargo_grf = _cur.grffile;
break;
}
case 0x1E: // Callback
ei->callback_mask = buf->ReadByte();
break;
case PROP_TRAIN_TRACTIVE_EFFORT: // 0x1F Tractive effort coefficient
rvi->tractive_effort = buf->ReadByte();
break;
case 0x20: // Air drag
rvi->air_drag = buf->ReadByte();
break;
case PROP_TRAIN_SHORTEN_FACTOR: // 0x21 Shorter vehicle
rvi->shorten_factor = buf->ReadByte();
break;
case 0x22: // Visual effect
rvi->visual_effect = buf->ReadByte();
/* Avoid accidentally setting visual_effect to the default value
* Since bit 6 (disable effects) is set anyways, we can safely erase some bits. */
if (rvi->visual_effect == VE_DEFAULT) {
assert(HasBit(rvi->visual_effect, VE_DISABLE_EFFECT));
SB(rvi->visual_effect, VE_TYPE_START, VE_TYPE_COUNT, 0);
}
break;
case 0x23: // Powered wagons weight bonus
rvi->pow_wag_weight = buf->ReadByte();
break;
case 0x24: { // High byte of vehicle weight
byte weight = buf->ReadByte();
if (weight > 4) {
grfmsg(2, "RailVehicleChangeInfo: Nonsensical weight of %d tons, ignoring", weight << 8);
} else {
SB(rvi->weight, 8, 8, weight);
}
break;
}
case PROP_TRAIN_USER_DATA: // 0x25 User-defined bit mask to set when checking veh. var. 42
rvi->user_def_data = buf->ReadByte();
break;
case 0x26: // Retire vehicle early
ei->retire_early = buf->ReadByte();
break;
case 0x27: // Miscellaneous flags
ei->misc_flags = buf->ReadByte();
_loaded_newgrf_features.has_2CC |= HasBit(ei->misc_flags, EF_USES_2CC);
_gted[e->index].prop27_set = true;
break;
case 0x28: // Cargo classes allowed
_gted[e->index].cargo_allowed = buf->ReadWord();
_gted[e->index].UpdateRefittability(_gted[e->index].cargo_allowed != 0);
_gted[e->index].defaultcargo_grf = _cur.grffile;
break;
case 0x29: // Cargo classes disallowed
_gted[e->index].cargo_disallowed = buf->ReadWord();
_gted[e->index].UpdateRefittability(false);
break;
case 0x2A: // Long format introduction date (days since year 0)
ei->base_intro = buf->ReadDWord();
break;
case PROP_TRAIN_CARGO_AGE_PERIOD: // 0x2B Cargo aging period
ei->cargo_age_period = buf->ReadWord();
break;
case 0x2C: // CTT refit include list
case 0x2D: { // CTT refit exclude list
uint8 count = buf->ReadByte();
_gted[e->index].UpdateRefittability(prop == 0x2C && count != 0);
if (prop == 0x2C) _gted[e->index].defaultcargo_grf = _cur.grffile;
uint32 &ctt = prop == 0x2C ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask;
ctt = 0;
while (count--) {
CargoID ctype = GetCargoTranslation(buf->ReadByte(), _cur.grffile);
if (ctype == CT_INVALID) continue;
SetBit(ctt, ctype);
}
break;
}
default:
ret = CommonVehicleChangeInfo(ei, prop, buf);
break;
}
}
return ret;
}
/**
* Define properties for road vehicles
* @param engine Local ID of the first vehicle.
* @param numinfo Number of subsequent IDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult RoadVehicleChangeInfo(uint engine, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
for (int i = 0; i < numinfo; i++) {
Engine *e = GetNewEngine(_cur.grffile, VEH_ROAD, engine + i);
if (e == NULL) return CIR_INVALID_ID; // No engine could be allocated, so neither can any next vehicles
EngineInfo *ei = &e->info;
RoadVehicleInfo *rvi = &e->u.road;
switch (prop) {
case 0x08: // Speed (1 unit is 0.5 kmh)
rvi->max_speed = buf->ReadByte();
break;
case PROP_ROADVEH_RUNNING_COST_FACTOR: // 0x09 Running cost factor
rvi->running_cost = buf->ReadByte();
break;
case 0x0A: // Running cost base
ConvertTTDBasePrice(buf->ReadDWord(), "RoadVehicleChangeInfo", &rvi->running_cost_class);
break;
case 0x0E: { // Sprite ID
uint8 spriteid = buf->ReadByte();
/* cars have different custom id in the GRF file */
if (spriteid == 0xFF) spriteid = 0xFD;
if (spriteid < 0xFD) spriteid >>= 1;
rvi->image_index = spriteid;
break;
}
case PROP_ROADVEH_CARGO_CAPACITY: // 0x0F Cargo capacity
rvi->capacity = buf->ReadByte();
break;
case 0x10: { // Cargo type
_gted[e->index].defaultcargo_grf = _cur.grffile;
uint8 ctype = buf->ReadByte();
if (ctype == 0xFF) {
/* 0xFF is specified as 'use first refittable' */
ei->cargo_type = CT_INVALID;
} else if (_cur.grffile->grf_version >= 8) {
/* Use translated cargo. Might result in CT_INVALID (first refittable), if cargo is not defined. */
ei->cargo_type = GetCargoTranslation(ctype, _cur.grffile);
} else if (ctype < NUM_CARGO) {
/* Use untranslated cargo. */
ei->cargo_type = ctype;
} else {
ei->cargo_type = CT_INVALID;
grfmsg(2, "RailVehicleChangeInfo: Invalid cargo type %d, using first refittable", ctype);
}
break;
}
case PROP_ROADVEH_COST_FACTOR: // 0x11 Cost factor
rvi->cost_factor = buf->ReadByte();
break;
case 0x12: // SFX
rvi->sfx = buf->ReadByte();
break;
case PROP_ROADVEH_POWER: // Power in units of 10 HP.
rvi->power = buf->ReadByte();
break;
case PROP_ROADVEH_WEIGHT: // Weight in units of 1/4 tons.
rvi->weight = buf->ReadByte();
break;
case PROP_ROADVEH_SPEED: // Speed in mph/0.8
_gted[e->index].rv_max_speed = buf->ReadByte();
break;
case 0x16: { // Cargoes available for refitting
uint32 mask = buf->ReadDWord();
_gted[e->index].UpdateRefittability(mask != 0);
ei->refit_mask = TranslateRefitMask(mask);
_gted[e->index].defaultcargo_grf = _cur.grffile;
break;
}
case 0x17: // Callback mask
ei->callback_mask = buf->ReadByte();
break;
case PROP_ROADVEH_TRACTIVE_EFFORT: // Tractive effort coefficient in 1/256.
rvi->tractive_effort = buf->ReadByte();
break;
case 0x19: // Air drag
rvi->air_drag = buf->ReadByte();
break;
case 0x1A: // Refit cost
ei->refit_cost = buf->ReadByte();
break;
case 0x1B: // Retire vehicle early
ei->retire_early = buf->ReadByte();
break;
case 0x1C: // Miscellaneous flags
ei->misc_flags = buf->ReadByte();
_loaded_newgrf_features.has_2CC |= HasBit(ei->misc_flags, EF_USES_2CC);
break;
case 0x1D: // Cargo classes allowed
_gted[e->index].cargo_allowed = buf->ReadWord();
_gted[e->index].UpdateRefittability(_gted[e->index].cargo_allowed != 0);
_gted[e->index].defaultcargo_grf = _cur.grffile;
break;
case 0x1E: // Cargo classes disallowed
_gted[e->index].cargo_disallowed = buf->ReadWord();
_gted[e->index].UpdateRefittability(false);
break;
case 0x1F: // Long format introduction date (days since year 0)
ei->base_intro = buf->ReadDWord();
break;
case 0x20: // Alter purchase list sort order
AlterVehicleListOrder(e->index, buf->ReadExtendedByte());
break;
case 0x21: // Visual effect
rvi->visual_effect = buf->ReadByte();
/* Avoid accidentally setting visual_effect to the default value
* Since bit 6 (disable effects) is set anyways, we can safely erase some bits. */
if (rvi->visual_effect == VE_DEFAULT) {
assert(HasBit(rvi->visual_effect, VE_DISABLE_EFFECT));
SB(rvi->visual_effect, VE_TYPE_START, VE_TYPE_COUNT, 0);
}
break;
case PROP_ROADVEH_CARGO_AGE_PERIOD: // 0x22 Cargo aging period
ei->cargo_age_period = buf->ReadWord();
break;
case PROP_ROADVEH_SHORTEN_FACTOR: // 0x23 Shorter vehicle
rvi->shorten_factor = buf->ReadByte();
break;
case 0x24: // CTT refit include list
case 0x25: { // CTT refit exclude list
uint8 count = buf->ReadByte();
_gted[e->index].UpdateRefittability(prop == 0x24 && count != 0);
if (prop == 0x24) _gted[e->index].defaultcargo_grf = _cur.grffile;
uint32 &ctt = prop == 0x24 ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask;
ctt = 0;
while (count--) {
CargoID ctype = GetCargoTranslation(buf->ReadByte(), _cur.grffile);
if (ctype == CT_INVALID) continue;
SetBit(ctt, ctype);
}
break;
}
default:
ret = CommonVehicleChangeInfo(ei, prop, buf);
break;
}
}
return ret;
}
/**
* Define properties for ships
* @param engine Local ID of the first vehicle.
* @param numinfo Number of subsequent IDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult ShipVehicleChangeInfo(uint engine, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
for (int i = 0; i < numinfo; i++) {
Engine *e = GetNewEngine(_cur.grffile, VEH_SHIP, engine + i);
if (e == NULL) return CIR_INVALID_ID; // No engine could be allocated, so neither can any next vehicles
EngineInfo *ei = &e->info;
ShipVehicleInfo *svi = &e->u.ship;
switch (prop) {
case 0x08: { // Sprite ID
uint8 spriteid = buf->ReadByte();
/* ships have different custom id in the GRF file */
if (spriteid == 0xFF) spriteid = 0xFD;
if (spriteid < 0xFD) spriteid >>= 1;
svi->image_index = spriteid;
break;
}
case 0x09: // Refittable
svi->old_refittable = (buf->ReadByte() != 0);
break;
case PROP_SHIP_COST_FACTOR: // 0x0A Cost factor
svi->cost_factor = buf->ReadByte();
break;
case PROP_SHIP_SPEED: // 0x0B Speed (1 unit is 0.5 km-ish/h)
svi->max_speed = buf->ReadByte();
break;
case 0x0C: { // Cargo type
_gted[e->index].defaultcargo_grf = _cur.grffile;
uint8 ctype = buf->ReadByte();
if (ctype == 0xFF) {
/* 0xFF is specified as 'use first refittable' */
ei->cargo_type = CT_INVALID;
} else if (_cur.grffile->grf_version >= 8) {
/* Use translated cargo. Might result in CT_INVALID (first refittable), if cargo is not defined. */
ei->cargo_type = GetCargoTranslation(ctype, _cur.grffile);
} else if (ctype < NUM_CARGO) {
/* Use untranslated cargo. */
ei->cargo_type = ctype;
} else {
ei->cargo_type = CT_INVALID;
grfmsg(2, "RailVehicleChangeInfo: Invalid cargo type %d, using first refittable", ctype);
}
break;
}
case PROP_SHIP_CARGO_CAPACITY: // 0x0D Cargo capacity
svi->capacity = buf->ReadWord();
break;
case PROP_SHIP_RUNNING_COST_FACTOR: // 0x0F Running cost factor
svi->running_cost = buf->ReadByte();
break;
case 0x10: // SFX
svi->sfx = buf->ReadByte();
break;
case 0x11: { // Cargoes available for refitting
uint32 mask = buf->ReadDWord();
_gted[e->index].UpdateRefittability(mask != 0);
ei->refit_mask = TranslateRefitMask(mask);
_gted[e->index].defaultcargo_grf = _cur.grffile;
break;
}
case 0x12: // Callback mask
ei->callback_mask = buf->ReadByte();
break;
case 0x13: // Refit cost
ei->refit_cost = buf->ReadByte();
break;
case 0x14: // Ocean speed fraction
svi->ocean_speed_frac = buf->ReadByte();
break;
case 0x15: // Canal speed fraction
svi->canal_speed_frac = buf->ReadByte();
break;
case 0x16: // Retire vehicle early
ei->retire_early = buf->ReadByte();
break;
case 0x17: // Miscellaneous flags
ei->misc_flags = buf->ReadByte();
_loaded_newgrf_features.has_2CC |= HasBit(ei->misc_flags, EF_USES_2CC);
break;
case 0x18: // Cargo classes allowed
_gted[e->index].cargo_allowed = buf->ReadWord();
_gted[e->index].UpdateRefittability(_gted[e->index].cargo_allowed != 0);
_gted[e->index].defaultcargo_grf = _cur.grffile;
break;
case 0x19: // Cargo classes disallowed
_gted[e->index].cargo_disallowed = buf->ReadWord();
_gted[e->index].UpdateRefittability(false);
break;
case 0x1A: // Long format introduction date (days since year 0)
ei->base_intro = buf->ReadDWord();
break;
case 0x1B: // Alter purchase list sort order
AlterVehicleListOrder(e->index, buf->ReadExtendedByte());
break;
case 0x1C: // Visual effect
svi->visual_effect = buf->ReadByte();
/* Avoid accidentally setting visual_effect to the default value
* Since bit 6 (disable effects) is set anyways, we can safely erase some bits. */
if (svi->visual_effect == VE_DEFAULT) {
assert(HasBit(svi->visual_effect, VE_DISABLE_EFFECT));
SB(svi->visual_effect, VE_TYPE_START, VE_TYPE_COUNT, 0);
}
break;
case PROP_SHIP_CARGO_AGE_PERIOD: // 0x1D Cargo aging period
ei->cargo_age_period = buf->ReadWord();
break;
case 0x1E: // CTT refit include list
case 0x1F: { // CTT refit exclude list
uint8 count = buf->ReadByte();
_gted[e->index].UpdateRefittability(prop == 0x1E && count != 0);
if (prop == 0x1E) _gted[e->index].defaultcargo_grf = _cur.grffile;
uint32 &ctt = prop == 0x1E ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask;
ctt = 0;
while (count--) {
CargoID ctype = GetCargoTranslation(buf->ReadByte(), _cur.grffile);
if (ctype == CT_INVALID) continue;
SetBit(ctt, ctype);
}
break;
}
default:
ret = CommonVehicleChangeInfo(ei, prop, buf);
break;
}
}
return ret;
}
/**
* Define properties for aircraft
* @param engine Local ID of the aircraft.
* @param numinfo Number of subsequent IDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult AircraftVehicleChangeInfo(uint engine, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
for (int i = 0; i < numinfo; i++) {
Engine *e = GetNewEngine(_cur.grffile, VEH_AIRCRAFT, engine + i);
if (e == NULL) return CIR_INVALID_ID; // No engine could be allocated, so neither can any next vehicles
EngineInfo *ei = &e->info;
AircraftVehicleInfo *avi = &e->u.air;
switch (prop) {
case 0x08: { // Sprite ID
uint8 spriteid = buf->ReadByte();
/* aircraft have different custom id in the GRF file */
if (spriteid == 0xFF) spriteid = 0xFD;
if (spriteid < 0xFD) spriteid >>= 1;
avi->image_index = spriteid;
break;
}
case 0x09: // Helicopter
if (buf->ReadByte() == 0) {
avi->subtype = AIR_HELI;
} else {
SB(avi->subtype, 0, 1, 1); // AIR_CTOL
}
break;
case 0x0A: // Large
SB(avi->subtype, 1, 1, (buf->ReadByte() != 0 ? 1 : 0)); // AIR_FAST
break;
case PROP_AIRCRAFT_COST_FACTOR: // 0x0B Cost factor
avi->cost_factor = buf->ReadByte();
break;
case PROP_AIRCRAFT_SPEED: // 0x0C Speed (1 unit is 8 mph, we translate to 1 unit is 1 km-ish/h)
avi->max_speed = (buf->ReadByte() * 128) / 10;
break;
case 0x0D: // Acceleration
avi->acceleration = buf->ReadByte();
break;
case PROP_AIRCRAFT_RUNNING_COST_FACTOR: // 0x0E Running cost factor
avi->running_cost = buf->ReadByte();
break;
case PROP_AIRCRAFT_PASSENGER_CAPACITY: // 0x0F Passenger capacity
avi->passenger_capacity = buf->ReadWord();
break;
case PROP_AIRCRAFT_MAIL_CAPACITY: // 0x11 Mail capacity
avi->mail_capacity = buf->ReadByte();
break;
case 0x12: // SFX
avi->sfx = buf->ReadByte();
break;
case 0x13: { // Cargoes available for refitting
uint32 mask = buf->ReadDWord();
_gted[e->index].UpdateRefittability(mask != 0);
ei->refit_mask = TranslateRefitMask(mask);
_gted[e->index].defaultcargo_grf = _cur.grffile;
break;
}
case 0x14: // Callback mask
ei->callback_mask = buf->ReadByte();
break;
case 0x15: // Refit cost
ei->refit_cost = buf->ReadByte();
break;
case 0x16: // Retire vehicle early
ei->retire_early = buf->ReadByte();
break;
case 0x17: // Miscellaneous flags
ei->misc_flags = buf->ReadByte();
_loaded_newgrf_features.has_2CC |= HasBit(ei->misc_flags, EF_USES_2CC);
break;
case 0x18: // Cargo classes allowed
_gted[e->index].cargo_allowed = buf->ReadWord();
_gted[e->index].UpdateRefittability(_gted[e->index].cargo_allowed != 0);
_gted[e->index].defaultcargo_grf = _cur.grffile;
break;
case 0x19: // Cargo classes disallowed
_gted[e->index].cargo_disallowed = buf->ReadWord();
_gted[e->index].UpdateRefittability(false);
break;
case 0x1A: // Long format introduction date (days since year 0)
ei->base_intro = buf->ReadDWord();
break;
case 0x1B: // Alter purchase list sort order
AlterVehicleListOrder(e->index, buf->ReadExtendedByte());
break;
case PROP_AIRCRAFT_CARGO_AGE_PERIOD: // 0x1C Cargo aging period
ei->cargo_age_period = buf->ReadWord();
break;
case 0x1D: // CTT refit include list
case 0x1E: { // CTT refit exclude list
uint8 count = buf->ReadByte();
_gted[e->index].UpdateRefittability(prop == 0x1D && count != 0);
if (prop == 0x1D) _gted[e->index].defaultcargo_grf = _cur.grffile;
uint32 &ctt = prop == 0x1D ? _gted[e->index].ctt_include_mask : _gted[e->index].ctt_exclude_mask;
ctt = 0;
while (count--) {
CargoID ctype = GetCargoTranslation(buf->ReadByte(), _cur.grffile);
if (ctype == CT_INVALID) continue;
SetBit(ctt, ctype);
}
break;
}
case PROP_AIRCRAFT_RANGE: // 0x1F Max aircraft range
avi->max_range = buf->ReadWord();
break;
default:
ret = CommonVehicleChangeInfo(ei, prop, buf);
break;
}
}
return ret;
}
/**
* Define properties for stations
* @param stdid StationID of the first station tile.
* @param numinfo Number of subsequent station tiles to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult StationChangeInfo(uint stid, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
if (stid + numinfo > MAX_STATIONS) {
grfmsg(1, "StationChangeInfo: Station %u is invalid, max %u, ignoring", stid + numinfo, MAX_STATIONS);
return CIR_INVALID_ID;
}
/* Allocate station specs if necessary */
if (_cur.grffile->stations == NULL) _cur.grffile->stations = CallocT<StationSpec*>(MAX_STATIONS);
for (int i = 0; i < numinfo; i++) {
StationSpec *statspec = _cur.grffile->stations[stid + i];
/* Check that the station we are modifying is defined. */
if (statspec == NULL && prop != 0x08) {
grfmsg(2, "StationChangeInfo: Attempt to modify undefined station %u, ignoring", stid + i);
return CIR_INVALID_ID;
}
switch (prop) {
case 0x08: { // Class ID
StationSpec **spec = &_cur.grffile->stations[stid + i];
/* Property 0x08 is special; it is where the station is allocated */
if (*spec == NULL) *spec = CallocT<StationSpec>(1);
/* Swap classid because we read it in BE meaning WAYP or DFLT */
uint32 classid = buf->ReadDWord();
(*spec)->cls_id = StationClass::Allocate(BSWAP32(classid));
break;
}
case 0x09: // Define sprite layout
statspec->tiles = buf->ReadExtendedByte();
delete[] statspec->renderdata; // delete earlier loaded stuff
statspec->renderdata = new NewGRFSpriteLayout[statspec->tiles];
for (uint t = 0; t < statspec->tiles; t++) {
NewGRFSpriteLayout *dts = &statspec->renderdata[t];
dts->consistent_max_offset = UINT16_MAX; // Spritesets are unknown, so no limit.
if (buf->HasData(4) && *(uint32*)buf->Data() == 0) {
buf->Skip(4);
extern const DrawTileSprites _station_display_datas_rail[8];
dts->Clone(&_station_display_datas_rail[t % 8]);
continue;
}
ReadSpriteLayoutSprite(buf, false, false, false, GSF_STATIONS, &dts->ground);
/* On error, bail out immediately. Temporary GRF data was already freed */
if (_cur.skip_sprites < 0) return CIR_DISABLED;
static SmallVector<DrawTileSeqStruct, 8> tmp_layout;
tmp_layout.Clear();
for (;;) {
/* no relative bounding box support */
DrawTileSeqStruct *dtss = tmp_layout.Append();
MemSetT(dtss, 0);
dtss->delta_x = buf->ReadByte();
if (dtss->IsTerminator()) break;
dtss->delta_y = buf->ReadByte();
dtss->delta_z = buf->ReadByte();
dtss->size_x = buf->ReadByte();
dtss->size_y = buf->ReadByte();
dtss->size_z = buf->ReadByte();
ReadSpriteLayoutSprite(buf, false, true, false, GSF_STATIONS, &dtss->image);
/* On error, bail out immediately. Temporary GRF data was already freed */
if (_cur.skip_sprites < 0) return CIR_DISABLED;
}
dts->Clone(tmp_layout.Begin());
}
break;
case 0x0A: { // Copy sprite layout
byte srcid = buf->ReadByte();
const StationSpec *srcstatspec = _cur.grffile->stations[srcid];
if (srcstatspec == NULL) {
grfmsg(1, "StationChangeInfo: Station %u is not defined, cannot copy sprite layout to %u.", srcid, stid + i);
continue;
}
delete[] statspec->renderdata; // delete earlier loaded stuff
statspec->tiles = srcstatspec->tiles;
statspec->renderdata = new NewGRFSpriteLayout[statspec->tiles];
for (uint t = 0; t < statspec->tiles; t++) {
statspec->renderdata[t].Clone(&srcstatspec->renderdata[t]);
}
break;
}
case 0x0B: // Callback mask
statspec->callback_mask = buf->ReadByte();
break;
case 0x0C: // Disallowed number of platforms
statspec->disallowed_platforms = buf->ReadByte();
break;
case 0x0D: // Disallowed platform lengths
statspec->disallowed_lengths = buf->ReadByte();
break;
case 0x0E: // Define custom layout
statspec->copied_layouts = false;
while (buf->HasData()) {
byte length = buf->ReadByte();
byte number = buf->ReadByte();
StationLayout layout;
uint l, p;
if (length == 0 || number == 0) break;
if (length > statspec->lengths) {
statspec->platforms = ReallocT(statspec->platforms, length);
memset(statspec->platforms + statspec->lengths, 0, length - statspec->lengths);
statspec->layouts = ReallocT(statspec->layouts, length);
memset(statspec->layouts + statspec->lengths, 0,
(length - statspec->lengths) * sizeof(*statspec->layouts));
statspec->lengths = length;
}
l = length - 1; // index is zero-based
if (number > statspec->platforms[l]) {
statspec->layouts[l] = ReallocT(statspec->layouts[l], number);
/* We expect NULL being 0 here, but C99 guarantees that. */
memset(statspec->layouts[l] + statspec->platforms[l], 0,
(number - statspec->platforms[l]) * sizeof(**statspec->layouts));
statspec->platforms[l] = number;
}
p = 0;
layout = MallocT<byte>(length * number);
try {
for (l = 0; l < length; l++) {
for (p = 0; p < number; p++) {
layout[l * number + p] = buf->ReadByte();
}
}
} catch (...) {
free(layout);
throw;
}
l--;
p--;
free(statspec->layouts[l][p]);
statspec->layouts[l][p] = layout;
}
break;
case 0x0F: { // Copy custom layout
byte srcid = buf->ReadByte();
const StationSpec *srcstatspec = _cur.grffile->stations[srcid];
if (srcstatspec == NULL) {
grfmsg(1, "StationChangeInfo: Station %u is not defined, cannot copy tile layout to %u.", srcid, stid + i);
continue;
}
statspec->lengths = srcstatspec->lengths;
statspec->platforms = srcstatspec->platforms;
statspec->layouts = srcstatspec->layouts;
statspec->copied_layouts = true;
break;
}
case 0x10: // Little/lots cargo threshold
statspec->cargo_threshold = buf->ReadWord();
break;
case 0x11: // Pylon placement
statspec->pylons = buf->ReadByte();
break;
case 0x12: // Cargo types for random triggers
statspec->cargo_triggers = buf->ReadDWord();
if (_cur.grffile->grf_version >= 7) {
statspec->cargo_triggers = TranslateRefitMask(statspec->cargo_triggers);
}
break;
case 0x13: // General flags
statspec->flags = buf->ReadByte();
break;
case 0x14: // Overhead wire placement
statspec->wires = buf->ReadByte();
break;
case 0x15: // Blocked tiles
statspec->blocked = buf->ReadByte();
break;
case 0x16: // Animation info
statspec->animation.frames = buf->ReadByte();
statspec->animation.status = buf->ReadByte();
break;
case 0x17: // Animation speed
statspec->animation.speed = buf->ReadByte();
break;
case 0x18: // Animation triggers
statspec->animation.triggers = buf->ReadWord();
break;
case 0x1A: // Advanced sprite layout
statspec->tiles = buf->ReadExtendedByte();
delete[] statspec->renderdata; // delete earlier loaded stuff
statspec->renderdata = new NewGRFSpriteLayout[statspec->tiles];
for (uint t = 0; t < statspec->tiles; t++) {
NewGRFSpriteLayout *dts = &statspec->renderdata[t];
uint num_building_sprites = buf->ReadByte();
/* On error, bail out immediately. Temporary GRF data was already freed */
if (ReadSpriteLayout(buf, num_building_sprites, false, GSF_STATIONS, true, false, dts)) return CIR_DISABLED;
}
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
/**
* Define properties for water features
* @param id Type of the first water feature.
* @param numinfo Number of subsequent water feature ids to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult CanalChangeInfo(uint id, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
if (id + numinfo > CF_END) {
grfmsg(1, "CanalChangeInfo: Canal feature %u is invalid, max %u, ignoring", id + numinfo, CF_END);
return CIR_INVALID_ID;
}
for (int i = 0; i < numinfo; i++) {
CanalProperties *cp = &_cur.grffile->canal_local_properties[id + i];
switch (prop) {
case 0x08:
cp->callback_mask = buf->ReadByte();
break;
case 0x09:
cp->flags = buf->ReadByte();
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
/**
* Define properties for bridges
* @param brid BridgeID of the bridge.
* @param numinfo Number of subsequent bridgeIDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult BridgeChangeInfo(uint brid, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
if (brid + numinfo > MAX_BRIDGES) {
grfmsg(1, "BridgeChangeInfo: Bridge %u is invalid, max %u, ignoring", brid + numinfo, MAX_BRIDGES);
return CIR_INVALID_ID;
}
for (int i = 0; i < numinfo; i++) {
BridgeSpec *bridge = &_bridge[brid + i];
switch (prop) {
case 0x08: { // Year of availability
/* We treat '0' as always available */
byte year = buf->ReadByte();
bridge->avail_year = (year > 0 ? ORIGINAL_BASE_YEAR + year : 0);
break;
}
case 0x09: // Minimum length
bridge->min_length = buf->ReadByte();
break;
case 0x0A: // Maximum length
bridge->max_length = buf->ReadByte();
if (bridge->max_length > 16) bridge->max_length = 0xFFFF;
break;
case 0x0B: // Cost factor
bridge->price = buf->ReadByte();
break;
case 0x0C: // Maximum speed
bridge->speed = buf->ReadWord();
break;
case 0x0D: { // Bridge sprite tables
byte tableid = buf->ReadByte();
byte numtables = buf->ReadByte();
if (bridge->sprite_table == NULL) {
/* Allocate memory for sprite table pointers and zero out */
bridge->sprite_table = CallocT<PalSpriteID*>(7);
}
for (; numtables-- != 0; tableid++) {
if (tableid >= 7) { // skip invalid data
grfmsg(1, "BridgeChangeInfo: Table %d >= 7, skipping", tableid);
for (byte sprite = 0; sprite < 32; sprite++) buf->ReadDWord();
continue;
}
if (bridge->sprite_table[tableid] == NULL) {
bridge->sprite_table[tableid] = MallocT<PalSpriteID>(32);
}
for (byte sprite = 0; sprite < 32; sprite++) {
SpriteID image = buf->ReadWord();
PaletteID pal = buf->ReadWord();
bridge->sprite_table[tableid][sprite].sprite = image;
bridge->sprite_table[tableid][sprite].pal = pal;
MapSpriteMappingRecolour(&bridge->sprite_table[tableid][sprite]);
}
}
break;
}
case 0x0E: // Flags; bit 0 - disable far pillars
bridge->flags = buf->ReadByte();
break;
case 0x0F: // Long format year of availability (year since year 0)
bridge->avail_year = Clamp(buf->ReadDWord(), MIN_YEAR, MAX_YEAR);
break;
case 0x10: { // purchase string
StringID newone = GetGRFStringID(_cur.grffile->grfid, buf->ReadWord());
if (newone != STR_UNDEFINED) bridge->material = newone;
break;
}
case 0x11: // description of bridge with rails or roads
case 0x12: {
StringID newone = GetGRFStringID(_cur.grffile->grfid, buf->ReadWord());
if (newone != STR_UNDEFINED) bridge->transport_name[prop - 0x11] = newone;
break;
}
case 0x13: // 16 bits cost multiplier
bridge->price = buf->ReadWord();
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
/**
* Ignore a house property
* @param prop Property to read.
* @param buf Property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult IgnoreTownHouseProperty(int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
switch (prop) {
case 0x09:
case 0x0B:
case 0x0C:
case 0x0D:
case 0x0E:
case 0x0F:
case 0x11:
case 0x14:
case 0x15:
case 0x16:
case 0x18:
case 0x19:
case 0x1A:
case 0x1B:
case 0x1C:
case 0x1D:
case 0x1F:
buf->ReadByte();
break;
case 0x0A:
case 0x10:
case 0x12:
case 0x13:
case 0x21:
case 0x22:
buf->ReadWord();
break;
case 0x1E:
buf->ReadDWord();
break;
case 0x17:
for (uint j = 0; j < 4; j++) buf->ReadByte();
break;
case 0x20: {
byte count = buf->ReadByte();
for (byte j = 0; j < count; j++) buf->ReadByte();
break;
}
default:
ret = CIR_UNKNOWN;
break;
}
return ret;
}
/**
* Define properties for houses
* @param hid HouseID of the house.
* @param numinfo Number of subsequent houseIDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult TownHouseChangeInfo(uint hid, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
if (hid + numinfo > HOUSE_MAX) {
grfmsg(1, "TownHouseChangeInfo: Too many houses loaded (%u), max (%u). Ignoring.", hid + numinfo, HOUSE_MAX);
return CIR_INVALID_ID;
}
/* Allocate house specs if they haven't been allocated already. */
if (_cur.grffile->housespec == NULL) {
_cur.grffile->housespec = CallocT<HouseSpec*>(HOUSE_MAX);
}
for (int i = 0; i < numinfo; i++) {
HouseSpec *housespec = _cur.grffile->housespec[hid + i];
if (prop != 0x08 && housespec == NULL) {
/* If the house property 08 is not yet set, ignore this property */
ChangeInfoResult cir = IgnoreTownHouseProperty(prop, buf);
if (cir > ret) ret = cir;
continue;
}
switch (prop) {
case 0x08: { // Substitute building type, and definition of a new house
HouseSpec **house = &_cur.grffile->housespec[hid + i];
byte subs_id = buf->ReadByte();
if (subs_id == 0xFF) {
/* Instead of defining a new house, a substitute house id
* of 0xFF disables the old house with the current id. */
HouseSpec::Get(hid + i)->enabled = false;
continue;
} else if (subs_id >= NEW_HOUSE_OFFSET) {
/* The substitute id must be one of the original houses. */
grfmsg(2, "TownHouseChangeInfo: Attempt to use new house %u as substitute house for %u. Ignoring.", subs_id, hid + i);
continue;
}
/* Allocate space for this house. */
if (*house == NULL) *house = CallocT<HouseSpec>(1);
housespec = *house;
MemCpyT(housespec, HouseSpec::Get(subs_id));
housespec->enabled = true;
housespec->grf_prop.local_id = hid + i;
housespec->grf_prop.subst_id = subs_id;
housespec->grf_prop.grffile = _cur.grffile;
housespec->random_colour[0] = 0x04; // those 4 random colours are the base colour
housespec->random_colour[1] = 0x08; // for all new houses
housespec->random_colour[2] = 0x0C; // they stand for red, blue, orange and green
housespec->random_colour[3] = 0x06;
/* Make sure that the third cargo type is valid in this
* climate. This can cause problems when copying the properties
* of a house that accepts food, where the new house is valid
* in the temperate climate. */
if (!CargoSpec::Get(housespec->accepts_cargo[2])->IsValid()) {
housespec->cargo_acceptance[2] = 0;
}
_loaded_newgrf_features.has_newhouses = true;
break;
}
case 0x09: // Building flags
housespec->building_flags = (BuildingFlags)buf->ReadByte();
break;
case 0x0A: { // Availability years
uint16 years = buf->ReadWord();
housespec->min_year = GB(years, 0, 8) > 150 ? MAX_YEAR : ORIGINAL_BASE_YEAR + GB(years, 0, 8);
housespec->max_year = GB(years, 8, 8) > 150 ? MAX_YEAR : ORIGINAL_BASE_YEAR + GB(years, 8, 8);
break;
}
case 0x0B: // Population
housespec->population = buf->ReadByte();
break;
case 0x0C: // Mail generation multiplier
housespec->mail_generation = buf->ReadByte();
break;
case 0x0D: // Passenger acceptance
case 0x0E: // Mail acceptance
housespec->cargo_acceptance[prop - 0x0D] = buf->ReadByte();
break;
case 0x0F: { // Goods/candy, food/fizzy drinks acceptance
int8 goods = buf->ReadByte();
/* If value of goods is negative, it means in fact food or, if in toyland, fizzy_drink acceptance.
* Else, we have "standard" 3rd cargo type, goods or candy, for toyland once more */
CargoID cid = (goods >= 0) ? ((_settings_game.game_creation.landscape == LT_TOYLAND) ? CT_CANDY : CT_GOODS) :
((_settings_game.game_creation.landscape == LT_TOYLAND) ? CT_FIZZY_DRINKS : CT_FOOD);
/* Make sure the cargo type is valid in this climate. */
if (!CargoSpec::Get(cid)->IsValid()) goods = 0;
housespec->accepts_cargo[2] = cid;
housespec->cargo_acceptance[2] = abs(goods); // but we do need positive value here
break;
}
case 0x10: // Local authority rating decrease on removal
housespec->remove_rating_decrease = buf->ReadWord();
break;
case 0x11: // Removal cost multiplier
housespec->removal_cost = buf->ReadByte();
break;
case 0x12: // Building name ID
housespec->building_name = buf->ReadWord();
_string_to_grf_mapping[&housespec->building_name] = _cur.grffile->grfid;
break;
case 0x13: // Building availability mask
housespec->building_availability = (HouseZones)buf->ReadWord();
break;
case 0x14: // House callback mask
housespec->callback_mask |= buf->ReadByte();
break;
case 0x15: { // House override byte
byte override = buf->ReadByte();
/* The house being overridden must be an original house. */
if (override >= NEW_HOUSE_OFFSET) {
grfmsg(2, "TownHouseChangeInfo: Attempt to override new house %u with house id %u. Ignoring.", override, hid + i);
continue;
}
_house_mngr.Add(hid + i, _cur.grffile->grfid, override);
break;
}
case 0x16: // Periodic refresh multiplier
housespec->processing_time = min(buf->ReadByte(), 63);
break;
case 0x17: // Four random colours to use
for (uint j = 0; j < 4; j++) housespec->random_colour[j] = buf->ReadByte();
break;
case 0x18: // Relative probability of appearing
housespec->probability = buf->ReadByte();
break;
case 0x19: // Extra flags
housespec->extra_flags = (HouseExtraFlags)buf->ReadByte();
break;
case 0x1A: // Animation frames
housespec->animation.frames = buf->ReadByte();
housespec->animation.status = GB(housespec->animation.frames, 7, 1);
SB(housespec->animation.frames, 7, 1, 0);
break;
case 0x1B: // Animation speed
housespec->animation.speed = Clamp(buf->ReadByte(), 2, 16);
break;
case 0x1C: // Class of the building type
housespec->class_id = AllocateHouseClassID(buf->ReadByte(), _cur.grffile->grfid);
break;
case 0x1D: // Callback mask part 2
housespec->callback_mask |= (buf->ReadByte() << 8);
break;
case 0x1E: { // Accepted cargo types
uint32 cargotypes = buf->ReadDWord();
/* Check if the cargo types should not be changed */
if (cargotypes == 0xFFFFFFFF) break;
for (uint j = 0; j < 3; j++) {
/* Get the cargo number from the 'list' */
uint8 cargo_part = GB(cargotypes, 8 * j, 8);
CargoID cargo = GetCargoTranslation(cargo_part, _cur.grffile);
if (cargo == CT_INVALID) {
/* Disable acceptance of invalid cargo type */
housespec->cargo_acceptance[j] = 0;
} else {
housespec->accepts_cargo[j] = cargo;
}
}
break;
}
case 0x1F: // Minimum life span
housespec->minimum_life = buf->ReadByte();
break;
case 0x20: { // Cargo acceptance watch list
byte count = buf->ReadByte();
for (byte j = 0; j < count; j++) {
CargoID cargo = GetCargoTranslation(buf->ReadByte(), _cur.grffile);
if (cargo != CT_INVALID) SetBit(housespec->watched_cargoes, cargo);
}
break;
}
case 0x21: // long introduction year
housespec->min_year = buf->ReadWord();
break;
case 0x22: // long maximum year
housespec->max_year = buf->ReadWord();
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
/**
* Get the language map associated with a given NewGRF and language.
* @param grfid The NewGRF to get the map for.
* @param language_id The (NewGRF) language ID to get the map for.
* @return The LanguageMap, or NULL if it couldn't be found.
*/
/* static */ const LanguageMap *LanguageMap::GetLanguageMap(uint32 grfid, uint8 language_id)
{
/* LanguageID "MAX_LANG", i.e. 7F is any. This language can't have a gender/case mapping, but has to be handled gracefully. */
const GRFFile *grffile = GetFileByGRFID(grfid);
return (grffile != NULL && grffile->language_map != NULL && language_id < MAX_LANG) ? &grffile->language_map[language_id] : NULL;
}
/**
* Load a cargo- or railtype-translation table.
* @param gvid ID of the global variable. This is basically only checked for zerones.
* @param numinfo Number of subsequent IDs to change the property for.
* @param buf The property value.
* @param [in,out] translation_table Storage location for the translation table.
* @param name Name of the table for debug output.
* @return ChangeInfoResult.
*/
template <typename T>
static ChangeInfoResult LoadTranslationTable(uint gvid, int numinfo, ByteReader *buf, T &translation_table, const char *name)
{
if (gvid != 0) {
grfmsg(1, "LoadTranslationTable: %s translation table must start at zero", name);
return CIR_INVALID_ID;
}
translation_table.Clear();
for (int i = 0; i < numinfo; i++) {
uint32 item = buf->ReadDWord();
*translation_table.Append() = BSWAP32(item);
}
return CIR_SUCCESS;
}
/**
* Define properties for global variables
* @param gvid ID of the global variable.
* @param numinfo Number of subsequent IDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult GlobalVarChangeInfo(uint gvid, int numinfo, int prop, ByteReader *buf)
{
/* Properties which are handled as a whole */
switch (prop) {
case 0x09: // Cargo Translation Table; loading during both reservation and activation stage (in case it is selected depending on defined cargos)
return LoadTranslationTable(gvid, numinfo, buf, _cur.grffile->cargo_list, "Cargo");
case 0x12: // Rail type translation table; loading during both reservation and activation stage (in case it is selected depending on defined railtypes)
return LoadTranslationTable(gvid, numinfo, buf, _cur.grffile->railtype_list, "Rail type");
default:
break;
}
/* Properties which are handled per item */
ChangeInfoResult ret = CIR_SUCCESS;
for (int i = 0; i < numinfo; i++) {
switch (prop) {
case 0x08: { // Cost base factor
int factor = buf->ReadByte();
uint price = gvid + i;
if (price < PR_END) {
_cur.grffile->price_base_multipliers[price] = min<int>(factor - 8, MAX_PRICE_MODIFIER);
} else {
grfmsg(1, "GlobalVarChangeInfo: Price %d out of range, ignoring", price);
}
break;
}
case 0x0A: { // Currency display names
uint curidx = GetNewgrfCurrencyIdConverted(gvid + i);
StringID newone = GetGRFStringID(_cur.grffile->grfid, buf->ReadWord());
if ((newone != STR_UNDEFINED) && (curidx < NUM_CURRENCY)) {
_currency_specs[curidx].name = newone;
}
break;
}
case 0x0B: { // Currency multipliers
uint curidx = GetNewgrfCurrencyIdConverted(gvid + i);
uint32 rate = buf->ReadDWord();
if (curidx < NUM_CURRENCY) {
/* TTDPatch uses a multiple of 1000 for its conversion calculations,
* which OTTD does not. For this reason, divide grf value by 1000,
* to be compatible */
_currency_specs[curidx].rate = rate / 1000;
} else {
grfmsg(1, "GlobalVarChangeInfo: Currency multipliers %d out of range, ignoring", curidx);
}
break;
}
case 0x0C: { // Currency options
uint curidx = GetNewgrfCurrencyIdConverted(gvid + i);
uint16 options = buf->ReadWord();
if (curidx < NUM_CURRENCY) {
_currency_specs[curidx].separator[0] = GB(options, 0, 8);
_currency_specs[curidx].separator[1] = '\0';
/* By specifying only one bit, we prevent errors,
* since newgrf specs said that only 0 and 1 can be set for symbol_pos */
_currency_specs[curidx].symbol_pos = GB(options, 8, 1);
} else {
grfmsg(1, "GlobalVarChangeInfo: Currency option %d out of range, ignoring", curidx);
}
break;
}
case 0x0D: { // Currency prefix symbol
uint curidx = GetNewgrfCurrencyIdConverted(gvid + i);
uint32 tempfix = buf->ReadDWord();
if (curidx < NUM_CURRENCY) {
memcpy(_currency_specs[curidx].prefix, &tempfix, 4);
_currency_specs[curidx].prefix[4] = 0;
} else {
grfmsg(1, "GlobalVarChangeInfo: Currency symbol %d out of range, ignoring", curidx);
}
break;
}
case 0x0E: { // Currency suffix symbol
uint curidx = GetNewgrfCurrencyIdConverted(gvid + i);
uint32 tempfix = buf->ReadDWord();
if (curidx < NUM_CURRENCY) {
memcpy(&_currency_specs[curidx].suffix, &tempfix, 4);
_currency_specs[curidx].suffix[4] = 0;
} else {
grfmsg(1, "GlobalVarChangeInfo: Currency symbol %d out of range, ignoring", curidx);
}
break;
}
case 0x0F: { // Euro introduction dates
uint curidx = GetNewgrfCurrencyIdConverted(gvid + i);
Year year_euro = buf->ReadWord();
if (curidx < NUM_CURRENCY) {
_currency_specs[curidx].to_euro = year_euro;
} else {
grfmsg(1, "GlobalVarChangeInfo: Euro intro date %d out of range, ignoring", curidx);
}
break;
}
case 0x10: // Snow line height table
if (numinfo > 1 || IsSnowLineSet()) {
grfmsg(1, "GlobalVarChangeInfo: The snowline can only be set once (%d)", numinfo);
} else if (buf->Remaining() < SNOW_LINE_MONTHS * SNOW_LINE_DAYS) {
grfmsg(1, "GlobalVarChangeInfo: Not enough entries set in the snowline table (" PRINTF_SIZE ")", buf->Remaining());
} else {
byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS];
for (uint i = 0; i < SNOW_LINE_MONTHS; i++) {
for (uint j = 0; j < SNOW_LINE_DAYS; j++) {
table[i][j] = buf->ReadByte();
if (_cur.grffile->grf_version >= 8) {
if (table[i][j] != 0xFF) table[i][j] = table[i][j] * (1 + _settings_game.construction.max_heightlevel) / 256;
} else {
if (table[i][j] >= 128) {
/* no snow */
table[i][j] = 0xFF;
} else {
table[i][j] = table[i][j] * (1 + _settings_game.construction.max_heightlevel) / 128;
}
}
}
}
SetSnowLine(table);
}
break;
case 0x11: // GRF match for engine allocation
/* This is loaded during the reservation stage, so just skip it here. */
/* Each entry is 8 bytes. */
buf->Skip(8);
break;
case 0x13: // Gender translation table
case 0x14: // Case translation table
case 0x15: { // Plural form translation
uint curidx = gvid + i; // The current index, i.e. language.
const LanguageMetadata *lang = curidx < MAX_LANG ? GetLanguage(curidx) : NULL;
if (lang == NULL) {
grfmsg(1, "GlobalVarChangeInfo: Language %d is not known, ignoring", curidx);
/* Skip over the data. */
if (prop == 0x15) {
buf->ReadByte();
} else {
while (buf->ReadByte() != 0) {
buf->ReadString();
}
}
break;
}
if (_cur.grffile->language_map == NULL) _cur.grffile->language_map = new LanguageMap[MAX_LANG];
if (prop == 0x15) {
uint plural_form = buf->ReadByte();
if (plural_form >= LANGUAGE_MAX_PLURAL) {
grfmsg(1, "GlobalVarChanceInfo: Plural form %d is out of range, ignoring", plural_form);
} else {
_cur.grffile->language_map[curidx].plural_form = plural_form;
}
break;
}
byte newgrf_id = buf->ReadByte(); // The NewGRF (custom) identifier.
while (newgrf_id != 0) {
const char *name = buf->ReadString(); // The name for the OpenTTD identifier.
/* We'll just ignore the UTF8 identifier character. This is (fairly)
* safe as OpenTTD's strings gender/cases are usually in ASCII which
* is just a subset of UTF8, or they need the bigger UTF8 characters
* such as Cyrillic. Thus we will simply assume they're all UTF8. */
WChar c;
size_t len = Utf8Decode(&c, name);
if (c == NFO_UTF8_IDENTIFIER) name += len;
LanguageMap::Mapping map;
map.newgrf_id = newgrf_id;
if (prop == 0x13) {
map.openttd_id = lang->GetGenderIndex(name);
if (map.openttd_id >= MAX_NUM_GENDERS) {
grfmsg(1, "GlobalVarChangeInfo: Gender name %s is not known, ignoring", name);
} else {
*_cur.grffile->language_map[curidx].gender_map.Append() = map;
}
} else {
map.openttd_id = lang->GetCaseIndex(name);
if (map.openttd_id >= MAX_NUM_CASES) {
grfmsg(1, "GlobalVarChangeInfo: Case name %s is not known, ignoring", name);
} else {
*_cur.grffile->language_map[curidx].case_map.Append() = map;
}
}
newgrf_id = buf->ReadByte();
}
break;
}
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
static ChangeInfoResult GlobalVarReserveInfo(uint gvid, int numinfo, int prop, ByteReader *buf)
{
/* Properties which are handled as a whole */
switch (prop) {
case 0x09: // Cargo Translation Table; loading during both reservation and activation stage (in case it is selected depending on defined cargos)
return LoadTranslationTable(gvid, numinfo, buf, _cur.grffile->cargo_list, "Cargo");
case 0x12: // Rail type translation table; loading during both reservation and activation stage (in case it is selected depending on defined railtypes)
return LoadTranslationTable(gvid, numinfo, buf, _cur.grffile->railtype_list, "Rail type");
default:
break;
}
/* Properties which are handled per item */
ChangeInfoResult ret = CIR_SUCCESS;
for (int i = 0; i < numinfo; i++) {
switch (prop) {
case 0x08: // Cost base factor
case 0x15: // Plural form translation
buf->ReadByte();
break;
case 0x0A: // Currency display names
case 0x0C: // Currency options
case 0x0F: // Euro introduction dates
buf->ReadWord();
break;
case 0x0B: // Currency multipliers
case 0x0D: // Currency prefix symbol
case 0x0E: // Currency suffix symbol
buf->ReadDWord();
break;
case 0x10: // Snow line height table
buf->Skip(SNOW_LINE_MONTHS * SNOW_LINE_DAYS);
break;
case 0x11: { // GRF match for engine allocation
uint32 s = buf->ReadDWord();
uint32 t = buf->ReadDWord();
SetNewGRFOverride(s, t);
break;
}
case 0x13: // Gender translation table
case 0x14: // Case translation table
while (buf->ReadByte() != 0) {
buf->ReadString();
}
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
/**
* Define properties for cargoes
* @param cid Local ID of the cargo.
* @param numinfo Number of subsequent IDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult CargoChangeInfo(uint cid, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
if (cid + numinfo > NUM_CARGO) {
grfmsg(2, "CargoChangeInfo: Cargo type %d out of range (max %d)", cid + numinfo, NUM_CARGO - 1);
return CIR_INVALID_ID;
}
for (int i = 0; i < numinfo; i++) {
CargoSpec *cs = CargoSpec::Get(cid + i);
switch (prop) {
case 0x08: // Bit number of cargo
cs->bitnum = buf->ReadByte();
if (cs->IsValid()) {
cs->grffile = _cur.grffile;
SetBit(_cargo_mask, cid + i);
} else {
ClrBit(_cargo_mask, cid + i);
}
break;
case 0x09: // String ID for cargo type name
cs->name = buf->ReadWord();
_string_to_grf_mapping[&cs->name] = _cur.grffile->grfid;
break;
case 0x0A: // String for 1 unit of cargo
cs->name_single = buf->ReadWord();
_string_to_grf_mapping[&cs->name_single] = _cur.grffile->grfid;
break;
case 0x0B: // String for singular quantity of cargo (e.g. 1 tonne of coal)
case 0x1B: // String for cargo units
/* String for units of cargo. This is different in OpenTTD
* (e.g. tonnes) to TTDPatch (e.g. {COMMA} tonne of coal).
* Property 1B is used to set OpenTTD's behaviour. */
cs->units_volume = buf->ReadWord();
_string_to_grf_mapping[&cs->units_volume] = _cur.grffile->grfid;
break;
case 0x0C: // String for plural quantity of cargo (e.g. 10 tonnes of coal)
case 0x1C: // String for any amount of cargo
/* Strings for an amount of cargo. This is different in OpenTTD
* (e.g. {WEIGHT} of coal) to TTDPatch (e.g. {COMMA} tonnes of coal).
* Property 1C is used to set OpenTTD's behaviour. */
cs->quantifier = buf->ReadWord();
_string_to_grf_mapping[&cs->quantifier] = _cur.grffile->grfid;
break;
case 0x0D: // String for two letter cargo abbreviation
cs->abbrev = buf->ReadWord();
_string_to_grf_mapping[&cs->abbrev] = _cur.grffile->grfid;
break;
case 0x0E: // Sprite ID for cargo icon
cs->sprite = buf->ReadWord();
break;
case 0x0F: // Weight of one unit of cargo
cs->weight = buf->ReadByte();
break;
case 0x10: // Used for payment calculation
cs->transit_days[0] = buf->ReadByte();
break;
case 0x11: // Used for payment calculation
cs->transit_days[1] = buf->ReadByte();
break;
case 0x12: // Base cargo price
cs->initial_payment = buf->ReadDWord();
break;
case 0x13: // Colour for station rating bars
cs->rating_colour = buf->ReadByte();
break;
case 0x14: // Colour for cargo graph
cs->legend_colour = buf->ReadByte();
break;
case 0x15: // Freight status
cs->is_freight = (buf->ReadByte() != 0);
break;
case 0x16: // Cargo classes
cs->classes = buf->ReadWord();
break;
case 0x17: // Cargo label
cs->label = buf->ReadDWord();
cs->label = BSWAP32(cs->label);
break;
case 0x18: { // Town growth substitute type
uint8 substitute_type = buf->ReadByte();
switch (substitute_type) {
case 0x00: cs->town_effect = TE_PASSENGERS; break;
case 0x02: cs->town_effect = TE_MAIL; break;
case 0x05: cs->town_effect = TE_GOODS; break;
case 0x09: cs->town_effect = TE_WATER; break;
case 0x0B: cs->town_effect = TE_FOOD; break;
default:
grfmsg(1, "CargoChangeInfo: Unknown town growth substitute value %d, setting to none.", substitute_type);
case 0xFF: cs->town_effect = TE_NONE; break;
}
break;
}
case 0x19: // Town growth coefficient
cs->multipliertowngrowth = buf->ReadWord();
break;
case 0x1A: // Bitmask of callbacks to use
cs->callback_mask = buf->ReadByte();
break;
case 0x1D: // Vehicle capacity muliplier
cs->multiplier = max<uint16>(1u, buf->ReadWord());
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
/**
* Define properties for sound effects
* @param sid Local ID of the sound.
* @param numinfo Number of subsequent IDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult SoundEffectChangeInfo(uint sid, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
if (_cur.grffile->sound_offset == 0) {
grfmsg(1, "SoundEffectChangeInfo: No effects defined, skipping");
return CIR_INVALID_ID;
}
if (sid + numinfo - ORIGINAL_SAMPLE_COUNT > _cur.grffile->num_sounds) {
grfmsg(1, "SoundEffectChangeInfo: Attemting to change undefined sound effect (%u), max (%u). Ignoring.", sid + numinfo, ORIGINAL_SAMPLE_COUNT + _cur.grffile->num_sounds);
return CIR_INVALID_ID;
}
for (int i = 0; i < numinfo; i++) {
SoundEntry *sound = GetSound(sid + i + _cur.grffile->sound_offset - ORIGINAL_SAMPLE_COUNT);
switch (prop) {
case 0x08: // Relative volume
sound->volume = buf->ReadByte();
break;
case 0x09: // Priority
sound->priority = buf->ReadByte();
break;
case 0x0A: { // Override old sound
SoundID orig_sound = buf->ReadByte();
if (orig_sound >= ORIGINAL_SAMPLE_COUNT) {
grfmsg(1, "SoundEffectChangeInfo: Original sound %d not defined (max %d)", orig_sound, ORIGINAL_SAMPLE_COUNT);
} else {
SoundEntry *old_sound = GetSound(orig_sound);
/* Literally copy the data of the new sound over the original */
*old_sound = *sound;
}
break;
}
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
/**
* Ignore an industry tile property
* @param prop The property to ignore.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult IgnoreIndustryTileProperty(int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
switch (prop) {
case 0x09:
case 0x0D:
case 0x0E:
case 0x10:
case 0x11:
case 0x12:
buf->ReadByte();
break;
case 0x0A:
case 0x0B:
case 0x0C:
case 0x0F:
buf->ReadWord();
break;
default:
ret = CIR_UNKNOWN;
break;
}
return ret;
}
/**
* Define properties for industry tiles
* @param indtid Local ID of the industry tile.
* @param numinfo Number of subsequent industry tile IDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult IndustrytilesChangeInfo(uint indtid, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
if (indtid + numinfo > NUM_INDUSTRYTILES) {
grfmsg(1, "IndustryTilesChangeInfo: Too many industry tiles loaded (%u), max (%u). Ignoring.", indtid + numinfo, NUM_INDUSTRYTILES);
return CIR_INVALID_ID;
}
/* Allocate industry tile specs if they haven't been allocated already. */
if (_cur.grffile->indtspec == NULL) {
_cur.grffile->indtspec = CallocT<IndustryTileSpec*>(NUM_INDUSTRYTILES);
}
for (int i = 0; i < numinfo; i++) {
IndustryTileSpec *tsp = _cur.grffile->indtspec[indtid + i];
if (prop != 0x08 && tsp == NULL) {
ChangeInfoResult cir = IgnoreIndustryTileProperty(prop, buf);
if (cir > ret) ret = cir;
continue;
}
switch (prop) {
case 0x08: { // Substitute industry tile type
IndustryTileSpec **tilespec = &_cur.grffile->indtspec[indtid + i];
byte subs_id = buf->ReadByte();
if (subs_id >= NEW_INDUSTRYTILEOFFSET) {
/* The substitute id must be one of the original industry tile. */
grfmsg(2, "IndustryTilesChangeInfo: Attempt to use new industry tile %u as substitute industry tile for %u. Ignoring.", subs_id, indtid + i);
continue;
}
/* Allocate space for this industry. */
if (*tilespec == NULL) {
*tilespec = CallocT<IndustryTileSpec>(1);
tsp = *tilespec;
memcpy(tsp, &_industry_tile_specs[subs_id], sizeof(_industry_tile_specs[subs_id]));
tsp->enabled = true;
/* A copied tile should not have the animation infos copied too.
* The anim_state should be left untouched, though
* It is up to the author to animate them himself */
tsp->anim_production = INDUSTRYTILE_NOANIM;
tsp->anim_next = INDUSTRYTILE_NOANIM;
tsp->grf_prop.local_id = indtid + i;
tsp->grf_prop.subst_id = subs_id;
tsp->grf_prop.grffile = _cur.grffile;
_industile_mngr.AddEntityID(indtid + i, _cur.grffile->grfid, subs_id); // pre-reserve the tile slot
}
break;
}
case 0x09: { // Industry tile override
byte ovrid = buf->ReadByte();
/* The industry being overridden must be an original industry. */
if (ovrid >= NEW_INDUSTRYTILEOFFSET) {
grfmsg(2, "IndustryTilesChangeInfo: Attempt to override new industry tile %u with industry tile id %u. Ignoring.", ovrid, indtid + i);
continue;
}
_industile_mngr.Add(indtid + i, _cur.grffile->grfid, ovrid);
break;
}
case 0x0A: // Tile acceptance
case 0x0B:
case 0x0C: {
uint16 acctp = buf->ReadWord();
tsp->accepts_cargo[prop - 0x0A] = GetCargoTranslation(GB(acctp, 0, 8), _cur.grffile);
tsp->acceptance[prop - 0x0A] = GB(acctp, 8, 8);
break;
}
case 0x0D: // Land shape flags
tsp->slopes_refused = (Slope)buf->ReadByte();
break;
case 0x0E: // Callback mask
tsp->callback_mask = buf->ReadByte();
break;
case 0x0F: // Animation information
tsp->animation.frames = buf->ReadByte();
tsp->animation.status = buf->ReadByte();
break;
case 0x10: // Animation speed
tsp->animation.speed = buf->ReadByte();
break;
case 0x11: // Triggers for callback 25
tsp->animation.triggers = buf->ReadByte();
break;
case 0x12: // Special flags
tsp->special_flags = (IndustryTileSpecialFlags)buf->ReadByte();
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
/**
* Ignore an industry property
* @param prop The property to ignore.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult IgnoreIndustryProperty(int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
switch (prop) {
case 0x09:
case 0x0B:
case 0x0F:
case 0x12:
case 0x13:
case 0x14:
case 0x17:
case 0x18:
case 0x19:
case 0x21:
case 0x22:
buf->ReadByte();
break;
case 0x0C:
case 0x0D:
case 0x0E:
case 0x10:
case 0x1B:
case 0x1F:
case 0x24:
buf->ReadWord();
break;
case 0x11:
case 0x1A:
case 0x1C:
case 0x1D:
case 0x1E:
case 0x20:
case 0x23:
buf->ReadDWord();
break;
case 0x0A: {
byte num_table = buf->ReadByte();
for (byte j = 0; j < num_table; j++) {
for (uint k = 0;; k++) {
byte x = buf->ReadByte();
if (x == 0xFE && k == 0) {
buf->ReadByte();
buf->ReadByte();
break;
}
byte y = buf->ReadByte();
if (x == 0 && y == 0x80) break;
byte gfx = buf->ReadByte();
if (gfx == 0xFE) buf->ReadWord();
}
}
break;
}
case 0x16:
for (byte j = 0; j < 3; j++) buf->ReadByte();
break;
case 0x15: {
byte number_of_sounds = buf->ReadByte();
for (uint8 j = 0; j < number_of_sounds; j++) {
buf->ReadByte();
}
break;
}
default:
ret = CIR_UNKNOWN;
break;
}
return ret;
}
/**
* Validate the industry layout; e.g. to prevent duplicate tiles.
* @param layout The layout to check.
* @param size The size of the layout.
* @return True if the layout is deemed valid.
*/
static bool ValidateIndustryLayout(const IndustryTileTable *layout, int size)
{
for (int i = 0; i < size - 1; i++) {
for (int j = i + 1; j < size; j++) {
if (layout[i].ti.x == layout[j].ti.x &&
layout[i].ti.y == layout[j].ti.y) {
return false;
}
}
}
return true;
}
/** Clean the tile table of the IndustrySpec if it's needed. */
static void CleanIndustryTileTable(IndustrySpec *ind)
{
if (HasBit(ind->cleanup_flag, CLEAN_TILELAYOUT) && ind->table != NULL) {
for (int j = 0; j < ind->num_table; j++) {
/* remove the individual layouts */
free(ind->table[j]);
}
/* remove the layouts pointers */
free(ind->table);
ind->table = NULL;
}
}
/**
* Define properties for industries
* @param indid Local ID of the industry.
* @param numinfo Number of subsequent industry IDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
if (indid + numinfo > NUM_INDUSTRYTYPES) {
grfmsg(1, "IndustriesChangeInfo: Too many industries loaded (%u), max (%u). Ignoring.", indid + numinfo, NUM_INDUSTRYTYPES);
return CIR_INVALID_ID;
}
/* Allocate industry specs if they haven't been allocated already. */
if (_cur.grffile->industryspec == NULL) {
_cur.grffile->industryspec = CallocT<IndustrySpec*>(NUM_INDUSTRYTYPES);
}
for (int i = 0; i < numinfo; i++) {
IndustrySpec *indsp = _cur.grffile->industryspec[indid + i];
if (prop != 0x08 && indsp == NULL) {
ChangeInfoResult cir = IgnoreIndustryProperty(prop, buf);
if (cir > ret) ret = cir;
continue;
}
switch (prop) {
case 0x08: { // Substitute industry type
IndustrySpec **indspec = &_cur.grffile->industryspec[indid + i];
byte subs_id = buf->ReadByte();
if (subs_id == 0xFF) {
/* Instead of defining a new industry, a substitute industry id
* of 0xFF disables the old industry with the current id. */
_industry_specs[indid + i].enabled = false;
continue;
} else if (subs_id >= NEW_INDUSTRYOFFSET) {
/* The substitute id must be one of the original industry. */
grfmsg(2, "_industry_specs: Attempt to use new industry %u as substitute industry for %u. Ignoring.", subs_id, indid + i);
continue;
}
/* Allocate space for this industry.
* Only need to do it once. If ever it is called again, it should not
* do anything */
if (*indspec == NULL) {
*indspec = CallocT<IndustrySpec>(1);
indsp = *indspec;
memcpy(indsp, &_origin_industry_specs[subs_id], sizeof(_industry_specs[subs_id]));
indsp->enabled = true;
indsp->grf_prop.local_id = indid + i;
indsp->grf_prop.subst_id = subs_id;
indsp->grf_prop.grffile = _cur.grffile;
/* If the grf industry needs to check its surounding upon creation, it should
* rely on callbacks, not on the original placement functions */
indsp->check_proc = CHECK_NOTHING;
}
break;
}
case 0x09: { // Industry type override
byte ovrid = buf->ReadByte();
/* The industry being overridden must be an original industry. */
if (ovrid >= NEW_INDUSTRYOFFSET) {
grfmsg(2, "IndustriesChangeInfo: Attempt to override new industry %u with industry id %u. Ignoring.", ovrid, indid + i);
continue;
}
indsp->grf_prop.override = ovrid;
_industry_mngr.Add(indid + i, _cur.grffile->grfid, ovrid);
break;
}
case 0x0A: { // Set industry layout(s)
byte new_num_layouts = buf->ReadByte(); // Number of layaouts
/* We read the total size in bytes, but we can't rely on the
* newgrf to provide a sane value. First assume the value is
* sane but later on we make sure we enlarge the array if the
* newgrf contains more data. Each tile uses either 3 or 5
* bytes, so to play it safe we assume 3. */
uint32 def_num_tiles = buf->ReadDWord() / 3 + 1;
IndustryTileTable **tile_table = CallocT<IndustryTileTable*>(new_num_layouts); // Table with tiles to compose an industry
IndustryTileTable *itt = CallocT<IndustryTileTable>(def_num_tiles); // Temporary array to read the tile layouts from the GRF
uint size;
const IndustryTileTable *copy_from;
try {
for (byte j = 0; j < new_num_layouts; j++) {
for (uint k = 0;; k++) {
if (k >= def_num_tiles) {
grfmsg(3, "IndustriesChangeInfo: Incorrect size for industry tile layout definition for industry %u.", indid);
/* Size reported by newgrf was not big enough so enlarge the array. */
def_num_tiles *= 2;
itt = ReallocT<IndustryTileTable>(itt, def_num_tiles);
}
itt[k].ti.x = buf->ReadByte(); // Offsets from northermost tile
if (itt[k].ti.x == 0xFE && k == 0) {
/* This means we have to borrow the layout from an old industry */
IndustryType type = buf->ReadByte(); // industry holding required layout
byte laynbr = buf->ReadByte(); // layout number to borrow
copy_from = _origin_industry_specs[type].table[laynbr];
for (size = 1;; size++) {
if (copy_from[size - 1].ti.x == -0x80 && copy_from[size - 1].ti.y == 0) break;
}
break;
}
itt[k].ti.y = buf->ReadByte(); // Or table definition finalisation
if (itt[k].ti.x == 0 && itt[k].ti.y == 0x80) {
/* Not the same terminator. The one we are using is rather
x = -80, y = x . So, adjust it. */
itt[k].ti.x = -0x80;
itt[k].ti.y = 0;
itt[k].gfx = 0;
size = k + 1;
copy_from = itt;
break;
}
itt[k].gfx = buf->ReadByte();
if (itt[k].gfx == 0xFE) {
/* Use a new tile from this GRF */
int local_tile_id = buf->ReadWord();
/* Read the ID from the _industile_mngr. */
int tempid = _industile_mngr.GetID(local_tile_id, _cur.grffile->grfid);
if (tempid == INVALID_INDUSTRYTILE) {
grfmsg(2, "IndustriesChangeInfo: Attempt to use industry tile %u with industry id %u, not yet defined. Ignoring.", local_tile_id, indid);
} else {
/* Declared as been valid, can be used */
itt[k].gfx = tempid;
size = k + 1;
copy_from = itt;
}
} else if (itt[k].gfx == 0xFF) {
itt[k].ti.x = (int8)GB(itt[k].ti.x, 0, 8);
itt[k].ti.y = (int8)GB(itt[k].ti.y, 0, 8);
}
}
if (!ValidateIndustryLayout(copy_from, size)) {
/* The industry layout was not valid, so skip this one. */
grfmsg(1, "IndustriesChangeInfo: Invalid industry layout for industry id %u. Ignoring", indid);
new_num_layouts--;
j--;
} else {
tile_table[j] = CallocT<IndustryTileTable>(size);
memcpy(tile_table[j], copy_from, sizeof(*copy_from) * size);
}
}
} catch (...) {
for (int i = 0; i < new_num_layouts; i++) {
free(tile_table[i]);
}
free(tile_table);
free(itt);
throw;
}
/* Clean the tile table if it was already set by a previous prop A. */
CleanIndustryTileTable(indsp);
/* Install final layout construction in the industry spec */
indsp->num_table = new_num_layouts;
indsp->table = tile_table;
SetBit(indsp->cleanup_flag, CLEAN_TILELAYOUT);
free(itt);
break;
}
case 0x0B: // Industry production flags
indsp->life_type = (IndustryLifeType)buf->ReadByte();
break;
case 0x0C: // Industry closure message
indsp->closure_text = buf->ReadWord();
_string_to_grf_mapping[&indsp->closure_text] = _cur.grffile->grfid;
break;
case 0x0D: // Production increase message
indsp->production_up_text = buf->ReadWord();
_string_to_grf_mapping[&indsp->production_up_text] = _cur.grffile->grfid;
break;
case 0x0E: // Production decrease message
indsp->production_down_text = buf->ReadWord();
_string_to_grf_mapping[&indsp->production_down_text] = _cur.grffile->grfid;
break;
case 0x0F: // Fund cost multiplier
indsp->cost_multiplier = buf->ReadByte();
break;
case 0x10: // Production cargo types
for (byte j = 0; j < 2; j++) {
indsp->produced_cargo[j] = GetCargoTranslation(buf->ReadByte(), _cur.grffile);
}
break;
case 0x11: // Acceptance cargo types
for (byte j = 0; j < 3; j++) {
indsp->accepts_cargo[j] = GetCargoTranslation(buf->ReadByte(), _cur.grffile);
}
buf->ReadByte(); // Unnused, eat it up
break;
case 0x12: // Production multipliers
case 0x13:
indsp->production_rate[prop - 0x12] = buf->ReadByte();
break;
case 0x14: // Minimal amount of cargo distributed
indsp->minimal_cargo = buf->ReadByte();
break;
case 0x15: { // Random sound effects
indsp->number_of_sounds = buf->ReadByte();
uint8 *sounds = MallocT<uint8>(indsp->number_of_sounds);
try {
for (uint8 j = 0; j < indsp->number_of_sounds; j++) {
sounds[j] = buf->ReadByte();
}
} catch (...) {
free(sounds);
throw;
}
if (HasBit(indsp->cleanup_flag, CLEAN_RANDOMSOUNDS)) {
free(indsp->random_sounds);
}
indsp->random_sounds = sounds;
SetBit(indsp->cleanup_flag, CLEAN_RANDOMSOUNDS);
break;
}
case 0x16: // Conflicting industry types
for (byte j = 0; j < 3; j++) indsp->conflicting[j] = buf->ReadByte();
break;
case 0x17: // Probability in random game
indsp->appear_creation[_settings_game.game_creation.landscape] = buf->ReadByte();
break;
case 0x18: // Probability during gameplay
indsp->appear_ingame[_settings_game.game_creation.landscape] = buf->ReadByte();
break;
case 0x19: // Map colour
indsp->map_colour = buf->ReadByte();
break;
case 0x1A: // Special industry flags to define special behavior
indsp->behaviour = (IndustryBehaviour)buf->ReadDWord();
break;
case 0x1B: // New industry text ID
indsp->new_industry_text = buf->ReadWord();
_string_to_grf_mapping[&indsp->new_industry_text] = _cur.grffile->grfid;
break;
case 0x1C: // Input cargo multipliers for the three input cargo types
case 0x1D:
case 0x1E: {
uint32 multiples = buf->ReadDWord();
indsp->input_cargo_multiplier[prop - 0x1C][0] = GB(multiples, 0, 16);
indsp->input_cargo_multiplier[prop - 0x1C][1] = GB(multiples, 16, 16);
break;
}
case 0x1F: // Industry name
indsp->name = buf->ReadWord();
_string_to_grf_mapping[&indsp->name] = _cur.grffile->grfid;
break;
case 0x20: // Prospecting success chance
indsp->prospecting_chance = buf->ReadDWord();
break;
case 0x21: // Callback mask
case 0x22: { // Callback additional mask
byte aflag = buf->ReadByte();
SB(indsp->callback_mask, (prop - 0x21) * 8, 8, aflag);
break;
}
case 0x23: // removal cost multiplier
indsp->removal_cost_multiplier = buf->ReadDWord();
break;
case 0x24: // name for nearby station
indsp->station_name = buf->ReadWord();
if (indsp->station_name != STR_NULL) _string_to_grf_mapping[&indsp->station_name] = _cur.grffile->grfid;
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
/**
* Create a copy of the tile table so it can be freed later
* without problems.
* @param as The AirportSpec to copy the arrays of.
*/
static void DuplicateTileTable(AirportSpec *as)
{
AirportTileTable **table_list = MallocT<AirportTileTable*>(as->num_table);
for (int i = 0; i < as->num_table; i++) {
uint num_tiles = 1;
const AirportTileTable *it = as->table[0];
do {
num_tiles++;
} while ((++it)->ti.x != -0x80);
table_list[i] = MallocT<AirportTileTable>(num_tiles);
MemCpyT(table_list[i], as->table[i], num_tiles);
}
as->table = table_list;
HangarTileTable *depot_table = MallocT<HangarTileTable>(as->nof_depots);
MemCpyT(depot_table, as->depot_table, as->nof_depots);
as->depot_table = depot_table;
}
/**
* Define properties for airports
* @param airport Local ID of the airport.
* @param numinfo Number of subsequent airport IDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult AirportChangeInfo(uint airport, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
if (airport + numinfo > NUM_AIRPORTS) {
grfmsg(1, "AirportChangeInfo: Too many airports, trying id (%u), max (%u). Ignoring.", airport + numinfo, NUM_AIRPORTS);
return CIR_INVALID_ID;
}
/* Allocate industry specs if they haven't been allocated already. */
if (_cur.grffile->airportspec == NULL) {
_cur.grffile->airportspec = CallocT<AirportSpec*>(NUM_AIRPORTS);
}
for (int i = 0; i < numinfo; i++) {
AirportSpec *as = _cur.grffile->airportspec[airport + i];
if (as == NULL && prop != 0x08 && prop != 0x09) {
grfmsg(2, "AirportChangeInfo: Attempt to modify undefined airport %u, ignoring", airport + i);
return CIR_INVALID_ID;
}
switch (prop) {
case 0x08: { // Modify original airport
byte subs_id = buf->ReadByte();
if (subs_id == 0xFF) {
/* Instead of defining a new airport, an airport id
* of 0xFF disables the old airport with the current id. */
AirportSpec::GetWithoutOverride(airport + i)->enabled = false;
continue;
} else if (subs_id >= NEW_AIRPORT_OFFSET) {
/* The substitute id must be one of the original airports. */
grfmsg(2, "AirportChangeInfo: Attempt to use new airport %u as substitute airport for %u. Ignoring.", subs_id, airport + i);
continue;
}
AirportSpec **spec = &_cur.grffile->airportspec[airport + i];
/* Allocate space for this airport.
* Only need to do it once. If ever it is called again, it should not
* do anything */
if (*spec == NULL) {
*spec = MallocT<AirportSpec>(1);
as = *spec;
memcpy(as, AirportSpec::GetWithoutOverride(subs_id), sizeof(*as));
as->enabled = true;
as->grf_prop.local_id = airport + i;
as->grf_prop.subst_id = subs_id;
as->grf_prop.grffile = _cur.grffile;
/* override the default airport */
_airport_mngr.Add(airport + i, _cur.grffile->grfid, subs_id);
/* Create a copy of the original tiletable so it can be freed later. */
DuplicateTileTable(as);
}
break;
}
case 0x0A: { // Set airport layout
as->num_table = buf->ReadByte(); // Number of layaouts
as->rotation = MallocT<Direction>(as->num_table);
uint32 defsize = buf->ReadDWord(); // Total size of the definition
AirportTileTable **tile_table = CallocT<AirportTileTable*>(as->num_table); // Table with tiles to compose the airport
AirportTileTable *att = CallocT<AirportTileTable>(defsize); // Temporary array to read the tile layouts from the GRF
int size;
const AirportTileTable *copy_from;
try {
for (byte j = 0; j < as->num_table; j++) {
as->rotation[j] = (Direction)buf->ReadByte();
for (int k = 0;; k++) {
att[k].ti.x = buf->ReadByte(); // Offsets from northermost tile
att[k].ti.y = buf->ReadByte();
if (att[k].ti.x == 0 && att[k].ti.y == 0x80) {
/* Not the same terminator. The one we are using is rather
x= -80, y = 0 . So, adjust it. */
att[k].ti.x = -0x80;
att[k].ti.y = 0;
att[k].gfx = 0;
size = k + 1;
copy_from = att;
break;
}
att[k].gfx = buf->ReadByte();
if (att[k].gfx == 0xFE) {
/* Use a new tile from this GRF */
int local_tile_id = buf->ReadWord();
/* Read the ID from the _airporttile_mngr. */
uint16 tempid = _airporttile_mngr.GetID(local_tile_id, _cur.grffile->grfid);
if (tempid == INVALID_AIRPORTTILE) {
grfmsg(2, "AirportChangeInfo: Attempt to use airport tile %u with airport id %u, not yet defined. Ignoring.", local_tile_id, airport + i);
} else {
/* Declared as been valid, can be used */
att[k].gfx = tempid;
size = k + 1;
copy_from = att;
}
} else if (att[k].gfx == 0xFF) {
att[k].ti.x = (int8)GB(att[k].ti.x, 0, 8);
att[k].ti.y = (int8)GB(att[k].ti.y, 0, 8);
}
if (as->rotation[j] == DIR_E || as->rotation[j] == DIR_W) {
as->size_x = max<byte>(as->size_x, att[k].ti.y + 1);
as->size_y = max<byte>(as->size_y, att[k].ti.x + 1);
} else {
as->size_x = max<byte>(as->size_x, att[k].ti.x + 1);
as->size_y = max<byte>(as->size_y, att[k].ti.y + 1);
}
}
tile_table[j] = CallocT<AirportTileTable>(size);
memcpy(tile_table[j], copy_from, sizeof(*copy_from) * size);
}
/* Install final layout construction in the airport spec */
as->table = tile_table;
free(att);
} catch (...) {
for (int i = 0; i < as->num_table; i++) {
free(tile_table[i]);
}
free(tile_table);
free(att);
throw;
}
break;
}
case 0x0C:
as->min_year = buf->ReadWord();
as->max_year = buf->ReadWord();
if (as->max_year == 0xFFFF) as->max_year = MAX_YEAR;
break;
case 0x0D:
as->ttd_airport_type = (TTDPAirportType)buf->ReadByte();
break;
case 0x0E:
as->catchment = Clamp(buf->ReadByte(), 1, MAX_CATCHMENT);
break;
case 0x0F:
as->noise_level = buf->ReadByte();
break;
case 0x10:
as->name = buf->ReadWord();
_string_to_grf_mapping[&as->name] = _cur.grffile->grfid;
break;
case 0x11: // Maintenance cost factor
as->maintenance_cost = buf->ReadWord();
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
/**
* Ignore properties for objects
* @param prop The property to ignore.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult IgnoreObjectProperty(uint prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
switch (prop) {
case 0x0B:
case 0x0C:
case 0x0D:
case 0x12:
case 0x14:
case 0x16:
case 0x17:
buf->ReadByte();
case 0x09:
case 0x0A:
case 0x10:
case 0x11:
case 0x13:
case 0x15:
buf->ReadWord();
break;
case 0x08:
case 0x0E:
case 0x0F:
buf->ReadDWord();
break;
/* day length factor */
// case 0x18: return _settings_game.economy.day_length_factor;
default:
ret = CIR_UNKNOWN;
break;
}
return ret;
}
/**
* Define properties for objects
* @param id Local ID of the object.
* @param numinfo Number of subsequent objectIDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult ObjectChangeInfo(uint id, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
if (id + numinfo > NUM_OBJECTS) {
grfmsg(1, "ObjectChangeInfo: Too many objects loaded (%u), max (%u). Ignoring.", id + numinfo, NUM_OBJECTS);
return CIR_INVALID_ID;
}
/* Allocate object specs if they haven't been allocated already. */
if (_cur.grffile->objectspec == NULL) {
_cur.grffile->objectspec = CallocT<ObjectSpec*>(NUM_OBJECTS);
}
for (int i = 0; i < numinfo; i++) {
ObjectSpec *spec = _cur.grffile->objectspec[id + i];
if (prop != 0x08 && spec == NULL) {
/* If the object property 08 is not yet set, ignore this property */
ChangeInfoResult cir = IgnoreObjectProperty(prop, buf);
if (cir > ret) ret = cir;
continue;
}
switch (prop) {
case 0x08: { // Class ID
ObjectSpec **ospec = &_cur.grffile->objectspec[id + i];
/* Allocate space for this object. */
if (*ospec == NULL) {
*ospec = CallocT<ObjectSpec>(1);
(*ospec)->views = 1; // Default for NewGRFs that don't set it.
}
/* Swap classid because we read it in BE. */
uint32 classid = buf->ReadDWord();
(*ospec)->cls_id = ObjectClass::Allocate(BSWAP32(classid));
(*ospec)->enabled = true;
break;
}
case 0x09: { // Class name
StringID class_name = buf->ReadWord();
ObjectClass *objclass = ObjectClass::Get(spec->cls_id);
objclass->name = class_name;
_string_to_grf_mapping[&objclass->name] = _cur.grffile->grfid;
break;
}
case 0x0A: // Object name
spec->name = buf->ReadWord();
_string_to_grf_mapping[&spec->name] = _cur.grffile->grfid;
break;
case 0x0B: // Climate mask
spec->climate = buf->ReadByte();
break;
case 0x0C: // Size
spec->size = buf->ReadByte();
break;
case 0x0D: // Build cost multipler
spec->build_cost_multiplier = buf->ReadByte();
spec->clear_cost_multiplier = spec->build_cost_multiplier;
break;
case 0x0E: // Introduction date
spec->introduction_date = buf->ReadDWord();
break;
case 0x0F: // End of life
spec->end_of_life_date = buf->ReadDWord();
break;
case 0x10: // Flags
spec->flags = (ObjectFlags)buf->ReadWord();
_loaded_newgrf_features.has_2CC |= (spec->flags & OBJECT_FLAG_2CC_COLOUR) != 0;
break;
case 0x11: // Animation info
spec->animation.frames = buf->ReadByte();
spec->animation.status = buf->ReadByte();
break;
case 0x12: // Animation speed
spec->animation.speed = buf->ReadByte();
break;
case 0x13: // Animation triggers
spec->animation.triggers = buf->ReadWord();
break;
case 0x14: // Removal cost multiplier
spec->clear_cost_multiplier = buf->ReadByte();
break;
case 0x15: // Callback mask
spec->callback_mask = buf->ReadWord();
break;
case 0x16: // Building height
spec->height = buf->ReadByte();
break;
case 0x17: // Views
spec->views = buf->ReadByte();
if (spec->views != 1 && spec->views != 2 && spec->views != 4) {
grfmsg(2, "ObjectChangeInfo: Invalid number of views (%u) for object id %u. Ignoring.", spec->views, id + i);
spec->views = 1;
}
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
/**
* Define properties for railtypes
* @param id ID of the railtype.
* @param numinfo Number of subsequent IDs to change the property for.
* @param prop The property to change.
* @param buf The property value.
* @return ChangeInfoResult.
*/
static ChangeInfoResult RailTypeChangeInfo(uint id, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
extern RailtypeInfo _railtypes[RAILTYPE_END];
if (id + numinfo > RAILTYPE_END) {
grfmsg(1, "RailTypeChangeInfo: Rail type %u is invalid, max %u, ignoring", id + numinfo, RAILTYPE_END);
return CIR_INVALID_ID;
}
for (int i = 0; i < numinfo; i++) {
RailType rt = _cur.grffile->railtype_map[id + i];
if (rt == INVALID_RAILTYPE) return CIR_INVALID_ID;
RailtypeInfo *rti = &_railtypes[rt];
switch (prop) {
case 0x08: // Label of rail type
/* Skipped here as this is loaded during reservation stage. */
buf->ReadDWord();
break;
case 0x09: // Toolbar caption of railtype (sets name as well for backwards compatibility for grf ver < 8)
rti->strings.toolbar_caption = buf->ReadWord();
_string_to_grf_mapping[&rti->strings.toolbar_caption] = _cur.grffile->grfid;
if (_cur.grffile->grf_version < 8) {
rti->strings.name = rti->strings.toolbar_caption;
_string_to_grf_mapping[&rti->strings.name] = _cur.grffile->grfid;
}
break;
case 0x0A: // Menu text of railtype
rti->strings.menu_text = buf->ReadWord();
_string_to_grf_mapping[&rti->strings.menu_text] = _cur.grffile->grfid;
break;
case 0x0B: // Build window caption
rti->strings.build_caption = buf->ReadWord();
_string_to_grf_mapping[&rti->strings.build_caption] = _cur.grffile->grfid;
break;
case 0x0C: // Autoreplace text
rti->strings.replace_text = buf->ReadWord();
_string_to_grf_mapping[&rti->strings.replace_text] = _cur.grffile->grfid;
break;
case 0x0D: // New locomotive text
rti->strings.new_loco = buf->ReadWord();
_string_to_grf_mapping[&rti->strings.new_loco] = _cur.grffile->grfid;
break;
case 0x0E: // Compatible railtype list
case 0x0F: // Powered railtype list
case 0x18: // Railtype list required for date introduction
case 0x19: // Introduced railtype list
{
/* Rail type compatibility bits are added to the existing bits
* to allow multiple GRFs to modify compatibility with the
* default rail types. */
int n = buf->ReadByte();
for (int j = 0; j != n; j++) {
RailTypeLabel label = buf->ReadDWord();
RailType rt = GetRailTypeByLabel(BSWAP32(label), false);
if (rt != INVALID_RAILTYPE) {
switch (prop) {
case 0x0E: SetBit(rti->compatible_railtypes, rt); break;
case 0x0F: SetBit(rti->powered_railtypes, rt); break;
case 0x18: SetBit(rti->introduction_required_railtypes, rt); break;
case 0x19: SetBit(rti->introduces_railtypes, rt); break;
}
}
}
break;
}
case 0x10: // Rail Type flags
rti->flags = (RailTypeFlags)buf->ReadByte();
break;
case 0x11: // Curve speed advantage
rti->curve_speed = buf->ReadByte();
break;
case 0x12: // Station graphic
rti->fallback_railtype = Clamp(buf->ReadByte(), 0, 2);
break;
case 0x13: // Construction cost factor
rti->cost_multiplier = buf->ReadWord();
break;
case 0x14: // Speed limit
rti->max_speed = buf->ReadWord();
break;
case 0x15: // Acceleration model
rti->acceleration_type = Clamp(buf->ReadByte(), 0, 2);
break;
case 0x16: // Map colour
rti->map_colour = buf->ReadByte();
break;
case 0x17: // Introduction date
rti->introduction_date = buf->ReadDWord();
break;
case 0x1A: // Sort order
rti->sorting_order = buf->ReadByte();
break;
case 0x1B: // Name of railtype (overridden by prop 09 for grf ver < 8)
rti->strings.name = buf->ReadWord();
_string_to_grf_mapping[&rti->strings.name] = _cur.grffile->grfid;
break;
case 0x1C: // Maintenance cost factor
rti->maintenance_multiplier = buf->ReadWord();
break;
case 0x1D: // Alternate rail type label list
/* Skipped here as this is loaded during reservation stage. */
for (int j = buf->ReadByte(); j != 0; j--) buf->ReadDWord();
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
static ChangeInfoResult RailTypeReserveInfo(uint id, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
extern RailtypeInfo _railtypes[RAILTYPE_END];
if (id + numinfo > RAILTYPE_END) {
grfmsg(1, "RailTypeReserveInfo: Rail type %u is invalid, max %u, ignoring", id + numinfo, RAILTYPE_END);
return CIR_INVALID_ID;
}
for (int i = 0; i < numinfo; i++) {
switch (prop) {
case 0x08: // Label of rail type
{
RailTypeLabel rtl = buf->ReadDWord();
rtl = BSWAP32(rtl);
RailType rt = GetRailTypeByLabel(rtl, false);
if (rt == INVALID_RAILTYPE) {
/* Set up new rail type */
rt = AllocateRailType(rtl);
}
_cur.grffile->railtype_map[id + i] = rt;
break;
}
case 0x09: // Toolbar caption of railtype
case 0x0A: // Menu text
case 0x0B: // Build window caption
case 0x0C: // Autoreplace text
case 0x0D: // New loco
case 0x13: // Construction cost
case 0x14: // Speed limit
case 0x1B: // Name of railtype
case 0x1C: // Maintenance cost factor
buf->ReadWord();
break;
case 0x1D: // Alternate rail type label list
if (_cur.grffile->railtype_map[id + i] != INVALID_RAILTYPE) {
int n = buf->ReadByte();
for (int j = 0; j != n; j++) {
*_railtypes[_cur.grffile->railtype_map[id + i]].alternate_labels.Append() = BSWAP32(buf->ReadDWord());
}
break;
}
grfmsg(1, "RailTypeReserveInfo: Ignoring property 1D for rail type %u because no label was set", id + i);
/* FALL THROUGH */
case 0x0E: // Compatible railtype list
case 0x0F: // Powered railtype list
case 0x18: // Railtype list required for date introduction
case 0x19: // Introduced railtype list
for (int j = buf->ReadByte(); j != 0; j--) buf->ReadDWord();
break;
case 0x10: // Rail Type flags
case 0x11: // Curve speed advantage
case 0x12: // Station graphic
case 0x15: // Acceleration model
case 0x16: // Map colour
case 0x1A: // Sort order
buf->ReadByte();
break;
case 0x17: // Introduction date
buf->ReadDWord();
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
static ChangeInfoResult AirportTilesChangeInfo(uint airtid, int numinfo, int prop, ByteReader *buf)
{
ChangeInfoResult ret = CIR_SUCCESS;
if (airtid + numinfo > NUM_AIRPORTTILES) {
grfmsg(1, "AirportTileChangeInfo: Too many airport tiles loaded (%u), max (%u). Ignoring.", airtid + numinfo, NUM_AIRPORTTILES);
return CIR_INVALID_ID;
}
/* Allocate airport tile specs if they haven't been allocated already. */
if (_cur.grffile->airtspec == NULL) {
_cur.grffile->airtspec = CallocT<AirportTileSpec*>(NUM_AIRPORTTILES);
}
for (int i = 0; i < numinfo; i++) {
AirportTileSpec *tsp = _cur.grffile->airtspec[airtid + i];
if (prop != 0x08 && tsp == NULL) {
grfmsg(2, "AirportTileChangeInfo: Attempt to modify undefined airport tile %u. Ignoring.", airtid + i);
return CIR_INVALID_ID;
}
switch (prop) {
case 0x08: { // Substitute airport tile type
AirportTileSpec **tilespec = &_cur.grffile->airtspec[airtid + i];
byte subs_id = buf->ReadByte();
if (subs_id >= NEW_AIRPORTTILE_OFFSET) {
/* The substitute id must be one of the original airport tiles. */
grfmsg(2, "AirportTileChangeInfo: Attempt to use new airport tile %u as substitute airport tile for %u. Ignoring.", subs_id, airtid + i);
continue;
}
/* Allocate space for this airport tile. */
if (*tilespec == NULL) {
*tilespec = CallocT<AirportTileSpec>(1);
tsp = *tilespec;
memcpy(tsp, AirportTileSpec::Get(subs_id), sizeof(AirportTileSpec));
tsp->enabled = true;
tsp->animation.status = ANIM_STATUS_NO_ANIMATION;
tsp->grf_prop.local_id = airtid + i;
tsp->grf_prop.subst_id = subs_id;
tsp->grf_prop.grffile = _cur.grffile;
_airporttile_mngr.AddEntityID(airtid + i, _cur.grffile->grfid, subs_id); // pre-reserve the tile slot
}
break;
}
case 0x09: { // Airport tile override
byte override = buf->ReadByte();
/* The airport tile being overridden must be an original airport tile. */
if (override >= NEW_AIRPORTTILE_OFFSET) {
grfmsg(2, "AirportTileChangeInfo: Attempt to override new airport tile %u with airport tile id %u. Ignoring.", override, airtid + i);
continue;
}
_airporttile_mngr.Add(airtid + i, _cur.grffile->grfid, override);
break;
}
case 0x0E: // Callback mask
tsp->callback_mask = buf->ReadByte();
break;
case 0x0F: // Animation information
tsp->animation.frames = buf->ReadByte();
tsp->animation.status = buf->ReadByte();
break;
case 0x10: // Animation speed
tsp->animation.speed = buf->ReadByte();
break;
case 0x11: // Animation triggers
tsp->animation.triggers = buf->ReadByte();
break;
default:
ret = CIR_UNKNOWN;
break;
}
}
return ret;
}
static bool HandleChangeInfoResult(const char *caller, ChangeInfoResult cir, uint8 feature, uint8 property)
{
switch (cir) {
default: NOT_REACHED();
case CIR_DISABLED:
/* Error has already been printed; just stop parsing */
return true;
case CIR_SUCCESS:
return false;
case CIR_UNHANDLED:
grfmsg(1, "%s: Ignoring property 0x%02X of feature 0x%02X (not implemented)", caller, property, feature);
return false;
case CIR_UNKNOWN:
grfmsg(0, "%s: Unknown property 0x%02X of feature 0x%02X, disabling", caller, property, feature);
/* FALL THROUGH */
case CIR_INVALID_ID: {
/* No debug message for an invalid ID, as it has already been output */
GRFError *error = DisableGrf(cir == CIR_INVALID_ID ? STR_NEWGRF_ERROR_INVALID_ID : STR_NEWGRF_ERROR_UNKNOWN_PROPERTY);
if (cir != CIR_INVALID_ID) error->param_value[1] = property;
return true;
}
}
}
/* Action 0x00 */
static void FeatureChangeInfo(ByteReader *buf)
{
/* <00> <feature> <num-props> <num-info> <id> (<property <new-info>)...
*
* B feature
* B num-props how many properties to change per vehicle/station
* B num-info how many vehicles/stations to change
* E id ID of first vehicle/station to change, if num-info is
* greater than one, this one and the following
* vehicles/stations will be changed
* B property what property to change, depends on the feature
* V new-info new bytes of info (variable size; depends on properties) */
static const VCI_Handler handler[] = {
/* GSF_TRAINS */ RailVehicleChangeInfo,
/* GSF_ROADVEHICLES */ RoadVehicleChangeInfo,
/* GSF_SHIPS */ ShipVehicleChangeInfo,
/* GSF_AIRCRAFT */ AircraftVehicleChangeInfo,
/* GSF_STATIONS */ StationChangeInfo,
/* GSF_CANALS */ CanalChangeInfo,
/* GSF_BRIDGES */ BridgeChangeInfo,
/* GSF_HOUSES */ TownHouseChangeInfo,
/* GSF_GLOBALVAR */ GlobalVarChangeInfo,
/* GSF_INDUSTRYTILES */ IndustrytilesChangeInfo,
/* GSF_INDUSTRIES */ IndustriesChangeInfo,
/* GSF_CARGOES */ NULL, // Cargo is handled during reservation
/* GSF_SOUNDFX */ SoundEffectChangeInfo,
/* GSF_AIRPORTS */ AirportChangeInfo,
/* GSF_SIGNALS */ NULL,
/* GSF_OBJECTS */ ObjectChangeInfo,
/* GSF_RAILTYPES */ RailTypeChangeInfo,
/* GSF_AIRPORTTILES */ AirportTilesChangeInfo,
};
uint8 feature = buf->ReadByte();
uint8 numprops = buf->ReadByte();
uint numinfo = buf->ReadByte();
uint engine = buf->ReadExtendedByte();
grfmsg(6, "FeatureChangeInfo: feature %d, %d properties, to apply to %d+%d",
feature, numprops, engine, numinfo);
if (feature >= lengthof(handler) || handler[feature] == NULL) {
if (feature != GSF_CARGOES) grfmsg(1, "FeatureChangeInfo: Unsupported feature %d, skipping", feature);
return;
}
/* Mark the feature as used by the grf */
SetBit(_cur.grffile->grf_features, feature);
while (numprops-- && buf->HasData()) {
uint8 prop = buf->ReadByte();
ChangeInfoResult cir = handler[feature](engine, numinfo, prop, buf);
if (HandleChangeInfoResult("FeatureChangeInfo", cir, feature, prop)) return;
}
}
/* Action 0x00 (GLS_SAFETYSCAN) */
static void SafeChangeInfo(ByteReader *buf)
{
uint8 feature = buf->ReadByte();
uint8 numprops = buf->ReadByte();
uint numinfo = buf->ReadByte();
buf->ReadExtendedByte(); // id
if (feature == GSF_BRIDGES && numprops == 1) {
uint8 prop = buf->ReadByte();
/* Bridge property 0x0D is redefinition of sprite layout tables, which
* is considered safe. */
if (prop == 0x0D) return;
} else if (feature == GSF_GLOBALVAR && numprops == 1) {
uint8 prop = buf->ReadByte();
/* Engine ID Mappings are safe, if the source is static */
if (prop == 0x11) {
bool is_safe = true;
for (uint i = 0; i < numinfo; i++) {
uint32 s = buf->ReadDWord();
buf->ReadDWord(); // dest
const GRFConfig *grfconfig = GetGRFConfig(s);
if (grfconfig != NULL && !HasBit(grfconfig->flags, GCF_STATIC)) {
is_safe = false;
break;
}
}
if (is_safe) return;
}
}
SetBit(_cur.grfconfig->flags, GCF_UNSAFE);
/* Skip remainder of GRF */
_cur.skip_sprites = -1;
}
/* Action 0x00 (GLS_RESERVE) */
static void ReserveChangeInfo(ByteReader *buf)
{
uint8 feature = buf->ReadByte();
if (feature != GSF_CARGOES && feature != GSF_GLOBALVAR && feature != GSF_RAILTYPES) return;
uint8 numprops = buf->ReadByte();
uint8 numinfo = buf->ReadByte();
uint8 index = buf->ReadExtendedByte();
while (numprops-- && buf->HasData()) {
uint8 prop = buf->ReadByte();
ChangeInfoResult cir = CIR_SUCCESS;
switch (feature) {
default: NOT_REACHED();
case GSF_CARGOES:
cir = CargoChangeInfo(index, numinfo, prop, buf);
break;
case GSF_GLOBALVAR:
cir = GlobalVarReserveInfo(index, numinfo, prop, buf);
break;
case GSF_RAILTYPES:
cir = RailTypeReserveInfo(index, numinfo, prop, buf);
break;
}
if (HandleChangeInfoResult("ReserveChangeInfo", cir, feature, prop)) return;
}
}
/* Action 0x01 */
static void NewSpriteSet(ByteReader *buf)
{
/* Basic format: <01> <feature> <num-sets> <num-ent>
* Extended format: <01> <feature> 00 <first-set> <num-sets> <num-ent>
*
* B feature feature to define sprites for
* 0, 1, 2, 3: veh-type, 4: train stations
* E first-set first sprite set to define
* B num-sets number of sprite sets (extended byte in extended format)
* E num-ent how many entries per sprite set
* For vehicles, this is the number of different
* vehicle directions in each sprite set
* Set num-dirs=8, unless your sprites are symmetric.
* In that case, use num-dirs=4.
*/
uint8 feature = buf->ReadByte();
uint16 num_sets = buf->ReadByte();
uint16 first_set = 0;
if (num_sets == 0 && buf->HasData(3)) {
/* Extended Action1 format.
* Some GRFs define zero sets of zero sprites, though there is actually no use in that. Ignore them. */
first_set = buf->ReadExtendedByte();
num_sets = buf->ReadExtendedByte();
}
uint16 num_ents = buf->ReadExtendedByte();
_cur.AddSpriteSets(feature, _cur.spriteid, first_set, num_sets, num_ents);
grfmsg(7, "New sprite set at %d of type %d, consisting of %d sets with %d views each (total %d)",
_cur.spriteid, feature, num_sets, num_ents, num_sets * num_ents
);
for (int i = 0; i < num_sets * num_ents; i++) {
_cur.nfo_line++;
LoadNextSprite(_cur.spriteid++, _cur.file_index, _cur.nfo_line, _cur.grf_container_ver);
}
}
/* Action 0x01 (SKIP) */
static void SkipAct1(ByteReader *buf)
{
buf->ReadByte();
uint16 num_sets = buf->ReadByte();
if (num_sets == 0 && buf->HasData(3)) {
/* Extended Action1 format.
* Some GRFs define zero sets of zero sprites, though there is actually no use in that. Ignore them. */
buf->ReadExtendedByte(); // first_set
num_sets = buf->ReadExtendedByte();
}
uint16 num_ents = buf->ReadExtendedByte();
_cur.skip_sprites = num_sets * num_ents;
grfmsg(3, "SkipAct1: Skipping %d sprites", _cur.skip_sprites);
}
/* Helper function to either create a callback or link to a previously
* defined spritegroup. */
static const SpriteGroup *GetGroupFromGroupID(byte setid, byte type, uint16 groupid)
{
if (HasBit(groupid, 15)) {
assert(CallbackResultSpriteGroup::CanAllocateItem());
return new CallbackResultSpriteGroup(groupid, _cur.grffile->grf_version >= 8);
}
if (groupid > MAX_SPRITEGROUP || _cur.spritegroups[groupid] == NULL) {
grfmsg(1, "GetGroupFromGroupID(0x%02X:0x%02X): Groupid 0x%04X does not exist, leaving empty", setid, type, groupid);
return NULL;
}
return _cur.spritegroups[groupid];
}
/**
* Helper function to either create a callback or a result sprite group.
* @param feature GrfSpecFeature to define spritegroup for.
* @param setid SetID of the currently being parsed Action2. (only for debug output)
* @param type Type of the currently being parsed Action2. (only for debug output)
* @param spriteid Raw value from the GRF for the new spritegroup; describes either the return value or the referenced spritegroup.
* @return Created spritegroup.
*/
static const SpriteGroup *CreateGroupFromGroupID(byte feature, byte setid, byte type, uint16 spriteid)
{
if (HasBit(spriteid, 15)) {
assert(CallbackResultSpriteGroup::CanAllocateItem());
return new CallbackResultSpriteGroup(spriteid, _cur.grffile->grf_version >= 8);
}
if (!_cur.IsValidSpriteSet(feature, spriteid)) {
grfmsg(1, "CreateGroupFromGroupID(0x%02X:0x%02X): Sprite set %u invalid", setid, type, spriteid);
return NULL;
}
SpriteID spriteset_start = _cur.GetSprite(feature, spriteid);
uint num_sprites = _cur.GetNumEnts(feature, spriteid);
/* Ensure that the sprites are loeded */
assert(spriteset_start + num_sprites <= _cur.spriteid);
assert(ResultSpriteGroup::CanAllocateItem());
return new ResultSpriteGroup(spriteset_start, num_sprites);
}
/* Action 0x02 */
static void NewSpriteGroup(ByteReader *buf)
{
/* <02> <feature> <set-id> <type/num-entries> <feature-specific-data...>
*
* B feature see action 1
* B set-id ID of this particular definition
* B type/num-entries
* if 80 or greater, this is a randomized or variational
* list definition, see below
* otherwise it specifies a number of entries, the exact
* meaning depends on the feature
* V feature-specific-data (huge mess, don't even look it up --pasky) */
SpriteGroup *act_group = NULL;
uint8 feature = buf->ReadByte();
uint8 setid = buf->ReadByte();
uint8 type = buf->ReadByte();
/* Sprite Groups are created here but they are allocated from a pool, so
* we do not need to delete anything if there is an exception from the
* ByteReader. */
switch (type) {
/* Deterministic Sprite Group */
case 0x81: // Self scope, byte
case 0x82: // Parent scope, byte
case 0x85: // Self scope, word
case 0x86: // Parent scope, word
case 0x89: // Self scope, dword
case 0x8A: // Parent scope, dword
{
byte varadjust;
byte varsize;
assert(DeterministicSpriteGroup::CanAllocateItem());
DeterministicSpriteGroup *group = new DeterministicSpriteGroup();
act_group = group;
group->var_scope = HasBit(type, 1) ? VSG_SCOPE_PARENT : VSG_SCOPE_SELF;
switch (GB(type, 2, 2)) {
default: NOT_REACHED();
case 0: group->size = DSG_SIZE_BYTE; varsize = 1; break;
case 1: group->size = DSG_SIZE_WORD; varsize = 2; break;
case 2: group->size = DSG_SIZE_DWORD; varsize = 4; break;
}
static SmallVector<DeterministicSpriteGroupAdjust, 16> adjusts;
adjusts.Clear();
/* Loop through the var adjusts. Unfortunately we don't know how many we have
* from the outset, so we shall have to keep reallocing. */
do {
DeterministicSpriteGroupAdjust *adjust = adjusts.Append();
/* The first var adjust doesn't have an operation specified, so we set it to add. */
adjust->operation = adjusts.Length() == 1 ? DSGA_OP_ADD : (DeterministicSpriteGroupAdjustOperation)buf->ReadByte();
adjust->variable = buf->ReadByte();
if (adjust->variable == 0x7E) {
/* Link subroutine group */
adjust->subroutine = GetGroupFromGroupID(setid, type, buf->ReadByte());
} else {
adjust->parameter = IsInsideMM(adjust->variable, 0x60, 0x80) ? buf->ReadByte() : 0;
}
varadjust = buf->ReadByte();
adjust->shift_num = GB(varadjust, 0, 5);
adjust->type = (DeterministicSpriteGroupAdjustType)GB(varadjust, 6, 2);
adjust->and_mask = buf->ReadVarSize(varsize);
if (adjust->type != DSGA_TYPE_NONE) {
adjust->add_val = buf->ReadVarSize(varsize);
adjust->divmod_val = buf->ReadVarSize(varsize);
} else {
adjust->add_val = 0;
adjust->divmod_val = 0;
}
/* Continue reading var adjusts while bit 5 is set. */
} while (HasBit(varadjust, 5));
group->num_adjusts = adjusts.Length();
group->adjusts = MallocT<DeterministicSpriteGroupAdjust>(group->num_adjusts);
MemCpyT(group->adjusts, adjusts.Begin(), group->num_adjusts);
group->num_ranges = buf->ReadByte();
if (group->num_ranges > 0) group->ranges = CallocT<DeterministicSpriteGroupRange>(group->num_ranges);
for (uint i = 0; i < group->num_ranges; i++) {
group->ranges[i].group = GetGroupFromGroupID(setid, type, buf->ReadWord());
group->ranges[i].low = buf->ReadVarSize(varsize);
group->ranges[i].high = buf->ReadVarSize(varsize);
}
group->default_group = GetGroupFromGroupID(setid, type, buf->ReadWord());
break;
}
/* Randomized Sprite Group */
case 0x80: // Self scope
case 0x83: // Parent scope
case 0x84: // Relative scope
{
assert(RandomizedSpriteGroup::CanAllocateItem());
RandomizedSpriteGroup *group = new RandomizedSpriteGroup();
act_group = group;
group->var_scope = HasBit(type, 1) ? VSG_SCOPE_PARENT : VSG_SCOPE_SELF;
if (HasBit(type, 2)) {
if (feature <= GSF_AIRCRAFT) group->var_scope = VSG_SCOPE_RELATIVE;
group->count = buf->ReadByte();
}
uint8 triggers = buf->ReadByte();
group->triggers = GB(triggers, 0, 7);
group->cmp_mode = HasBit(triggers, 7) ? RSG_CMP_ALL : RSG_CMP_ANY;
group->lowest_randbit = buf->ReadByte();
group->num_groups = buf->ReadByte();
group->groups = CallocT<const SpriteGroup*>(group->num_groups);
for (uint i = 0; i < group->num_groups; i++) {
group->groups[i] = GetGroupFromGroupID(setid, type, buf->ReadWord());
}
break;
}
/* Neither a variable or randomized sprite group... must be a real group */
default:
{
switch (feature) {
case GSF_TRAINS:
case GSF_ROADVEHICLES:
case GSF_SHIPS:
case GSF_AIRCRAFT:
case GSF_STATIONS:
case GSF_CANALS:
case GSF_CARGOES:
case GSF_AIRPORTS:
case GSF_RAILTYPES:
{
byte num_loaded = type;
byte num_loading = buf->ReadByte();
if (!_cur.HasValidSpriteSets(feature)) {
grfmsg(0, "NewSpriteGroup: No sprite set to work on! Skipping");
return;
}
assert(RealSpriteGroup::CanAllocateItem());
RealSpriteGroup *group = new RealSpriteGroup();
act_group = group;
group->num_loaded = num_loaded;
group->num_loading = num_loading;
if (num_loaded > 0) group->loaded = CallocT<const SpriteGroup*>(num_loaded);
if (num_loading > 0) group->loading = CallocT<const SpriteGroup*>(num_loading);
grfmsg(6, "NewSpriteGroup: New SpriteGroup 0x%02X, %u loaded, %u loading",
setid, num_loaded, num_loading);
for (uint i = 0; i < num_loaded; i++) {
uint16 spriteid = buf->ReadWord();
group->loaded[i] = CreateGroupFromGroupID(feature, setid, type, spriteid);
grfmsg(8, "NewSpriteGroup: + rg->loaded[%i] = subset %u", i, spriteid);
}
for (uint i = 0; i < num_loading; i++) {
uint16 spriteid = buf->ReadWord();
group->loading[i] = CreateGroupFromGroupID(feature, setid, type, spriteid);
grfmsg(8, "NewSpriteGroup: + rg->loading[%i] = subset %u", i, spriteid);
}
break;
}
case GSF_HOUSES:
case GSF_AIRPORTTILES:
case GSF_OBJECTS:
case GSF_INDUSTRYTILES: {
byte num_building_sprites = max((uint8)1, type);
assert(TileLayoutSpriteGroup::CanAllocateItem());
TileLayoutSpriteGroup *group = new TileLayoutSpriteGroup();
act_group = group;
/* On error, bail out immediately. Temporary GRF data was already freed */
if (ReadSpriteLayout(buf, num_building_sprites, true, feature, false, type == 0, &group->dts)) return;
break;
}
case GSF_INDUSTRIES: {
if (type > 1) {
grfmsg(1, "NewSpriteGroup: Unsupported industry production version %d, skipping", type);
break;
}
assert(IndustryProductionSpriteGroup::CanAllocateItem());
IndustryProductionSpriteGroup *group = new IndustryProductionSpriteGroup();
act_group = group;
group->version = type;
if (type == 0) {
for (uint i = 0; i < 3; i++) {
group->subtract_input[i] = (int16)buf->ReadWord(); // signed
}
for (uint i = 0; i < 2; i++) {
group->add_output[i] = buf->ReadWord(); // unsigned
}
group->again = buf->ReadByte();
} else {
for (uint i = 0; i < 3; i++) {
group->subtract_input[i] = buf->ReadByte();
}
for (uint i = 0; i < 2; i++) {
group->add_output[i] = buf->ReadByte();
}
group->again = buf->ReadByte();
}
break;
}
/* Loading of Tile Layout and Production Callback groups would happen here */
default: grfmsg(1, "NewSpriteGroup: Unsupported feature %d, skipping", feature);
}
}
}
_cur.spritegroups[setid] = act_group;
}
static CargoID TranslateCargo(uint8 feature, uint8 ctype)
{
if (feature == GSF_OBJECTS) {
switch (ctype) {
case 0: return 0;
case 0xFF: return CT_PURCHASE_OBJECT;
default:
grfmsg(1, "TranslateCargo: Invalid cargo bitnum %d for objects, skipping.", ctype);
return CT_INVALID;
}
}
/* Special cargo types for purchase list and stations */
if (feature == GSF_STATIONS && ctype == 0xFE) return CT_DEFAULT_NA;
if (ctype == 0xFF) return CT_PURCHASE;
if (_cur.grffile->cargo_list.Length() == 0) {
/* No cargo table, so use bitnum values */
if (ctype >= 32) {
grfmsg(1, "TranslateCargo: Cargo bitnum %d out of range (max 31), skipping.", ctype);
return CT_INVALID;
}
const CargoSpec *cs;
FOR_ALL_CARGOSPECS(cs) {
if (cs->bitnum == ctype) {
grfmsg(6, "TranslateCargo: Cargo bitnum %d mapped to cargo type %d.", ctype, cs->Index());
return cs->Index();
}
}
grfmsg(5, "TranslateCargo: Cargo bitnum %d not available in this climate, skipping.", ctype);
return CT_INVALID;
}
/* Check if the cargo type is out of bounds of the cargo translation table */
if (ctype >= _cur.grffile->cargo_list.Length()) {
grfmsg(1, "TranslateCargo: Cargo type %d out of range (max %d), skipping.", ctype, _cur.grffile->cargo_list.Length() - 1);
return CT_INVALID;
}
/* Look up the cargo label from the translation table */
CargoLabel cl = _cur.grffile->cargo_list[ctype];
if (cl == 0) {
grfmsg(5, "TranslateCargo: Cargo type %d not available in this climate, skipping.", ctype);
return CT_INVALID;
}
ctype = GetCargoIDByLabel(cl);
if (ctype == CT_INVALID) {
grfmsg(5, "TranslateCargo: Cargo '%c%c%c%c' unsupported, skipping.", GB(cl, 24, 8), GB(cl, 16, 8), GB(cl, 8, 8), GB(cl, 0, 8));
return CT_INVALID;
}
grfmsg(6, "TranslateCargo: Cargo '%c%c%c%c' mapped to cargo type %d.", GB(cl, 24, 8), GB(cl, 16, 8), GB(cl, 8, 8), GB(cl, 0, 8), ctype);
return ctype;
}
static bool IsValidGroupID(uint16 groupid, const char *function)
{
if (groupid > MAX_SPRITEGROUP || _cur.spritegroups[groupid] == NULL) {
grfmsg(1, "%s: Spritegroup 0x%04X out of range or empty, skipping.", function, groupid);
return false;
}
return true;
}
static void VehicleMapSpriteGroup(ByteReader *buf, byte feature, uint8 idcount)
{
static EngineID *last_engines;
static uint last_engines_count;
bool wagover = false;
/* Test for 'wagon override' flag */
if (HasBit(idcount, 7)) {
wagover = true;
/* Strip off the flag */
idcount = GB(idcount, 0, 7);
if (last_engines_count == 0) {
grfmsg(0, "VehicleMapSpriteGroup: WagonOverride: No engine to do override with");
return;
}
grfmsg(6, "VehicleMapSpriteGroup: WagonOverride: %u engines, %u wagons",
last_engines_count, idcount);
} else {
if (last_engines_count != idcount) {
last_engines = ReallocT(last_engines, idcount);
last_engines_count = idcount;
}
}
EngineID *engines = AllocaM(EngineID, idcount);
for (uint i = 0; i < idcount; i++) {
Engine *e = GetNewEngine(_cur.grffile, (VehicleType)feature, buf->ReadExtendedByte());
if (e == NULL) {
/* No engine could be allocated?!? Deal with it. Okay,
* this might look bad. Also make sure this NewGRF
* gets disabled, as a half loaded one is bad. */
HandleChangeInfoResult("VehicleMapSpriteGroup", CIR_INVALID_ID, 0, 0);
return;
}
engines[i] = e->index;
if (!wagover) last_engines[i] = engines[i];
}
uint8 cidcount = buf->ReadByte();
for (uint c = 0; c < cidcount; c++) {
uint8 ctype = buf->ReadByte();
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "VehicleMapSpriteGroup")) continue;
grfmsg(8, "VehicleMapSpriteGroup: * [%d] Cargo type 0x%X, group id 0x%02X", c, ctype, groupid);
ctype = TranslateCargo(feature, ctype);
if (ctype == CT_INVALID) continue;
for (uint i = 0; i < idcount; i++) {
EngineID engine = engines[i];
grfmsg(7, "VehicleMapSpriteGroup: [%d] Engine %d...", i, engine);
if (wagover) {
SetWagonOverrideSprites(engine, ctype, _cur.spritegroups[groupid], last_engines, last_engines_count);
} else {
SetCustomEngineSprites(engine, ctype, _cur.spritegroups[groupid]);
}
}
}
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "VehicleMapSpriteGroup")) return;
grfmsg(8, "-- Default group id 0x%04X", groupid);
for (uint i = 0; i < idcount; i++) {
EngineID engine = engines[i];
if (wagover) {
SetWagonOverrideSprites(engine, CT_DEFAULT, _cur.spritegroups[groupid], last_engines, last_engines_count);
} else {
SetCustomEngineSprites(engine, CT_DEFAULT, _cur.spritegroups[groupid]);
SetEngineGRF(engine, _cur.grffile);
}
}
}
static void CanalMapSpriteGroup(ByteReader *buf, uint8 idcount)
{
CanalFeature *cfs = AllocaM(CanalFeature, idcount);
for (uint i = 0; i < idcount; i++) {
cfs[i] = (CanalFeature)buf->ReadByte();
}
uint8 cidcount = buf->ReadByte();
buf->Skip(cidcount * 3);
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "CanalMapSpriteGroup")) return;
for (uint i = 0; i < idcount; i++) {
CanalFeature cf = cfs[i];
if (cf >= CF_END) {
grfmsg(1, "CanalMapSpriteGroup: Canal subset %d out of range, skipping", cf);
continue;
}
_water_feature[cf].grffile = _cur.grffile;
_water_feature[cf].group = _cur.spritegroups[groupid];
}
}
static void StationMapSpriteGroup(ByteReader *buf, uint8 idcount)
{
uint8 *stations = AllocaM(uint8, idcount);
for (uint i = 0; i < idcount; i++) {
stations[i] = buf->ReadByte();
}
uint8 cidcount = buf->ReadByte();
for (uint c = 0; c < cidcount; c++) {
uint8 ctype = buf->ReadByte();
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "StationMapSpriteGroup")) continue;
ctype = TranslateCargo(GSF_STATIONS, ctype);
if (ctype == CT_INVALID) continue;
for (uint i = 0; i < idcount; i++) {
StationSpec *statspec = _cur.grffile->stations == NULL ? NULL : _cur.grffile->stations[stations[i]];
if (statspec == NULL) {
grfmsg(1, "StationMapSpriteGroup: Station with ID 0x%02X does not exist, skipping", stations[i]);
continue;
}
statspec->grf_prop.spritegroup[ctype] = _cur.spritegroups[groupid];
}
}
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "StationMapSpriteGroup")) return;
for (uint i = 0; i < idcount; i++) {
StationSpec *statspec = _cur.grffile->stations == NULL ? NULL : _cur.grffile->stations[stations[i]];
if (statspec == NULL) {
grfmsg(1, "StationMapSpriteGroup: Station with ID 0x%02X does not exist, skipping", stations[i]);
continue;
}
if (statspec->grf_prop.grffile != NULL) {
grfmsg(1, "StationMapSpriteGroup: Station with ID 0x%02X mapped multiple times, skipping", stations[i]);
continue;
}
statspec->grf_prop.spritegroup[CT_DEFAULT] = _cur.spritegroups[groupid];
statspec->grf_prop.grffile = _cur.grffile;
statspec->grf_prop.local_id = stations[i];
StationClass::Assign(statspec);
}
}
static void TownHouseMapSpriteGroup(ByteReader *buf, uint8 idcount)
{
uint8 *houses = AllocaM(uint8, idcount);
for (uint i = 0; i < idcount; i++) {
houses[i] = buf->ReadByte();
}
/* Skip the cargo type section, we only care about the default group */
uint8 cidcount = buf->ReadByte();
buf->Skip(cidcount * 3);
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "TownHouseMapSpriteGroup")) return;
if (_cur.grffile->housespec == NULL) {
grfmsg(1, "TownHouseMapSpriteGroup: No houses defined, skipping");
return;
}
for (uint i = 0; i < idcount; i++) {
HouseSpec *hs = _cur.grffile->housespec[houses[i]];
if (hs == NULL) {
grfmsg(1, "TownHouseMapSpriteGroup: House %d undefined, skipping.", houses[i]);
continue;
}
hs->grf_prop.spritegroup[0] = _cur.spritegroups[groupid];
}
}
static void IndustryMapSpriteGroup(ByteReader *buf, uint8 idcount)
{
uint8 *industries = AllocaM(uint8, idcount);
for (uint i = 0; i < idcount; i++) {
industries[i] = buf->ReadByte();
}
/* Skip the cargo type section, we only care about the default group */
uint8 cidcount = buf->ReadByte();
buf->Skip(cidcount * 3);
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "IndustryMapSpriteGroup")) return;
if (_cur.grffile->industryspec == NULL) {
grfmsg(1, "IndustryMapSpriteGroup: No industries defined, skipping");
return;
}
for (uint i = 0; i < idcount; i++) {
IndustrySpec *indsp = _cur.grffile->industryspec[industries[i]];
if (indsp == NULL) {
grfmsg(1, "IndustryMapSpriteGroup: Industry %d undefined, skipping", industries[i]);
continue;
}
indsp->grf_prop.spritegroup[0] = _cur.spritegroups[groupid];
}
}
static void IndustrytileMapSpriteGroup(ByteReader *buf, uint8 idcount)
{
uint8 *indtiles = AllocaM(uint8, idcount);
for (uint i = 0; i < idcount; i++) {
indtiles[i] = buf->ReadByte();
}
/* Skip the cargo type section, we only care about the default group */
uint8 cidcount = buf->ReadByte();
buf->Skip(cidcount * 3);
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "IndustrytileMapSpriteGroup")) return;
if (_cur.grffile->indtspec == NULL) {
grfmsg(1, "IndustrytileMapSpriteGroup: No industry tiles defined, skipping");
return;
}
for (uint i = 0; i < idcount; i++) {
IndustryTileSpec *indtsp = _cur.grffile->indtspec[indtiles[i]];
if (indtsp == NULL) {
grfmsg(1, "IndustrytileMapSpriteGroup: Industry tile %d undefined, skipping", indtiles[i]);
continue;
}
indtsp->grf_prop.spritegroup[0] = _cur.spritegroups[groupid];
}
}
static void CargoMapSpriteGroup(ByteReader *buf, uint8 idcount)
{
CargoID *cargoes = AllocaM(CargoID, idcount);
for (uint i = 0; i < idcount; i++) {
cargoes[i] = buf->ReadByte();
}
/* Skip the cargo type section, we only care about the default group */
uint8 cidcount = buf->ReadByte();
buf->Skip(cidcount * 3);
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "CargoMapSpriteGroup")) return;
for (uint i = 0; i < idcount; i++) {
CargoID cid = cargoes[i];
if (cid >= NUM_CARGO) {
grfmsg(1, "CargoMapSpriteGroup: Cargo ID %d out of range, skipping", cid);
continue;
}
CargoSpec *cs = CargoSpec::Get(cid);
cs->grffile = _cur.grffile;
cs->group = _cur.spritegroups[groupid];
}
}
static void ObjectMapSpriteGroup(ByteReader *buf, uint8 idcount)
{
if (_cur.grffile->objectspec == NULL) {
grfmsg(1, "ObjectMapSpriteGroup: No object tiles defined, skipping");
return;
}
uint8 *objects = AllocaM(uint8, idcount);
for (uint i = 0; i < idcount; i++) {
objects[i] = buf->ReadByte();
}
uint8 cidcount = buf->ReadByte();
for (uint c = 0; c < cidcount; c++) {
uint8 ctype = buf->ReadByte();
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "ObjectMapSpriteGroup")) continue;
ctype = TranslateCargo(GSF_OBJECTS, ctype);
if (ctype == CT_INVALID) continue;
for (uint i = 0; i < idcount; i++) {
ObjectSpec *spec = _cur.grffile->objectspec[objects[i]];
if (spec == NULL) {
grfmsg(1, "ObjectMapSpriteGroup: Object with ID 0x%02X undefined, skipping", objects[i]);
continue;
}
spec->grf_prop.spritegroup[ctype] = _cur.spritegroups[groupid];
}
}
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "ObjectMapSpriteGroup")) return;
for (uint i = 0; i < idcount; i++) {
ObjectSpec *spec = _cur.grffile->objectspec[objects[i]];
if (spec == NULL) {
grfmsg(1, "ObjectMapSpriteGroup: Object with ID 0x%02X undefined, skipping", objects[i]);
continue;
}
if (spec->grf_prop.grffile != NULL) {
grfmsg(1, "ObjectMapSpriteGroup: Object with ID 0x%02X mapped multiple times, skipping", objects[i]);
continue;
}
spec->grf_prop.spritegroup[0] = _cur.spritegroups[groupid];
spec->grf_prop.grffile = _cur.grffile;
spec->grf_prop.local_id = objects[i];
}
}
static void RailTypeMapSpriteGroup(ByteReader *buf, uint8 idcount)
{
uint8 *railtypes = AllocaM(uint8, idcount);
for (uint i = 0; i < idcount; i++) {
railtypes[i] = _cur.grffile->railtype_map[buf->ReadByte()];
}
uint8 cidcount = buf->ReadByte();
for (uint c = 0; c < cidcount; c++) {
uint8 ctype = buf->ReadByte();
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "RailTypeMapSpriteGroup")) continue;
if (ctype >= RTSG_END) continue;
extern RailtypeInfo _railtypes[RAILTYPE_END];
for (uint i = 0; i < idcount; i++) {
if (railtypes[i] != INVALID_RAILTYPE) {
RailtypeInfo *rti = &_railtypes[railtypes[i]];
rti->grffile[ctype] = _cur.grffile;
rti->group[ctype] = _cur.spritegroups[groupid];
}
}
}
/* Railtypes do not use the default group. */
buf->ReadWord();
}
static void AirportMapSpriteGroup(ByteReader *buf, uint8 idcount)
{
uint8 *airports = AllocaM(uint8, idcount);
for (uint i = 0; i < idcount; i++) {
airports[i] = buf->ReadByte();
}
/* Skip the cargo type section, we only care about the default group */
uint8 cidcount = buf->ReadByte();
buf->Skip(cidcount * 3);
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "AirportMapSpriteGroup")) return;
if (_cur.grffile->airportspec == NULL) {
grfmsg(1, "AirportMapSpriteGroup: No airports defined, skipping");
return;
}
for (uint i = 0; i < idcount; i++) {
AirportSpec *as = _cur.grffile->airportspec[airports[i]];
if (as == NULL) {
grfmsg(1, "AirportMapSpriteGroup: Airport %d undefined, skipping", airports[i]);
continue;
}
as->grf_prop.spritegroup[0] = _cur.spritegroups[groupid];
}
}
static void AirportTileMapSpriteGroup(ByteReader *buf, uint8 idcount)
{
uint8 *airptiles = AllocaM(uint8, idcount);
for (uint i = 0; i < idcount; i++) {
airptiles[i] = buf->ReadByte();
}
/* Skip the cargo type section, we only care about the default group */
uint8 cidcount = buf->ReadByte();
buf->Skip(cidcount * 3);
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "AirportTileMapSpriteGroup")) return;
if (_cur.grffile->airtspec == NULL) {
grfmsg(1, "AirportTileMapSpriteGroup: No airport tiles defined, skipping");
return;
}
for (uint i = 0; i < idcount; i++) {
AirportTileSpec *airtsp = _cur.grffile->airtspec[airptiles[i]];
if (airtsp == NULL) {
grfmsg(1, "AirportTileMapSpriteGroup: Airport tile %d undefined, skipping", airptiles[i]);
continue;
}
airtsp->grf_prop.spritegroup[0] = _cur.spritegroups[groupid];
}
}
/* Action 0x03 */
static void FeatureMapSpriteGroup(ByteReader *buf)
{
/* <03> <feature> <n-id> <ids>... <num-cid> [<cargo-type> <cid>]... <def-cid>
* id-list := [<id>] [id-list]
* cargo-list := <cargo-type> <cid> [cargo-list]
*
* B feature see action 0
* B n-id bits 0-6: how many IDs this definition applies to
* bit 7: if set, this is a wagon override definition (see below)
* B ids the IDs for which this definition applies
* B num-cid number of cargo IDs (sprite group IDs) in this definition
* can be zero, in that case the def-cid is used always
* B cargo-type type of this cargo type (e.g. mail=2, wood=7, see below)
* W cid cargo ID (sprite group ID) for this type of cargo
* W def-cid default cargo ID (sprite group ID) */
uint8 feature = buf->ReadByte();
uint8 idcount = buf->ReadByte();
/* If idcount is zero, this is a feature callback */
if (idcount == 0) {
/* Skip number of cargo ids? */
buf->ReadByte();
uint16 groupid = buf->ReadWord();
if (!IsValidGroupID(groupid, "FeatureMapSpriteGroup")) return;
grfmsg(6, "FeatureMapSpriteGroup: Adding generic feature callback for feature %d", feature);
AddGenericCallback(feature, _cur.grffile, _cur.spritegroups[groupid]);
return;
}
/* Mark the feature as used by the grf (generic callbacks do not count) */
SetBit(_cur.grffile->grf_features, feature);
grfmsg(6, "FeatureMapSpriteGroup: Feature %d, %d ids", feature, idcount);
switch (feature) {
case GSF_TRAINS:
case GSF_ROADVEHICLES:
case GSF_SHIPS:
case GSF_AIRCRAFT:
VehicleMapSpriteGroup(buf, feature, idcount);
return;
case GSF_CANALS:
CanalMapSpriteGroup(buf, idcount);
return;
case GSF_STATIONS:
StationMapSpriteGroup(buf, idcount);
return;
case GSF_HOUSES:
TownHouseMapSpriteGroup(buf, idcount);
return;
case GSF_INDUSTRIES:
IndustryMapSpriteGroup(buf, idcount);
return;
case GSF_INDUSTRYTILES:
IndustrytileMapSpriteGroup(buf, idcount);
return;
case GSF_CARGOES:
CargoMapSpriteGroup(buf, idcount);
return;
case GSF_AIRPORTS:
AirportMapSpriteGroup(buf, idcount);
return;
case GSF_OBJECTS:
ObjectMapSpriteGroup(buf, idcount);
break;
case GSF_RAILTYPES:
RailTypeMapSpriteGroup(buf, idcount);
break;
case GSF_AIRPORTTILES:
AirportTileMapSpriteGroup(buf, idcount);
return;
default:
grfmsg(1, "FeatureMapSpriteGroup: Unsupported feature %d, skipping", feature);
return;
}
}
/* Action 0x04 */
static void FeatureNewName(ByteReader *buf)
{
/* <04> <veh-type> <language-id> <num-veh> <offset> <data...>
*
* B veh-type see action 0 (as 00..07, + 0A
* But IF veh-type = 48, then generic text
* B language-id If bit 6 is set, This is the extended language scheme,
* with up to 64 language.
* Otherwise, it is a mapping where set bits have meaning
* 0 = american, 1 = english, 2 = german, 3 = french, 4 = spanish
* Bit 7 set means this is a generic text, not a vehicle one (or else)
* B num-veh number of vehicles which are getting a new name
* B/W offset number of the first vehicle that gets a new name
* Byte : ID of vehicle to change
* Word : ID of string to change/add
* S data new texts, each of them zero-terminated, after
* which the next name begins. */
bool new_scheme = _cur.grffile->grf_version >= 7;
uint8 feature = buf->ReadByte();
uint8 lang = buf->ReadByte();
uint8 num = buf->ReadByte();
bool generic = HasBit(lang, 7);
uint16 id;
if (generic) {
id = buf->ReadWord();
} else if (feature <= GSF_AIRCRAFT) {
id = buf->ReadExtendedByte();
} else {
id = buf->ReadByte();
}
ClrBit(lang, 7);
uint16 endid = id + num;
grfmsg(6, "FeatureNewName: About to rename engines %d..%d (feature %d) in language 0x%02X",
id, endid, feature, lang);
for (; id < endid && buf->HasData(); id++) {
const char *name = buf->ReadString();
grfmsg(8, "FeatureNewName: 0x%04X <- %s", id, name);
switch (feature) {
case GSF_TRAINS:
case GSF_ROADVEHICLES:
case GSF_SHIPS:
case GSF_AIRCRAFT:
if (!generic) {
Engine *e = GetNewEngine(_cur.grffile, (VehicleType)feature, id, HasBit(_cur.grfconfig->flags, GCF_STATIC));
if (e == NULL) break;
StringID string = AddGRFString(_cur.grffile->grfid, e->index, lang, new_scheme, false, name, e->info.string_id);
e->info.string_id = string;
} else {
AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, true, name, STR_UNDEFINED);
}
break;
case GSF_INDUSTRIES: {
AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, true, name, STR_UNDEFINED);
break;
}
case GSF_HOUSES:
default:
switch (GB(id, 8, 8)) {
case 0xC4: // Station class name
if (_cur.grffile->stations == NULL || _cur.grffile->stations[GB(id, 0, 8)] == NULL) {
grfmsg(1, "FeatureNewName: Attempt to name undefined station 0x%X, ignoring", GB(id, 0, 8));
} else {
StationClassID cls_id = _cur.grffile->stations[GB(id, 0, 8)]->cls_id;
StationClass::Get(cls_id)->name = AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, false, name, STR_UNDEFINED);
}
break;
case 0xC5: // Station name
if (_cur.grffile->stations == NULL || _cur.grffile->stations[GB(id, 0, 8)] == NULL) {
grfmsg(1, "FeatureNewName: Attempt to name undefined station 0x%X, ignoring", GB(id, 0, 8));
} else {
_cur.grffile->stations[GB(id, 0, 8)]->name = AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, false, name, STR_UNDEFINED);
}
break;
case 0xC7: // Airporttile name
if (_cur.grffile->airtspec == NULL || _cur.grffile->airtspec[GB(id, 0, 8)] == NULL) {
grfmsg(1, "FeatureNewName: Attempt to name undefined airport tile 0x%X, ignoring", GB(id, 0, 8));
} else {
_cur.grffile->airtspec[GB(id, 0, 8)]->name = AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, false, name, STR_UNDEFINED);
}
break;
case 0xC9: // House name
if (_cur.grffile->housespec == NULL || _cur.grffile->housespec[GB(id, 0, 8)] == NULL) {
grfmsg(1, "FeatureNewName: Attempt to name undefined house 0x%X, ignoring.", GB(id, 0, 8));
} else {
_cur.grffile->housespec[GB(id, 0, 8)]->building_name = AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, false, name, STR_UNDEFINED);
}
break;
case 0xD0:
case 0xD1:
case 0xD2:
case 0xD3:
case 0xDC:
AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, true, name, STR_UNDEFINED);
break;
default:
grfmsg(7, "FeatureNewName: Unsupported ID (0x%04X)", id);
break;
}
break;
}
}
}
/**
* Sanitize incoming sprite offsets for Action 5 graphics replacements.
* @param num The number of sprites to load.
* @param offset Offset from the base.
* @param max_sprites The maximum number of sprites that can be loaded in this action 5.
* @param name Used for error warnings.
* @return The number of sprites that is going to be skipped.
*/
static uint16 SanitizeSpriteOffset(uint16& num, uint16 offset, int max_sprites, const char *name)
{
if (offset >= max_sprites) {
grfmsg(1, "GraphicsNew: %s sprite offset must be less than %i, skipping", name, max_sprites);
uint orig_num = num;
num = 0;
return orig_num;
}
if (offset + num > max_sprites) {
grfmsg(4, "GraphicsNew: %s sprite overflow, truncating...", name);
uint orig_num = num;
num = max(max_sprites - offset, 0);
return orig_num - num;
}
return 0;
}
/** The type of action 5 type. */
enum Action5BlockType {
A5BLOCK_FIXED, ///< Only allow replacing a whole block of sprites. (TTDP compatible)
A5BLOCK_ALLOW_OFFSET, ///< Allow replacing any subset by specifiing an offset.
A5BLOCK_INVALID, ///< unknown/not-implemented type
};
/** Information about a single action 5 type. */
struct Action5Type {
Action5BlockType block_type; ///< How is this Action5 type processed?
SpriteID sprite_base; ///< Load the sprites starting from this sprite.
uint16 min_sprites; ///< If the Action5 contains less sprites, the whole block will be ignored.
uint16 max_sprites; ///< If the Action5 contains more sprites, only the first max_sprites sprites will be used.
const char *name; ///< Name for error messages.
};
/** The information about action 5 types. */
static const Action5Type _action5_types[] = {
/* Note: min_sprites should not be changed. Therefore these constants are directly here and not in sprites.h */
/* 0x00 */ { A5BLOCK_INVALID, 0, 0, 0, "Type 0x00" },
/* 0x01 */ { A5BLOCK_INVALID, 0, 0, 0, "Type 0x01" },
/* 0x02 */ { A5BLOCK_INVALID, 0, 0, 0, "Type 0x02" },
/* 0x03 */ { A5BLOCK_INVALID, 0, 0, 0, "Type 0x03" },
/* 0x04 */ { A5BLOCK_ALLOW_OFFSET, SPR_SIGNALS_BASE, 1, PRESIGNAL_SEMAPHORE_AND_PBS_SPRITE_COUNT, "Signal graphics" },
/* 0x05 */ { A5BLOCK_ALLOW_OFFSET, SPR_ELRAIL_BASE, 1, ELRAIL_SPRITE_COUNT, "Catenary graphics" },
/* 0x06 */ { A5BLOCK_ALLOW_OFFSET, SPR_SLOPES_BASE, 1, NORMAL_AND_HALFTILE_FOUNDATION_SPRITE_COUNT, "Foundation graphics" },
/* 0x07 */ { A5BLOCK_INVALID, 0, 75, 0, "TTDP GUI graphics" }, // Not used by OTTD.
/* 0x08 */ { A5BLOCK_ALLOW_OFFSET, SPR_CANALS_BASE, 1, CANALS_SPRITE_COUNT, "Canal graphics" },
/* 0x09 */ { A5BLOCK_ALLOW_OFFSET, SPR_ONEWAY_BASE, 1, ONEWAY_SPRITE_COUNT, "One way road graphics" },
/* 0x0A */ { A5BLOCK_ALLOW_OFFSET, SPR_2CCMAP_BASE, 1, TWOCCMAP_SPRITE_COUNT, "2CC colour maps" },
/* 0x0B */ { A5BLOCK_ALLOW_OFFSET, SPR_TRAMWAY_BASE, 1, TRAMWAY_SPRITE_COUNT, "Tramway graphics" },
/* 0x0C */ { A5BLOCK_INVALID, 0, 133, 0, "Snowy temperate tree" }, // Not yet used by OTTD.
/* 0x0D */ { A5BLOCK_FIXED, SPR_SHORE_BASE, 16, SPR_SHORE_SPRITE_COUNT, "Shore graphics" },
/* 0x0E */ { A5BLOCK_INVALID, 0, 0, 0, "New Signals graphics" }, // Not yet used by OTTD.
/* 0x0F */ { A5BLOCK_ALLOW_OFFSET, SPR_TRACKS_FOR_SLOPES_BASE, 1, TRACKS_FOR_SLOPES_SPRITE_COUNT, "Sloped rail track" },
/* 0x10 */ { A5BLOCK_ALLOW_OFFSET, SPR_AIRPORTX_BASE, 1, AIRPORTX_SPRITE_COUNT, "Airport graphics" },
/* 0x11 */ { A5BLOCK_ALLOW_OFFSET, SPR_ROADSTOP_BASE, 1, ROADSTOP_SPRITE_COUNT, "Road stop graphics" },
/* 0x12 */ { A5BLOCK_ALLOW_OFFSET, SPR_AQUEDUCT_BASE, 1, AQUEDUCT_SPRITE_COUNT, "Aqueduct graphics" },
/* 0x13 */ { A5BLOCK_ALLOW_OFFSET, SPR_AUTORAIL_BASE, 1, AUTORAIL_SPRITE_COUNT, "Autorail graphics" },
/* 0x14 */ { A5BLOCK_ALLOW_OFFSET, SPR_FLAGS_BASE, 1, FLAGS_SPRITE_COUNT, "Flag graphics" },
/* 0x15 */ { A5BLOCK_ALLOW_OFFSET, SPR_OPENTTD_BASE, 1, OPENTTD_SPRITE_COUNT, "OpenTTD GUI graphics" },
/* 0x16 */ { A5BLOCK_ALLOW_OFFSET, SPR_AIRPORT_PREVIEW_BASE, 1, SPR_AIRPORT_PREVIEW_COUNT, "Airport preview graphics" },
/* 0x17 */ { A5BLOCK_ALLOW_OFFSET, SPR_RAILTYPE_TUNNEL_BASE, 1, RAILTYPE_TUNNEL_BASE_COUNT, "Railtype tunnel base" },
};
/* Action 0x05 */
static void GraphicsNew(ByteReader *buf)
{
/* <05> <graphics-type> <num-sprites> <other data...>
*
* B graphics-type What set of graphics the sprites define.
* E num-sprites How many sprites are in this set?
* V other data Graphics type specific data. Currently unused. */
/* TODO */
uint8 type = buf->ReadByte();
uint16 num = buf->ReadExtendedByte();
uint16 offset = HasBit(type, 7) ? buf->ReadExtendedByte() : 0;
ClrBit(type, 7); // Clear the high bit as that only indicates whether there is an offset.
if ((type == 0x0D) && (num == 10) && _cur.grffile->is_ottdfile) {
/* Special not-TTDP-compatible case used in openttd.grf
* Missing shore sprites and initialisation of SPR_SHORE_BASE */
grfmsg(2, "GraphicsNew: Loading 10 missing shore sprites from extra grf.");
LoadNextSprite(SPR_SHORE_BASE + 0, _cur.file_index, _cur.nfo_line++, _cur.grf_container_ver); // SLOPE_STEEP_S
LoadNextSprite(SPR_SHORE_BASE + 5, _cur.file_index, _cur.nfo_line++, _cur.grf_container_ver); // SLOPE_STEEP_W
LoadNextSprite(SPR_SHORE_BASE + 7, _cur.file_index, _cur.nfo_line++, _cur.grf_container_ver); // SLOPE_WSE
LoadNextSprite(SPR_SHORE_BASE + 10, _cur.file_index, _cur.nfo_line++, _cur.grf_container_ver); // SLOPE_STEEP_N
LoadNextSprite(SPR_SHORE_BASE + 11, _cur.file_index, _cur.nfo_line++, _cur.grf_container_ver); // SLOPE_NWS
LoadNextSprite(SPR_SHORE_BASE + 13, _cur.file_index, _cur.nfo_line++, _cur.grf_container_ver); // SLOPE_ENW
LoadNextSprite(SPR_SHORE_BASE + 14, _cur.file_index, _cur.nfo_line++, _cur.grf_container_ver); // SLOPE_SEN
LoadNextSprite(SPR_SHORE_BASE + 15, _cur.file_index, _cur.nfo_line++, _cur.grf_container_ver); // SLOPE_STEEP_E
LoadNextSprite(SPR_SHORE_BASE + 16, _cur.file_index, _cur.nfo_line++, _cur.grf_container_ver); // SLOPE_EW
LoadNextSprite(SPR_SHORE_BASE + 17, _cur.file_index, _cur.nfo_line++, _cur.grf_container_ver); // SLOPE_NS
if (_loaded_newgrf_features.shore == SHORE_REPLACE_NONE) _loaded_newgrf_features.shore = SHORE_REPLACE_ONLY_NEW;
return;
}
/* Supported type? */
if ((type >= lengthof(_action5_types)) || (_action5_types[type].block_type == A5BLOCK_INVALID)) {
grfmsg(2, "GraphicsNew: Custom graphics (type 0x%02X) sprite block of length %u (unimplemented, ignoring)", type, num);
_cur.skip_sprites = num;
return;
}
const Action5Type *action5_type = &_action5_types[type];
/* Contrary to TTDP we allow always to specify too few sprites as we allow always an offset,
* except for the long version of the shore type:
* Ignore offset if not allowed */
if ((action5_type->block_type != A5BLOCK_ALLOW_OFFSET) && (offset != 0)) {
grfmsg(1, "GraphicsNew: %s (type 0x%02X) do not allow an <offset> field. Ignoring offset.", action5_type->name, type);
offset = 0;
}
/* Ignore action5 if too few sprites are specified. (for TTDP compatibility)
* This does not make sense, if <offset> is allowed */
if ((action5_type->block_type == A5BLOCK_FIXED) && (num < action5_type->min_sprites)) {
grfmsg(1, "GraphicsNew: %s (type 0x%02X) count must be at least %d. Only %d were specified. Skipping.", action5_type->name, type, action5_type->min_sprites, num);
_cur.skip_sprites = num;
return;
}
/* Load at most max_sprites sprites. Skip remaining sprites. (for compatibility with TTDP and future extentions) */
uint16 skip_num = SanitizeSpriteOffset(num, offset, action5_type->max_sprites, action5_type->name);
SpriteID replace = action5_type->sprite_base + offset;
/* Load <num> sprites starting from <replace>, then skip <skip_num> sprites. */
grfmsg(2, "GraphicsNew: Replacing sprites %d to %d of %s (type 0x%02X) at SpriteID 0x%04X", offset, offset + num - 1, action5_type->name, type, replace);
for (; num > 0; num--) {
_cur.nfo_line++;
LoadNextSprite(replace == 0 ? _cur.spriteid++ : replace++, _cur.file_index, _cur.nfo_line, _cur.grf_container_ver);
}
if (type == 0x0D) _loaded_newgrf_features.shore = SHORE_REPLACE_ACTION_5;
_cur.skip_sprites = skip_num;
}
/* Action 0x05 (SKIP) */
static void SkipAct5(ByteReader *buf)
{
/* Ignore type byte */
buf->ReadByte();
/* Skip the sprites of this action */
_cur.skip_sprites = buf->ReadExtendedByte();
grfmsg(3, "SkipAct5: Skipping %d sprites", _cur.skip_sprites);
}
/**
* Check whether we are (obviously) missing some of the extra
* (Action 0x05) sprites that we like to use.
* When missing sprites are found a warning will be shown.
*/
void CheckForMissingSprites()
{
/* Don't break out quickly, but allow to check the other
* sprites as well, so we can give the best information. */
bool missing = false;
for (uint8 i = 0; i < lengthof(_action5_types); i++) {
const Action5Type *type = &_action5_types[i];
if (type->block_type == A5BLOCK_INVALID) continue;
for (uint j = 0; j < type->max_sprites; j++) {
if (!SpriteExists(type->sprite_base + j)) {
DEBUG(grf, 0, "%s sprites are missing", type->name);
missing = true;
/* No need to log more of the same. */
break;
}
}
}
if (missing) {
ShowErrorMessage(IsReleasedVersion() ? STR_NEWGRF_ERROR_MISSING_SPRITES : STR_NEWGRF_ERROR_MISSING_SPRITES_UNSTABLE, INVALID_STRING_ID, WL_CRITICAL);
}
}
/**
* Reads a variable common to VarAction2 and Action7/9/D.
*
* Returns VarAction2 variable 'param' resp. Action7/9/D variable '0x80 + param'.
* If a variable is not accessible from all four actions, it is handled in the action specific functions.
*
* @param param variable number (as for VarAction2, for Action7/9/D you have to subtract 0x80 first).
* @param value returns the value of the variable.
* @param grffile NewGRF querying the variable
* @return true iff the variable is known and the value is returned in 'value'.
*/
bool GetGlobalVariable(byte param, uint32 *value, const GRFFile *grffile)
{
switch (param) {
case 0x00: // current date
*value = max(_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0);
return true;
case 0x01: // current year
*value = Clamp(_cur_year, ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR) - ORIGINAL_BASE_YEAR;
return true;
case 0x02: { // detailed date information: month of year (bit 0-7), day of month (bit 8-12), leap year (bit 15), day of year (bit 16-24)
YearMonthDay ymd;
ConvertDateToYMD(_date, &ymd);
Date start_of_year = ConvertYMDToDate(ymd.year, 0, 1);
*value = ymd.month | (ymd.day - 1) << 8 | (IsLeapYear(ymd.year) ? 1 << 15 : 0) | (_date - start_of_year) << 16;
return true;
}
case 0x03: // current climate, 0=temp, 1=arctic, 2=trop, 3=toyland
*value = _settings_game.game_creation.landscape;
return true;
case 0x06: // road traffic side, bit 4 clear=left, set=right
*value = _settings_game.vehicle.road_side << 4;
return true;
case 0x09: // date fraction
*value = _date_fract * 885;
return true;
case 0x0A: // animation counter
*value = _tick_counter;
return true;
case 0x0B: { // TTDPatch version
uint major = 2;
uint minor = 6;
uint revision = 1; // special case: 2.0.1 is 2.0.10
uint build = 1382;
*value = (major << 24) | (minor << 20) | (revision << 16) | build;
return true;
}
case 0x0D: // TTD Version, 00=DOS, 01=Windows
*value = _cur.grfconfig->palette & GRFP_USE_MASK;
return true;
case 0x0E: // Y-offset for train sprites
*value = _cur.grffile->traininfo_vehicle_pitch;
return true;
case 0x0F: // Rail track type cost factors
*value = 0;
SB(*value, 0, 8, GetRailTypeInfo(RAILTYPE_RAIL)->cost_multiplier); // normal rail
if (_settings_game.vehicle.disable_elrails) {
/* skip elrail multiplier - disabled */
SB(*value, 8, 8, GetRailTypeInfo(RAILTYPE_MONO)->cost_multiplier); // monorail
} else {
SB(*value, 8, 8, GetRailTypeInfo(RAILTYPE_ELECTRIC)->cost_multiplier); // electified railway
/* Skip monorail multiplier - no space in result */
}
SB(*value, 16, 8, GetRailTypeInfo(RAILTYPE_MAGLEV)->cost_multiplier); // maglev
return true;
case 0x11: // current rail tool type
*value = 0; // constant fake value to avoid desync
return true;
case 0x12: // Game mode
*value = _game_mode;
return true;
/* case 0x13: // Tile refresh offset to left not implemented */
/* case 0x14: // Tile refresh offset to right not implemented */
/* case 0x15: // Tile refresh offset upwards not implemented */
/* case 0x16: // Tile refresh offset downwards not implemented */
case 0x17: // temperate snow line
*value = _settings_game.construction.snow_in_temperate;
return true;
case 0x1A: // Always -1
*value = UINT_MAX;
return true;
case 0x1B: // Display options
*value = 0x3F; // constant fake value to avoid desync
return true;
case 0x1D: // TTD Platform, 00=TTDPatch, 01=OpenTTD
*value = 1;
return true;
case 0x1E: // Miscellaneous GRF features
*value = _misc_grf_features;
/* Add the local flags */
assert(!HasBit(*value, GMB_TRAIN_WIDTH_32_PIXELS));
if (_cur.grffile->traininfo_vehicle_width == VEHICLEINFO_FULL_VEHICLE_WIDTH) SetBit(*value, GMB_TRAIN_WIDTH_32_PIXELS);
return true;
/* case 0x1F: // locale dependent settings not implemented to avoid desync */
case 0x20: { // snow line height
byte snowline = GetSnowLine();
if ( snowline <= _settings_game.construction.max_heightlevel )
{
switch (_settings_game.game_creation.landscape)
{
case LT_ARCTIC:
*value = GetSnowLine();
break;
case LT_TEMPERATE:
if (_settings_game.construction.snow_in_temperate)
*value = GetSnowLine();
else
*value = 0xFF;
default:
*value = 0xFF;
};
} else { *value = 0xFF; };
return true;
}
case 0x21: // OpenTTD version
*value = _openttd_newgrf_version;
return true;
case 0x22: // difficulty level
*value = SP_CUSTOM;
return true;
case 0x23: // long format date
*value = _date;
return true;
case 0x24: // long format year
*value = _cur_year;
return true;
default: return false;
}
}
static uint32 GetParamVal(byte param, uint32 *cond_val)
{
/* First handle variable common with VarAction2 */
uint32 value;
if (GetGlobalVariable(param - 0x80, &value, _cur.grffile)) return value;
/* Non-common variable */
switch (param) {
case 0x84: { // GRF loading stage
uint32 res = 0;
if (_cur.stage > GLS_INIT) SetBit(res, 0);
if (_cur.stage == GLS_RESERVE) SetBit(res, 8);
if (_cur.stage == GLS_ACTIVATION) SetBit(res, 9);
return res;
}
case 0x85: // TTDPatch flags, only for bit tests
if (cond_val == NULL) {
/* Supported in Action 0x07 and 0x09, not 0x0D */
return 0;
} else {
uint32 param_val = _ttdpatch_flags[*cond_val / 0x20];
*cond_val %= 0x20;
return param_val;
}
case 0x88: // GRF ID check
return 0;
/* case 0x99: Global ID offest not implemented */
default:
/* GRF Parameter */
if (param < 0x80) return _cur.grffile->GetParam(param);
/* In-game variable. */
grfmsg(1, "Unsupported in-game variable 0x%02X", param);
return UINT_MAX;
}
}
/* Action 0x06 */
static void CfgApply(ByteReader *buf)
{
/* <06> <param-num> <param-size> <offset> ... <FF>
*
* B param-num Number of parameter to substitute (First = "zero")
* Ignored if that parameter was not specified in newgrf.cfg
* B param-size How many bytes to replace. If larger than 4, the
* bytes of the following parameter are used. In that
* case, nothing is applied unless *all* parameters
* were specified.
* B offset Offset into data from beginning of next sprite
* to place where parameter is to be stored. */
/* Preload the next sprite */
size_t pos = FioGetPos();
uint32 num = _cur.grf_container_ver >= 2 ? FioReadDword() : FioReadWord();
uint8 type = FioReadByte();
byte *preload_sprite = NULL;
/* Check if the sprite is a pseudo sprite. We can't operate on real sprites. */
if (type == 0xFF) {
preload_sprite = MallocT<byte>(num);
FioReadBlock(preload_sprite, num);
}
/* Reset the file position to the start of the next sprite */
FioSeekTo(pos, SEEK_SET);
if (type != 0xFF) {
grfmsg(2, "CfgApply: Ignoring (next sprite is real, unsupported)");
free(preload_sprite);
return;
}
GRFLocation location(_cur.grfconfig->ident.grfid, _cur.nfo_line + 1);
GRFLineToSpriteOverride::iterator it = _grf_line_to_action6_sprite_override.find(location);
if (it != _grf_line_to_action6_sprite_override.end()) {
free(preload_sprite);
preload_sprite = _grf_line_to_action6_sprite_override[location];
} else {
_grf_line_to_action6_sprite_override[location] = preload_sprite;
}
/* Now perform the Action 0x06 on our data. */
for (;;) {
uint i;
uint param_num;
uint param_size;
uint offset;
bool add_value;
/* Read the parameter to apply. 0xFF indicates no more data to change. */
param_num = buf->ReadByte();
if (param_num == 0xFF) break;
/* Get the size of the parameter to use. If the size covers multiple
* double words, sequential parameter values are used. */
param_size = buf->ReadByte();
/* Bit 7 of param_size indicates we should add to the original value
* instead of replacing it. */
add_value = HasBit(param_size, 7);
param_size = GB(param_size, 0, 7);
/* Where to apply the data to within the pseudo sprite data. */
offset = buf->ReadExtendedByte();
/* If the parameter is a GRF parameter (not an internal variable) check
* if it (and all further sequential parameters) has been defined. */
if (param_num < 0x80 && (param_num + (param_size - 1) / 4) >= _cur.grffile->param_end) {
grfmsg(2, "CfgApply: Ignoring (param %d not set)", (param_num + (param_size - 1) / 4));
break;
}
grfmsg(8, "CfgApply: Applying %u bytes from parameter 0x%02X at offset 0x%04X", param_size, param_num, offset);
bool carry = false;
for (i = 0; i < param_size && offset + i < num; i++) {
uint32 value = GetParamVal(param_num + i / 4, NULL);
/* Reset carry flag for each iteration of the variable (only really
* matters if param_size is greater than 4) */
if (i % 4 == 0) carry = false;
if (add_value) {
uint new_value = preload_sprite[offset + i] + GB(value, (i % 4) * 8, 8) + (carry ? 1 : 0);
preload_sprite[offset + i] = GB(new_value, 0, 8);
/* Check if the addition overflowed */
carry = new_value >= 256;
} else {
preload_sprite[offset + i] = GB(value, (i % 4) * 8, 8);
}
}
}
}
/**
* Disable a static NewGRF when it is influencing another (non-static)
* NewGRF as this could cause desyncs.
*
* We could just tell the NewGRF querying that the file doesn't exist,
* but that might give unwanted results. Disabling the NewGRF gives the
* best result as no NewGRF author can complain about that.
* @param c The NewGRF to disable.
*/
static void DisableStaticNewGRFInfluencingNonStaticNewGRFs(GRFConfig *c)
{
GRFError *error = DisableGrf(STR_NEWGRF_ERROR_STATIC_GRF_CAUSES_DESYNC, c);
error->data = strdup(_cur.grfconfig->GetName());
}
/* Action 0x07
* Action 0x09 */
static void SkipIf(ByteReader *buf)
{
/* <07/09> <param-num> <param-size> <condition-type> <value> <num-sprites>
*
* B param-num
* B param-size
* B condition-type
* V value
* B num-sprites */
/* TODO: More params. More condition types. */
uint32 cond_val = 0;
uint32 mask = 0;
bool result;
uint8 param = buf->ReadByte();
uint8 paramsize = buf->ReadByte();
uint8 condtype = buf->ReadByte();
if (condtype < 2) {
/* Always 1 for bit tests, the given value should be ignored. */
paramsize = 1;
}
switch (paramsize) {
case 8: cond_val = buf->ReadDWord(); mask = buf->ReadDWord(); break;
case 4: cond_val = buf->ReadDWord(); mask = 0xFFFFFFFF; break;
case 2: cond_val = buf->ReadWord(); mask = 0x0000FFFF; break;
case 1: cond_val = buf->ReadByte(); mask = 0x000000FF; break;
default: break;
}
if (param < 0x80 && _cur.grffile->param_end <= param) {
grfmsg(7, "SkipIf: Param %d undefined, skipping test", param);
return;
}
uint32 param_val = GetParamVal(param, &cond_val);
grfmsg(7, "SkipIf: Test condtype %d, param 0x%08X, condval 0x%08X", condtype, param_val, cond_val);
/*
* Parameter (variable in specs) 0x88 can only have GRF ID checking
* conditions, except conditions 0x0B, 0x0C (cargo availability) and
* 0x0D, 0x0E (Rail type availability) as those ignore the parameter.
* So, when the condition type is one of those, the specific variable
* 0x88 code is skipped, so the "general" code for the cargo
* availability conditions kicks in.
*/
if (param == 0x88 && (condtype < 0x0B || condtype > 0x0E)) {
/* GRF ID checks */
GRFConfig *c = GetGRFConfig(cond_val, mask);
if (c != NULL && HasBit(c->flags, GCF_STATIC) && !HasBit(_cur.grfconfig->flags, GCF_STATIC) && _networking) {
DisableStaticNewGRFInfluencingNonStaticNewGRFs(c);
c = NULL;
}
if (condtype != 10 && c == NULL) {
grfmsg(7, "SkipIf: GRFID 0x%08X unknown, skipping test", BSWAP32(cond_val));
return;
}
switch (condtype) {
/* Tests 0x06 to 0x0A are only for param 0x88, GRFID checks */
case 0x06: // Is GRFID active?
result = c->status == GCS_ACTIVATED;
break;
case 0x07: // Is GRFID non-active?
result = c->status != GCS_ACTIVATED;
break;
case 0x08: // GRFID is not but will be active?
result = c->status == GCS_INITIALISED;
break;
case 0x09: // GRFID is or will be active?
result = c->status == GCS_ACTIVATED || c->status == GCS_INITIALISED;
break;
case 0x0A: // GRFID is not nor will be active
/* This is the only condtype that doesn't get ignored if the GRFID is not found */
result = c == NULL || c->flags == GCS_DISABLED || c->status == GCS_NOT_FOUND;
break;
default: grfmsg(1, "SkipIf: Unsupported GRF condition type %02X. Ignoring", condtype); return;
}
} else {
/* Parameter or variable tests */
switch (condtype) {
case 0x00: result = !!(param_val & (1 << cond_val));
break;
case 0x01: result = !(param_val & (1 << cond_val));
break;
case 0x02: result = (param_val & mask) == cond_val;
break;
case 0x03: result = (param_val & mask) != cond_val;
break;
case 0x04: result = (param_val & mask) < cond_val;
break;
case 0x05: result = (param_val & mask) > cond_val;
break;
case 0x0B: result = GetCargoIDByLabel(BSWAP32(cond_val)) == CT_INVALID;
break;
case 0x0C: result = GetCargoIDByLabel(BSWAP32(cond_val)) != CT_INVALID;
break;
case 0x0D: result = GetRailTypeByLabel(BSWAP32(cond_val)) == INVALID_RAILTYPE;
break;
case 0x0E: result = GetRailTypeByLabel(BSWAP32(cond_val)) != INVALID_RAILTYPE;
break;
default: grfmsg(1, "SkipIf: Unsupported condition type %02X. Ignoring", condtype); return;
}
}
if (!result) {
grfmsg(2, "SkipIf: Not skipping sprites, test was false");
return;
}
uint8 numsprites = buf->ReadByte();
/* numsprites can be a GOTO label if it has been defined in the GRF
* file. The jump will always be the first matching label that follows
* the current nfo_line. If no matching label is found, the first matching
* label in the file is used. */
GRFLabel *choice = NULL;
for (GRFLabel *label = _cur.grffile->label; label != NULL; label = label->next) {
if (label->label != numsprites) continue;
/* Remember a goto before the current line */
if (choice == NULL) choice = label;
/* If we find a label here, this is definitely good */
if (label->nfo_line > _cur.nfo_line) {
choice = label;
break;
}
}
if (choice != NULL) {
grfmsg(2, "SkipIf: Jumping to label 0x%0X at line %d, test was true", choice->label, choice->nfo_line);
FioSeekTo(choice->pos, SEEK_SET);
_cur.nfo_line = choice->nfo_line;
return;
}
grfmsg(2, "SkipIf: Skipping %d sprites, test was true", numsprites);
_cur.skip_sprites = numsprites;
if (_cur.skip_sprites == 0) {
/* Zero means there are no sprites to skip, so
* we use -1 to indicate that all further
* sprites should be skipped. */
_cur.skip_sprites = -1;
/* If an action 8 hasn't been encountered yet, disable the grf. */
if (_cur.grfconfig->status != (_cur.stage < GLS_RESERVE ? GCS_INITIALISED : GCS_ACTIVATED)) {
DisableGrf();
}
}
}
/* Action 0x08 (GLS_FILESCAN) */
static void ScanInfo(ByteReader *buf)
{
uint8 grf_version = buf->ReadByte();
uint32 grfid = buf->ReadDWord();
const char *name = buf->ReadString();
_cur.grfconfig->ident.grfid = grfid;
if (grf_version < 2 || grf_version > 8) {
SetBit(_cur.grfconfig->flags, GCF_INVALID);
DEBUG(grf, 0, "%s: NewGRF \"%s\" (GRFID %08X) uses GRF version %d, which is incompatible with this version of OpenTTD.", _cur.grfconfig->filename, name, BSWAP32(grfid), grf_version);
}
/* GRF IDs starting with 0xFF are reserved for internal TTDPatch use */
if (GB(grfid, 24, 8) == 0xFF) SetBit(_cur.grfconfig->flags, GCF_SYSTEM);
AddGRFTextToList(&_cur.grfconfig->name->text, 0x7F, grfid, false, name);
if (buf->HasData()) {
const char *info = buf->ReadString();
AddGRFTextToList(&_cur.grfconfig->info->text, 0x7F, grfid, true, info);
}
/* GLS_INFOSCAN only looks for the action 8, so we can skip the rest of the file */
_cur.skip_sprites = -1;
}
/* Action 0x08 */
static void GRFInfo(ByteReader *buf)
{
/* <08> <version> <grf-id> <name> <info>
*
* B version newgrf version, currently 06
* 4*B grf-id globally unique ID of this .grf file
* S name name of this .grf set
* S info string describing the set, and e.g. author and copyright */
uint8 version = buf->ReadByte();
uint32 grfid = buf->ReadDWord();
const char *name = buf->ReadString();
if (_cur.stage < GLS_RESERVE && _cur.grfconfig->status != GCS_UNKNOWN) {
DisableGrf(STR_NEWGRF_ERROR_MULTIPLE_ACTION_8);
return;
}
if (_cur.grffile->grfid != grfid) {
DEBUG(grf, 0, "GRFInfo: GRFID %08X in FILESCAN stage does not match GRFID %08X in INIT/RESERVE/ACTIVATION stage", BSWAP32(_cur.grffile->grfid), BSWAP32(grfid));
_cur.grffile->grfid = grfid;
}
_cur.grffile->grf_version = version;
_cur.grfconfig->status = _cur.stage < GLS_RESERVE ? GCS_INITIALISED : GCS_ACTIVATED;
/* Do swap the GRFID for displaying purposes since people expect that */
DEBUG(grf, 1, "GRFInfo: Loaded GRFv%d set %08X - %s (palette: %s, version: %i)", version, BSWAP32(grfid), name, (_cur.grfconfig->palette & GRFP_USE_MASK) ? "Windows" : "DOS", _cur.grfconfig->version);
}
/* Action 0x0A */
static void SpriteReplace(ByteReader *buf)
{
/* <0A> <num-sets> <set1> [<set2> ...]
* <set>: <num-sprites> <first-sprite>
*
* B num-sets How many sets of sprites to replace.
* Each set:
* B num-sprites How many sprites are in this set
* W first-sprite First sprite number to replace */
uint8 num_sets = buf->ReadByte();
for (uint i = 0; i < num_sets; i++) {
uint8 num_sprites = buf->ReadByte();
uint16 first_sprite = buf->ReadWord();
grfmsg(2, "SpriteReplace: [Set %d] Changing %d sprites, beginning with %d",
i, num_sprites, first_sprite
);
for (uint j = 0; j < num_sprites; j++) {
int load_index = first_sprite + j;
_cur.nfo_line++;
LoadNextSprite(load_index, _cur.file_index, _cur.nfo_line, _cur.grf_container_ver); // XXX
/* Shore sprites now located at different addresses.
* So detect when the old ones get replaced. */
if (IsInsideMM(load_index, SPR_ORIGINALSHORE_START, SPR_ORIGINALSHORE_END + 1)) {
if (_loaded_newgrf_features.shore != SHORE_REPLACE_ACTION_5) _loaded_newgrf_features.shore = SHORE_REPLACE_ACTION_A;
}
}
}
}
/* Action 0x0A (SKIP) */
static void SkipActA(ByteReader *buf)
{
uint8 num_sets = buf->ReadByte();
for (uint i = 0; i < num_sets; i++) {
/* Skip the sprites this replaces */
_cur.skip_sprites += buf->ReadByte();
/* But ignore where they go */
buf->ReadWord();
}
grfmsg(3, "SkipActA: Skipping %d sprites", _cur.skip_sprites);
}
/* Action 0x0B */
static void GRFLoadError(ByteReader *buf)
{
/* <0B> <severity> <language-id> <message-id> [<message...> 00] [<data...>] 00 [<parnum>]
*
* B severity 00: notice, contine loading grf file
* 01: warning, continue loading grf file
* 02: error, but continue loading grf file, and attempt
* loading grf again when loading or starting next game
* 03: error, abort loading and prevent loading again in
* the future (only when restarting the patch)
* B language-id see action 4, use 1F for built-in error messages
* B message-id message to show, see below
* S message for custom messages (message-id FF), text of the message
* not present for built-in messages.
* V data additional data for built-in (or custom) messages
* B parnum parameter numbers to be shown in the message (maximum of 2) */
static const StringID msgstr[] = {
STR_NEWGRF_ERROR_VERSION_NUMBER,
STR_NEWGRF_ERROR_DOS_OR_WINDOWS,
STR_NEWGRF_ERROR_UNSET_SWITCH,
STR_NEWGRF_ERROR_INVALID_PARAMETER,
STR_NEWGRF_ERROR_LOAD_BEFORE,
STR_NEWGRF_ERROR_LOAD_AFTER,
STR_NEWGRF_ERROR_OTTD_VERSION_NUMBER,
};
static const StringID sevstr[] = {
STR_NEWGRF_ERROR_MSG_INFO,
STR_NEWGRF_ERROR_MSG_WARNING,
STR_NEWGRF_ERROR_MSG_ERROR,
STR_NEWGRF_ERROR_MSG_FATAL
};
byte severity = buf->ReadByte();
byte lang = buf->ReadByte();
byte message_id = buf->ReadByte();
/* Skip the error if it isn't valid for the current language. */
if (!CheckGrfLangID(lang, _cur.grffile->grf_version)) return;
/* Skip the error until the activation stage unless bit 7 of the severity
* is set. */
if (!HasBit(severity, 7) && _cur.stage == GLS_INIT) {
grfmsg(7, "GRFLoadError: Skipping non-fatal GRFLoadError in stage %d", _cur.stage);
return;
}
ClrBit(severity, 7);
if (severity >= lengthof(sevstr)) {
grfmsg(7, "GRFLoadError: Invalid severity id %d. Setting to 2 (non-fatal error).", severity);
severity = 2;
} else if (severity == 3) {
/* This is a fatal error, so make sure the GRF is deactivated and no
* more of it gets loaded. */
DisableGrf();
/* Make sure we show fatal errors, instead of silly infos from before */
delete _cur.grfconfig->error;
_cur.grfconfig->error = NULL;
}
if (message_id >= lengthof(msgstr) && message_id != 0xFF) {
grfmsg(7, "GRFLoadError: Invalid message id.");
return;
}
if (buf->Remaining() <= 1) {
grfmsg(7, "GRFLoadError: No message data supplied.");
return;
}
/* For now we can only show one message per newgrf file. */
if (_cur.grfconfig->error != NULL) return;
GRFError *error = new GRFError(sevstr[severity]);
if (message_id == 0xFF) {
/* This is a custom error message. */
if (buf->HasData()) {
const char *message = buf->ReadString();
error->custom_message = TranslateTTDPatchCodes(_cur.grffile->grfid, lang, true, message, NULL, SCC_RAW_STRING_POINTER);
} else {
grfmsg(7, "GRFLoadError: No custom message supplied.");
error->custom_message = strdup("");
}
} else {
error->message = msgstr[message_id];
}
if (buf->HasData()) {
const char *data = buf->ReadString();
error->data = TranslateTTDPatchCodes(_cur.grffile->grfid, lang, true, data);
} else {
grfmsg(7, "GRFLoadError: No message data supplied.");
error->data = strdup("");
}
/* Only two parameter numbers can be used in the string. */
for (uint i = 0; i < lengthof(error->param_value) && buf->HasData(); i++) {
uint param_number = buf->ReadByte();
error->param_value[i] = _cur.grffile->GetParam(param_number);
}
_cur.grfconfig->error = error;
}
/* Action 0x0C */
static void GRFComment(ByteReader *buf)
{
/* <0C> [<ignored...>]
*
* V ignored Anything following the 0C is ignored */
if (!buf->HasData()) return;
const char *text = buf->ReadString();
grfmsg(2, "GRFComment: %s", text);
}
/* Action 0x0D (GLS_SAFETYSCAN) */
static void SafeParamSet(ByteReader *buf)
{
uint8 target = buf->ReadByte();
/* Only writing GRF parameters is considered safe */
if (target < 0x80) return;
/* GRM could be unsafe, but as here it can only happen after other GRFs
* are loaded, it should be okay. If the GRF tried to use the slots it
* reserved, it would be marked unsafe anyway. GRM for (e.g. bridge)
* sprites is considered safe. */
SetBit(_cur.grfconfig->flags, GCF_UNSAFE);
/* Skip remainder of GRF */
_cur.skip_sprites = -1;
}
static uint32 GetPatchVariable(uint8 param)
{
switch (param) {
/* start year - 1920 */
case 0x0B: return max(_settings_game.game_creation.starting_year, ORIGINAL_BASE_YEAR) - ORIGINAL_BASE_YEAR;
/* freight trains weight factor */
case 0x0E: return _settings_game.vehicle.freight_trains;
/* empty wagon speed increase */
case 0x0F: return 0;
/* plane speed factor; our patch option is reversed from TTDPatch's,
* the following is good for 1x, 2x and 4x (most common?) and...
* well not really for 3x. */
case 0x10:
switch (_settings_game.vehicle.plane_speed) {
default:
case 4: return 1;
case 3: return 2;
case 2: return 2;
case 1: return 4;
}
/* 2CC colourmap base sprite */
case 0x11: return SPR_2CCMAP_BASE;
/* map size: format = -MABXYSS
* M : the type of map
* bit 0 : set : squared map. Bit 1 is now not relevant
* clear : rectangle map. Bit 1 will indicate the bigger edge of the map
* bit 1 : set : Y is the bigger edge. Bit 0 is clear
* clear : X is the bigger edge.
* A : minimum edge(log2) of the map
* B : maximum edge(log2) of the map
* XY : edges(log2) of each side of the map.
* SS : combination of both X and Y, thus giving the size(log2) of the map
*/
case 0x13: {
byte map_bits = 0;
byte log_X = MapLogX() - 6; // substraction is required to make the minimal size (64) zero based
byte log_Y = MapLogY() - 6;
byte max_edge = max(log_X, log_Y);
if (log_X == log_Y) { // we have a squared map, since both edges are identical
SetBit(map_bits, 0);
} else {
if (max_edge == log_Y) SetBit(map_bits, 1); // edge Y been the biggest, mark it
}
return (map_bits << 24) | (min(log_X, log_Y) << 20) | (max_edge << 16) |
(log_X << 12) | (log_Y << 8) | (log_X + log_Y);
}
/* The maximum height of the map. */
case 0x14:
return _settings_game.construction.max_heightlevel;
default:
grfmsg(2, "ParamSet: Unknown Patch variable 0x%02X.", param);
return 0;
}
}
static uint32 PerformGRM(uint32 *grm, uint16 num_ids, uint16 count, uint8 op, uint8 target, const char *type)
{
uint start = 0;
uint size = 0;
if (op == 6) {
/* Return GRFID of set that reserved ID */
return grm[_cur.grffile->GetParam(target)];
}
/* With an operation of 2 or 3, we want to reserve a specific block of IDs */
if (op == 2 || op == 3) start = _cur.grffile->GetParam(target);
for (uint i = start; i < num_ids; i++) {
if (grm[i] == 0) {
size++;
} else {
if (op == 2 || op == 3) break;
start = i + 1;
size = 0;
}
if (size == count) break;
}
if (size == count) {
/* Got the slot... */
if (op == 0 || op == 3) {
grfmsg(2, "ParamSet: GRM: Reserving %d %s at %d", count, type, start);
for (uint i = 0; i < count; i++) grm[start + i] = _cur.grffile->grfid;
}
return start;
}
/* Unable to allocate */
if (op != 4 && op != 5) {
/* Deactivate GRF */
grfmsg(0, "ParamSet: GRM: Unable to allocate %d %s, deactivating", count, type);
DisableGrf(STR_NEWGRF_ERROR_GRM_FAILED);
return UINT_MAX;
}
grfmsg(1, "ParamSet: GRM: Unable to allocate %d %s", count, type);
return UINT_MAX;
}
/** Action 0x0D: Set parameter */
static void ParamSet(ByteReader *buf)
{
/* <0D> <target> <operation> <source1> <source2> [<data>]
*
* B target parameter number where result is stored
* B operation operation to perform, see below
* B source1 first source operand
* B source2 second source operand
* D data data to use in the calculation, not necessary
* if both source1 and source2 refer to actual parameters
*
* Operations
* 00 Set parameter equal to source1
* 01 Addition, source1 + source2
* 02 Subtraction, source1 - source2
* 03 Unsigned multiplication, source1 * source2 (both unsigned)
* 04 Signed multiplication, source1 * source2 (both signed)
* 05 Unsigned bit shift, source1 by source2 (source2 taken to be a
* signed quantity; left shift if positive and right shift if
* negative, source1 is unsigned)
* 06 Signed bit shift, source1 by source2
* (source2 like in 05, and source1 as well)
*/
uint8 target = buf->ReadByte();
uint8 oper = buf->ReadByte();
uint32 src1 = buf->ReadByte();
uint32 src2 = buf->ReadByte();
uint32 data = 0;
if (buf->Remaining() >= 4) data = buf->ReadDWord();
/* You can add 80 to the operation to make it apply only if the target
* is not defined yet. In this respect, a parameter is taken to be
* defined if any of the following applies:
* - it has been set to any value in the newgrf(w).cfg parameter list
* - it OR A PARAMETER WITH HIGHER NUMBER has been set to any value by
* an earlier action D */
if (HasBit(oper, 7)) {
if (target < 0x80 && target < _cur.grffile->param_end) {
grfmsg(7, "ParamSet: Param %u already defined, skipping", target);
return;
}
oper = GB(oper, 0, 7);
}
if (src2 == 0xFE) {
if (GB(data, 0, 8) == 0xFF) {
if (data == 0x0000FFFF) {
/* Patch variables */
src1 = GetPatchVariable(src1);
} else {
/* GRF Resource Management */
uint8 op = src1;
uint8 feature = GB(data, 8, 8);
uint16 count = GB(data, 16, 16);
if (_cur.stage == GLS_RESERVE) {
if (feature == 0x08) {
/* General sprites */
if (op == 0) {
/* Check if the allocated sprites will fit below the original sprite limit */
if (_cur.spriteid + count >= 16384) {
grfmsg(0, "ParamSet: GRM: Unable to allocate %d sprites; try changing NewGRF order", count);
DisableGrf(STR_NEWGRF_ERROR_GRM_FAILED);
return;
}
/* Reserve space at the current sprite ID */
grfmsg(4, "ParamSet: GRM: Allocated %d sprites at %d", count, _cur.spriteid);
_grm_sprites[GRFLocation(_cur.grffile->grfid, _cur.nfo_line)] = _cur.spriteid;
_cur.spriteid += count;
}
}
/* Ignore GRM result during reservation */
src1 = 0;
} else if (_cur.stage == GLS_ACTIVATION) {
switch (feature) {
case 0x00: // Trains
case 0x01: // Road Vehicles
case 0x02: // Ships
case 0x03: // Aircraft
if (!_settings_game.vehicle.dynamic_engines) {
src1 = PerformGRM(&_grm_engines[_engine_offsets[feature]], _engine_counts[feature], count, op, target, "vehicles");
if (_cur.skip_sprites == -1) return;
} else {
/* GRM does not apply for dynamic engine allocation. */
switch (op) {
case 2:
case 3:
src1 = _cur.grffile->GetParam(target);
break;
default:
src1 = 0;
break;
}
}
break;
case 0x08: // General sprites
switch (op) {
case 0:
/* Return space reserved during reservation stage */
src1 = _grm_sprites[GRFLocation(_cur.grffile->grfid, _cur.nfo_line)];
grfmsg(4, "ParamSet: GRM: Using pre-allocated sprites at %d", src1);
break;
case 1:
src1 = _cur.spriteid;
break;
default:
grfmsg(1, "ParamSet: GRM: Unsupported operation %d for general sprites", op);
return;
}
break;
case 0x0B: // Cargo
/* There are two ranges: one for cargo IDs and one for cargo bitmasks */
src1 = PerformGRM(_grm_cargoes, NUM_CARGO * 2, count, op, target, "cargoes");
if (_cur.skip_sprites == -1) return;
break;
default: grfmsg(1, "ParamSet: GRM: Unsupported feature 0x%X", feature); return;
}
} else {
/* Ignore GRM during initialization */
src1 = 0;
}
}
} else {
/* Read another GRF File's parameter */
const GRFFile *file = GetFileByGRFID(data);
GRFConfig *c = GetGRFConfig(data);
if (c != NULL && HasBit(c->flags, GCF_STATIC) && !HasBit(_cur.grfconfig->flags, GCF_STATIC) && _networking) {
/* Disable the read GRF if it is a static NewGRF. */
DisableStaticNewGRFInfluencingNonStaticNewGRFs(c);
src1 = 0;
} else if (file == NULL || (c != NULL && c->status == GCS_DISABLED)) {
src1 = 0;
} else if (src1 == 0xFE) {
src1 = c->version;
} else {
src1 = file->GetParam(src1);
}
}
} else {
/* The source1 and source2 operands refer to the grf parameter number
* like in action 6 and 7. In addition, they can refer to the special
* variables available in action 7, or they can be FF to use the value
* of <data>. If referring to parameters that are undefined, a value
* of 0 is used instead. */
src1 = (src1 == 0xFF) ? data : GetParamVal(src1, NULL);
src2 = (src2 == 0xFF) ? data : GetParamVal(src2, NULL);
}
/* TODO: You can access the parameters of another GRF file by using
* source2=FE, source1=the other GRF's parameter number and data=GRF
* ID. This is only valid with operation 00 (set). If the GRF ID
* cannot be found, a value of 0 is used for the parameter value
* instead. */
uint32 res;
switch (oper) {
case 0x00:
res = src1;
break;
case 0x01:
res = src1 + src2;
break;
case 0x02:
res = src1 - src2;
break;
case 0x03:
res = src1 * src2;
break;
case 0x04:
res = (int32)src1 * (int32)src2;
break;
case 0x05:
if ((int32)src2 < 0) {
res = src1 >> -(int32)src2;
} else {
res = src1 << src2;
}
break;
case 0x06:
if ((int32)src2 < 0) {
res = (int32)src1 >> -(int32)src2;
} else {
res = (int32)src1 << src2;
}
break;
case 0x07: // Bitwise AND
res = src1 & src2;
break;
case 0x08: // Bitwise OR
res = src1 | src2;
break;
case 0x09: // Unsigned division
if (src2 == 0) {
res = src1;
} else {
res = src1 / src2;
}
break;
case 0x0A: // Signed divison
if (src2 == 0) {
res = src1;
} else {
res = (int32)src1 / (int32)src2;
}
break;
case 0x0B: // Unsigned modulo
if (src2 == 0) {
res = src1;
} else {
res = src1 % src2;
}
break;
case 0x0C: // Signed modulo
if (src2 == 0) {
res = src1;
} else {
res = (int32)src1 % (int32)src2;
}
break;
default: grfmsg(0, "ParamSet: Unknown operation %d, skipping", oper); return;
}
switch (target) {
case 0x8E: // Y-Offset for train sprites
_cur.grffile->traininfo_vehicle_pitch = res;
break;
case 0x8F: { // Rail track type cost factors
extern RailtypeInfo _railtypes[RAILTYPE_END];
_railtypes[RAILTYPE_RAIL].cost_multiplier = GB(res, 0, 8);
if (_settings_game.vehicle.disable_elrails) {
_railtypes[RAILTYPE_ELECTRIC].cost_multiplier = GB(res, 0, 8);
_railtypes[RAILTYPE_MONO].cost_multiplier = GB(res, 8, 8);
} else {
_railtypes[RAILTYPE_ELECTRIC].cost_multiplier = GB(res, 8, 8);
_railtypes[RAILTYPE_MONO].cost_multiplier = GB(res, 16, 8);
}
_railtypes[RAILTYPE_MAGLEV].cost_multiplier = GB(res, 16, 8);
break;
}
/* @todo implement */
case 0x93: // Tile refresh offset to left
case 0x94: // Tile refresh offset to right
case 0x95: // Tile refresh offset upwards
case 0x96: // Tile refresh offset downwards
case 0x97: // Snow line height
case 0x99: // Global ID offset
grfmsg(7, "ParamSet: Skipping unimplemented target 0x%02X", target);
break;
case 0x9E: // Miscellaneous GRF features
/* Set train list engine width */
_cur.grffile->traininfo_vehicle_width = HasBit(res, GMB_TRAIN_WIDTH_32_PIXELS) ? VEHICLEINFO_FULL_VEHICLE_WIDTH : TRAININFO_DEFAULT_VEHICLE_WIDTH;
/* Remove the local flags from the global flags */
ClrBit(res, GMB_TRAIN_WIDTH_32_PIXELS);
_misc_grf_features = res;
break;
case 0x9F: // locale-dependent settings
grfmsg(7, "ParamSet: Skipping unimplemented target 0x%02X", target);
break;
default:
if (target < 0x80) {
_cur.grffile->param[target] = res;
/* param is zeroed by default */
if (target + 1U > _cur.grffile->param_end) _cur.grffile->param_end = target + 1;
} else {
grfmsg(7, "ParamSet: Skipping unknown target 0x%02X", target);
}
break;
}
}
/* Action 0x0E (GLS_SAFETYSCAN) */
static void SafeGRFInhibit(ByteReader *buf)
{
/* <0E> <num> <grfids...>
*
* B num Number of GRFIDs that follow
* D grfids GRFIDs of the files to deactivate */
uint8 num = buf->ReadByte();
for (uint i = 0; i < num; i++) {
uint32 grfid = buf->ReadDWord();
/* GRF is unsafe it if tries to deactivate other GRFs */
if (grfid != _cur.grfconfig->ident.grfid) {
SetBit(_cur.grfconfig->flags, GCF_UNSAFE);
/* Skip remainder of GRF */
_cur.skip_sprites = -1;
return;
}
}
}
/* Action 0x0E */
static void GRFInhibit(ByteReader *buf)
{
/* <0E> <num> <grfids...>
*
* B num Number of GRFIDs that follow
* D grfids GRFIDs of the files to deactivate */
uint8 num = buf->ReadByte();
for (uint i = 0; i < num; i++) {
uint32 grfid = buf->ReadDWord();
GRFConfig *file = GetGRFConfig(grfid);
/* Unset activation flag */
if (file != NULL && file != _cur.grfconfig) {
grfmsg(2, "GRFInhibit: Deactivating file '%s'", file->filename);
GRFError *error = DisableGrf(STR_NEWGRF_ERROR_FORCEFULLY_DISABLED, file);
error->data = strdup(_cur.grfconfig->GetName());
}
}
}
/** Action 0x0F - Define Town names */
static void FeatureTownName(ByteReader *buf)
{
/* <0F> <id> <style-name> <num-parts> <parts>
*
* B id ID of this definition in bottom 7 bits (final definition if bit 7 set)
* V style-name Name of the style (only for final definition)
* B num-parts Number of parts in this definition
* V parts The parts */
uint32 grfid = _cur.grffile->grfid;
GRFTownName *townname = AddGRFTownName(grfid);
byte id = buf->ReadByte();
grfmsg(6, "FeatureTownName: definition 0x%02X", id & 0x7F);
if (HasBit(id, 7)) {
/* Final definition */
ClrBit(id, 7);
bool new_scheme = _cur.grffile->grf_version >= 7;
byte lang = buf->ReadByte();
byte nb_gen = townname->nb_gen;
do {
ClrBit(lang, 7);
const char *name = buf->ReadString();
char *lang_name = TranslateTTDPatchCodes(grfid, lang, false, name);
grfmsg(6, "FeatureTownName: lang 0x%X -> '%s'", lang, lang_name);
free(lang_name);
townname->name[nb_gen] = AddGRFString(grfid, id, lang, new_scheme, false, name, STR_UNDEFINED);
lang = buf->ReadByte();
} while (lang != 0);
townname->id[nb_gen] = id;
townname->nb_gen++;
}
byte nb = buf->ReadByte();
grfmsg(6, "FeatureTownName: %u parts", nb);
townname->nbparts[id] = nb;
townname->partlist[id] = CallocT<NamePartList>(nb);
for (int i = 0; i < nb; i++) {
byte nbtext = buf->ReadByte();
townname->partlist[id][i].bitstart = buf->ReadByte();
townname->partlist[id][i].bitcount = buf->ReadByte();
townname->partlist[id][i].maxprob = 0;
townname->partlist[id][i].partcount = nbtext;
townname->partlist[id][i].parts = CallocT<NamePart>(nbtext);
grfmsg(6, "FeatureTownName: part %d contains %d texts and will use GB(seed, %d, %d)", i, nbtext, townname->partlist[id][i].bitstart, townname->partlist[id][i].bitcount);
for (int j = 0; j < nbtext; j++) {
byte prob = buf->ReadByte();
if (HasBit(prob, 7)) {
byte ref_id = buf->ReadByte();
if (townname->nbparts[ref_id] == 0) {
grfmsg(0, "FeatureTownName: definition 0x%02X doesn't exist, deactivating", ref_id);
DelGRFTownName(grfid);
DisableGrf(STR_NEWGRF_ERROR_INVALID_ID);
return;
}
grfmsg(6, "FeatureTownName: part %d, text %d, uses intermediate definition 0x%02X (with probability %d)", i, j, ref_id, prob & 0x7F);
townname->partlist[id][i].parts[j].data.id = ref_id;
} else {
const char *text = buf->ReadString();
townname->partlist[id][i].parts[j].data.text = TranslateTTDPatchCodes(grfid, 0, false, text);
grfmsg(6, "FeatureTownName: part %d, text %d, '%s' (with probability %d)", i, j, townname->partlist[id][i].parts[j].data.text, prob);
}
townname->partlist[id][i].parts[j].prob = prob;
townname->partlist[id][i].maxprob += GB(prob, 0, 7);
}
grfmsg(6, "FeatureTownName: part %d, total probability %d", i, townname->partlist[id][i].maxprob);
}
}
/** Action 0x10 - Define goto label */
static void DefineGotoLabel(ByteReader *buf)
{
/* <10> <label> [<comment>]
*
* B label The label to define
* V comment Optional comment - ignored */
byte nfo_label = buf->ReadByte();
GRFLabel *label = MallocT<GRFLabel>(1);
label->label = nfo_label;
label->nfo_line = _cur.nfo_line;
label->pos = FioGetPos();
label->next = NULL;
/* Set up a linked list of goto targets which we will search in an Action 0x7/0x9 */
if (_cur.grffile->label == NULL) {
_cur.grffile->label = label;
} else {
/* Attach the label to the end of the list */
GRFLabel *l;
for (l = _cur.grffile->label; l->next != NULL; l = l->next) {}
l->next = label;
}
grfmsg(2, "DefineGotoLabel: GOTO target with label 0x%02X", label->label);
}
/**
* Process a sound import from another GRF file.
* @param sound Destination for sound.
*/
static void ImportGRFSound(SoundEntry *sound)
{
const GRFFile *file;
uint32 grfid = FioReadDword();
SoundID sound_id = FioReadWord();
file = GetFileByGRFID(grfid);
if (file == NULL || file->sound_offset == 0) {
grfmsg(1, "ImportGRFSound: Source file not available");
return;
}
if (sound_id >= file->num_sounds) {
grfmsg(1, "ImportGRFSound: Sound effect %d is invalid", sound_id);
return;
}
grfmsg(2, "ImportGRFSound: Copying sound %d (%d) from file %X", sound_id, file->sound_offset + sound_id, grfid);
*sound = *GetSound(file->sound_offset + sound_id);
/* Reset volume and priority, which TTDPatch doesn't copy */
sound->volume = 128;
sound->priority = 0;
}
/**
* Load a sound from a file.
* @param offs File offset to read sound from.
* @param sound Destination for sound.
*/
static void LoadGRFSound(size_t offs, SoundEntry *sound)
{
/* Set default volume and priority */
sound->volume = 0x80;
sound->priority = 0;
if (offs != SIZE_MAX) {
/* Sound is present in the NewGRF. */
sound->file_slot = _cur.file_index;
sound->file_offset = offs;
sound->grf_container_ver = _cur.grf_container_ver;
}
}
/* Action 0x11 */
static void GRFSound(ByteReader *buf)
{
/* <11> <num>
*
* W num Number of sound files that follow */
uint16 num = buf->ReadWord();
if (num == 0) return;
SoundEntry *sound;
if (_cur.grffile->sound_offset == 0) {
_cur.grffile->sound_offset = GetNumSounds();
_cur.grffile->num_sounds = num;
sound = AllocateSound(num);
} else {
sound = GetSound(_cur.grffile->sound_offset);
}
for (int i = 0; i < num; i++) {
_cur.nfo_line++;
/* Check whether the index is in range. This might happen if multiple action 11 are present.
* While this is invalid, we do not check for this. But we should prevent it from causing bigger trouble */
bool invalid = i >= _cur.grffile->num_sounds;
size_t offs = FioGetPos();
uint32 len = _cur.grf_container_ver >= 2 ? FioReadDword() : FioReadWord();
byte type = FioReadByte();
if (_cur.grf_container_ver >= 2 && type == 0xFD) {
/* Reference to sprite section. */
if (invalid) {
grfmsg(1, "GRFSound: Sound index out of range (multiple Action 11?)");
FioSkipBytes(len);
} else if (len != 4) {
grfmsg(1, "GRFSound: Invalid sprite section import");
FioSkipBytes(len);
} else {
uint32 id = FioReadDword();
if (_cur.stage == GLS_INIT) LoadGRFSound(GetGRFSpriteOffset(id), sound + i);
}
continue;
}
if (type != 0xFF) {
grfmsg(1, "GRFSound: Unexpected RealSprite found, skipping");
FioSkipBytes(7);
SkipSpriteData(type, len - 8);
continue;
}
if (invalid) {
grfmsg(1, "GRFSound: Sound index out of range (multiple Action 11?)");
FioSkipBytes(len);
}
byte action = FioReadByte();
switch (action) {
case 0xFF:
/* Allocate sound only in init stage. */
if (_cur.stage == GLS_INIT) {
if (_cur.grf_container_ver >= 2) {
grfmsg(1, "GRFSound: Inline sounds are not supported for container version >= 2");
} else {
LoadGRFSound(offs, sound + i);
}
}
FioSkipBytes(len - 1); // already read <action>
break;
case 0xFE:
if (_cur.stage == GLS_ACTIVATION) {
/* XXX 'Action 0xFE' isn't really specified. It is only mentioned for
* importing sounds, so this is probably all wrong... */
if (FioReadByte() != 0) grfmsg(1, "GRFSound: Import type mismatch");
ImportGRFSound(sound + i);
} else {
FioSkipBytes(len - 1); // already read <action>
}
break;
default:
grfmsg(1, "GRFSound: Unexpected Action %x found, skipping", action);
FioSkipBytes(len - 1); // already read <action>
break;
}
}
}
/* Action 0x11 (SKIP) */
static void SkipAct11(ByteReader *buf)
{
/* <11> <num>
*
* W num Number of sound files that follow */
_cur.skip_sprites = buf->ReadWord();
grfmsg(3, "SkipAct11: Skipping %d sprites", _cur.skip_sprites);
}
/** Action 0x12 */
static void LoadFontGlyph(ByteReader *buf)
{
/* <12> <num_def> <font_size> <num_char> <base_char>
*
* B num_def Number of definitions
* B font_size Size of font (0 = normal, 1 = small, 2 = large, 3 = mono)
* B num_char Number of consecutive glyphs
* W base_char First character index */
uint8 num_def = buf->ReadByte();
for (uint i = 0; i < num_def; i++) {
FontSize size = (FontSize)buf->ReadByte();
uint8 num_char = buf->ReadByte();
uint16 base_char = buf->ReadWord();
if (size >= FS_END) {
grfmsg(1, "LoadFontGlyph: Size %u is not supported, ignoring", size);
}
grfmsg(7, "LoadFontGlyph: Loading %u glyph(s) at 0x%04X for size %u", num_char, base_char, size);
for (uint c = 0; c < num_char; c++) {
if (size < FS_END) SetUnicodeGlyph(size, base_char + c, _cur.spriteid);
_cur.nfo_line++;
LoadNextSprite(_cur.spriteid++, _cur.file_index, _cur.nfo_line, _cur.grf_container_ver);
}
}
}
/** Action 0x12 (SKIP) */
static void SkipAct12(ByteReader *buf)
{
/* <12> <num_def> <font_size> <num_char> <base_char>
*
* B num_def Number of definitions
* B font_size Size of font (0 = normal, 1 = small, 2 = large)
* B num_char Number of consecutive glyphs
* W base_char First character index */
uint8 num_def = buf->ReadByte();
for (uint i = 0; i < num_def; i++) {
/* Ignore 'size' byte */
buf->ReadByte();
/* Sum up number of characters */
_cur.skip_sprites += buf->ReadByte();
/* Ignore 'base_char' word */
buf->ReadWord();
}
grfmsg(3, "SkipAct12: Skipping %d sprites", _cur.skip_sprites);
}
/** Action 0x13 */
static void TranslateGRFStrings(ByteReader *buf)
{
/* <13> <grfid> <num-ent> <offset> <text...>
*
* 4*B grfid The GRFID of the file whose texts are to be translated
* B num-ent Number of strings
* W offset First text ID
* S text... Zero-terminated strings */
uint32 grfid = buf->ReadDWord();
const GRFConfig *c = GetGRFConfig(grfid);
if (c == NULL || (c->status != GCS_INITIALISED && c->status != GCS_ACTIVATED)) {
grfmsg(7, "TranslateGRFStrings: GRFID 0x%08x unknown, skipping action 13", BSWAP32(grfid));
return;
}
if (c->status == GCS_INITIALISED) {
/* If the file is not active but will be activated later, give an error
* and disable this file. */
GRFError *error = DisableGrf(STR_NEWGRF_ERROR_LOAD_AFTER);
char tmp[256];
GetString(tmp, STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE, lastof(tmp));
error->data = strdup(tmp);
return;
}
/* Since no language id is supplied for with version 7 and lower NewGRFs, this string has
* to be added as a generic string, thus the language id of 0x7F. For this to work
* new_scheme has to be true as well, which will also be implicitly the case for version 8
* and higher. A language id of 0x7F will be overridden by a non-generic id, so this will
* not change anything if a string has been provided specifically for this language. */
byte language = _cur.grffile->grf_version >= 8 ? buf->ReadByte() : 0x7F;
byte num_strings = buf->ReadByte();
uint16 first_id = buf->ReadWord();
if (!((first_id >= 0xD000 && first_id + num_strings <= 0xD3FF) || (first_id >= 0xDC00 && first_id + num_strings <= 0xDCFF))) {
grfmsg(7, "TranslateGRFStrings: Attempting to set out-of-range string IDs in action 13 (first: 0x%4X, number: 0x%2X)", first_id, num_strings);
return;
}
for (uint i = 0; i < num_strings && buf->HasData(); i++) {
const char *string = buf->ReadString();
if (StrEmpty(string)) {
grfmsg(7, "TranslateGRFString: Ignoring empty string.");
continue;
}
AddGRFString(grfid, first_id + i, language, true, true, string, STR_UNDEFINED);
}
}
/** Callback function for 'INFO'->'NAME' to add a translation to the newgrf name. */
static bool ChangeGRFName(byte langid, const char *str)
{
AddGRFTextToList(&_cur.grfconfig->name->text, langid, _cur.grfconfig->ident.grfid, false, str);
return true;
}
/** Callback function for 'INFO'->'DESC' to add a translation to the newgrf description. */
static bool ChangeGRFDescription(byte langid, const char *str)
{
AddGRFTextToList(&_cur.grfconfig->info->text, langid, _cur.grfconfig->ident.grfid, true, str);
return true;
}
/** Callback function for 'INFO'->'URL_' to set the newgrf url. */
static bool ChangeGRFURL(byte langid, const char *str)
{
AddGRFTextToList(&_cur.grfconfig->url->text, langid, _cur.grfconfig->ident.grfid, false, str);
return true;
}
/** Callback function for 'INFO'->'NPAR' to set the number of valid parameters. */
static bool ChangeGRFNumUsedParams(size_t len, ByteReader *buf)
{
if (len != 1) {
grfmsg(2, "StaticGRFInfo: expected only 1 byte for 'INFO'->'NPAR' but got " PRINTF_SIZE ", ignoring this field", len);
buf->Skip(len);
} else {
_cur.grfconfig->num_valid_params = min(buf->ReadByte(), lengthof(_cur.grfconfig->param));
}
return true;
}
/** Callback function for 'INFO'->'PALS' to set the number of valid parameters. */
static bool ChangeGRFPalette(size_t len, ByteReader *buf)
{
if (len != 1) {
grfmsg(2, "StaticGRFInfo: expected only 1 byte for 'INFO'->'PALS' but got " PRINTF_SIZE ", ignoring this field", len);
buf->Skip(len);
} else {
char data = buf->ReadByte();
GRFPalette pal = GRFP_GRF_UNSET;
switch (data) {
case '*':
case 'A': pal = GRFP_GRF_ANY; break;
case 'W': pal = GRFP_GRF_WINDOWS; break;
case 'D': pal = GRFP_GRF_DOS; break;
default:
grfmsg(2, "StaticGRFInfo: unexpected value '%02x' for 'INFO'->'PALS', ignoring this field", data);
break;
}
if (pal != GRFP_GRF_UNSET) {
_cur.grfconfig->palette &= ~GRFP_GRF_MASK;
_cur.grfconfig->palette |= pal;
}
}
return true;
}
/** Callback function for 'INFO'->'BLTR' to set the blitter info. */
static bool ChangeGRFBlitter(size_t len, ByteReader *buf)
{
if (len != 1) {
grfmsg(2, "StaticGRFInfo: expected only 1 byte for 'INFO'->'BLTR' but got " PRINTF_SIZE ", ignoring this field", len);
buf->Skip(len);
} else {
char data = buf->ReadByte();
GRFPalette pal = GRFP_BLT_UNSET;
switch (data) {
case '8': pal = GRFP_BLT_UNSET; break;
case '3': pal = GRFP_BLT_32BPP; break;
default:
grfmsg(2, "StaticGRFInfo: unexpected value '%02x' for 'INFO'->'BLTR', ignoring this field", data);
return true;
}
_cur.grfconfig->palette &= ~GRFP_BLT_MASK;
_cur.grfconfig->palette |= pal;
}
return true;
}
/** Callback function for 'INFO'->'VRSN' to the version of the NewGRF. */
static bool ChangeGRFVersion(size_t len, ByteReader *buf)
{
if (len != 4) {
grfmsg(2, "StaticGRFInfo: expected 4 bytes for 'INFO'->'VRSN' but got " PRINTF_SIZE ", ignoring this field", len);
buf->Skip(len);
} else {
/* Set min_loadable_version as well (default to minimal compatibility) */
_cur.grfconfig->version = _cur.grfconfig->min_loadable_version = buf->ReadDWord();
}
return true;
}
/** Callback function for 'INFO'->'MINV' to the minimum compatible version of the NewGRF. */
static bool ChangeGRFMinVersion(size_t len, ByteReader *buf)
{
if (len != 4) {
grfmsg(2, "StaticGRFInfo: expected 4 bytes for 'INFO'->'MINV' but got " PRINTF_SIZE ", ignoring this field", len);
buf->Skip(len);
} else {
_cur.grfconfig->min_loadable_version = buf->ReadDWord();
if (_cur.grfconfig->version == 0) {
grfmsg(2, "StaticGRFInfo: 'MINV' defined before 'VRSN' or 'VRSN' set to 0, ignoring this field");
_cur.grfconfig->min_loadable_version = 0;
}
if (_cur.grfconfig->version < _cur.grfconfig->min_loadable_version) {
grfmsg(2, "StaticGRFInfo: 'MINV' defined as %d, limiting it to 'VRSN'", _cur.grfconfig->min_loadable_version);
_cur.grfconfig->min_loadable_version = _cur.grfconfig->version;
}
}
return true;
}
static GRFParameterInfo *_cur_parameter; ///< The parameter which info is currently changed by the newgrf.
/** Callback function for 'INFO'->'PARAM'->param_num->'NAME' to set the name of a parameter. */
static bool ChangeGRFParamName(byte langid, const char *str)
{
AddGRFTextToList(&_cur_parameter->name, langid, _cur.grfconfig->ident.grfid, false, str);
return true;
}
/** Callback function for 'INFO'->'PARAM'->param_num->'DESC' to set the description of a parameter. */
static bool ChangeGRFParamDescription(byte langid, const char *str)
{
AddGRFTextToList(&_cur_parameter->desc, langid, _cur.grfconfig->ident.grfid, true, str);
return true;
}
/** Callback function for 'INFO'->'PARAM'->param_num->'TYPE' to set the typeof a parameter. */
static bool ChangeGRFParamType(size_t len, ByteReader *buf)
{
if (len != 1) {
grfmsg(2, "StaticGRFInfo: expected 1 byte for 'INFO'->'PARA'->'TYPE' but got " PRINTF_SIZE ", ignoring this field", len);
buf->Skip(len);
} else {
GRFParameterType type = (GRFParameterType)buf->ReadByte();
if (type < PTYPE_END) {
_cur_parameter->type = type;
} else {
grfmsg(3, "StaticGRFInfo: unknown parameter type %d, ignoring this field", type);
}
}
return true;
}
/** Callback function for 'INFO'->'PARAM'->param_num->'LIMI' to set the min/max value of a parameter. */
static bool ChangeGRFParamLimits(size_t len, ByteReader *buf)
{
if (_cur_parameter->type != PTYPE_UINT_ENUM) {
grfmsg(2, "StaticGRFInfo: 'INFO'->'PARA'->'LIMI' is only valid for parameters with type uint/enum, ignoring this field");
buf->Skip(len);
} else if (len != 8) {
grfmsg(2, "StaticGRFInfo: expected 8 bytes for 'INFO'->'PARA'->'LIMI' but got " PRINTF_SIZE ", ignoring this field", len);
buf->Skip(len);
} else {
_cur_parameter->min_value = buf->ReadDWord();
_cur_parameter->max_value = buf->ReadDWord();
}
return true;
}
/** Callback function for 'INFO'->'PARAM'->param_num->'MASK' to set the parameter and bits to use. */
static bool ChangeGRFParamMask(size_t len, ByteReader *buf)
{
if (len < 1 || len > 3) {
grfmsg(2, "StaticGRFInfo: expected 1 to 3 bytes for 'INFO'->'PARA'->'MASK' but got " PRINTF_SIZE ", ignoring this field", len);
buf->Skip(len);
} else {
byte param_nr = buf->ReadByte();
if (param_nr >= lengthof(_cur.grfconfig->param)) {
grfmsg(2, "StaticGRFInfo: invalid parameter number in 'INFO'->'PARA'->'MASK', param %d, ignoring this field", param_nr);
buf->Skip(len - 1);
} else {
_cur_parameter->param_nr = param_nr;
if (len >= 2) _cur_parameter->first_bit = min(buf->ReadByte(), 31);
if (len >= 3) _cur_parameter->num_bit = min(buf->ReadByte(), 32 - _cur_parameter->first_bit);
}
}
return true;
}
/** Callback function for 'INFO'->'PARAM'->param_num->'DFLT' to set the default value. */
static bool ChangeGRFParamDefault(size_t len, ByteReader *buf)
{
if (len != 4) {
grfmsg(2, "StaticGRFInfo: expected 4 bytes for 'INFO'->'PARA'->'DEFA' but got " PRINTF_SIZE ", ignoring this field", len);
buf->Skip(len);
} else {
_cur_parameter->def_value = buf->ReadDWord();
}
_cur.grfconfig->has_param_defaults = true;
return true;
}
typedef bool (*DataHandler)(size_t, ByteReader *); ///< Type of callback function for binary nodes
typedef bool (*TextHandler)(byte, const char *str); ///< Type of callback function for text nodes
typedef bool (*BranchHandler)(ByteReader *); ///< Type of callback function for branch nodes
/**
* Data structure to store the allowed id/type combinations for action 14. The
* data can be represented as a tree with 3 types of nodes:
* 1. Branch nodes (identified by 'C' for choice).
* 2. Binary leaf nodes (identified by 'B').
* 3. Text leaf nodes (identified by 'T').
*/
struct AllowedSubtags {
/** Create empty subtags object used to identify the end of a list. */
AllowedSubtags() :
id(0),
type(0)
{}
/**
* Create a binary leaf node.
* @param id The id for this node.
* @param handler The callback function to call.
*/
AllowedSubtags(uint32 id, DataHandler handler) :
id(id),
type('B')
{
this->handler.data = handler;
}
/**
* Create a text leaf node.
* @param id The id for this node.
* @param handler The callback function to call.
*/
AllowedSubtags(uint32 id, TextHandler handler) :
id(id),
type('T')
{
this->handler.text = handler;
}
/**
* Create a branch node with a callback handler
* @param id The id for this node.
* @param handler The callback function to call.
*/
AllowedSubtags(uint32 id, BranchHandler handler) :
id(id),
type('C')
{
this->handler.call_handler = true;
this->handler.u.branch = handler;
}
/**
* Create a branch node with a list of sub-nodes.
* @param id The id for this node.
* @param subtags Array with all valid subtags.
*/
AllowedSubtags(uint32 id, AllowedSubtags *subtags) :
id(id),
type('C')
{
this->handler.call_handler = false;
this->handler.u.subtags = subtags;
}
uint32 id; ///< The identifier for this node
byte type; ///< The type of the node, must be one of 'C', 'B' or 'T'.
union {
DataHandler data; ///< Callback function for a binary node, only valid if type == 'B'.
TextHandler text; ///< Callback function for a text node, only valid if type == 'T'.
struct {
union {
BranchHandler branch; ///< Callback function for a branch node, only valid if type == 'C' && call_handler.
AllowedSubtags *subtags; ///< Pointer to a list of subtags, only valid if type == 'C' && !call_handler.
} u;
bool call_handler; ///< True if there is a callback function for this node, false if there is a list of subnodes.
};
} handler;
};
static bool SkipUnknownInfo(ByteReader *buf, byte type);
static bool HandleNodes(ByteReader *buf, AllowedSubtags *tags);
/**
* Callback function for 'INFO'->'PARA'->param_num->'VALU' to set the names
* of some parameter values (type uint/enum) or the names of some bits
* (type bitmask). In both cases the format is the same:
* Each subnode should be a text node with the value/bit number as id.
*/
static bool ChangeGRFParamValueNames(ByteReader *buf)
{
byte type = buf->ReadByte();
while (type != 0) {
uint32 id = buf->ReadDWord();
if (type != 'T' || id > _cur_parameter->max_value) {
grfmsg(2, "StaticGRFInfo: all child nodes of 'INFO'->'PARA'->param_num->'VALU' should have type 't' and the value/bit number as id");
if (!SkipUnknownInfo(buf, type)) return false;
type = buf->ReadByte();
continue;
}
byte langid = buf->ReadByte();
const char *name_string = buf->ReadString();
SmallPair<uint32, GRFText *> *val_name = _cur_parameter->value_names.Find(id);
if (val_name != _cur_parameter->value_names.End()) {
AddGRFTextToList(&val_name->second, langid, _cur.grfconfig->ident.grfid, false, name_string);
} else {
GRFText *list = NULL;
AddGRFTextToList(&list, langid, _cur.grfconfig->ident.grfid, false, name_string);
_cur_parameter->value_names.Insert(id, list);
}
type = buf->ReadByte();
}
return true;
}
/** Action14 parameter tags */
AllowedSubtags _tags_parameters[] = {
AllowedSubtags('NAME', ChangeGRFParamName),
AllowedSubtags('DESC', ChangeGRFParamDescription),
AllowedSubtags('TYPE', ChangeGRFParamType),
AllowedSubtags('LIMI', ChangeGRFParamLimits),
AllowedSubtags('MASK', ChangeGRFParamMask),
AllowedSubtags('VALU', ChangeGRFParamValueNames),
AllowedSubtags('DFLT', ChangeGRFParamDefault),
AllowedSubtags()
};
/**
* Callback function for 'INFO'->'PARA' to set extra information about the
* parameters. Each subnode of 'INFO'->'PARA' should be a branch node with
* the parameter number as id. The first parameter has id 0. The maximum
* parameter that can be changed is set by 'INFO'->'NPAR' which defaults to 80.
*/
static bool HandleParameterInfo(ByteReader *buf)
{
byte type = buf->ReadByte();
while (type != 0) {
uint32 id = buf->ReadDWord();
if (type != 'C' || id >= _cur.grfconfig->num_valid_params) {
grfmsg(2, "StaticGRFInfo: all child nodes of 'INFO'->'PARA' should have type 'C' and their parameter number as id");
if (!SkipUnknownInfo(buf, type)) return false;
type = buf->ReadByte();
continue;
}
if (id >= _cur.grfconfig->param_info.Length()) {
uint num_to_add = id - _cur.grfconfig->param_info.Length() + 1;
GRFParameterInfo **newdata = _cur.grfconfig->param_info.Append(num_to_add);
MemSetT<GRFParameterInfo *>(newdata, 0, num_to_add);
}
if (_cur.grfconfig->param_info[id] == NULL) {
_cur.grfconfig->param_info[id] = new GRFParameterInfo(id);
}
_cur_parameter = _cur.grfconfig->param_info[id];
/* Read all parameter-data and process each node. */
if (!HandleNodes(buf, _tags_parameters)) return false;
type = buf->ReadByte();
}
return true;
}
/** Action14 tags for the INFO node */
AllowedSubtags _tags_info[] = {
AllowedSubtags('NAME', ChangeGRFName),
AllowedSubtags('DESC', ChangeGRFDescription),
AllowedSubtags('URL_', ChangeGRFURL),
AllowedSubtags('NPAR', ChangeGRFNumUsedParams),
AllowedSubtags('PALS', ChangeGRFPalette),
AllowedSubtags('BLTR', ChangeGRFBlitter),
AllowedSubtags('VRSN', ChangeGRFVersion),
AllowedSubtags('MINV', ChangeGRFMinVersion),
AllowedSubtags('PARA', HandleParameterInfo),
AllowedSubtags()
};
/** Action14 root tags */
AllowedSubtags _tags_root[] = {
AllowedSubtags('INFO', _tags_info),
AllowedSubtags()
};
/**
* Try to skip the current node and all subnodes (if it's a branch node).
* @param buf Buffer.
* @param type The node type to skip.
* @return True if we could skip the node, false if an error occured.
*/
static bool SkipUnknownInfo(ByteReader *buf, byte type)
{
/* type and id are already read */
switch (type) {
case 'C': {
byte new_type = buf->ReadByte();
while (new_type != 0) {
buf->ReadDWord(); // skip the id
if (!SkipUnknownInfo(buf, new_type)) return false;
new_type = buf->ReadByte();
}
break;
}
case 'T':
buf->ReadByte(); // lang
buf->ReadString(); // actual text
break;
case 'B': {
uint16 size = buf->ReadWord();
buf->Skip(size);
break;
}
default:
return false;
}
return true;
}
/**
* Handle the nodes of an Action14
* @param type Type of node.
* @param id ID.
* @param buf Buffer.
* @param subtags Allowed subtags.
* @return Whether all tags could be handled.
*/
static bool HandleNode(byte type, uint32 id, ByteReader *buf, AllowedSubtags subtags[])
{
uint i = 0;
AllowedSubtags *tag;
while ((tag = &subtags[i++])->type != 0) {
if (tag->id != BSWAP32(id) || tag->type != type) continue;
switch (type) {
default: NOT_REACHED();
case 'T': {
byte langid = buf->ReadByte();
return tag->handler.text(langid, buf->ReadString());
}
case 'B': {
size_t len = buf->ReadWord();
if (buf->Remaining() < len) return false;
return tag->handler.data(len, buf);
}
case 'C': {
if (tag->handler.call_handler) {
return tag->handler.u.branch(buf);
}
return HandleNodes(buf, tag->handler.u.subtags);
}
}
}
grfmsg(2, "StaticGRFInfo: unknown type/id combination found, type=%c, id=%x", type, id);
return SkipUnknownInfo(buf, type);
}
/**
* Handle the contents of a 'C' choice of an Action14
* @param buf Buffer.
* @param subtags List of subtags.
* @return Whether the nodes could all be handled.
*/
static bool HandleNodes(ByteReader *buf, AllowedSubtags subtags[])
{
byte type = buf->ReadByte();
while (type != 0) {
uint32 id = buf->ReadDWord();
if (!HandleNode(type, id, buf, subtags)) return false;
type = buf->ReadByte();
}
return true;
}
/**
* Handle Action 0x14
* @param buf Buffer.
*/
static void StaticGRFInfo(ByteReader *buf)
{
/* <14> <type> <id> <text/data...> */
HandleNodes(buf, _tags_root);
}
/**
* Set the current NewGRF as unsafe for static use
* @param buf Unused.
* @note Used during safety scan on unsafe actions.
*/
static void GRFUnsafe(ByteReader *buf)
{
SetBit(_cur.grfconfig->flags, GCF_UNSAFE);
/* Skip remainder of GRF */
_cur.skip_sprites = -1;
}
/** Initialize the TTDPatch flags */
static void InitializeGRFSpecial()
{
_ttdpatch_flags[0] = ((_settings_game.station.never_expire_airports ? 1 : 0) << 0x0C) // keepsmallairport
| (1 << 0x0D) // newairports
| (1 << 0x0E) // largestations
| ((_settings_game.construction.max_bridge_length > 16 ? 1 : 0) << 0x0F) // longbridges
| (0 << 0x10) // loadtime
| (1 << 0x12) // presignals
| (1 << 0x13) // extpresignals
| ((_settings_game.vehicle.never_expire_vehicles ? 1 : 0) << 0x16) // enginespersist
| (1 << 0x1B) // multihead
| (1 << 0x1D) // lowmemory
| (1 << 0x1E); // generalfixes
_ttdpatch_flags[1] = ((_settings_game.economy.station_noise_level ? 1 : 0) << 0x07) // moreairports - based on units of noise
| (1 << 0x08) // mammothtrains
| (1 << 0x09) // trainrefit
| (0 << 0x0B) // subsidiaries
| ((_settings_game.order.gradual_loading ? 1 : 0) << 0x0C) // gradualloading
| (1 << 0x12) // unifiedmaglevmode - set bit 0 mode. Not revelant to OTTD
| (1 << 0x13) // unifiedmaglevmode - set bit 1 mode
| (1 << 0x14) // bridgespeedlimits
| (1 << 0x16) // eternalgame
| (1 << 0x17) // newtrains
| (1 << 0x18) // newrvs
| (1 << 0x19) // newships
| (1 << 0x1A) // newplanes
| ((_settings_game.construction.train_signal_side == 1 ? 1 : 0) << 0x1B) // signalsontrafficside
| ((_settings_game.vehicle.disable_elrails ? 0 : 1) << 0x1C); // electrifiedrailway
_ttdpatch_flags[2] = (1 << 0x01) // loadallgraphics - obsolote
| (1 << 0x03) // semaphores
| (1 << 0x0A) // newobjects
| (0 << 0x0B) // enhancedgui
| (0 << 0x0C) // newagerating
| ((_settings_game.construction.build_on_slopes ? 1 : 0) << 0x0D) // buildonslopes
| (1 << 0x0E) // fullloadany
| (1 << 0x0F) // planespeed
| (0 << 0x10) // moreindustriesperclimate - obsolete
| (0 << 0x11) // moretoylandfeatures
| (1 << 0x12) // newstations
| (1 << 0x13) // tracktypecostdiff
| (1 << 0x14) // manualconvert
| ((_settings_game.construction.build_on_slopes ? 1 : 0) << 0x15) // buildoncoasts
| (1 << 0x16) // canals
| (1 << 0x17) // newstartyear
| ((_settings_game.vehicle.freight_trains > 1 ? 1 : 0) << 0x18) // freighttrains
| (1 << 0x19) // newhouses
| (1 << 0x1A) // newbridges
| (1 << 0x1B) // newtownnames
| (1 << 0x1C) // moreanimation
| ((_settings_game.vehicle.wagon_speed_limits ? 1 : 0) << 0x1D) // wagonspeedlimits
| (1 << 0x1E) // newshistory
| (0 << 0x1F); // custombridgeheads
_ttdpatch_flags[3] = (0 << 0x00) // newcargodistribution
| (1 << 0x01) // windowsnap
| ((_settings_game.economy.allow_town_roads || _generating_world ? 0 : 1) << 0x02) // townbuildnoroad
| (1 << 0x03) // pathbasedsignalling
| (0 << 0x04) // aichoosechance
| (1 << 0x05) // resolutionwidth
| (1 << 0x06) // resolutionheight
| (1 << 0x07) // newindustries
| ((_settings_game.order.improved_load ? 1 : 0) << 0x08) // fifoloading
| (0 << 0x09) // townroadbranchprob
| (0 << 0x0A) // tempsnowline
| (1 << 0x0B) // newcargo
| (1 << 0x0C) // enhancemultiplayer
| (1 << 0x0D) // onewayroads
| (1 << 0x0E) // irregularstations
| (1 << 0x0F) // statistics
| (1 << 0x10) // newsounds
| (1 << 0x11) // autoreplace
| (1 << 0x12) // autoslope
| (0 << 0x13) // followvehicle
| (1 << 0x14) // trams
| (0 << 0x15) // enhancetunnels
| (1 << 0x16) // shortrvs
| (1 << 0x17) // articulatedrvs
| ((_settings_game.vehicle.dynamic_engines ? 1 : 0) << 0x18) // dynamic engines
| (1 << 0x1E) // variablerunningcosts
| (1 << 0x1F); // any switch is on
}
/** Reset and clear all NewGRF stations */
static void ResetCustomStations()
{
const GRFFile * const *end = _grf_files.End();
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
StationSpec **&stations = (*file)->stations;
if (stations == NULL) continue;
for (uint i = 0; i < MAX_STATIONS; i++) {
if (stations[i] == NULL) continue;
StationSpec *statspec = stations[i];
delete[] statspec->renderdata;
/* Release platforms and layouts */
if (!statspec->copied_layouts) {
for (uint l = 0; l < statspec->lengths; l++) {
for (uint p = 0; p < statspec->platforms[l]; p++) {
free(statspec->layouts[l][p]);
}
free(statspec->layouts[l]);
}
free(statspec->layouts);
free(statspec->platforms);
}
/* Release this station */
free(statspec);
}
/* Free and reset the station data */
free(stations);
stations = NULL;
}
}
/** Reset and clear all NewGRF houses */
static void ResetCustomHouses()
{
const GRFFile * const *end = _grf_files.End();
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
HouseSpec **&housespec = (*file)->housespec;
if (housespec == NULL) continue;
for (uint i = 0; i < HOUSE_MAX; i++) {
free(housespec[i]);
}
free(housespec);
housespec = NULL;
}
}
/** Reset and clear all NewGRF airports */
static void ResetCustomAirports()
{
const GRFFile * const *end = _grf_files.End();
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
AirportSpec **aslist = (*file)->airportspec;
if (aslist != NULL) {
for (uint i = 0; i < NUM_AIRPORTS; i++) {
AirportSpec *as = aslist[i];
if (as != NULL) {
/* We need to remove the tiles layouts */
for (int j = 0; j < as->num_table; j++) {
/* remove the individual layouts */
free(as->table[j]);
}
free(as->table);
free(as->depot_table);
free(as);
}
}
free(aslist);
(*file)->airportspec = NULL;
}
AirportTileSpec **&airporttilespec = (*file)->airtspec;
if (airporttilespec != NULL) {
for (uint i = 0; i < NUM_AIRPORTTILES; i++) {
free(airporttilespec[i]);
}
free(airporttilespec);
airporttilespec = NULL;
}
}
}
/** Reset and clear all NewGRF industries */
static void ResetCustomIndustries()
{
const GRFFile * const *end = _grf_files.End();
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
IndustrySpec **&industryspec = (*file)->industryspec;
IndustryTileSpec **&indtspec = (*file)->indtspec;
/* We are verifiying both tiles and industries specs loaded from the grf file
* First, let's deal with industryspec */
if (industryspec != NULL) {
for (uint i = 0; i < NUM_INDUSTRYTYPES; i++) {
IndustrySpec *ind = industryspec[i];
if (ind == NULL) continue;
/* We need to remove the sounds array */
if (HasBit(ind->cleanup_flag, CLEAN_RANDOMSOUNDS)) {
free(ind->random_sounds);
}
/* We need to remove the tiles layouts */
CleanIndustryTileTable(ind);
free(ind);
}
free(industryspec);
industryspec = NULL;
}
if (indtspec == NULL) continue;
for (uint i = 0; i < NUM_INDUSTRYTILES; i++) {
free(indtspec[i]);
}
free(indtspec);
indtspec = NULL;
}
}
/** Reset and clear all NewObjects */
static void ResetCustomObjects()
{
const GRFFile * const *end = _grf_files.End();
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
ObjectSpec **&objectspec = (*file)->objectspec;
if (objectspec == NULL) continue;
for (uint i = 0; i < NUM_OBJECTS; i++) {
free(objectspec[i]);
}
free(objectspec);
objectspec = NULL;
}
}
/** Reset and clear all NewGRFs */
static void ResetNewGRF()
{
const GRFFile * const *end = _grf_files.End();
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
delete *file;
}
_grf_files.Clear();
_cur.grffile = NULL;
}
/** Clear all NewGRF errors */
static void ResetNewGRFErrors()
{
for (GRFConfig *c = _grfconfig; c != NULL; c = c->next) {
if (!HasBit(c->flags, GCF_COPY) && c->error != NULL) {
delete c->error;
c->error = NULL;
}
}
}
/**
* Reset all NewGRF loaded data
* TODO
*/
void ResetNewGRFData()
{
CleanUpStrings();
CleanUpGRFTownNames();
/* Copy/reset original engine info data */
SetupEngines();
/* Copy/reset original bridge info data */
ResetBridges();
/* Reset rail type information */
ResetRailTypes();
/* Allocate temporary refit/cargo class data */
_gted = CallocT<GRFTempEngineData>(Engine::GetPoolSize());
/* Fill rail type label temporary data for default trains */
Engine *e;
FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) {
_gted[e->index].railtypelabel = GetRailTypeInfo(e->u.rail.railtype)->label;
}
/* Reset GRM reservations */
memset(&_grm_engines, 0, sizeof(_grm_engines));
memset(&_grm_cargoes, 0, sizeof(_grm_cargoes));
/* Reset generic feature callback lists */
ResetGenericCallbacks();
/* Reset price base data */
ResetPriceBaseMultipliers();
/* Reset the curencies array */
ResetCurrencies();
/* Reset the house array */
ResetCustomHouses();
ResetHouses();
/* Reset the industries structures*/
ResetCustomIndustries();
ResetIndustries();
/* Reset the objects. */
ObjectClass::Reset();
ResetCustomObjects();
ResetObjects();
/* Reset station classes */
StationClass::Reset();
ResetCustomStations();
/* Reset airport-related structures */
AirportClass::Reset();
ResetCustomAirports();
AirportSpec::ResetAirports();
AirportTileSpec::ResetAirportTiles();
/* Reset canal sprite groups and flags */
memset(_water_feature, 0, sizeof(_water_feature));
/* Reset the snowline table. */
ClearSnowLine();
/* Reset NewGRF files */
ResetNewGRF();
/* Reset NewGRF errors. */
ResetNewGRFErrors();
/* Set up the default cargo types */
SetupCargoForClimate(_settings_game.game_creation.landscape);
/* Reset misc GRF features and train list display variables */
_misc_grf_features = 0;
_loaded_newgrf_features.has_2CC = false;
_loaded_newgrf_features.used_liveries = 1 << LS_DEFAULT;
_loaded_newgrf_features.has_newhouses = false;
_loaded_newgrf_features.has_newindustries = false;
_loaded_newgrf_features.shore = SHORE_REPLACE_NONE;
/* Clear all GRF overrides */
_grf_id_overrides.clear();
InitializeSoundPool();
_spritegroup_pool.CleanPool();
}
/**
* Reset NewGRF data which is stored persistently in savegames.
*/
void ResetPersistentNewGRFData()
{
/* Reset override managers */
_engine_mngr.ResetToDefaultMapping();
_house_mngr.ResetMapping();
_industry_mngr.ResetMapping();
_industile_mngr.ResetMapping();
_airport_mngr.ResetMapping();
_airporttile_mngr.ResetMapping();
}
/**
* Construct the Cargo Mapping
* @note This is the reverse of a cargo translation table
*/
static void BuildCargoTranslationMap()
{
memset(_cur.grffile->cargo_map, 0xFF, sizeof(_cur.grffile->cargo_map));
for (CargoID c = 0; c < NUM_CARGO; c++) {
const CargoSpec *cs = CargoSpec::Get(c);
if (!cs->IsValid()) continue;
if (_cur.grffile->cargo_list.Length() == 0) {
/* Default translation table, so just a straight mapping to bitnum */
_cur.grffile->cargo_map[c] = cs->bitnum;
} else {
/* Check the translation table for this cargo's label */
int index = _cur.grffile->cargo_list.FindIndex(cs->label);
if (index >= 0) _cur.grffile->cargo_map[c] = index;
}
}
}
/**
* Prepare loading a NewGRF file with its config
* @param config The NewGRF configuration struct with name, id, parameters and alike.
*/
static void InitNewGRFFile(const GRFConfig *config)
{
GRFFile *newfile = GetFileByFilename(config->filename);
if (newfile != NULL) {
/* We already loaded it once. */
_cur.grffile = newfile;
return;
}
newfile = new GRFFile(config);
*_grf_files.Append() = _cur.grffile = newfile;
}
/**
* Constructor for GRFFile
* @param config GRFConfig to copy name, grfid and parameters from.
*/
GRFFile::GRFFile(const GRFConfig *config)
{
this->filename = strdup(config->filename);
this->grfid = config->ident.grfid;
/* Initialise local settings to defaults */
this->traininfo_vehicle_pitch = 0;
this->traininfo_vehicle_width = TRAININFO_DEFAULT_VEHICLE_WIDTH;
/* Mark price_base_multipliers as 'not set' */
for (Price i = PR_BEGIN; i < PR_END; i++) {
this->price_base_multipliers[i] = INVALID_PRICE_MODIFIER;
}
/* Initialise rail type map with default rail types */
memset(this->railtype_map, INVALID_RAILTYPE, sizeof(this->railtype_map));
this->railtype_map[0] = RAILTYPE_RAIL;
this->railtype_map[1] = RAILTYPE_ELECTRIC;
this->railtype_map[2] = RAILTYPE_MONO;
this->railtype_map[3] = RAILTYPE_MAGLEV;
/* Copy the initial parameter list
* 'Uninitialised' parameters are zeroed as that is their default value when dynamically creating them. */
assert_compile(lengthof(this->param) == lengthof(config->param) && lengthof(this->param) == 0x80);
assert(config->num_params <= lengthof(config->param));
this->param_end = config->num_params;
if (this->param_end > 0) {
MemCpyT(this->param, config->param, this->param_end);
}
}
GRFFile::~GRFFile()
{
free(this->filename);
delete[] this->language_map;
}
/**
* List of what cargo labels are refittable for the given the vehicle-type.
* Only currently active labels are applied.
*/
static const CargoLabel _default_refitmasks_rail[] = {
'PASS', 'COAL', 'MAIL', 'LVST', 'GOOD', 'GRAI', 'WHEA', 'MAIZ', 'WOOD',
'IORE', 'STEL', 'VALU', 'GOLD', 'DIAM', 'PAPR', 'FOOD', 'FRUT', 'CORE',
'WATR', 'SUGR', 'TOYS', 'BATT', 'SWET', 'TOFF', 'COLA', 'CTCD', 'BUBL',
'PLST', 'FZDR',
0 };
static const CargoLabel _default_refitmasks_road[] = {
0 };
static const CargoLabel _default_refitmasks_ships[] = {
'COAL', 'MAIL', 'LVST', 'GOOD', 'GRAI', 'WHEA', 'MAIZ', 'WOOD', 'IORE',
'STEL', 'VALU', 'GOLD', 'DIAM', 'PAPR', 'FOOD', 'FRUT', 'CORE', 'WATR',
'RUBR', 'SUGR', 'TOYS', 'BATT', 'SWET', 'TOFF', 'COLA', 'CTCD', 'BUBL',
'PLST', 'FZDR',
0 };
static const CargoLabel _default_refitmasks_aircraft[] = {
'PASS', 'MAIL', 'GOOD', 'VALU', 'GOLD', 'DIAM', 'FOOD', 'FRUT', 'SUGR',
'TOYS', 'BATT', 'SWET', 'TOFF', 'COLA', 'CTCD', 'BUBL', 'PLST', 'FZDR',
0 };
static const CargoLabel * const _default_refitmasks[] = {
_default_refitmasks_rail,
_default_refitmasks_road,
_default_refitmasks_ships,
_default_refitmasks_aircraft,
};
/**
* Precalculate refit masks from cargo classes for all vehicles.
*/
static void CalculateRefitMasks()
{
Engine *e;
FOR_ALL_ENGINES(e) {
EngineID engine = e->index;
EngineInfo *ei = &e->info;
bool only_defaultcargo; ///< Set if the vehicle shall carry only the default cargo
/* Did the newgrf specify any refitting? If not, use defaults. */
if (_gted[engine].refittability != GRFTempEngineData::UNSET) {
uint32 mask = 0;
uint32 not_mask = 0;
uint32 xor_mask = ei->refit_mask;
/* If the original masks set by the grf are zero, the vehicle shall only carry the default cargo.
* Note: After applying the translations, the vehicle may end up carrying no defined cargo. It becomes unavailable in that case. */
only_defaultcargo = _gted[engine].refittability == GRFTempEngineData::EMPTY;
if (_gted[engine].cargo_allowed != 0) {
/* Build up the list of cargo types from the set cargo classes. */
const CargoSpec *cs;
FOR_ALL_CARGOSPECS(cs) {
if (_gted[engine].cargo_allowed & cs->classes) SetBit(mask, cs->Index());
if (_gted[engine].cargo_disallowed & cs->classes) SetBit(not_mask, cs->Index());
}
}
ei->refit_mask = ((mask & ~not_mask) ^ xor_mask) & _cargo_mask;
/* Apply explicit refit includes/excludes. */
ei->refit_mask |= _gted[engine].ctt_include_mask;
ei->refit_mask &= ~_gted[engine].ctt_exclude_mask;
} else {
uint32 xor_mask = 0;
/* Don't apply default refit mask to wagons nor engines with no capacity */
if (e->type != VEH_TRAIN || (e->u.rail.capacity != 0 && e->u.rail.railveh_type != RAILVEH_WAGON)) {
const CargoLabel *cl = _default_refitmasks[e->type];
for (uint i = 0;; i++) {
if (cl[i] == 0) break;
CargoID cargo = GetCargoIDByLabel(cl[i]);
if (cargo == CT_INVALID) continue;
SetBit(xor_mask, cargo);
}
}
ei->refit_mask = xor_mask & _cargo_mask;
/* If the mask is zero, the vehicle shall only carry the default cargo */
only_defaultcargo = (ei->refit_mask == 0);
}
/* Clear invalid cargoslots (from default vehicles or pre-NewCargo GRFs) */
if (!HasBit(_cargo_mask, ei->cargo_type)) ei->cargo_type = CT_INVALID;
/* Ensure that the vehicle is either not refittable, or that the default cargo is one of the refittable cargoes.
* Note: Vehicles refittable to no cargo are handle differently to vehicle refittable to a single cargo. The latter might have subtypes. */
if (!only_defaultcargo && (e->type != VEH_SHIP || e->u.ship.old_refittable) && ei->cargo_type != CT_INVALID && !HasBit(ei->refit_mask, ei->cargo_type)) {
ei->cargo_type = CT_INVALID;
}
/* Check if this engine's cargo type is valid. If not, set to the first refittable
* cargo type. Finally disable the vehicle, if there is still no cargo. */
if (ei->cargo_type == CT_INVALID && ei->refit_mask != 0) {
/* Figure out which CTT to use for the default cargo, if it is 'first refittable'. */
const uint8 *cargo_map_for_first_refittable = NULL;
{
const GRFFile *file = _gted[engine].defaultcargo_grf;
if (file == NULL) file = e->GetGRF();
if (file != NULL && file->grf_version >= 8 && file->cargo_list.Length() != 0) {
cargo_map_for_first_refittable = file->cargo_map;
}
}
if (cargo_map_for_first_refittable != NULL) {
/* Use first refittable cargo from cargo translation table */
byte best_local_slot = 0xFF;
CargoID cargo_type;
FOR_EACH_SET_CARGO_ID(cargo_type, ei->refit_mask) {
byte local_slot = cargo_map_for_first_refittable[cargo_type];
if (local_slot < best_local_slot) {
best_local_slot = local_slot;
ei->cargo_type = cargo_type;
}
}
}
if (ei->cargo_type == CT_INVALID) {
/* Use first refittable cargo slot */
ei->cargo_type = (CargoID)FindFirstBit(ei->refit_mask);
}
}
if (ei->cargo_type == CT_INVALID) ei->climates = 0;
/* Clear refit_mask for not refittable ships */
if (e->type == VEH_SHIP && !e->u.ship.old_refittable) {
ei->refit_mask = 0;
}
}
}
/** Set to use the correct action0 properties for each canal feature */
static void FinaliseCanals()
{
for (uint i = 0; i < CF_END; i++) {
if (_water_feature[i].grffile != NULL) {
_water_feature[i].callback_mask = _water_feature[i].grffile->canal_local_properties[i].callback_mask;
_water_feature[i].flags = _water_feature[i].grffile->canal_local_properties[i].flags;
}
}
}
/** Check for invalid engines */
static void FinaliseEngineArray()
{
Engine *e;
FOR_ALL_ENGINES(e) {
if (e->GetGRF() == NULL) {
const EngineIDMapping &eid = _engine_mngr[e->index];
if (eid.grfid != INVALID_GRFID || eid.internal_id != eid.substitute_id) {
e->info.string_id = STR_NEWGRF_INVALID_ENGINE;
}
}
/* When the train does not set property 27 (misc flags), but it
* is overridden by a NewGRF graphically we want to disable the
* flipping possibility. */
if (e->type == VEH_TRAIN && !_gted[e->index].prop27_set && e->GetGRF() != NULL && is_custom_sprite(e->u.rail.image_index)) {
ClrBit(e->info.misc_flags, EF_RAIL_FLIPS);
}
/* Skip wagons, there livery is defined via the engine */
if (e->type != VEH_TRAIN || e->u.rail.railveh_type != RAILVEH_WAGON) {
LiveryScheme ls = GetEngineLiveryScheme(e->index, INVALID_ENGINE, NULL);
SetBit(_loaded_newgrf_features.used_liveries, ls);
/* Note: For ships and roadvehicles we assume that they cannot be refitted between passenger and freight */
if (e->type == VEH_TRAIN) {
SetBit(_loaded_newgrf_features.used_liveries, LS_FREIGHT_WAGON);
switch (ls) {
case LS_STEAM:
case LS_DIESEL:
case LS_ELECTRIC:
case LS_MONORAIL:
case LS_MAGLEV:
SetBit(_loaded_newgrf_features.used_liveries, LS_PASSENGER_WAGON_STEAM + ls - LS_STEAM);
break;
case LS_DMU:
case LS_EMU:
SetBit(_loaded_newgrf_features.used_liveries, LS_PASSENGER_WAGON_DIESEL + ls - LS_DMU);
break;
default: NOT_REACHED();
}
}
}
}
}
/** Check for invalid cargoes */
static void FinaliseCargoArray()
{
for (CargoID c = 0; c < NUM_CARGO; c++) {
CargoSpec *cs = CargoSpec::Get(c);
if (!cs->IsValid()) {
cs->name = cs->name_single = cs->units_volume = STR_NEWGRF_INVALID_CARGO;
cs->quantifier = STR_NEWGRF_INVALID_CARGO_QUANTITY;
cs->abbrev = STR_NEWGRF_INVALID_CARGO_ABBREV;
}
}
}
/**
* Check if a given housespec is valid and disable it if it's not.
* The housespecs that follow it are used to check the validity of
* multitile houses.
* @param hs The housespec to check.
* @param next1 The housespec that follows \c hs.
* @param next2 The housespec that follows \c next1.
* @param next3 The housespec that follows \c next2.
* @param filename The filename of the newgrf this house was defined in.
* @return Whether the given housespec is valid.
*/
static bool IsHouseSpecValid(HouseSpec *hs, const HouseSpec *next1, const HouseSpec *next2, const HouseSpec *next3, const char *filename)
{
if (((hs->building_flags & BUILDING_HAS_2_TILES) != 0 &&
(next1 == NULL || !next1->enabled || (next1->building_flags & BUILDING_HAS_1_TILE) != 0)) ||
((hs->building_flags & BUILDING_HAS_4_TILES) != 0 &&
(next2 == NULL || !next2->enabled || (next2->building_flags & BUILDING_HAS_1_TILE) != 0 ||
next3 == NULL || !next3->enabled || (next3->building_flags & BUILDING_HAS_1_TILE) != 0))) {
hs->enabled = false;
if (filename != NULL) DEBUG(grf, 1, "FinaliseHouseArray: %s defines house %d as multitile, but no suitable tiles follow. Disabling house.", filename, hs->grf_prop.local_id);
return false;
}
/* Some places sum population by only counting north tiles. Other places use all tiles causing desyncs.
* As the newgrf specs define population to be zero for non-north tiles, we just disable the offending house.
* If you want to allow non-zero populations somewhen, make sure to sum the population of all tiles in all places. */
if (((hs->building_flags & BUILDING_HAS_2_TILES) != 0 && next1->population != 0) ||
((hs->building_flags & BUILDING_HAS_4_TILES) != 0 && (next2->population != 0 || next3->population != 0))) {
hs->enabled = false;
if (filename != NULL) DEBUG(grf, 1, "FinaliseHouseArray: %s defines multitile house %d with non-zero population on additional tiles. Disabling house.", filename, hs->grf_prop.local_id);
return false;
}
/* Substitute type is also used for override, and having an override with a different size causes crashes.
* This check should only be done for NewGRF houses because grf_prop.subst_id is not set for original houses.*/
if (filename != NULL && (hs->building_flags & BUILDING_HAS_1_TILE) != (HouseSpec::Get(hs->grf_prop.subst_id)->building_flags & BUILDING_HAS_1_TILE)) {
hs->enabled = false;
DEBUG(grf, 1, "FinaliseHouseArray: %s defines house %d with different house size then it's substitute type. Disabling house.", filename, hs->grf_prop.local_id);
return false;
}
/* Make sure that additional parts of multitile houses are not available. */
if ((hs->building_flags & BUILDING_HAS_1_TILE) == 0 && (hs->building_availability & HZ_ZONALL) != 0 && (hs->building_availability & HZ_CLIMALL) != 0) {
hs->enabled = false;
if (filename != NULL) DEBUG(grf, 1, "FinaliseHouseArray: %s defines house %d without a size but marked it as available. Disabling house.", filename, hs->grf_prop.local_id);
return false;
}
return true;
}
/**
* Make sure there is at least one house available in the year 0 for the given
* climate / housezone combination.
* @param bitmask The climate and housezone to check for. Exactly one climate
* bit and one housezone bit should be set.
*/
static void EnsureEarlyHouse(HouseZones bitmask)
{
Year min_year = MAX_YEAR;
for (int i = 0; i < HOUSE_MAX; i++) {
HouseSpec *hs = HouseSpec::Get(i);
if (hs == NULL || !hs->enabled) continue;
if ((hs->building_availability & bitmask) != bitmask) continue;
if (hs->min_year < min_year) min_year = hs->min_year;
}
if (min_year == 0) return;
for (int i = 0; i < HOUSE_MAX; i++) {
HouseSpec *hs = HouseSpec::Get(i);
if (hs == NULL || !hs->enabled) continue;
if ((hs->building_availability & bitmask) != bitmask) continue;
if (hs->min_year == min_year) hs->min_year = 0;
}
}
/**
* Add all new houses to the house array. House properties can be set at any
* time in the GRF file, so we can only add a house spec to the house array
* after the file has finished loading. We also need to check the dates, due to
* the TTDPatch behaviour described below that we need to emulate.
*/
static void FinaliseHouseArray()
{
/* If there are no houses with start dates before 1930, then all houses
* with start dates of 1930 have them reset to 0. This is in order to be
* compatible with TTDPatch, where if no houses have start dates before
* 1930 and the date is before 1930, the game pretends that this is 1930.
* If there have been any houses defined with start dates before 1930 then
* the dates are left alone.
* On the other hand, why 1930? Just 'fix' the houses with the lowest
* minimum introduction date to 0.
*/
const GRFFile * const *end = _grf_files.End();
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
HouseSpec **&housespec = (*file)->housespec;
if (housespec == NULL) continue;
for (int i = 0; i < HOUSE_MAX; i++) {
HouseSpec *hs = housespec[i];
if (hs == NULL) continue;
const HouseSpec *next1 = (i + 1 < HOUSE_MAX ? housespec[i + 1] : NULL);
const HouseSpec *next2 = (i + 2 < HOUSE_MAX ? housespec[i + 2] : NULL);
const HouseSpec *next3 = (i + 3 < HOUSE_MAX ? housespec[i + 3] : NULL);
if (!IsHouseSpecValid(hs, next1, next2, next3, (*file)->filename)) continue;
_house_mngr.SetEntitySpec(hs);
}
}
for (int i = 0; i < HOUSE_MAX; i++) {
HouseSpec *hs = HouseSpec::Get(i);
const HouseSpec *next1 = (i + 1 < HOUSE_MAX ? HouseSpec::Get(i + 1) : NULL);
const HouseSpec *next2 = (i + 2 < HOUSE_MAX ? HouseSpec::Get(i + 2) : NULL);
const HouseSpec *next3 = (i + 3 < HOUSE_MAX ? HouseSpec::Get(i + 3) : NULL);
/* We need to check all houses again to we are sure that multitile houses
* did get consecutive IDs and none of the parts are missing. */
if (!IsHouseSpecValid(hs, next1, next2, next3, NULL)) {
/* GetHouseNorthPart checks 3 houses that are directly before
* it in the house pool. If any of those houses have multi-tile
* flags set it assumes it's part of a multitile house. Since
* we can have invalid houses in the pool marked as disabled, we
* don't want to have them influencing valid tiles. As such set
* building_flags to zero here to make sure any house following
* this one in the pool is properly handled as 1x1 house. */
hs->building_flags = TILE_NO_FLAG;
}
}
HouseZones climate_mask = (HouseZones)(1 << (_settings_game.game_creation.landscape + 12));
EnsureEarlyHouse(HZ_ZON1 | climate_mask);
EnsureEarlyHouse(HZ_ZON2 | climate_mask);
EnsureEarlyHouse(HZ_ZON3 | climate_mask);
EnsureEarlyHouse(HZ_ZON4 | climate_mask);
EnsureEarlyHouse(HZ_ZON5 | climate_mask);
if (_settings_game.game_creation.landscape == LT_ARCTIC) {
EnsureEarlyHouse(HZ_ZON1 | HZ_SUBARTC_ABOVE);
EnsureEarlyHouse(HZ_ZON2 | HZ_SUBARTC_ABOVE);
EnsureEarlyHouse(HZ_ZON3 | HZ_SUBARTC_ABOVE);
EnsureEarlyHouse(HZ_ZON4 | HZ_SUBARTC_ABOVE);
EnsureEarlyHouse(HZ_ZON5 | HZ_SUBARTC_ABOVE);
}
}
/**
* Add all new industries to the industry array. Industry properties can be set at any
* time in the GRF file, so we can only add a industry spec to the industry array
* after the file has finished loading.
*/
static void FinaliseIndustriesArray()
{
const GRFFile * const *end = _grf_files.End();
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
IndustrySpec **&industryspec = (*file)->industryspec;
IndustryTileSpec **&indtspec = (*file)->indtspec;
if (industryspec != NULL) {
for (int i = 0; i < NUM_INDUSTRYTYPES; i++) {
IndustrySpec *indsp = industryspec[i];
if (indsp != NULL && indsp->enabled) {
StringID strid;
/* process the conversion of text at the end, so to be sure everything will be fine
* and available. Check if it does not return undefind marker, which is a very good sign of a
* substitute industry who has not changed the string been examined, thus using it as such */
strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->name);
if (strid != STR_UNDEFINED) indsp->name = strid;
strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->closure_text);
if (strid != STR_UNDEFINED) indsp->closure_text = strid;
strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->production_up_text);
if (strid != STR_UNDEFINED) indsp->production_up_text = strid;
strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->production_down_text);
if (strid != STR_UNDEFINED) indsp->production_down_text = strid;
strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->new_industry_text);
if (strid != STR_UNDEFINED) indsp->new_industry_text = strid;
if (indsp->station_name != STR_NULL) {
/* STR_NULL (0) can be set by grf. It has a meaning regarding assignation of the
* station's name. Don't want to lose the value, therefore, do not process. */
strid = GetGRFStringID(indsp->grf_prop.grffile->grfid, indsp->station_name);
if (strid != STR_UNDEFINED) indsp->station_name = strid;
}
_industry_mngr.SetEntitySpec(indsp);
_loaded_newgrf_features.has_newindustries = true;
}
}
}
if (indtspec != NULL) {
for (int i = 0; i < NUM_INDUSTRYTILES; i++) {
IndustryTileSpec *indtsp = indtspec[i];
if (indtsp != NULL) {
_industile_mngr.SetEntitySpec(indtsp);
}
}
}
}
for (uint j = 0; j < NUM_INDUSTRYTYPES; j++) {
IndustrySpec *indsp = &_industry_specs[j];
if (indsp->enabled && indsp->grf_prop.grffile != NULL) {
for (uint i = 0; i < 3; i++) {
indsp->conflicting[i] = MapNewGRFIndustryType(indsp->conflicting[i], indsp->grf_prop.grffile->grfid);
}
}
if (!indsp->enabled) {
indsp->name = STR_NEWGRF_INVALID_INDUSTRYTYPE;
}
}
}
/**
* Add all new objects to the object array. Object properties can be set at any
* time in the GRF file, so we can only add an object spec to the object array
* after the file has finished loading.
*/
static void FinaliseObjectsArray()
{
const GRFFile * const *end = _grf_files.End();
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
ObjectSpec **&objectspec = (*file)->objectspec;
if (objectspec != NULL) {
for (int i = 0; i < NUM_OBJECTS; i++) {
if (objectspec[i] != NULL && objectspec[i]->grf_prop.grffile != NULL && objectspec[i]->enabled) {
_object_mngr.SetEntitySpec(objectspec[i]);
}
}
}
}
}
/**
* Add all new airports to the airport array. Airport properties can be set at any
* time in the GRF file, so we can only add a airport spec to the airport array
* after the file has finished loading.
*/
static void FinaliseAirportsArray()
{
const GRFFile * const *end = _grf_files.End();
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
AirportSpec **&airportspec = (*file)->airportspec;
if (airportspec != NULL) {
for (int i = 0; i < NUM_AIRPORTS; i++) {
if (airportspec[i] != NULL && airportspec[i]->enabled) {
_airport_mngr.SetEntitySpec(airportspec[i]);
}
}
}
AirportTileSpec **&airporttilespec = (*file)->airtspec;
if (airporttilespec != NULL) {
for (uint i = 0; i < NUM_AIRPORTTILES; i++) {
if (airporttilespec[i] != NULL && airporttilespec[i]->enabled) {
_airporttile_mngr.SetEntitySpec(airporttilespec[i]);
}
}
}
}
}
/* Here we perform initial decoding of some special sprites (as are they
* described at http://www.ttdpatch.net/src/newgrf.txt, but this is only a very
* partial implementation yet).
* XXX: We consider GRF files trusted. It would be trivial to exploit OTTD by
* a crafted invalid GRF file. We should tell that to the user somehow, or
* better make this more robust in the future. */
static void DecodeSpecialSprite(byte *buf, uint num, GrfLoadingStage stage)
{
/* XXX: There is a difference between staged loading in TTDPatch and
* here. In TTDPatch, for some reason actions 1 and 2 are carried out
* during stage 1, whilst action 3 is carried out during stage 2 (to
* "resolve" cargo IDs... wtf). This is a little problem, because cargo
* IDs are valid only within a given set (action 1) block, and may be
* overwritten after action 3 associates them. But overwriting happens
* in an earlier stage than associating, so... We just process actions
* 1 and 2 in stage 2 now, let's hope that won't get us into problems.
* --pasky
* We need a pre-stage to set up GOTO labels of Action 0x10 because the grf
* is not in memory and scanning the file every time would be too expensive.
* In other stages we skip action 0x10 since it's already dealt with. */
static const SpecialSpriteHandler handlers[][GLS_END] = {
/* 0x00 */ { NULL, SafeChangeInfo, NULL, NULL, ReserveChangeInfo, FeatureChangeInfo, },
/* 0x01 */ { SkipAct1, SkipAct1, SkipAct1, SkipAct1, SkipAct1, NewSpriteSet, },
/* 0x02 */ { NULL, NULL, NULL, NULL, NULL, NewSpriteGroup, },
/* 0x03 */ { NULL, GRFUnsafe, NULL, NULL, NULL, FeatureMapSpriteGroup, },
/* 0x04 */ { NULL, NULL, NULL, NULL, NULL, FeatureNewName, },
/* 0x05 */ { SkipAct5, SkipAct5, SkipAct5, SkipAct5, SkipAct5, GraphicsNew, },
/* 0x06 */ { NULL, NULL, NULL, CfgApply, CfgApply, CfgApply, },
/* 0x07 */ { NULL, NULL, NULL, NULL, SkipIf, SkipIf, },
/* 0x08 */ { ScanInfo, NULL, NULL, GRFInfo, GRFInfo, GRFInfo, },
/* 0x09 */ { NULL, NULL, NULL, SkipIf, SkipIf, SkipIf, },
/* 0x0A */ { SkipActA, SkipActA, SkipActA, SkipActA, SkipActA, SpriteReplace, },
/* 0x0B */ { NULL, NULL, NULL, GRFLoadError, GRFLoadError, GRFLoadError, },
/* 0x0C */ { NULL, NULL, NULL, GRFComment, NULL, GRFComment, },
/* 0x0D */ { NULL, SafeParamSet, NULL, ParamSet, ParamSet, ParamSet, },
/* 0x0E */ { NULL, SafeGRFInhibit, NULL, GRFInhibit, GRFInhibit, GRFInhibit, },
/* 0x0F */ { NULL, GRFUnsafe, NULL, FeatureTownName, NULL, NULL, },
/* 0x10 */ { NULL, NULL, DefineGotoLabel, NULL, NULL, NULL, },
/* 0x11 */ { SkipAct11,GRFUnsafe, SkipAct11, GRFSound, SkipAct11, GRFSound, },
/* 0x12 */ { SkipAct12, SkipAct12, SkipAct12, SkipAct12, SkipAct12, LoadFontGlyph, },
/* 0x13 */ { NULL, NULL, NULL, NULL, NULL, TranslateGRFStrings, },
/* 0x14 */ { StaticGRFInfo, NULL, NULL, NULL, NULL, NULL, },
};
GRFLocation location(_cur.grfconfig->ident.grfid, _cur.nfo_line);
GRFLineToSpriteOverride::iterator it = _grf_line_to_action6_sprite_override.find(location);
if (it == _grf_line_to_action6_sprite_override.end()) {
/* No preloaded sprite to work with; read the
* pseudo sprite content. */
FioReadBlock(buf, num);
} else {
/* Use the preloaded sprite data. */
buf = _grf_line_to_action6_sprite_override[location];
grfmsg(7, "DecodeSpecialSprite: Using preloaded pseudo sprite data");
/* Skip the real (original) content of this action. */
FioSeekTo(num, SEEK_CUR);
}
ByteReader br(buf, buf + num);
ByteReader *bufp = &br;
try {
byte action = bufp->ReadByte();
if (action == 0xFF) {
grfmsg(2, "DecodeSpecialSprite: Unexpected data block, skipping");
} else if (action == 0xFE) {
grfmsg(2, "DecodeSpecialSprite: Unexpected import block, skipping");
} else if (action >= lengthof(handlers)) {
grfmsg(7, "DecodeSpecialSprite: Skipping unknown action 0x%02X", action);
} else if (handlers[action][stage] == NULL) {
grfmsg(7, "DecodeSpecialSprite: Skipping action 0x%02X in stage %d", action, stage);
} else {
grfmsg(7, "DecodeSpecialSprite: Handling action 0x%02X in stage %d", action, stage);
handlers[action][stage](bufp);
}
} catch (...) {
grfmsg(1, "DecodeSpecialSprite: Tried to read past end of pseudo-sprite data");
DisableGrf(STR_NEWGRF_ERROR_READ_BOUNDS);
}
}
/** Signature of a container version 2 GRF. */
extern const byte _grf_cont_v2_sig[8] = {'G', 'R', 'F', 0x82, 0x0D, 0x0A, 0x1A, 0x0A};
/**
* Get the container version of the currently opened GRF file.
* @return Container version of the GRF file or 0 if the file is corrupt/no GRF file.
*/
byte GetGRFContainerVersion()
{
size_t pos = FioGetPos();
if (FioReadWord() == 0) {
/* Check for GRF container version 2, which is identified by the bytes
* '47 52 46 82 0D 0A 1A 0A' at the start of the file. */
for (uint i = 0; i < lengthof(_grf_cont_v2_sig); i++) {
if (FioReadByte() != _grf_cont_v2_sig[i]) return 0; // Invalid format
}
return 2;
}
/* Container version 1 has no header, rewind to start. */
FioSeekTo(pos, SEEK_SET);
return 1;
}
/**
* Load a particular NewGRF.
* @param config The configuration of the to be loaded NewGRF.
* @param file_index The Fio index of the first NewGRF to load.
* @param stage The loading stage of the NewGRF.
* @param subdir The sub directory to find the NewGRF in.
*/
void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage, Subdirectory subdir)
{
const char *filename = config->filename;
/* A .grf file is activated only if it was active when the game was
* started. If a game is loaded, only its active .grfs will be
* reactivated, unless "loadallgraphics on" is used. A .grf file is
* considered active if its action 8 has been processed, i.e. its
* action 8 hasn't been skipped using an action 7.
*
* During activation, only actions 0, 1, 2, 3, 4, 5, 7, 8, 9, 0A and 0B are
* carried out. All others are ignored, because they only need to be
* processed once at initialization. */
if (stage != GLS_FILESCAN && stage != GLS_SAFETYSCAN && stage != GLS_LABELSCAN) {
_cur.grffile = GetFileByFilename(filename);
if (_cur.grffile == NULL) usererror("File '%s' lost in cache.\n", filename);
if (stage == GLS_RESERVE && config->status != GCS_INITIALISED) return;
if (stage == GLS_ACTIVATION && !HasBit(config->flags, GCF_RESERVED)) return;
_cur.grffile->is_ottdfile = config->IsOpenTTDBaseGRF();
}
if (file_index > LAST_GRF_SLOT) {
DEBUG(grf, 0, "'%s' is not loaded as the maximum number of GRFs has been reached", filename);
config->status = GCS_DISABLED;
config->error = new GRFError(STR_NEWGRF_ERROR_MSG_FATAL, STR_NEWGRF_ERROR_TOO_MANY_NEWGRFS_LOADED);
return;
}
FioOpenFile(file_index, filename, subdir);
_cur.file_index = file_index; // XXX
_palette_remap_grf[_cur.file_index] = (config->palette & GRFP_USE_MASK);
_cur.grfconfig = config;
DEBUG(grf, 2, "LoadNewGRFFile: Reading NewGRF-file '%s'", filename);
_cur.grf_container_ver = GetGRFContainerVersion();
if (_cur.grf_container_ver == 0) {
DEBUG(grf, 7, "LoadNewGRFFile: Custom .grf has invalid format");
return;
}
if (stage == GLS_INIT || stage == GLS_ACTIVATION) {
/* We need the sprite offsets in the init stage for NewGRF sounds
* and in the activation stage for real sprites. */
ReadGRFSpriteOffsets(_cur.grf_container_ver);
} else {
/* Skip sprite section offset if present. */
if (_cur.grf_container_ver >= 2) FioReadDword();
}
if (_cur.grf_container_ver >= 2) {
/* Read compression value. */
byte compression = FioReadByte();
if (compression != 0) {
DEBUG(grf, 7, "LoadNewGRFFile: Unsupported compression format");
return;
}
}
/* Skip the first sprite; we don't care about how many sprites this
* does contain; newest TTDPatches and George's longvehicles don't
* neither, apparently. */
uint32 num = _cur.grf_container_ver >= 2 ? FioReadDword() : FioReadWord();
if (num == 4 && FioReadByte() == 0xFF) {
FioReadDword();
} else {
DEBUG(grf, 7, "LoadNewGRFFile: Custom .grf has invalid format");
return;
}
_cur.ClearDataForNextFile();
ReusableBuffer<byte> buf;
while ((num = (_cur.grf_container_ver >= 2 ? FioReadDword() : FioReadWord())) != 0) {
byte type = FioReadByte();
_cur.nfo_line++;
if (type == 0xFF) {
if (_cur.skip_sprites == 0) {
DecodeSpecialSprite(buf.Allocate(num), num, stage);
/* Stop all processing if we are to skip the remaining sprites */
if (_cur.skip_sprites == -1) break;
continue;
} else {
FioSkipBytes(num);
}
} else {
if (_cur.skip_sprites == 0) {
grfmsg(0, "LoadNewGRFFile: Unexpected sprite, disabling");
DisableGrf(STR_NEWGRF_ERROR_UNEXPECTED_SPRITE);
break;
}
if (_cur.grf_container_ver >= 2 && type == 0xFD) {
/* Reference to data section. Container version >= 2 only. */
FioSkipBytes(num);
} else {
FioSkipBytes(7);
SkipSpriteData(type, num - 8);
}
}
if (_cur.skip_sprites > 0) _cur.skip_sprites--;
}
}
/**
* Relocates the old shore sprites at new positions.
*
* 1. If shore sprites are neither loaded by Action5 nor ActionA, the extra sprites from openttd(w/d).grf are used. (SHORE_REPLACE_ONLY_NEW)
* 2. If a newgrf replaces some shore sprites by ActionA. The (maybe also replaced) grass tiles are used for corner shores. (SHORE_REPLACE_ACTION_A)
* 3. If a newgrf replaces shore sprites by Action5 any shore replacement by ActionA has no effect. (SHORE_REPLACE_ACTION_5)
*/
static void ActivateOldShore()
{
/* Use default graphics, if no shore sprites were loaded.
* Should not happen, as the base set's extra grf should include some. */
if (_loaded_newgrf_features.shore == SHORE_REPLACE_NONE) _loaded_newgrf_features.shore = SHORE_REPLACE_ACTION_A;
if (_loaded_newgrf_features.shore != SHORE_REPLACE_ACTION_5) {
DupSprite(SPR_ORIGINALSHORE_START + 1, SPR_SHORE_BASE + 1); // SLOPE_W
DupSprite(SPR_ORIGINALSHORE_START + 2, SPR_SHORE_BASE + 2); // SLOPE_S
DupSprite(SPR_ORIGINALSHORE_START + 6, SPR_SHORE_BASE + 3); // SLOPE_SW
DupSprite(SPR_ORIGINALSHORE_START + 0, SPR_SHORE_BASE + 4); // SLOPE_E
DupSprite(SPR_ORIGINALSHORE_START + 4, SPR_SHORE_BASE + 6); // SLOPE_SE
DupSprite(SPR_ORIGINALSHORE_START + 3, SPR_SHORE_BASE + 8); // SLOPE_N
DupSprite(SPR_ORIGINALSHORE_START + 7, SPR_SHORE_BASE + 9); // SLOPE_NW
DupSprite(SPR_ORIGINALSHORE_START + 5, SPR_SHORE_BASE + 12); // SLOPE_NE
}
if (_loaded_newgrf_features.shore == SHORE_REPLACE_ACTION_A) {
DupSprite(SPR_FLAT_GRASS_TILE + 16, SPR_SHORE_BASE + 0); // SLOPE_STEEP_S
DupSprite(SPR_FLAT_GRASS_TILE + 17, SPR_SHORE_BASE + 5); // SLOPE_STEEP_W
DupSprite(SPR_FLAT_GRASS_TILE + 7, SPR_SHORE_BASE + 7); // SLOPE_WSE
DupSprite(SPR_FLAT_GRASS_TILE + 15, SPR_SHORE_BASE + 10); // SLOPE_STEEP_N
DupSprite(SPR_FLAT_GRASS_TILE + 11, SPR_SHORE_BASE + 11); // SLOPE_NWS
DupSprite(SPR_FLAT_GRASS_TILE + 13, SPR_SHORE_BASE + 13); // SLOPE_ENW
DupSprite(SPR_FLAT_GRASS_TILE + 14, SPR_SHORE_BASE + 14); // SLOPE_SEN
DupSprite(SPR_FLAT_GRASS_TILE + 18, SPR_SHORE_BASE + 15); // SLOPE_STEEP_E
/* XXX - SLOPE_EW, SLOPE_NS are currently not used.
* If they would be used somewhen, then these grass tiles will most like not look as needed */
DupSprite(SPR_FLAT_GRASS_TILE + 5, SPR_SHORE_BASE + 16); // SLOPE_EW
DupSprite(SPR_FLAT_GRASS_TILE + 10, SPR_SHORE_BASE + 17); // SLOPE_NS
}
}
/**
* Decide whether price base multipliers of grfs shall apply globally or only to the grf specifying them
*/
static void FinalisePriceBaseMultipliers()
{
extern const PriceBaseSpec _price_base_specs[];
/** Features, to which '_grf_id_overrides' applies. Currently vehicle features only. */
static const uint32 override_features = (1 << GSF_TRAINS) | (1 << GSF_ROADVEHICLES) | (1 << GSF_SHIPS) | (1 << GSF_AIRCRAFT);
/* Evaluate grf overrides */
int num_grfs = _grf_files.Length();
int *grf_overrides = AllocaM(int, num_grfs);
for (int i = 0; i < num_grfs; i++) {
grf_overrides[i] = -1;
GRFFile *source = _grf_files[i];
uint32 override = _grf_id_overrides[source->grfid];
if (override == 0) continue;
GRFFile *dest = GetFileByGRFID(override);
if (dest == NULL) continue;
grf_overrides[i] = _grf_files.FindIndex(dest);
assert(grf_overrides[i] >= 0);
}
/* Override features and price base multipliers of earlier loaded grfs */
for (int i = 0; i < num_grfs; i++) {
if (grf_overrides[i] < 0 || grf_overrides[i] >= i) continue;
GRFFile *source = _grf_files[i];
GRFFile *dest = _grf_files[grf_overrides[i]];
uint32 features = (source->grf_features | dest->grf_features) & override_features;
source->grf_features |= features;
dest->grf_features |= features;
for (Price p = PR_BEGIN; p < PR_END; p++) {
/* No price defined -> nothing to do */
if (!HasBit(features, _price_base_specs[p].grf_feature) || source->price_base_multipliers[p] == INVALID_PRICE_MODIFIER) continue;
DEBUG(grf, 3, "'%s' overrides price base multiplier %d of '%s'", source->filename, p, dest->filename);
dest->price_base_multipliers[p] = source->price_base_multipliers[p];
}
}
/* Propagate features and price base multipliers of afterwards loaded grfs, if none is present yet */
for (int i = num_grfs - 1; i >= 0; i--) {
if (grf_overrides[i] < 0 || grf_overrides[i] <= i) continue;
GRFFile *source = _grf_files[i];
GRFFile *dest = _grf_files[grf_overrides[i]];
uint32 features = (source->grf_features | dest->grf_features) & override_features;
source->grf_features |= features;
dest->grf_features |= features;
for (Price p = PR_BEGIN; p < PR_END; p++) {
/* Already a price defined -> nothing to do */
if (!HasBit(features, _price_base_specs[p].grf_feature) || dest->price_base_multipliers[p] != INVALID_PRICE_MODIFIER) continue;
DEBUG(grf, 3, "Price base multiplier %d from '%s' propagated to '%s'", p, source->filename, dest->filename);
dest->price_base_multipliers[p] = source->price_base_multipliers[p];
}
}
/* The 'master grf' now have the correct multipliers. Assign them to the 'addon grfs' to make everything consistent. */
for (int i = 0; i < num_grfs; i++) {
if (grf_overrides[i] < 0) continue;
GRFFile *source = _grf_files[i];
GRFFile *dest = _grf_files[grf_overrides[i]];
uint32 features = (source->grf_features | dest->grf_features) & override_features;
source->grf_features |= features;
dest->grf_features |= features;
for (Price p = PR_BEGIN; p < PR_END; p++) {
if (!HasBit(features, _price_base_specs[p].grf_feature)) continue;
if (source->price_base_multipliers[p] != dest->price_base_multipliers[p]) {
DEBUG(grf, 3, "Price base multiplier %d from '%s' propagated to '%s'", p, dest->filename, source->filename);
}
source->price_base_multipliers[p] = dest->price_base_multipliers[p];
}
}
/* Apply fallback prices for grf version < 8 */
const GRFFile * const *end = _grf_files.End();
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
if ((*file)->grf_version >= 8) continue;
PriceMultipliers &price_base_multipliers = (*file)->price_base_multipliers;
for (Price p = PR_BEGIN; p < PR_END; p++) {
Price fallback_price = _price_base_specs[p].fallback_price;
if (fallback_price != INVALID_PRICE && price_base_multipliers[p] == INVALID_PRICE_MODIFIER) {
/* No price multiplier has been set.
* So copy the multiplier from the fallback price, maybe a multiplier was set there. */
price_base_multipliers[p] = price_base_multipliers[fallback_price];
}
}
}
/* Decide local/global scope of price base multipliers */
for (GRFFile **file = _grf_files.Begin(); file != end; file++) {
PriceMultipliers &price_base_multipliers = (*file)->price_base_multipliers;
for (Price p = PR_BEGIN; p < PR_END; p++) {
if (price_base_multipliers[p] == INVALID_PRICE_MODIFIER) {
/* No multiplier was set; set it to a neutral value */
price_base_multipliers[p] = 0;
} else {
if (!HasBit((*file)->grf_features, _price_base_specs[p].grf_feature)) {
/* The grf does not define any objects of the feature,
* so it must be a difficulty setting. Apply it globally */
DEBUG(grf, 3, "'%s' sets global price base multiplier %d", (*file)->filename, p);
SetPriceBaseMultiplier(p, price_base_multipliers[p]);
price_base_multipliers[p] = 0;
} else {
DEBUG(grf, 3, "'%s' sets local price base multiplier %d", (*file)->filename, p);
}
}
}
}
}
void InitDepotWindowBlockSizes();
extern void InitGRFTownGeneratorNames();
/** Finish loading NewGRFs and execute needed post-processing */
static void AfterLoadGRFs()
{
for (StringIDToGRFIDMapping::iterator it = _string_to_grf_mapping.begin(); it != _string_to_grf_mapping.end(); it++) {
*((*it).first) = MapGRFStringID((*it).second, *((*it).first));
}
_string_to_grf_mapping.clear();
/* Free the action 6 override sprites. */
for (GRFLineToSpriteOverride::iterator it = _grf_line_to_action6_sprite_override.begin(); it != _grf_line_to_action6_sprite_override.end(); it++) {
free((*it).second);
}
_grf_line_to_action6_sprite_override.clear();
/* Polish cargoes */
FinaliseCargoArray();
/* Pre-calculate all refit masks after loading GRF files. */
CalculateRefitMasks();
/* Polish engines */
FinaliseEngineArray();
/* Set the actually used Canal properties */
FinaliseCanals();
/* Set the block size in the depot windows based on vehicle sprite sizes */
InitDepotWindowBlockSizes();
/* Add all new houses to the house array. */
FinaliseHouseArray();
/* Add all new industries to the industry array. */
FinaliseIndustriesArray();
/* Add all new objects to the object array. */
FinaliseObjectsArray();
InitializeSortedCargoSpecs();
/* Create dynamic list of cargo legends for smallmap_gui.cpp. */
BuildCargoTypesLegend();
/* Sort the list of industry types. */
SortIndustryTypes();
/* Create dynamic list of industry legends for smallmap_gui.cpp */
BuildIndustriesLegend();
/* Add all new airports to the airports array. */
FinaliseAirportsArray();
BindAirportSpecs();
/* Update the townname generators list */
InitGRFTownGeneratorNames();
/* Run all queued vehicle list order changes */
CommitVehicleListOrderChanges();
/* Load old shore sprites in new position, if they were replaced by ActionA */
ActivateOldShore();
/* Set up custom rail types */
InitRailTypes();
Engine *e;
FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) {
if (_gted[e->index].rv_max_speed != 0) {
/* Set RV maximum speed from the mph/0.8 unit value */
e->u.road.max_speed = _gted[e->index].rv_max_speed * 4;
}
}
FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) {
RailType railtype = GetRailTypeByLabel(_gted[e->index].railtypelabel);
if (railtype == INVALID_RAILTYPE) {
/* Rail type is not available, so disable this engine */
e->info.climates = 0;
} else {
e->u.rail.railtype = railtype;
}
}
SetYearEngineAgingStops();
FinalisePriceBaseMultipliers();
/* Deallocate temporary loading data */
free(_gted);
_grm_sprites.clear();
}
/**
* Load all the NewGRFs.
* @param load_index The offset for the first sprite to add.
* @param file_index The Fio index of the first NewGRF to load.
*/
void LoadNewGRF(uint load_index, uint file_index)
{
/* In case of networking we need to "sync" the start values
* so all NewGRFs are loaded equally. For this we use the
* start date of the game and we set the counters, etc. to
* 0 so they're the same too. */
Date date = _date;
Year year = _cur_year;
DateFract date_fract = _date_fract;
uint16 tick_counter = _tick_counter;
byte display_opt = _display_opt;
if (_networking) {
_cur_year = _settings_game.game_creation.starting_year;
_date = ConvertYMDToDate(_cur_year, 0, 1);
_date_fract = 0;
_tick_counter = 0;
_display_opt = 0;
}
InitializeGRFSpecial();
ResetNewGRFData();
/*
* Reset the status of all files, so we can 'retry' to load them.
* This is needed when one for example rearranges the NewGRFs in-game
* and a previously disabled NewGRF becomes useable. If it would not
* be reset, the NewGRF would remain disabled even though it should
* have been enabled.
*/
for (GRFConfig *c = _grfconfig; c != NULL; c = c->next) {
if (c->status != GCS_NOT_FOUND) c->status = GCS_UNKNOWN;
}
_cur.spriteid = load_index;
/* Load newgrf sprites
* in each loading stage, (try to) open each file specified in the config
* and load information from it. */
for (GrfLoadingStage stage = GLS_LABELSCAN; stage <= GLS_ACTIVATION; stage++) {
/* Set activated grfs back to will-be-activated between reservation- and activation-stage.
* This ensures that action7/9 conditions 0x06 - 0x0A work correctly. */
for (GRFConfig *c = _grfconfig; c != NULL; c = c->next) {
if (c->status == GCS_ACTIVATED) c->status = GCS_INITIALISED;
}
if (stage == GLS_RESERVE) {
static const uint32 overrides[][2] = {
{ 0x44442202, 0x44440111 }, // UKRS addons modifies UKRS
{ 0x6D620402, 0x6D620401 }, // DBSetXL ECS extension modifies DBSetXL
{ 0x4D656f20, 0x4D656F17 }, // LV4cut modifies LV4
};
for (size_t i = 0; i < lengthof(overrides); i++) {
SetNewGRFOverride(BSWAP32(overrides[i][0]), BSWAP32(overrides[i][1]));
}
}
uint slot = file_index;
_cur.stage = stage;
for (GRFConfig *c = _grfconfig; c != NULL; c = c->next) {
if (c->status == GCS_DISABLED || c->status == GCS_NOT_FOUND) continue;
if (stage > GLS_INIT && HasBit(c->flags, GCF_INIT_ONLY)) continue;
Subdirectory subdir = slot == file_index ? BASESET_DIR : NEWGRF_DIR;
if (!FioCheckFileExists(c->filename, subdir)) {
DEBUG(grf, 0, "NewGRF file is missing '%s'; disabling", c->filename);
c->status = GCS_NOT_FOUND;
continue;
}
if (stage == GLS_LABELSCAN) InitNewGRFFile(c);
LoadNewGRFFile(c, slot++, stage, subdir);
if (stage == GLS_RESERVE) {
SetBit(c->flags, GCF_RESERVED);
} else if (stage == GLS_ACTIVATION) {
ClrBit(c->flags, GCF_RESERVED);
assert(GetFileByGRFID(c->ident.grfid) == _cur.grffile);
ClearTemporaryNewGRFData(_cur.grffile);
BuildCargoTranslationMap();
DEBUG(sprite, 2, "LoadNewGRF: Currently %i sprites are loaded", _cur.spriteid);
} else if (stage == GLS_INIT && HasBit(c->flags, GCF_INIT_ONLY)) {
/* We're not going to activate this, so free whatever data we allocated */
ClearTemporaryNewGRFData(_cur.grffile);
}
}
}
/* Pseudo sprite processing is finished; free temporary stuff */
_cur.ClearDataForNextFile();
/* Call any functions that should be run after GRFs have been loaded. */
AfterLoadGRFs();
/* Now revert back to the original situation */
_cur_year = year;
_date = date;
_date_fract = date_fract;
_tick_counter = tick_counter;
_display_opt = display_opt;
}
/**
* Returns amount of user selected NewGRFs files.
*/
int CountSelectedGRFs(GRFConfig *grfconf)
{
int i = 0;
/* Find last entry in the list */
for (const GRFConfig *list = grfconf; list != NULL; list = list->next , i++) {
}
return i;
}
| gpl-2.0 |
OpenNos/OpenNos | OpenNos.GameObject/Packets/ClientPackets/RdPacket.cs | 525 | ๏ปฟ////<auto-generated <- Codemaid exclusion for now (PacketIndex Order is important for maintenance)
using OpenNos.Core;
using OpenNos.Domain;
namespace OpenNos.GameObject
{
[PacketHeader("rd")]
public class RdPacket : PacketDefinition
{
#region Properties
[PacketIndex(0)]
public short Type { get; set; }
[PacketIndex(1)]
public long CharacterId { get; set; }
[PacketIndex(2)]
public short? Parameter { get; set; }
#endregion
}
} | gpl-2.0 |
AlvaroVega/TIDNotifC | source/util/parser/TIDParser.C | 4173 | /*
* File name: TIDParser.C
* File type: Body file.
* Date : January 2006
* Author: David Alonso <[email protected]>
*/
/*
// (C) Copyright 2009 Telefonica Investigacion y Desarrollo
*
// S.A.Unipersonal (Telefonica I+D)
//
* by its owner.
*/
/*
* Revision historial:
* - 03/30/2006 by Alvaro Polo <[email protected]>
* * Static member TIDParser::gbl_lexpr_ptr must not be released.
* - 03/30/2006 by Alvaro Polo <[email protected]>
* * Useless extern symbol 'new_constraint()' eliminated.
* - 03/31/2006 by Alvaro Polo <[email protected]>
* * Exceptions must be throw without new operator.
* - 04/07/2006 by Alvaro Polo <[email protected]>
* * TIDParser::parse(...) will set gbl_lexpr_ptr to NULL
* before parsing begins.
* * Static member name 'gbl_lexpr_ptr' changed to 'tmp_constraint'.
* * New static member 'tmp_nodes' to store temporally created nodes
* to be released in case of syntax errors.
* * New function members 'new_tmp_node(EvaluableNode*)',
* 'clear_tmp_nodes()' and 'free_tmp_nodes()' to manage 'tmp_nodes'.
* - 04/10/2006 by Alvaro Polo <[email protected]>
* * In 'TIDParser::free_tmp_node_stack()', each node delete must
* be reported to debugger.
*/
#include "TIDParser.h"
#include "parser.h"
#include "Debugger.h"
extern void yy_scan_string(const char *);
extern int yyparse();
namespace TIDNotif {
namespace util
{
namespace parser
{
ParsingErrorException::ParsingErrorException(const string & msg)
{
add_error(msg);
}
void
ParsingErrorException::add_error(const string & msg)
{
m_errors.push_back(msg);
}
string
ParsingErrorException::print_to_string() const
{
string buff;
list<string>::const_iterator it;
for (it = m_errors.begin(); it != m_errors.end(); it++)
{
buff.append(*it);
buff.append("\n");
}
return buff;
}
const ParsingErrorException &
ParsingErrorException::operator >> (iostream & stream) const
{
stream << print_to_string();
return *this;
}
const int TIDParser::ERROR = 1;
const int TIDParser::USER = 2;
const int TIDParser::DEBUG = 3;
const int TIDParser::DEEP_DEBUG = 4;
// Id de la gramatica utilizada
const char * TIDParser::_CONSTRAINT_GRAMMAR = "EXTENDED_TCL";
// int max value = 2147483647
const int TIDParser::_MAX_CONSTRAINT_ID = 999999;
const char * TIDParser::Title = "ConstraintGrammar Parser Version 1.0";
int TIDParser::_constraintId = 0;
char * TIDParser::default_constraint = "TRUE";
TIDConstraint * TIDParser::tmp_constraint = NULL;
TIDParser::NodePtrStack TIDParser::tmp_node_stack;
//extern YY_BUFFER_STATE yy_scan_string(yyconst char *yy_str);
TIDConstraint *
TIDParser::parse(string new_constraint)
{ //TODO_MORFEO: synchronized
//TP_PARSE[1] = new_constraint; //TODO_MORFEO: Trace
//print(DEBUG, TP_PARSE); //TODO_MORFEO: Trace
TIDParser::tmp_constraint = NULL; /* Reset constraint store. */
yy_scan_string(new_constraint.c_str());
if (yyparse())
throw ParsingErrorException("parsing error");
return TIDParser::tmp_constraint;
}
void TIDParser::push_tmp_node(EvaluableNode * node)
{
TIDParser::tmp_node_stack.push(node);
}
void TIDParser::pop_tmp_node()
{
TIDParser::tmp_node_stack.pop();
}
void TIDParser::clear_tmp_node_stack()
{
while (!TIDParser::tmp_node_stack.empty())
TIDParser::pop_tmp_node();
}
void TIDParser::free_tmp_node_stack()
{
EvaluableNode * node;
while (!TIDParser::tmp_node_stack.empty())
{
node = TIDParser::tmp_node_stack.top();
Debugger::register_free(node);
delete node;
TIDParser::tmp_node_stack.pop();
}
}
int TIDParser::newConstraintId()
{
return (++_constraintId % _MAX_CONSTRAINT_ID);
}
}; //namespace parser
}; //namespace util
}; //namespace TIDNotif
| gpl-2.0 |
egiggy/githubericgiguere | wp-content/themes/Academy/footer.php | 3002 |
<div class="clearfix"><!----></div>
</div><!--/container_12 -->
<div class="container_12 footwidgets-spot">
<?php if ( is_category() || is_single() || is_day() || is_month() || is_year() || is_tag() && ( function_exists('dynamic_sidebar') && (is_sidebar_active(2) || is_sidebar_active(3) || is_sidebar_active(4)) ) ) { // Don't show on the front page ?>
<!-- Bottom Blog Widgets: START -->
<div id="footwidgets-blog">
<div class="widget-spot grid_4_a">
<?php dynamic_sidebar(2); ?>
</div>
<div class="widget-spot grid_4_a">
<?php dynamic_sidebar(3); ?>
</div>
<div class="widget-spot grid_4_a last">
<?php dynamic_sidebar(4); ?>
</div>
</div><!--/footwidgets-front -->
<!-- Bottom Blog Widgets: END -->
<?php } elseif ( function_exists('dynamic_sidebar') && (is_sidebar_active(5) || is_sidebar_active(6) || is_sidebar_active(7)) ) { // Show on the front page ?>
<!-- Bottom Front Widgets: START -->
<div id="footwidgets-front">
<div class="widget-spot grid_4_a">
<?php dynamic_sidebar(5); ?>
</div>
<div class="widget-spot grid_4_a">
<?php dynamic_sidebar(6); ?>
</div>
<div class="widget-spot grid_4_a last">
<?php dynamic_sidebar(7); ?>
</div>
</div><!--/footwidgets-front -->
<!-- Bottom Front Widgets: END -->
<?php } ?>
<div class="clearfix"><!----></div>
</div><!--/container_12 -->
<div class="container_12">
<!-- Footer: START -->
<div id="footer" >
<div class="copyright">
<p class="fl">© <?php the_time('Y'); ?> <?php bloginfo(); ?> <br/>
<span class="designby" > Powered by </span> <span class="templatic"> <a href="http://templatic.com" title="http://templatic.com">http://templatic.com</a> </span> </p>
<div class="fr">
<?php if ( get_option('bizzthemes_footpages') <> "" ) { ?>
<?php wp_list_pages('title_li=&depth=0&include=' . get_option('bizzthemes_footpages') .'&sort_column=menu_order'); ?>
<?php } ?>
</div>
<div class="clearfix"></div>
</div><!--/copyright -->
</div><!--/footer -->
<!-- Footer: END -->
<?php wp_footer(); ?>
<script type="text/javascript" >
/* <![CDATA[ */
sfHover = function() {
//alert('hai');
var sfEls = document.getElementById("pagenav").getElementsByTagName("li");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
/* ]]> */
</script>
<?php if ( get_option('bizzthemes_google_analytics') <> "" ) { echo stripslashes(get_option('bizzthemes_google_analytics')); } ?>
</div><!--/container_12 -->
</body>
</html>
| gpl-2.0 |
opennms-forge/poc-nms-core | opennms-dao-mock/src/main/java/org/opennms/netmgt/dao/mock/UnimplementedIpInterfaceDao.java | 4316 | package org.opennms.netmgt.dao.mock;
import java.net.InetAddress;
import java.util.List;
import java.util.Map;
import org.opennms.core.criteria.Criteria;
import org.opennms.netmgt.dao.api.IpInterfaceDao;
import org.opennms.netmgt.model.OnmsCriteria;
import org.opennms.netmgt.model.OnmsIpInterface;
import org.opennms.netmgt.model.OnmsNode;
public abstract class UnimplementedIpInterfaceDao implements IpInterfaceDao {
@Override
public List<OnmsIpInterface> findMatching(OnmsCriteria criteria) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public int countMatching(OnmsCriteria onmsCrit) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public void lock() {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public void initialize(Object obj) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public void flush() {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public void clear() {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public int countAll() {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public void delete(OnmsIpInterface entity) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public void delete(Integer key) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public List<OnmsIpInterface> findAll() {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public List<OnmsIpInterface> findMatching(Criteria criteria) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public int countMatching(Criteria onmsCrit) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public OnmsIpInterface get(Integer id) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public OnmsIpInterface load(Integer id) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public void save(OnmsIpInterface entity) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public void saveOrUpdate(OnmsIpInterface entity) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public void update(OnmsIpInterface entity) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public OnmsIpInterface get(OnmsNode node, String ipAddress) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public OnmsIpInterface findByNodeIdAndIpAddress(Integer nodeId, String ipAddress) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public OnmsIpInterface findByForeignKeyAndIpAddress(String foreignSource, String foreignId, String ipAddress) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public List<OnmsIpInterface> findByIpAddress(String ipAddress) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public List<OnmsIpInterface> findByNodeId(Integer nodeId) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public List<OnmsIpInterface> findByServiceType(String svcName) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public List<OnmsIpInterface> findHierarchyByServiceType(String svcName) {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public Map<InetAddress, Integer> getInterfacesForNodes() {
throw new UnsupportedOperationException("Not yet implemented!");
}
@Override
public OnmsIpInterface findPrimaryInterfaceByNodeId(Integer nodeId) {
throw new UnsupportedOperationException("Not yet implemented!");
}
}
| gpl-2.0 |
Izeut/vertigo | wp-content/plugins/hello.php | 2260 | <?php
/**
* @package Hello_Dolly
* @version 1.6
*/
/*
Plugin Name: Hello Dolly
Plugin URI: http://wordpress.org/plugins/hello-dolly/
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
Author: Matt Mullenweg test
Version: 1.6
Author URI: http://ma.tt/
*/
function hello_dolly_get_lyric() {
/** These are the lyrics to Hello Dolly */
$lyrics = "Hello, Dolly
Well, hello, Dolly
It's so nice to have you back where you belong
You're lookin' swell, Dolly
I can tell, Dolly
You're still glowin', you're still crowin'
You're still goin' strong
We feel the room swayin'
While the band's playin'
One of your old favourite songs from way back when
So, take her wrap, fellas
Find her an empty lap, fellas
Dolly'll never go away again
Hello, Dolly
Well, hello, Dolly
It's so nice to have you back where you belong
You're lookin' swell, Dolly
I can tell, Dolly
You're still glowin', you're still crowin'
You're still goin' strong
We feel the room swayin'
While the band's playin'
One of your old favourite songs from way back when
Golly, gee, fellas
Find her a vacant knee, fellas
Dolly'll never go away
Dolly'll never go away
Dolly'll never go away again";
// Here we split it into lines
$lyrics = explode( "\n", $lyrics );
// And then randomly choose a line
return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );
}
// This just echoes the chosen line, we'll position it later
function hello_dolly() {
$chosen = hello_dolly_get_lyric();
echo "<p id='dolly'>$chosen</p>";
}
// Now we set that function up to execute when the admin_notices action is called
add_action( 'admin_notices', 'hello_dolly' );
// We need some CSS to position the paragraph
function dolly_css() {
// This makes sure that the positioning is also good for right-to-left languages
$x = is_rtl() ? 'left' : 'right';
echo "
<style type='text/css'>
#dolly {
float: $x;
padding-$x: 15px;
padding-top: 5px;
margin: 0;
font-size: 11px;
}
</style>
";
}
add_action( 'admin_head', 'dolly_css' );
?>
| gpl-2.0 |
bmacenbacher/multison | components/com_roksprocket/lib/RokSprocket/Provider/Posttype/AccessPopulator.php | 722 | <?php
/**
* @version $Id: AccessPopulator.php 10887 2013-05-30 06:31:57Z btowles $
* @author RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2017 RocketTheme, LLC
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*/
class RokSprocket_Provider_Posttype_AccessPopulator implements RokCommon_Filter_IPicklistPopulator
{
/**
*
* @return array;
*/
public function getPicklistOptions()
{
$editable_roles = get_editable_roles();
foreach ( $editable_roles as $role => $details ) {
$name = translate_user_role($details['name'] );
$options[esc_attr($role)] = $name;
}
return $options;
}
}
| gpl-2.0 |
concord-consortium/mw | src/org/concord/modeler/g2d/AxisLabel.java | 1853 | /*
* Copyright (C) 2006 The Concord Consortium, Inc.,
* 25 Love Lane, Concord, MA 01742
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* END LICENSE */
package org.concord.modeler.g2d;
import java.awt.Color;
import java.awt.Font;
import java.io.Serializable;
/**
* This class defines a serializable label for axis.
*
* @author Qian Xie
*/
public class AxisLabel implements Serializable {
private String text;
private Color color;
private Font font;
public AxisLabel() {
text = "Label";
color = Color.black;
font = new Font("Times Roman", Font.PLAIN, 9);
}
public AxisLabel(String text) {
this.text = text;
color = Color.black;
font = new Font("Times Roman", Font.PLAIN, 9);
}
public AxisLabel(String text, Color color, Font font) {
this.text = text;
this.color = color;
this.font = font;
}
public void setText(String text) {
this.text = text;
}
public String getText() {
return text;
}
public void setColor(Color color) {
this.color = color;
}
public Color getColor() {
return color;
}
public void setFont(Font font) {
this.font = font;
}
public Font getFont() {
return font;
}
}
| gpl-2.0 |
reginas/callan-consulting | wp-content/themes/interakt-parent/js/reservation_frontend.js | 9759 | var _theme_index=tf_script.TF_THEME_PREFIX;
var dates = [];
var picker_in=false;
var picker_out = false;
var _form;
var _captcha_arr = [];
jQuery(document).ready(function(){
repeat = ['Do not repeat','Every week','Every month','Every year'];
to_replace = [' to ',' Repeat '];
var $=jQuery;
$('.reservationForm').each(function(){
if($(this).find('.tfuse_captcha_input').length > 0)
_captcha_arr.push($(this).find('#this_form_id').val());
});
$('.reservationForm .btn-submit2').click(function(){
_form = $(this).closest('form');
})
$.ajax({
url:'',
type:'POST',
dataType:'json',
data:{tf_form_id:$('#this_form_id').val(), tf_action:'get_excluded_dates', action:'tfuse_ajax_reservationform'},
async:false,
success:function (response, textStatus, XMLHttpRequest) {
for(i in response){
response[i] = response[i].replace(' to ','&');
response[i] = response[i].replace(' | Repeat ','&');
response[i] = response[i].replace(' | ','&');
response[i] = response[i].replace('From ','');
for(l in repeat)
response[i] = response[i].replace(repeat[l],l);
dates[i]=response[i].split('&');
if(dates[i].length < 3){
temp = dates[i][1];
dates[i][1] = dates[i][0];
dates[i][2] = temp;
}
row=dates[i];
for(j in row){
if(j<2){
data = row[j].split('-');
dates[i][j] = new Date(data[0],data[1]-1,data[2]);
}
}
}
},
error:function (jqXHR, textStatus, errorThrown) {
}
});
$('.tfuse_rf_post_datepicker_in').datepicker({
minDate: new Date(),
dateFormat:"yy-mm-dd",
altField:$('#tfuse_rf_post_datepicker_in_input'),
onSelect:function(date,inst){
picker_in = date;
$('.tfuse_rf_post_datepicker_out').datepicker('refresh');
},
beforeShowDay:day_statuses,
beforeShow: function(input, inst)
{
inst.dpDiv.css({marginTop: -input.offsetHeight+39 + 'px'});
}
});
$('.tfuse_rf_post_datepicker_out').datepicker({
minDate: new Date(),
dateFormat:"yy-mm-dd",
altField:$('#tfuse_rf_post_datepicker_out_input'),
onSelect:function(date,inst){
picker_out = date;
$('.tfuse_rf_post_datepicker_in').datepicker('refresh');
},
beforeShowDay:day_statuses,
beforeShow: function(input, inst)
{
inst.dpDiv.css({marginTop: -input.offsetHeight+39 + 'px'});
}
});
$('.tfuse_captcha_reload').live('click', function (event) {
_form = $(this).closest('form');
_captcha = _form.find('.tfuse_captcha_img');
_captcha_src = _captcha.attr('src');
_url = _captcha_src.split('&');
_r=_url[_url.length-1].split('=');
if(_r[0]=='time')
_url.pop(_url[_url.length-1]);
_url=_url.join('&');
_captcha.attr('src', _url + '&time=' + event.timeStamp);
});
$('.reservationForm').each(function(){
var _id = $(this).find('#this_form_id').val();
$(this).ajaxForm({
dataType:'json',
data:{action:'tfuse_ajax_reservationform',tf_action:'submitFrontendForm',form_id:_id},
beforeSubmit:check_fields,
success:function(responseText, statusText, xhr){
if(responseText.error){
showErrorMessage(responseText.mess);
} else {
showSuccessMessage(responseText.mess);
}
}
});
});
});
function showErrorMessage(textMessage){
var $=jQuery;
_message= _form.closest('.add-comment').find('#form_messages').html('<h2>'+textMessage+'</h2>').addClass('error_submiting_form').show();
_form.hide();
}
function day_statuses(date){
var $=jQuery;
if($(this).hasClass('tfuse_rf_post_datepicker_out') && picker_in !==false){
date_from = picker_in.split('-');
date_from = new Date(date_from[0], date_from[1] - 1, date_from[2]);
if(date < date_from) return [false]
} else if($(this).hasClass('tfuse_rf_post_datepicker_in') && picker_out !==false){
date_to = picker_out.split('-');
date_to = new Date(date_to[0], date_to[1] - 1, date_to[2]);
if(date > date_to) return [false]
}
for(i in dates){
if(dates[i][2] == 0)
if(date >= dates[i][0] && date <= dates[i][1]) return [false,'']
if(dates[i][2] == 1){
if(dates[i][0].getDay() > dates[i][1].getDay()){
if(date.getDay() >= dates[i][0].getDay() && date.getDay() <= 7) return [false,'']
if(date.getDay() >= 0 && date.getDay() <= dates[i][1].getDay()) return [false,'']
} else
if(date.getDay() >= dates[i][0].getDay() && date.getDay() <= dates[i][1].getDay()) return [false,'']
}
if(dates[i][2] == 2)
if(date.getDate() >= dates[i][0].getDate() && date.getDate() <= dates[i][1].getDate() ) return [false,'']
if(dates[i][2] == 3)
if(date.getDate() >= dates[i][0].getDate() && date.getDate() <= dates[i][1].getDate() && date.getMonth() <= dates[i][1].getMonth() && date.getMonth() >= dates[i][0].getMonth()) return [false,''];
}
return [true,''];
}
function showSuccessMessage(textMessage){
var $=jQuery;
_message= _form.closest('.add-comment').find('#form_messages').html('<h2>'+textMessage+'</h2>').addClass('success_submited_form').show();
_form.hide();
}
function check_fields() {
var $=jQuery;
_captcha = _form.find('.tfuse_captcha_img');
_captcha_resp = true;
if($.inArray(_form.find('#this_form_id').val(),_captcha_arr) != -1) {
if(_captcha.length == 0) _captcha_resp = false;}
if (_captcha.length > 0) {
_captcha_src = _captcha.attr('src');
_url = _captcha_src.split('?');
_ww = _url[0].substring(0, _url[0].lastIndexOf('/'));
_captcha_input = _form.find('.tfuse_captcha_input');
$.ajax({
url:_ww + '/check_captcha.php',
dataType:'json',
type:'POST',
async:false,
data : {form_id:_captcha_input.attr('name'),captcha:_captcha_input.val()},
success:function (response, textStatus, XMLHttpRequest) {
if (!response) {
_captcha_input.css('border', '1px solid red');
_captcha_resp = false;
}
else _captcha_input.css('borderColor', '#ccc');
}
});
}
_return_val = true;
_required_inputs = _form.find('.tf_rf_required_input');
_required_inputs.each(function () {
if(jQuery(this).hasClass('hasDatepicker') && !jQuery(this).parent().is(':visible')){
if(jQuery.trim(jQuery(this).val()) == ''){
jQuery(this).val(new Date());
}
}
if(jQuery(this).attr('type')=='checkbox'){
if(!jQuery(this).is(':checked')){
jQuery(this).next('label').css('color', 'red');
} else {
jQuery(this).next('label').css('color','#12A0A9');
}
} else {
if (jQuery.trim(jQuery(this).val()) == '') {
_return_val = false;
jQuery(this).css('border', '1px solid red');
} else {
jQuery(this).css('borderColor', '#ccc');
}
}
});
if (_form.find('.'+_theme_index + '_email').length>0) {
var pattern = new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);
_form.find('.'+_theme_index + '_email').each(function(){
if(!pattern.test(jQuery(this).val())){
_return_val = false;
jQuery(this).css('border', '1px solid red');
} else {
jQuery(this).css('borderColor', '#ccc');
}
});
}
if( _captcha_resp && _return_val )
{
_form.find('#send_reservation').hide();
_form.closest('.add-comment').find('#header_message').hide();
_form.find('#sending,#sending_img').css('display','inline-block');
}
return _captcha_resp &&_return_val;
}
function resetFields(obj,evt){
evt.preventDefault();
_form = jQuery(obj).closest('form');
_form.get(0).reset();
return false;
} | gpl-2.0 |
gnuboard/gnuboard4 | cheditor5/popup/js/flash.js | 2536 | // ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var button = [
{ alt : "", img : 'play.gif', cmd : doPlay },
{ alt : "", img : 'submit.gif', cmd : doSubmit },
{ alt : "", img : 'cancel.gif', cmd : popupClose }
];
var oEditor = null;
function init(dialog) {
oEditor = this;
oEditor.dialog = dialog;
var dlg = new Dialog(oEditor);
dlg.showButton(button);
dlg.setDialogHeight();
}
function doPlay()
{
var elem = oEditor.trimSpace(document.getElementById("fm_embed").value);
var embed = null;
var div = document.createElement('DIV');
var pos = elem.toLowerCase().indexOf("embed");
if (pos != -1) {
var str = elem.substr(pos);
pos = str.indexOf(">");
div.innerHTML = "<" + str.substr(0, pos) + ">";
embed = div.firstChild;
}
else {
div.innerHTML = elem;
var object = div.getElementsByTagName('OBJECT')[0];
if (object && object.hasChildNodes()) {
var child = object.firstChild;
var movieHeight, movieWidth;
movieWidth = (isNaN(object.width) != true) ? object.width : 320;
movieHeight = (isNaN(object.height)!= true) ? object.height: 240;
var params = new Array();
do {
if ((child.nodeName == 'PARAM') && (typeof child.name != 'undefined') && (typeof child.value != 'undefined'))
{
params.push({key: (child.name == 'movie') ? 'src' : child.name, val: child.value});
}
child = child.nextSibling;
}
while (child);
if (params.length > 0) {
embed = document.createElement('embed');
embed.setAttribute("width", movieWidth);
embed.setAttribute("height", movieHeight);
for (var i=0; i<params.length; i++)
embed.setAttribute(params[i].key, params[i].val);
embed.setAttribute("type", "application/x-shockwave-flash");
}
}
}
if (embed != null) {
document.getElementById('fm_player').appendChild(embed);
}
}
function doSubmit()
{
var source = '' + oEditor.trimSpace(document.getElementById("fm_embed").value);
if (source != '') {
oEditor.insertFlash(source);
}
document.getElementById('fm_player').innerHTML = '';
popupClose();
}
function popupClose() {
document.getElementById('fm_player').innerHTML = '';
oEditor.popupWinClose();
} | gpl-2.0 |
kalyanbhave/backoffice | messages/Messages.cs | 7496 | ๏ปฟ//====================================================================
// Credit Card Encryption/Decryption Tool
//
// Copyright (c) 2009-2015 Egencia. All rights reserved.
// This software was developed by Egencia An Expedia Inc. Corporation
// La Defense. Paris. France
// The Original Code is Egencia
// The Initial Developer is Samatar Hassan.
//
//===================================================================
using System;
using System.Text;
using System.IO;
using System.Collections.Generic;
using System.Resources;
using System.Web;
using SafeNetWS.utils;
using SafeNetWS.exception;
namespace SafeNetWS.messages
{
/// <summary>
/// Cette classe permet de charger les entrรฉes
/// de traduction
/// </summary>
public class Messages
{
private string Lang;
private Dictionary<string, string> dictionary;
public Messages(string lang)
{
SetLang(lang);
//Initialisation du tableau qui va contenir
// les entrรฉes clรฉ/valeur correspondant aux valeurs tranduites
this.dictionary = new Dictionary<string, string>();
InitResourceFile();
}
/// <summary>
/// Chargement du fichier correspond ร la bonne langue
/// sรฉlectionnรฉ par le client
/// </summary>
protected void InitResourceFile()
{
// On rรฉcupรจre la langue que le client souhaite
string mylang = Util.CorrectLang(GetLang());
// On pointe vers le bon fichier de traduction
string fileName=HttpContext.Current.Server.MapPath(String.Format("messages/messages_{0}.properties", mylang));
if (!Util.FileExists(fileName))
{
// le fichier pour la local est introuvable
// On va passer en anglais (language de rรฉfรฉrence)
SetLang(Const.LangEN);
fileName = HttpContext.Current.Server.MapPath("messages/messages_en_US.properties");
}
// On lit le fichier properties et on charge
// les entrรฉes pour la locale dรฉsirรฉe
foreach (string line in File.ReadAllLines(fileName, Encoding.Default))
{
if ((!string.IsNullOrEmpty(line)) && (!line.StartsWith(";")) && (!line.StartsWith("#")) && (!line.StartsWith("'")) && (line.Contains("=")))
{
int index = line.IndexOf('=');
string key = line.Substring(0, index).Trim();
string value = line.Substring(index + 1).Trim();
if ((value.StartsWith("\"") && value.EndsWith("\"")) || (value.StartsWith("'") && value.EndsWith("'")))
{
value = value.Substring(1, value.Length - 2);
}
dictionary.Add(key, value);
}
}
}
public string GetString(string resKey, bool exception)
{
if (exception)
{
return CCEExceptionUtil.GetEnhancedMessage(resKey, dictionary[resKey], dictionary[resKey]);
}
else
{
return dictionary[resKey];
}
}
public string GetString(string resKey, string arg, bool exception)
{
if (exception)
{
return CCEExceptionUtil.GetEnhancedMessage(resKey, arg, String.Format(dictionary[resKey], new String[] { arg }));
}
else
{
return String.Format(dictionary[resKey], new String[] { arg });
}
}
public string GetString(string resKey, int arg, bool exception)
{
return GetString(resKey, arg.ToString(), exception);
}
public string GetString(string resKey, string arg1, string arg2, bool exception)
{
if (exception)
{
return CCEExceptionUtil.GetEnhancedMessage(resKey, arg2, String.Format(dictionary[resKey], new String[] { arg1, arg2 }));
}
else
{
return String.Format(dictionary[resKey], new String[] { arg1, arg2 });
}
}
public string GetString(string resKey, string arg1, string arg2, string arg3, bool exception)
{
if (exception)
{
return CCEExceptionUtil.GetEnhancedMessage(resKey, arg3, String.Format(dictionary[resKey], new String[] { arg1, arg2, arg3 }));
}
else
{
return String.Format(dictionary[resKey], new String[] { arg1, arg2, arg3});
}
}
public string GetString(string resKey, long arg1, string arg2, string arg3, bool exception)
{
return GetString(resKey, arg1.ToString(), arg2, arg3, exception);
}
public string GetString(string resKey, long arg1, string arg2, string arg3, string arg4, bool exception)
{
return GetString(resKey, arg1.ToString(), arg2, arg3, arg4, exception);
}
public string GetString(string resKey, string arg1, string arg2, string arg3, string arg4, Boolean exception)
{
if (exception)
{
return CCEExceptionUtil.GetEnhancedMessage(resKey, arg4, String.Format(dictionary[resKey], new String[] { arg1, arg2, arg3, arg4 }));
}
else
{
return String.Format(dictionary[resKey], new String[] { arg1, arg2, arg3, arg4 });
}
}
public string GetString(string resKey, string arg1, string arg2, string arg3, string arg4, string arg5, bool exception)
{
if (exception)
{
return CCEExceptionUtil.GetEnhancedMessage(resKey, arg5, String.Format(dictionary[resKey], new String[] { arg1, arg2, arg3, arg4, arg5 }));
}
else
{
return String.Format(dictionary[resKey], new String[] { arg1, arg2, arg3, arg4, arg5 });
}
}
public string GetString(string resKey, string arg1, int arg2, bool exception)
{
return GetString(resKey, arg1, arg2.ToString(), exception);
}
public string GetString(string resKey, long arg1, string arg2, Exception arg3, bool exception)
{
return GetString(resKey, arg1.ToString(), arg2, arg3.Message, exception);
}
public string GetString(string resKey, string arg1, string arg2, Exception arg3, bool exception)
{
return GetString(resKey, arg1, arg2, arg3.Message, exception);
}
public string GetString(string resKey, long arg1, string arg2, bool exception)
{
return GetString(resKey, arg1.ToString(), arg2, exception);
}
public string GetString(string resKey, long arg, bool exception)
{
return GetString(resKey, arg.ToString(), exception);
}
/// <summary>
/// Retour de la langue
/// </summary>
/// <returns>Langue</returns>
public string GetLang()
{
return this.Lang;
}
/// <summary>
/// Affectation de la langue
/// </summary>
/// <param name="lang">Langue</param>
public void SetLang(string lang)
{
this.Lang = lang;
}
}
}
| gpl-2.0 |
tecknicaltom/tide | analyser/le_analy.cc | 14005 | /*
* HT Editor
* le_analy.cc
*
* Copyright (C) 1999-2002 Sebastian Biallas ([email protected])
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "analy.h"
#include "analy_alpha.h"
#include "analy_names.h"
#include "analy_register.h"
#include "analy_x86.h"
#include "htanaly.h" // FIXME: for ht_aviewer, to call gotoAddress(entrypoint)
#include "le_analy.h"
#include "htctrl.h"
#include "htdebug.h"
#include "endianess.h"
#include "htiobox.h"
#include "htle.h"
#include "strtools.h"
#include "nestruct.h"
#include "snprintf.h"
#include "x86asm.h"
/*
*
*/
void LEAnalyser::init(ht_le_shared_data *LE_shared, File *File)
{
le_shared = LE_shared;
file = File;
validarea = new Area();
validarea->init();
Analyser::init();
/////////////
setLocationTreeOptimizeThreshold(100);
setSymbolTreeOptimizeThreshold(100);
}
/*
*
*/
void LEAnalyser::load(ObjectStream &f)
{
/*
ht_pe_shared_data *pe_shared;
ht_stream *file;
area *validarea;
*/
GET_OBJECT(f, validarea);
Analyser::load(f);
}
/*
*
*/
void LEAnalyser::done()
{
validarea->done();
delete validarea;
Analyser::done();
}
/*
*
*/
void LEAnalyser::beginAnalysis()
{
// char buffer[1024];
/*
* entrypoint
*/
LEAddress a;
Address *control = NULL;
Address *v86control = NULL;
Address *pmcontrol = NULL;
if (le_shared->is_vxd) {
LEAddress addr;
int temp;
addr = le_shared->vxd_desc.v86_ctrl_ofs;
if (LE_addr_to_segment(le_shared, addr, &temp)) {
a = LE_MAKE_ADDR(le_shared, LE_ADDR_SEG(le_shared, addr),
LE_ADDR_OFS(le_shared, addr));
v86control = createAddressFlat32(a);
le_shared->best_entrypoint = a;
}
addr = le_shared->vxd_desc.pm_ctrl_ofs;
if (LE_addr_to_segment(le_shared, addr, &temp)) {
a = LE_MAKE_ADDR(le_shared, LE_ADDR_SEG(le_shared, addr),
LE_ADDR_OFS(le_shared, addr));
pmcontrol = createAddressFlat32(a);
le_shared->best_entrypoint = a;
}
addr = le_shared->vxd_desc.ctrl_ofs;
if (LE_addr_to_segment(le_shared, addr, &temp)) {
a = LE_MAKE_ADDR(le_shared, LE_ADDR_SEG(le_shared, addr),
LE_ADDR_OFS(le_shared, addr));
control = createAddressFlat32(a);
le_shared->best_entrypoint = a;
}
}
Address *entry = NULL;
if (le_shared->hdr.startobj != 0) {
a = LE_MAKE_ADDR(le_shared, le_shared->hdr.startobj-1, le_shared->hdr.eip);
le_shared->best_entrypoint = a;
entry = createAddressFlat32(a);
}
if (v86control) pushAddress(v86control, v86control);
if (pmcontrol) pushAddress(pmcontrol, pmcontrol);
if (control) pushAddress(control, control);
if (entry) pushAddress(entry, entry);
/*
* give all sections a descriptive comment:
*/
LE_OBJECT *s = le_shared->objmap.header;
char blub[100];
for (uint i = 0; i < le_shared->objmap.count; i++) {
LEAddress la = LE_get_seg_addr(le_shared, i);
Address *secaddr = createAddressFlat32(la);
// uint psize = LE_get_seg_psize(le_shared, i);
uint vsize = LE_get_seg_vsize(le_shared, i);
sprintf(blub, "; section %d <%s> USE%d", i+1, getSegmentNameByAddress(secaddr), (le_shared->objmap.header[i].flags & LE_OBJECT_FLAG_USE32) ? 32 : 16);
addComment(secaddr, 0, "");
addComment(secaddr, 0, ";******************************************************************");
addComment(secaddr, 0, blub);
sprintf(blub, "; virtual address %08x virtual size %08x", LE_get_seg_addr(le_shared, i), vsize);
addComment(secaddr, 0, blub);
/* sprintf(blub, "; file offset %08x file size %08x", psize);
addComment(secaddr, 0, blub);*/
addComment(secaddr, 0, ";******************************************************************");
// mark end of sections
sprintf(blub, "; end of section <%s>", getSegmentNameByAddress(secaddr));
Address *secend_addr = secaddr->clone();
secend_addr->add(vsize);
newLocation(secend_addr)->flags |= AF_FUNCTION_END;
addComment(secend_addr, 0, "");
addComment(secend_addr, 0, ";******************************************************************");
addComment(secend_addr, 0, blub);
addComment(secend_addr, 0, ";******************************************************************");
validarea->add(secaddr, secend_addr);
Address *seciniaddr = secaddr->clone();
seciniaddr->add(vsize-1);
if (validAddress(secaddr, scinitialized) && validAddress(seciniaddr, scinitialized)) {
initialized->add(secaddr, seciniaddr);
}
delete secaddr;
delete secend_addr;
delete seciniaddr;
s++;
}
// entrypoints
/*
int entrypoint_count = le_shared->entrypoints->count();
int *entropy = random_permutation(entrypoint_count);
for (int i=0; i<entrypoint_count; i++) {
ht_ne_entrypoint *f = (ht_ne_entrypoint*)le_shared->entrypoints->get(*(entropy+i));
if (f) {
Address *address = createAddress1616(f->seg, f->offset);
if (validAddress(address, scvalid)) {
char *label;
if (f->name) {
sprintf(buffer, "; exported function %s, ordinal %04x", f->name, f->ordinal);
} else {
sprintf(buffer, "; unnamed exported function, ordinal %04x", f->ordinal);
}
label = export_func_name(f->name, f->ordinal);
addComment(address, 0, "");
addComment(address, 0, ";********************************************************");
addComment(address, 0, buffer);
addComment(address, 0, ";********************************************************");
pushAddress(address, address);
assignSymbol(address, label, label_func);
free(label);
}
delete address;
}
}
if (entropy) free(entropy);
*/
// imports
/*
if (le_shared->imports) {
ht_tree *t = le_shared->imports;
Object *v;
ne_import_rec *imp = NULL;
FileOfs h = le_shared->hdr_ofs + le_shared->hdr.imptab;
while ((imp = (ne_import_rec*)t->enum_next(&v, imp))) {
char *name = NULL;
char *mod = (imp->module-1 < le_shared->modnames_count) ? le_shared->modnames[imp->module-1] : (char*)"invalid!";
if (imp->byname) {
file->seek(h+imp->name_ofs);
name = getstrp(file);
}
char *label = import_func_name(mod, name, imp->byname ? 0 : imp->ord);
if (name) free(name);
Address *addr = createAddress1616(le_shared->fake_segment+1, imp->addr);
addComment(addr, 0, "");
assignSymbol(addr, label, label_func);
data->setIntAddressType(addr, dst_ibyte, 1);
free(label);
delete addr;
}
}
*/
/* virtual Object *enum_next(ht_data **value, Object *prevkey);
int import_count = le_shared->imports.funcs->count();
for (int i=0; i<import_count; i++) {
ht_pe_import_function *f=(ht_pe_import_function *)pe_shared->imports.funcs->get(*(entropy+i));
ht_pe_import_library *d=(ht_pe_import_library *)pe_shared->imports.libs->get(f->libidx);
char *label;
label = import_func_name(d->name, (f->byname) ? f->name.name : NULL, f->ordinal);
addComment(f->address, 0, "");
assignSymbol(f->address, label, label_func);
data->set_int_addr_type(f->address, dst_idword, 4);
free(label);
}*/
if (le_shared->is_vxd) {
if (v86control) {
addComment(v86control, 0, "");
addComment(v86control, 0, ";****************************");
addComment(v86control, 0, "; VxD V86-control procedure");
addComment(v86control, 0, ";****************************");
assignSymbol(v86control, "VxD_v86_control", label_func);
}
if (pmcontrol) {
addComment(pmcontrol, 0, "");
addComment(pmcontrol, 0, ";****************************");
addComment(pmcontrol, 0, "; VxD PM-control procedure");
addComment(pmcontrol, 0, ";****************************");
assignSymbol(pmcontrol, "VxD_pm_control", label_func);
}
if (control) {
addComment(control, 0, "");
addComment(control, 0, ";****************************");
addComment(control, 0, "; VxD control procedure");
addComment(control, 0, ";****************************");
assignSymbol(control, "VxD_control", label_func);
}
}
if (entry) {
addComment(entry, 0, "");
addComment(entry, 0, ";****************************");
addComment(entry, 0, "; program entry point");
addComment(entry, 0, ";****************************");
if (validCodeAddress(entry)) {
assignSymbol(entry, "entrypoint", label_func);
} else {
assignSymbol(entry, "entrypoint", label_data);
}
}
setLocationTreeOptimizeThreshold(1000);
setSymbolTreeOptimizeThreshold(1000);
delete entry;
if (le_shared->best_entrypoint != LE_ADDR_INVALID) {
Address *tmpaddr = createAddressFlat32(le_shared->best_entrypoint);
((ht_aviewer*)le_shared->v_image)->gotoAddress(tmpaddr, NULL);
delete tmpaddr;
}
Analyser::beginAnalysis();
}
/*
*
*/
ObjectID LEAnalyser::getObjectID() const
{
return ATOM_LE_ANALYSER;
}
/*
*
*/
FileOfs LEAnalyser::addressToFileofs(const Address *Addr)
{
if (validAddress(Addr, scinitialized)) {
FileOfs ofs;
LEAddress na;
if (!convertAddressToLEAddress(Addr, &na)) return INVALID_FILE_OFS;
if (!LE_addr_to_ofs(le_shared, na, &ofs)) {
return INVALID_FILE_OFS;
}
return ofs;
/* uint m;
FileOfs oo;
if (!le_shared->linear_file->map_ofs(ofs, &oo, &m)) {
le_shared->linear_file->map_ofs(ofs, &oo, &m);
return INVALID_FILE_OFS;
}
return oo;*/
} else {
return INVALID_FILE_OFS;
}
}
FileOfs LEAnalyser::addressToRealFileofs(Address *Addr)
{
if (validAddress(Addr, scinitialized)) {
FileOfs ofs;
LEAddress na;
if (!convertAddressToLEAddress(Addr, &na)) return INVALID_FILE_OFS;
if (!LE_addr_to_ofs(le_shared, na, &ofs)) {
return INVALID_FILE_OFS;
}
FileOfs m;
FileOfs oo;
if (!le_shared->linear_file->map_ofs(ofs, &oo, &m)) {
return INVALID_FILE_OFS;
}
return oo;
} else {
return INVALID_FILE_OFS;
}
}
/*
*
*/
uint LEAnalyser::bufPtr(const Address *Addr, byte *buf, int size)
{
FileOfs ofs = addressToFileofs(Addr);
/* if (ofs == INVALID_FILE_OFS) {
ht_printf("%y", Addr);
int as=1;
}*/
assert(ofs != INVALID_FILE_OFS);
file->seek(ofs);
return file->read(buf, size);
}
bool LEAnalyser::convertAddressToLEAddress(const Address *addr, LEAddress *r)
{
if (addr->getObjectID()==ATOM_ADDRESS_X86_FLAT_32) {
// *r = LE_MAKE_ADDR(le_shared, ((AddressX86Flat32*)addr)->seg, ((AddressX86_1632*)addr)->addr);
*r = ((AddressX86Flat32*)addr)->addr;
return true;
} else {
return false;
}
}
Address *LEAnalyser::createAddress()
{
return new AddressX86Flat32(0);
}
Address *LEAnalyser::createAddressFlat32(uint32 ofs)
{
return new AddressX86Flat32(ofs);
}
/*
*
*/
Assembler *LEAnalyser::createAssembler()
{
/* FIXME: 16/32 */
Assembler *a = new x86asm(X86_OPSIZE32, X86_ADDRSIZE32);
a->init();
return a;
}
/*
*
*/
const char *LEAnalyser::getSegmentNameByAddress(const Address *Addr)
{
static char segmentname[16];
int i;
LEAddress na;
if (!convertAddressToLEAddress(Addr, &na)) return NULL;
if (!LE_addr_to_segment(le_shared, na, &i)) return NULL;
// LEAddress temp;
/* bool init = LE_addr_to_ofs(le_shared, na, &temp);
if (!init)
return NULL;*/
/* if (i == (int)le_shared->fake_segment) {
strcpy(segmentname, "faked names");
} else {*/
sprintf(segmentname, "seg%d", i+1);
// }
return segmentname;
}
/*
*
*/
String &LEAnalyser::getName(String &res)
{
return file->getDesc(res);
}
/*
*
*/
const char *LEAnalyser::getType()
{
return "LE/Analyser";
}
/*
*
*/
void LEAnalyser::initCodeAnalyser()
{
Analyser::initCodeAnalyser();
}
/*
*
*/
void LEAnalyser::initUnasm()
{
DPRINTF("le_analy: ");
DPRINTF("initing analy_x86_disassembler\n");
analy_disasm = new AnalyX86Disassembler();
((AnalyX86Disassembler*)analy_disasm)->init(this, le_shared->is_vxd ? ANALYX86DISASSEMBLER_FLAGS_VXD_X86DIS : 0);
}
/*
*
*/
void LEAnalyser::log(const char *msg)
{
/*
* log() creates to much traffic so dont log
* perhaps we reactivate this later
*
*/
/* LOG(msg);*/
}
/*
*
*/
Address *LEAnalyser::nextValid(const Address *Addr)
{
return (Address *)validarea->findNext(Addr);
}
/*
*
*/
void LEAnalyser::store(ObjectStream &st) const
{
PUT_OBJECT(st, validarea);
Analyser::store(st);
}
/*
*
*/
int LEAnalyser::queryConfig(int mode)
{
switch (mode) {
case Q_DO_ANALYSIS:
case Q_ENGAGE_CODE_ANALYSER:
case Q_ENGAGE_DATA_ANALYSER:
return true;
default:
return 0;
}
}
/*
*
*/
Address *LEAnalyser::fileofsToAddress(FileOfs fileofs)
{
LEAddress a;
if (LE_ofs_to_addr(le_shared, fileofs, &a)) {
return createAddressFlat32(a);
} else {
return new InvalidAddress();
}
}
/*
*
*/
/* FIXME: fileofs chaos */
Address *LEAnalyser::realFileofsToAddress(FileOfs fileofs)
{
LEAddress a;
uint lofs;
if (le_shared->linear_file->unmap_ofs(fileofs, &lofs) &&
LE_ofs_to_addr(le_shared, lofs, &a)) {
return createAddressFlat32(a);
} else {
return new InvalidAddress();
}
}
/*
*
*/
bool LEAnalyser::validAddress(const Address *Addr, tsectype action)
{
ht_le_objmap *objects = &le_shared->objmap;
int sec;
LEAddress na;
if (!convertAddressToLEAddress(Addr, &na)) return false;
if (!LE_addr_to_segment(le_shared, na, &sec)) return false;
FileOfs temp;
bool init = LE_addr_to_ofs(le_shared, na, &temp);
LE_OBJECT *s = objects->header + sec;
switch (action) {
case scvalid:
return true;
case scread:
return (s->flags & LE_OBJECT_FLAG_READABLE);
case scwrite:
return (s->flags & LE_OBJECT_FLAG_WRITEABLE);
case screadwrite:
return (s->flags & LE_OBJECT_FLAG_READABLE) && (s->flags & LE_OBJECT_FLAG_WRITEABLE);
case sccode:
return (s->flags & LE_OBJECT_FLAG_EXECUTABLE) && init;
case scinitialized:
return init;
}
return false;
}
| gpl-2.0 |
cipriancraciun/netpanzer | src/NetPanzer/Bot/BotPlayer.hpp | 1557 | /*
Copyright (C) 2003 Ivo Danihelka <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef BOTPLAYER_H
#define BOTPLAYER_H
#include "Core/CoreTypes.hpp"
#include "Bot.hpp"
#include "Util/Timer.hpp"
class ObjectiveState;
#include <vector>
typedef std::vector<int> playerList_t;
typedef std::vector<ObjectiveID> outpostList_t;
class BotPlayer : public Bot {
private:
static const int NONE_PLAYER = 0xFFFF;
Timer m_timer;
public:
BotPlayer();
virtual void processEvents();
int isReady();
UnitBase *getRandomUnit(int playerIndex);
playerList_t getEnemyPlayers();
int getRandomEnemyPlayer();
UnitBase *getRandomEnemy();
outpostList_t getOutposts(int disposition);
ObjectiveState *getRandomOutpost(int disposition);
void unitOccupyOupost(UnitBase *unit);
void outpostProduce();
};
#endif
| gpl-2.0 |
BiglySoftware/BiglyBT | core/src/com/biglybt/ui/selectedcontent/SelectedContent.java | 5036 | /*
* Created on May 6, 2008
*
* Copyright (C) Azureus Software, Inc, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.biglybt.ui.selectedcontent;
import com.biglybt.core.CoreFactory;
import com.biglybt.core.download.DownloadManager;
import com.biglybt.core.global.GlobalManager;
import com.biglybt.core.torrent.TOTorrent;
import com.biglybt.core.util.Base32;
import com.biglybt.core.util.HashWrapper;
/**
* Represents a piece of content (torrent) that is selected
*
* @author TuxPaper
* @created May 6, 2008
*
*/
public class SelectedContent implements ISelectedContent
{
private String hash;
private DownloadManager dm;
private int file_index = -1;
private TOTorrent torrent;
private String displayName;
private DownloadUrlInfo downloadInfo;
// add more fields and you need to amend sameAs below
/**
* @param dm
* @throws Exception
*/
public SelectedContent(DownloadManager dm){
setDownloadManager(dm);
}
public SelectedContent(DownloadManager dm, int _file_index ){
setDownloadManager(dm);
file_index = _file_index;
}
/**
*
*/
public SelectedContent(String hash, String displayName) {
this.hash = hash;
this.displayName = displayName;
}
/**
* @deprecated - at least set a display-name for debug purposes
*/
public SelectedContent() {
}
public SelectedContent( String dn) {
displayName = dn;
}
// @see ISelectedContent#getHash()
@Override
public String getHash() {
return hash;
}
// @see ISelectedContent#setHash(java.lang.String)
@Override
public void setHash(String hash) {
this.hash = hash;
}
// @see ISelectedContent#getDM()
@Override
public DownloadManager getDownloadManager() {
if (dm == null && hash != null) {
try {
GlobalManager gm = CoreFactory.getSingleton().getGlobalManager();
return gm.getDownloadManager(new HashWrapper(Base32.decode(hash)));
} catch (Exception ignore) {
}
}
return dm;
}
// @see ISelectedContent#setDM(com.biglybt.core.download.DownloadManager)
@Override
public void setDownloadManager(DownloadManager _dm) {
dm = _dm;
if ( dm != null ){
setTorrent( dm.getTorrent());
setDisplayName(dm.getDisplayName());
}
}
@Override
public int getFileIndex() {
return file_index;
}
@Override
public TOTorrent getTorrent() {
return( torrent );
}
@Override
public void setTorrent(TOTorrent _torrent) {
torrent = _torrent;
if ( torrent != null ){
try {
hash = torrent.getHashWrapper().toBase32String();
} catch (Exception e) {
hash = null;
}
}
}
// @see ISelectedContent#getDisplayName()
@Override
public String
getDisplayName()
{
String str = displayName;
if ( displayName == null || displayName.isEmpty()){
if ( dm != null ){
str = dm.getDisplayName();
}else if ( torrent != null ){
str = new String( torrent.getName());
}else if ( downloadInfo != null ){
str = downloadInfo.getDownloadURL();
}
if ( file_index >= 0 ){
str += " (file=" + file_index + ")";
}
}
return( str );
}
// @see ISelectedContent#setDisplayName(java.lang.String)
@Override
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
// @see ISelectedContent#getDownloadInfo()
@Override
public DownloadUrlInfo getDownloadInfo() {
return downloadInfo;
}
public void setDownloadInfo(DownloadUrlInfo info) {
this.downloadInfo = info;
}
@Override
public boolean
sameAs(
ISelectedContent _other )
{
if ( _other instanceof SelectedContent ){
SelectedContent other = (SelectedContent)_other;
if ( hash != other.hash ){
if ( hash == null ||
other.hash == null ||
!hash.equals( other.hash )){
return( false );
}
}
if ( dm != other.dm ||
torrent != other.torrent ||
file_index != other.file_index ){
return( false );
}
if ( displayName != other.displayName ){
if ( displayName == null ||
other.displayName == null ||
!displayName.equals( other.displayName )){
return( false );
}
}
if ( downloadInfo != other.downloadInfo ){
if ( downloadInfo == null ||
other.downloadInfo == null ||
!downloadInfo.sameAs( other.downloadInfo )){
return( false );
}
}
return( true );
}
return( false );
}
}
| gpl-2.0 |
dubasdey/XlsToWiki | index.php | 31 | <?php
header('Location:/src/'); | gpl-2.0 |
BlueFern/DBiharMesher | meshes/c960/Generate960ATPMesh.py | 1116 | # -*- coding: utf-8 -*-
"""
Create an initial ATP Profile for an ECs Mesh and write it out as .vtp.
"""
import os
import sys
# Run in current directory.
os.chdir(os.path.dirname(os.path.abspath(__file__)))
# Import path for the GenerateATPMapV2 script.
importPath = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../util'))
if not importPath in sys.path:
sys.path.insert(1, importPath)
del importPath
import GenerateATPMapV2
# This is for the c960 mesh.
GenerateATPMapV2.centrelineFile = "c960Centreline.vtk"
GenerateATPMapV2.meshFile = "quadMeshFullECc960.vtp"
GenerateATPMapV2.atpFile = "quadMeshFullATPc960.vtp"
GenerateATPMapV2.debugAtpFile = "quadMeshFullATPV2Debugc960.vtp"
GenerateATPMapV2.numBranches = 1
GenerateATPMapV2.numQuads = 960
GenerateATPMapV2.numAxialQuads = 24
GenerateATPMapV2.numECsPerCol = 4
GenerateATPMapV2.atpGradient = 4.0
GenerateATPMapV2.atpMin = 0.1
GenerateATPMapV2.atpMax = 1.0
def main():
GenerateATPMapV2.buildATPMesh()
if __name__ == '__main__':
print "Starting", os.path.basename(__file__)
main()
print "Exiting", os.path.basename(__file__) | gpl-2.0 |
BeardandFedora/spawncamping-archer | wp-content/themes/appsfreedom-x/framework/js/src/site/x-buddypress-mod.js | 826 | // =============================================================================
// JS/X-BUDDYPRESS-MOD.JS
// -----------------------------------------------------------------------------
// BuddyPress specific modifications.
// =============================================================================
// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
// 01. Global Functions
// =============================================================================
// Global Functions
// =============================================================================
jQuery(document).ready(function(jq) {
jq('.x-item-list-tabs-subnav').find('li.last select option').prepend('Show: ');
}); | gpl-2.0 |
UkCvs/commando | apps/tuxbox/neutrino/src/gui/pluginlist.cpp | 10697 | /*
Neutrino-GUI - DBoxII-Project
Copyright (C) 2001 Steffen Hehn 'McClean'
Homepage: http://dbox.cyberphoria.org/
Kommentar:
Diese GUI wurde von Grund auf neu programmiert und sollte nun vom
Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert
auf der Client-Server Idee, diese GUI ist also von der direkten DBox-
Steuerung getrennt. Diese wird dann von Daemons uebernommen.
License: GPL
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <plugin.h>
#include <gui/pluginlist.h>
#include <gui/widget/messagebox.h>
#include <gui/widget/icons.h>
#include <sstream>
#include <fstream>
#include <iostream>
#include <dirent.h>
#include <dlfcn.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <global.h>
#include <neutrino.h>
#include <plugins.h>
#include <driver/encoding.h>
#include <driver/screen_max.h>
#include <zapit/client/zapittools.h>
#include <daemonc/remotecontrol.h>
CPluginList::CPluginList(const neutrino_locale_t Name, const uint listtype)
{
frameBuffer = CFrameBuffer::getInstance();
name = Name;
pluginlisttype = listtype;
buttonname = LOCALE_MENU_BACK;
selected = 0;
liststart = 0;
if (listtype == CPlugins::P_TYPE_GAME)
iconfile = NEUTRINO_ICON_GAMES;
else if (listtype == CPlugins::P_TYPE_SCRIPT)
iconfile = NEUTRINO_ICON_SHELL;
else
iconfile = "";
ticonwidth = 0;
ticonheight = 0;
}
CPluginList::~CPluginList()
{
for(unsigned int count=0;count<pluginlist.size();count++)
delete pluginlist[count];
}
int CPluginList::exec(CMenuTarget* parent, const std::string & /*actionKey*/)
{
neutrino_msg_t msg;
neutrino_msg_data_t data;
int res = menu_return::RETURN_REPAINT;
if (parent)
{
parent->hide();
}
//scan4plugins here!
for(unsigned int count=0;count<pluginlist.size();count++)
{
delete pluginlist[count];
}
pluginlist.clear();
pluginitem* tmp = new pluginitem();
tmp->name = g_Locale->getText(buttonname);
pluginlist.push_back(tmp);
for(unsigned int count=0;count < (unsigned int)g_PluginList->getNumberOfPlugins();count++)
{
if ((g_PluginList->getType(count) & pluginlisttype) && !g_PluginList->isHidden(count))
{
tmp = new pluginitem();
tmp->number = count;
tmp->name = g_PluginList->getName(count);
tmp->desc = g_PluginList->getDescription(count);
pluginlist.push_back(tmp);
}
}
if (selected >= pluginlist.size())
selected = pluginlist.size() - 1;
paint();
unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
bool loop=true;
while (loop)
{
g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd );
neutrino_msg_t msg_repeatok = msg & ~CRCInput::RC_Repeat;
if ( msg <= CRCInput::RC_MaxRC )
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
if (msg == CRCInput::RC_timeout || msg == CRCInput::RC_left || msg == g_settings.key_channelList_cancel)
{
loop=false;
}
else if (msg_repeatok == CRCInput::RC_up || msg_repeatok == g_settings.key_channelList_pageup)
{
int step = (msg_repeatok == g_settings.key_channelList_pageup) ? listmaxshow : 1; // browse or step 1
int new_selected = selected - step;
if (new_selected < 0)
new_selected = pluginlist.size() - 1;
updateSelection(new_selected);
}
else if (msg_repeatok == CRCInput::RC_down || msg_repeatok == g_settings.key_channelList_pagedown)
{
unsigned int step = (msg_repeatok == g_settings.key_channelList_pagedown) ? listmaxshow : 1; // browse or step 1
unsigned int new_selected = selected + step;
unsigned int p_size = pluginlist.size();
if (new_selected >= p_size)
{
if ((p_size / listmaxshow + 1) * listmaxshow == p_size + listmaxshow) // last page has full entries
new_selected = 0;
else
new_selected = ((step == listmaxshow) && (new_selected < ((p_size / listmaxshow + 1) * listmaxshow))) ? (p_size - 1) : 0;
}
updateSelection(new_selected);
}
else if (msg == CRCInput::RC_right || msg == CRCInput::RC_ok)
{
if(selected==0)
{
if (msg == CRCInput::RC_ok)
loop = false;
}
else
{//exec the plugin :))
if (pluginSelected() == close)
{
loop=false;
}
}
}
else if (msg == CRCInput::RC_setup)
{
res = menu_return::RETURN_EXIT_ALL;
loop = false;
}
else if( (msg== CRCInput::RC_red) ||
(msg==CRCInput::RC_green) ||
(msg==CRCInput::RC_yellow) ||
(msg==CRCInput::RC_blue) ||
(CRCInput::isNumeric(msg)) )
{
g_RCInput->postMsg(msg, data);
loop=false;
}
else if ( CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all )
{
loop = false;
res = menu_return::RETURN_EXIT_ALL;
}
}
hide();
return res;
}
void CPluginList::hide()
{
int c_rad_mid = RADIUS_MID;
frameBuffer->paintBackgroundBoxRel(x, y, width + sb_width + SHADOW_OFFSET, height + (c_rad_mid / 3 * 2) + SHADOW_OFFSET);
}
void CPluginList::paintItem(int pos)
{
int ypos = (y+theight) + pos*fheight;
int itemheight = fheight;
int c_rad_small = 0;
uint8_t color = COL_MENUCONTENT;
fb_pixel_t bgcolor = COL_MENUCONTENT_PLUS_0;
if (liststart+pos==selected)
{
color = COL_MENUCONTENTSELECTED;
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
c_rad_small = RADIUS_SMALL;
}
if(liststart+pos==0)
{ //back is half-height...
itemheight = (fheight / 2) + 3;
frameBuffer->paintBoxRel(x , ypos + itemheight , width , 15, COL_MENUCONTENT_PLUS_0);
frameBuffer->paintBoxRel(x + 10, ypos + itemheight + 5, width - 20, 1, COL_MENUCONTENT_PLUS_5);
frameBuffer->paintBoxRel(x + 10, ypos + itemheight + 6, width - 20, 1, COL_MENUCONTENT_PLUS_2);
}
else if(liststart==0)
{
ypos -= (fheight / 2) - 15;
if(pos==(int)listmaxshow-1)
frameBuffer->paintBoxRel(x,ypos+itemheight, width, (fheight / 2)-15, COL_MENUCONTENT_PLUS_0);
}
frameBuffer->paintBoxRel(x, ypos, width, itemheight, bgcolor, c_rad_small);
if(liststart+pos<pluginlist.size())
{
pluginitem* actplugin = pluginlist[liststart+pos];
g_Font[SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMLARGE]->RenderString(x+10, ypos+fheight1+3, width-20, actplugin->name, color, 0, true); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMSMALL]->RenderString(x+20, ypos+fheight, width-20, actplugin->desc, color, 0, true); // UTF-8
if(liststart+pos==selected)
{
CLCD::getInstance()->showMenuText(0, actplugin->name.c_str(), -1, true); // UTF-8
CLCD::getInstance()->showMenuText(1, actplugin->desc.c_str(), -1, true); // UTF-8
}
}
}
void CPluginList::paintHead()
{
frameBuffer->paintBoxRel(x, y, width + sb_width, theight, COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP);
int iconoffset = 0;
if (!iconfile.empty())
{
frameBuffer->paintIcon(iconfile, x + 8, y + theight / 2 - ticonheight / 2);
iconoffset = 8 + ticonwidth;
}
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x + iconoffset + 10, y + theight + 2, width - iconoffset - 10, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8
}
void CPluginList::paint()
{
int c_rad_mid = RADIUS_MID;
width = w_max (500, 100);
height = h_max (526, 50);
if (!iconfile.empty())
frameBuffer->getIconSize(iconfile.c_str(), &ticonwidth, &ticonheight);
theight = std::max(ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight());
//
fheight1 = g_Font[SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMLARGE]->getHeight();
fheight2 = g_Font[SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMSMALL]->getHeight();
fheight = fheight1 + fheight2 + 2;
//
listmaxshow = (height-theight-0)/fheight;
if (pluginlist.size() < listmaxshow)
listmaxshow = pluginlist.size();
height = theight+0+listmaxshow*fheight; // recalc height
sb_width = (pluginlist.size() > listmaxshow) ? 15 : 0;
x = getScreenStartX(width + sb_width);
y = getScreenStartY(height + (c_rad_mid / 3 * 2));
liststart = (selected/listmaxshow)*listmaxshow;
CLCD::getInstance()->setMode(CLCD::MODE_MENU_UTF8, g_Locale->getText(name));
frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width + sb_width, height + (c_rad_mid / 3 * 2), COL_MENUCONTENTDARK_PLUS_0, c_rad_mid);
frameBuffer->paintBoxRel(x, y + height - ((c_rad_mid * 2) + 1) + (c_rad_mid / 3 * 2), width + sb_width, ((c_rad_mid * 2) + 1), COL_MENUCONTENT_PLUS_0, c_rad_mid, CORNER_BOTTOM);
paintHead();
paintItems();
}
void CPluginList::paintItems()
{
if(pluginlist.size() > listmaxshow)
{
// Scrollbar
int nrOfPages = ((pluginlist.size()-1) / listmaxshow)+1;
int currPage = (liststart/listmaxshow) +1;
frameBuffer->paintBoxRel(x+width, y+theight, 15, height-theight, COL_MENUCONTENT_PLUS_1);
frameBuffer->paintBoxRel(x+ width +2, y+theight+2+(currPage-1)*(height-theight-4)/nrOfPages, 11, (height-theight-4)/nrOfPages, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL);
}
for(unsigned int count=0;count<listmaxshow;count++)
{
paintItem(count);
}
}
void CPluginList::updateSelection(unsigned int newpos)
{
if (selected != newpos)
{
unsigned int prev_selected = selected;
unsigned int oldliststart = liststart;
selected = newpos;
liststart = (selected / listmaxshow) * listmaxshow;
if (oldliststart != liststart)
paintItems();
else
{
paintItem(prev_selected - liststart);
paintItem(selected - liststart);
}
}
}
CPluginList::result_ CPluginList::pluginSelected()
{
g_PluginList->startPlugin(pluginlist[selected]->number);
hide();
if (!g_PluginList->getScriptOutput().empty())
{
ShowMsgUTF(LOCALE_PLUGINS_RESULT, Latin1_to_UTF8(g_PluginList->getScriptOutput()),
CMessageBox::mbrBack,CMessageBox::mbBack,NEUTRINO_ICON_SHELL);
}
paint();
return resume;
}
CPluginChooser::CPluginChooser(const neutrino_locale_t Name, const uint listtype, char* pluginname)
: CPluginList(Name, listtype), selected_plugin(pluginname)
{
buttonname = LOCALE_MENU_CANCEL;
}
CPluginList::result_ CPluginChooser::pluginSelected()
{
strcpy(selected_plugin,g_PluginList->getFileName(pluginlist[selected]->number));
return CPluginList::close;
}
| gpl-2.0 |
Heyloyalty/wp-heyloyalty | src/Admin/partials/permission.php | 416 | <?php defined('ABSPATH') or exit; ?>
<h3><?php _e("Heyloyalty Permission", "blank"); ?></h3>
<table class="form-table">
<tr>
<th><label for="permission"><?php _e("Permission"); ?></label></th>
<td>
<input type="checkbox" name="hl_permission" id="permission" <?php echo $checked = (get_user_meta($userID,'hl_permission',true) == 'on') ? 'checked' : ''; ?> />
</td>
</tr>
</table> | gpl-2.0 |
SamiDidier/NClass | src/Core/Members/Destructor.cs | 3045 | // NClass - Free class diagram editor
// Copyright (C) 2006-2009 Balazs Tihanyi
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 3 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using NClass.Translations;
namespace NClass.Core
{
public abstract class Destructor : Method
{
/// <exception cref="ArgumentException">
/// The language of <paramref name="parent"/> does not equal.
/// </exception>
/// <exception cref="ArgumentNullException">
/// <paramref name="parent"/> is null.
/// </exception>
protected Destructor(CompositeType parent) : base(null, parent)
{
}
public sealed override MemberType MemberType
{
get { return MemberType.Destructor; }
}
/// <exception cref="BadSyntaxException">
/// The <paramref name="value"/> does not fit to the syntax.
/// </exception>
public abstract override string Name
{
get;
set;
}
public sealed override bool IsNameReadonly
{
get { return true; }
}
public sealed override bool Overridable
{
get { return false; }
}
public sealed override bool IsOperator
{
get { return false; }
}
/// <exception cref="BadSyntaxException">
/// The <paramref name="value"/> does not fit to the syntax.
/// </exception>
public sealed override string Type
{
get
{
return null;
}
set
{
if (value != null)
throw new BadSyntaxException(Strings.ErrorCannotSetType);
}
}
public sealed override bool IsTypeReadonly
{
get { return true; }
}
protected sealed override string DefaultType
{
get { return null; }
}
/// <exception cref="BadSyntaxException">
/// Cannot set static modifier.
/// </exception>
public sealed override bool IsStatic
{
get
{
return false;
}
set
{
if (value)
throw new BadSyntaxException(Strings.ErrorCannotSetStatic);
}
}
/// <exception cref="BadSyntaxException">
/// Cannot set hider modifier.
/// </exception>
public override bool IsHider
{
get
{
return base.IsHider;
}
set
{
if (value)
throw new BadSyntaxException(Strings.ErrorCannotSetModifier);
}
}
/// <exception cref="BadSyntaxException">
/// Cannot set abstract modifier.
/// </exception>
public override bool IsAbstract
{
get
{
return base.IsAbstract;
}
set
{
if (value)
throw new BadSyntaxException(Strings.ErrorCannotSetModifier);
}
}
}
}
| gpl-2.0 |
WebModerna/maqueta-emyth | header-home.php | 2232 | <!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" lang="es-ES">
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" lang="es-ES">
<![endif]-->
<!--[if !(IE 7) & !(IE 8)]><!-->
<html class="no-js" type="text/html" lang="es-ES">
<!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.5, user-scalable=yes" />
<meta name="description" content="Coaching empresarial" />
<title>Emyth Argentina | el futuro de los negocios</title>
<!-- Condicionales de scripts para IE -->
<!--[if IE 8]>
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<script type="text/javascript" src="js/modernizr-2.8.3.min.js"></script>
<script type="text/javascript" src="js/html5.js"></script>
<script src="js/DD_roundies_0.0.2a-min.js" type="text/javascript"></script>
<script type="text/javascript">DD_roundies.addRule('.toggle, label', '10px 4px', true);</script>
<![endif]-->
<!-- Estlilos generales y para el IE -->
<link rel="stylesheet" type="text/css" href="assets/index.css" media="all" />
<!--[if IE 8]><link type="text/css" rel="stylesheet" href="css/styleIE8.css" media="all" /><![endif]-->
<!-- favicon -->
<link rel="shortcut icon" href="img/logo.png" />
</head>
<body>
<header class="header">
<div class="logo">
<a href="index.php">
<img src="img/logo.png" />
</a>
</div>
<div class="menu">
<a href="#" id="menu">
<span></span>
<span></span>
<span></span>
</a>
</div>
<nav class="nav" id="nav_home">
<ul id="header_nav" class="nav--listado">
<li class="nav--listado--item current_menu_item current_page_item"><a href="index.php">Home</a></li>
<li class="nav--listado--item"><a href="#productos">Productos</a></li>
<li class="nav--listado--item"><a href="#blog">Blog</a></li>
<li class="nav--listado--item"><a href="#ubicacion">Deshubicaciรณn</a></li>
<li class="nav--listado--item"><a href="#servicios">Servicios</a></li>
<li class="nav--listado--item"><a href="#about_us">About Us</a></li>
<li class="nav--listado--item"><a href="#contacto">Contacto</a></li>
</ul>
</nav>
</header> | gpl-2.0 |
ahneechu/ronsite | wp-content/themes/themify-base/includes/loop.php | 2140 | <?php
/**
* Template for generic post display.
* @package themify
* @since 1.0.0
*/
// Enable more link
if ( ! is_single() ) {
global $more;
$more = 0;
}
?>
<?php themify_post_before(); // hook ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
<?php themify_post_start(); // hook ?>
<?php themify_before_post_image(); // Hook ?>
<?php if ( has_post_thumbnail() ) : ?>
<figure class="post-image">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail( 'medium' ); ?>
</a>
</figure>
<?php endif; // has post thumbnail ?>
<?php themify_after_post_image(); // Hook ?>
<div class="post-content">
<time datetime="<?php the_time('o-m-d') ?>" class="post-date"><?php the_time(apply_filters('themify_loop_date', 'M j, Y')) ?></time>
<?php themify_before_post_title(); // Hook ?>
<h1 class="post-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</h1>
<?php themify_after_post_title(); // Hook ?>
<?php if ( ! is_attachment() ) : ?>
<p class="post-meta">
<span class="post-author"><?php the_author_posts_link(); ?></span>
<?php the_terms( get_the_ID(), 'category', ' <span class="post-category">', ', ', '</span>' ); ?>
<?php the_tags( ' <span class="post-tag">', ', ', '</span>' ); ?>
<?php if ( comments_open() ) : ?>
<span class="post-comment">
<?php comments_popup_link( __( '0 Comments', 'themify' ), __( '1 Comment', 'themify' ), __( '% Comments', 'themify' ) ); ?>
</span>
<?php endif; //post comment ?>
</p>
<!-- /.post-meta -->
<?php endif; ?>
<?php if ( is_single() ) : ?>
<?php the_content(); ?>
<?php else : ?>
<?php the_excerpt(); ?>
<?php endif; // single or archive ?>
<?php edit_post_link(__('Edit', 'themify'), '<span class="edit-button">[', ']</span>'); ?>
</div>
<!-- /.post-content -->
<?php themify_post_end(); // hook ?>
</article>
<!-- /.post -->
<?php themify_post_after(); // hook ?> | gpl-2.0 |
akka-benelux/PM-Tool | src/app/welcome/welcome.routes.ts | 347 | import { Routes } from '@angular/router';
// app
import { WelcomeScreenComponent, GettingStartedComponent } from './components/index';
export const WelcomeRoutes: Routes = [
{
path: 'welcome',
component: WelcomeScreenComponent
},
{
path: 'getting-started',
component: GettingStartedComponent
}
];
| gpl-2.0 |
TheTypoMaster/Scaper | openjdk/jdk/src/share/sample/scripting/scriptpad/src/resources/mm.js | 11053 | /*
* Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Sun Microsystems nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This is a collection of utilities for Monitoring
* and management API.
*
* File dependency:
* conc.js -> for concurrency utilities
*/
// At any time, we maintain atmost one MBeanServer
// connection. And so, we store the same as a global
// variable.
var mmConnection = null;
function jmxConnect(hostport) {
if (mmConnection != null) {
// close the existing connection
try {
mmConnection.close();
} catch (e) {
}
}
var JMXServiceURL = javax.management.remote.JMXServiceURL;
var JMXConnectorFactory = javax.management.remote.JMXConnectorFactory;
var urlPath = "/jndi/rmi://" + hostport + "/jmxrmi";
var url = new JMXServiceURL("rmi", "", 0, urlPath);
var jmxc = JMXConnectorFactory.connect(url);
// note that the "mmConnection" is a global variable!
mmConnection = jmxc.getMBeanServerConnection();
}
jmxConnect.docString = "connects to the given host, port (specified as name:port)";
function mbeanConnection() {
if (mmConnection == null) {
throw "Not connected to MBeanServer yet!";
}
return mmConnection;
}
mbeanConnection.docString = "returns the current MBeanServer connection"
/**
* Returns a platform MXBean proxy for given MXBean name and interface class
*/
function newPlatformMXBeanProxy(name, intf) {
var factory = java.lang.management.ManagementFactory;
return factory.newPlatformMXBeanProxy(mbeanConnection(), name, intf);
}
newPlatformMXBeanProxy.docString = "returns a proxy for a platform MXBean";
/**
* Wraps a string to ObjectName if needed.
*/
function objectName(objName) {
var ObjectName = Packages.javax.management.ObjectName;
if (objName instanceof ObjectName) {
return objName;
} else {
return new ObjectName(objName);
}
}
objectName.docString = "creates JMX ObjectName for a given String";
/**
* Creates a new (M&M) Attribute object
*
* @param name name of the attribute
* @param value value of the attribute
*/
function attribute(name, value) {
var Attribute = Packages.javax.management.Attribute;
return new Attribute(name, value);
}
attribute.docString = "returns a new JMX Attribute using name and value given";
/**
* Returns MBeanInfo for given ObjectName. Strings are accepted.
*/
function mbeanInfo(objName) {
objName = objectName(objName);
return mbeanConnection().getMBeanInfo(objName);
}
mbeanInfo.docString = "returns MBeanInfo of a given ObjectName";
/**
* Returns ObjectInstance for a given ObjectName.
*/
function objectInstance(objName) {
objName = objectName(objName);
return mbeanConnection().objectInstance(objectName);
}
objectInstance.docString = "returns ObjectInstance for a given ObjectName";
/**
* Queries with given ObjectName and QueryExp.
* QueryExp may be null.
*
* @return set of ObjectNames.
*/
function queryNames(objName, query) {
objName = objectName(objName);
if (query == undefined) query = null;
return mbeanConnection().queryNames(objName, query);
}
queryNames.docString = "returns QueryNames using given ObjectName and optional query";
/**
* Queries with given ObjectName and QueryExp.
* QueryExp may be null.
*
* @return set of ObjectInstances.
*/
function queryMBeans(objName, query) {
objName = objectName(objName);
if (query == undefined) query = null;
return mbeanConnection().queryMBeans(objName, query);
}
queryMBeans.docString = "return MBeans using given ObjectName and optional query";
// wraps a script array as java.lang.Object[]
function objectArray(array) {
var len = array.length;
var res = java.lang.reflect.Array.newInstance(java.lang.Object, len);
for (var i = 0; i < array.length; i++) {
res[i] = array[i];
}
return res;
}
// wraps a script (string) array as java.lang.String[]
function stringArray(array) {
var len = array.length;
var res = java.lang.reflect.Array.newInstance(java.lang.String, len);
for (var i = 0; i < array.length; i++) {
res[i] = String(array[i]);
}
return res;
}
// script array to Java List
function toAttrList(array) {
var AttributeList = Packages.javax.management.AttributeList;
if (array instanceof AttributeList) {
return array;
}
var list = new AttributeList(array.length);
for (var index = 0; index < array.length; index++) {
list.add(array[index]);
}
return list;
}
// Java Collection (Iterable) to script array
function toArray(collection) {
if (collection instanceof Array) {
return collection;
}
var itr = collection.iterator();
var array = new Array();
while (itr.hasNext()) {
array[array.length] = itr.next();
}
return array;
}
// gets MBean attributes
function getMBeanAttributes(objName, attributeNames) {
objName = objectName(objName);
return mbeanConnection().getAttributes(objName,stringArray(attributeNames));
}
getMBeanAttributes.docString = "returns specified Attributes of given ObjectName";
// gets MBean attribute
function getMBeanAttribute(objName, attrName) {
objName = objectName(objName);
return mbeanConnection().getAttribute(objName, attrName);
}
getMBeanAttribute.docString = "returns a single Attribute of given ObjectName";
// sets MBean attributes
function setMBeanAttributes(objName, attrList) {
objName = objectName(objName);
attrList = toAttrList(attrList);
return mbeanConnection().setAttributes(objName, attrList);
}
setMBeanAttributes.docString = "sets specified Attributes of given ObjectName";
// sets MBean attribute
function setMBeanAttribute(objName, attrName, attrValue) {
var Attribute = Packages.javax.management.Attribute;
objName = objectName(objName);
mbeanConnection().setAttribute(objName, new Attribute(attrName, attrValue));
}
setMBeanAttribute.docString = "sets a single Attribute of given ObjectName";
// invokes an operation on given MBean
function invokeMBean(objName, operation, params, signature) {
objName = objectName(objName);
params = objectArray(params);
signature = stringArray(signature);
return mbeanConnection().invoke(objName, operation, params, signature);
}
invokeMBean.docString = "invokes MBean operation on given ObjectName";
/**
* Wraps a MBean specified by ObjectName as a convenient
* script object -- so that setting/getting MBean attributes
* and invoking MBean method can be done with natural syntax.
*
* @param objName ObjectName of the MBean
* @param async asynchornous mode [optional, default is false]
* @return script wrapper for MBean
*
* With async mode, all field, operation access is async. Results
* will be of type FutureTask. When you need value, call 'get' on it.
*/
function mbean(objName, async) {
objName = objectName(objName);
var info = mbeanInfo(objName);
var attrs = info.attributes;
var attrMap = new Object;
for (var index in attrs) {
attrMap[attrs[index].name] = attrs[index];
}
var opers = info.operations;
var operMap = new Object;
for (var index in opers) {
operMap[opers[index].name] = opers[index];
}
function isAttribute(name) {
return name in attrMap;
}
function isOperation(name) {
return name in operMap;
}
return new JSAdapter() {
__has__: function (name) {
return isAttribute(name) || isOperation(name);
},
__get__: function (name) {
if (isAttribute(name)) {
if (async) {
return getMBeanAttribute.future(objName, name);
} else {
return getMBeanAttribute(objName, name);
}
} else if (isOperation(name)) {
var oper = operMap[name];
return function() {
var params = objectArray(arguments);
var sigs = oper.signature;
var sigNames = new Array(sigs.length);
for (var index in sigs) {
sigNames[index] = sigs[index].getType();
}
if (async) {
return invokeMBean.future(objName, name,
params, sigNames);
} else {
return invokeMBean(objName, name, params, sigNames);
}
}
} else {
return undefined;
}
},
__put__: function (name, value) {
if (isAttribute(name)) {
if (async) {
setMBeanAttribute.future(objName, name, value);
} else {
setMBeanAttribute(objName, name, value);
}
} else {
return undefined;
}
}
};
}
mbean.docString = "returns a conveninent script wrapper for a MBean of given ObjectName";
if (this.application != undefined) {
this.application.addTool("JMX Connect",
// connect to a JMX MBean Server
function () {
var url = prompt("Connect to JMX server (host:port)");
if (url != null) {
try {
jmxConnect(url);
alert("connected!");
} catch (e) {
error(e, "Can not connect to " + url);
}
}
});
}
| gpl-2.0 |
gunjanpatel/redCORE | libraries/redcore/layouts/searchtools/default/filters.php | 760 | <?php
/**
* @package Redcore
* @subpackage Layout
*
* @copyright Copyright (C) 2012 - 2013 redCOMPONENT.com. All rights reserved.
* @license GNU General Public License version 2 or later, see LICENSE.
*/
defined('JPATH_BASE') or die;
$data = $displayData;
// Is multilanguage enabled?
$langs = isset(JFactory::getApplication()->languages_enabled);
$filters = $data->filterForm->getGroup('filter');
$searchField = $data->options->get('searchField', 'filter_search');
?>
<?php if ($filters) : ?>
<div class="filter-select hidden-phone">
<?php foreach ($filters as $fieldName => $field) : ?>
<?php if ($fieldName != $searchField) : ?>
<?php echo $field->input; ?>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
| gpl-2.0 |
jcorrego/graduarte | templates/zengridframework/assets/layout/grid6.php | 2316 | <?php
/**
* @package Joomla Bamboo Zen Grid Framework
* @version v1.0
* @author Joomal Bamboo http://www.joomlabamboo.com
* @copyright Copyright (C) 2007 - 2010 Joomla Bamboo
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*
* The Zen Grid Framework is a templating framework that uses the Joomla Content Manament System (http://www.joomla.org)
* This file is called if the grid6 layout override is enabled and is placed in the templates/[your template name]/layout folder.
*/
// This file is called if the grid6 layout override is enabled and is placed in the templates/[your template name]/layout folder.
// no direct access
defined( '_JEXEC' ) or die( 'Restricted index access' );
?>
<!-- Sixth Row Grid -->
<div class="outerWrapper grid6Row">
<div class="container <?php echo $position ?>" style="width:<?php echo $tWidth ?>px;<?php echo $containerOffset?>">
<div class="containerBG">
<div class="innerContainer" style="width:<?php echo $contentWidth ?>px;margin-left:<?php echo $gutter ?>px">
<div class="gridWrap6">
<?php if($this->countModules('grid21')) : ?>
<div id="grid21" style="width:<?php echo $$grid21Cols; ?>px;margin-right: <?php echo $gutter ?>px">
<jdoc:include type="modules" name="grid21" style="xhtml" />
</div>
<?php endif; ?>
<?php if($this->countModules('grid22')) : ?>
<div id="grid22" style="width:<?php echo $$grid22Cols; ?>px;margin-right: <?php echo $gutter ?>px">
<jdoc:include type="modules" name="grid22" style="xhtml" />
</div>
<?php endif; ?>
<?php if($this->countModules('grid23')) : ?>
<div id="grid23" style="width:<?php echo $$grid23Cols; ?>px;margin-right: <?php echo $gutter ?>px">
<jdoc:include type="modules" name="grid23" style="xhtml" />
</div>
<?php endif; ?>
<?php if($this->countModules('grid24')) : ?>
<div id="grid24" style="width:<?php echo $$grid24Cols; ?>px">
<jdoc:include type="modules" name="grid24" style="xhtml" />
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<!-- Sixth Row Grid -->
| gpl-2.0 |
buffer/thug | tests/DOM/test_MimeType.py | 381 | from thug.DOM.MimeType import MimeType
class TestMimeType(object):
def test_items(self):
mimetype = MimeType()
mimetype['test1'] = 'value1'
assert mimetype['test1'] in ('value1', )
mimetype.test2 = 'value2'
assert mimetype.test2 in ('value2', )
del mimetype['test1']
del mimetype.test2
del mimetype['test3']
| gpl-2.0 |
spraveenitpro/phpsandbox | mailing-list/index.tmpl.php | 785 | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
li {
list-style: none;
}
ul, li {
margin: 0;padding: 0;
}
.notice{
color: red;font-style: italic;
}
</style>
</head>
<body>
<h1>Join the Mailing List</h1>
<form action="" method="post">
<?php if (isset($status)) : ?>
<p class="notice"><?php echo $status; ?></p>
<?php endif; ?>
<ul>
<li>
<label for="name">Your Name</label>
<input type="text" name="name" value="<?= old('name'); ?>">
</li>
<li>
<label for="email">Your Email</label>
<input type="text" name="email" value="<?= old('email'); ?>">
</li>
<li>
<input type="submit" value="signup">
</li>
</ul>
</form>
</body>
</html> | gpl-2.0 |
Renegro/naturanum_foundation | wp-content/themes/JointsWP-master/vendor/what-input/gulpfile.js/tasks/clean.js | 269 | var gulp = require('gulp');
var del = require('del');
gulp.task('clean', function () {
return del([
'./.DS_Store',
'./src/.DS_Store',
'./src/**/.DS_Store',
'./gulpfile.js/.DS_Store',
'./gulpfile.js/**/.DS_Store'
]);
});
| gpl-2.0 |
InkVisible/wow | src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp | 10761 | /*
* Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Boss_Darkmaster_Gandling
SD%Complete: 75
SDComment: Doors missing in instance script.
SDCategory: Scholomance
EndScriptData */
#include "ScriptPCH.h"
#include "scholomance.h"
#define SPELL_ARCANEMISSILES 22272
#define SPELL_SHADOWSHIELD 22417 //Not right ID. But 12040 is wrong either.
#define SPELL_CURSE 18702
#define ADD_1X 170.205
#define ADD_1Y 99.413
#define ADD_1Z 104.733
#define ADD_1O 3.16
#define ADD_2X 170.813
#define ADD_2Y 97.857
#define ADD_2Z 104.713
#define ADD_2O 3.16
#define ADD_3X 170.720
#define ADD_3Y 100.900
#define ADD_3Z 104.739
#define ADD_3O 3.16
#define ADD_4X 171.866
#define ADD_4Y 99.373
#define ADD_4Z 104.732
#define ADD_4O 3.16
class boss_darkmaster_gandling : public CreatureScript
{
public:
boss_darkmaster_gandling() : CreatureScript("boss_darkmaster_gandling") { }
CreatureAI* GetAI(Creature* pCreature) const
{
return new boss_darkmaster_gandlingAI (pCreature);
}
struct boss_darkmaster_gandlingAI : public ScriptedAI
{
boss_darkmaster_gandlingAI(Creature *c) : ScriptedAI(c)
{
pInstance = me->GetInstanceScript();
}
InstanceScript* pInstance;
uint32 ArcaneMissiles_Timer;
uint32 ShadowShield_Timer;
uint32 Curse_Timer;
uint32 Teleport_Timer;
void Reset()
{
ArcaneMissiles_Timer = 4500;
ShadowShield_Timer = 12000;
Curse_Timer = 2000;
Teleport_Timer = 16000;
}
void EnterCombat(Unit * /*who*/)
{
}
void JustDied(Unit * /*killer*/)
{
if (pInstance)
pInstance->SetData(TYPE_GANDLING, DONE);
}
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
//ArcaneMissiles_Timer
if (ArcaneMissiles_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_ARCANEMISSILES);
ArcaneMissiles_Timer = 8000;
} else ArcaneMissiles_Timer -= diff;
//ShadowShield_Timer
if (ShadowShield_Timer <= diff)
{
DoCast(me, SPELL_SHADOWSHIELD);
ShadowShield_Timer = 14000 + rand()%14000;
} else ShadowShield_Timer -= diff;
//Curse_Timer
if (Curse_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_CURSE);
Curse_Timer = 15000 + rand()%12000;
} else Curse_Timer -= diff;
//Teleporting Random Target to one of the six pre boss rooms and spawn 3-4 skeletons near the gamer.
//We will only telport if gandling has more than 3% of hp so teleported gamers can always loot.
if (me->GetHealth()*100 / me->GetMaxHealth() > 3)
{
if (Teleport_Timer <= diff)
{
Unit *pTarget = NULL;
pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
{
if (DoGetThreat(pTarget))
DoModifyThreatPercent(pTarget, -100);
Creature *Summoned = NULL;
switch(rand()%6)
{
case 0:
DoTeleportPlayer(pTarget, 250.0696,0.3921,84.8408,3.149);
Summoned = me->SummonCreature(16119,254.2325,0.3417,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,257.7133,4.0226,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,258.6702,-2.60656,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
break;
case 1:
DoTeleportPlayer(pTarget, 181.4220,-91.9481,84.8410,1.608);
Summoned = me->SummonCreature(16119,184.0519,-73.5649,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,179.5951,-73.7045,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,180.6452,-78.2143,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,283.2274,-78.1518,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
break;
case 2:
DoTeleportPlayer(pTarget, 95.1547,-1.8173,85.2289,0.043);
Summoned = me->SummonCreature(16119,100.9404,-1.8016,85.2289,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,101.3729,0.4882,85.2289,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,101.4596,-4.4740,85.2289,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
break;
case 3:
DoTeleportPlayer(pTarget, 250.0696,0.3921,72.6722,3.149);
Summoned = me->SummonCreature(16119,240.34481,0.7368,72.6722,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,240.3633,-2.9520,72.6722,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,240.6702,3.34949,72.6722,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
break;
case 4:
DoTeleportPlayer(pTarget, 181.4220,-91.9481,70.7734,1.608);
Summoned = me->SummonCreature(16119,184.0519,-73.5649,70.7734,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,179.5951,-73.7045,70.7734,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,180.6452,-78.2143,70.7734,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,283.2274,-78.1518,70.7734,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
break;
case 5:
DoTeleportPlayer(pTarget, 106.1541,-1.8994,75.3663,0.043);
Summoned = me->SummonCreature(16119,115.3945,-1.5555,75.3663,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,257.7133,1.8066,75.3663,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
Summoned = me->SummonCreature(16119,258.6702,-5.1001,75.3663,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
if (Summoned)
Summoned->AI()->AttackStart(pTarget);
break;
}
}
Teleport_Timer = 20000 + rand()%15000;
} else Teleport_Timer -= diff;
}
DoMeleeAttackIfReady();
}
};
};
void AddSC_boss_darkmaster_gandling()
{
new boss_darkmaster_gandling();
}
| gpl-2.0 |
rero/multivio_client | apps/multivio/views/unsupported_view.js | 1100 | /**
==============================================================================
Project: Multivio - https://www.multivio.org/
Copyright: (c) 2009-2011 RERO
License: See file COPYING
==============================================================================
*/
Multivio.unsupportedFileView = SC.View.design({
childViews: ['titleView', 'previousButton', 'nextButton'],
titleView: SC.View.design({
layout: { top: 0, left: 0, bottom: 0, right: 0 },
childViews: 'titleLabel'.w(),
titleLabel: SC.LabelView.design({
layout: { width: 500, height: 18 },
value: "Unsupported file type!"
})
}),
previousButton: SC.ButtonView.design({
layout: {bottom: 10, left: 10, width: 50, height: 30 },
action: 'goToPreviousFile',
title: '<<',
isEnabledBinding: "Multivio.currentFileNodeController.hasPreviousFile"
}),
nextButton: SC.ButtonView.design({
layout: {bottom: 10, right: 10, width: 50, height: 30 },
action: 'goToNextFile',
isEnabledBinding: "Multivio.currentFileNodeController.hasNextFile",
title: '>>'
})
});
| gpl-2.0 |
rex-xxx/mt6572_x201 | mediatek/frameworks/common/src/com/mediatek/common/telephony/IPhoneNumberExt.java | 3179 | /* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein is
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
* the prior written permission of MediaTek inc. and/or its licensors, any
* reproduction, modification, use or disclosure of MediaTek Software, and
* information contained herein, in whole or in part, shall be strictly
* prohibited.
*
* MediaTek Inc. (C) 2010. All rights reserved.
*
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
* ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
* RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
* INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
* TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
* RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
* OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
* SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
* RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
* ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
* RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
* MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
* CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* The following software/firmware and/or related documentation ("MediaTek
* Software") have been modified by MediaTek Inc. All revisions are subject to
* any receiver's applicable license agreements with MediaTek Inc.
*/
package com.mediatek.common.telephony;
public interface IPhoneNumberExt {
boolean isCustomizedEmergencyNumber(String number, String plusNumber, String numberPlus);
boolean isSpecialEmergencyNumber(String dialString);
boolean isCustomizedEmergencyNumberExt(String number, String plusNumber, String numberPlus);
/**
* @hide
*/
String prependPlusToNumber(String number);
/**
* isVoiceMailNumber: checks a given number against the voicemail
* number provided by the RIL and SIM card. The caller must have
* the READ_PHONE_STATE credential.
*
* @param number the number to look up.
* @param simId the SIM card ID
* @return true if the number is in the list of voicemail. False
* otherwise, including if the caller does not have the permission
* to read the VM number.
* @hide TODO: pending API Council approval
*/
boolean isVoiceMailNumber(String number, int simId);
}
| gpl-2.0 |
jnschilling/fahrnerphp | wp-content/plugins/pmi_fahrner/update_cotes.php | 2970 | <?php
//update_cotes.php
include('functions.php');
// $query = "UPDATE MP SET [type_plaque] = '".$_GET['type_plaque']."' ,";
// $query .= " [DESIGNATION] = '".$_GET['DESIGNATION']."' ,";
// $query .= " [famille] = '".$_GET['famille']."', ";
// $query .= " [epaisseur] = '".$_GET['epaisseur']."', ";
// $query .= " [CODEMATPMI] = '".$_GET['CODEMATPMI']."', ";
// $query .= " [CODEARDIS] = '".$_GET['CODEARDIS']."', ";
// $query .= " [CC] = '".$_GET['CC']."', ";
// $query .= " [PRIXDEVIS] = '".$_GET['PRIXDEVIS']."', ";
// $query .= " [PRIXVALO] = '".$_GET['PRIXVALO']."' ";
// $query .= " WHERE SOC = '100' AND ID = ".$_GET['ID'];
$pmi_conn = pmi_connect();
//var_dump(date('Gis'));
if (floatval($_GET['CNCTVALNOM']) <> 0) {
$query = "IF EXISTS (SELECT * FROM CONTROLE WHERE CNKTSOC = '100' AND CNKTCODART = '".$_GET['ARKTCODART']."' AND CNKTCOMART = '".$_GET['ARKTCOMART']."' AND CNKNNOCTR = ".$_GET['CNKNNOCTR']." )";
$query .= " UPDATE CONTROLE ";
$query .= "SET CNCTVALNOM = ".$_GET['CNCTVALNOM'].", ";
$query .= "CNCNMINI = ".$_GET['CNCNMINI'].", ";
$query .= "CNCNMAXI = ".$_GET['CNCNMAXI']." ";
$query .= "WHERE CNKTSOC = '100' AND CNKTCODART = '".$_GET['ARKTCODART']."' AND CNKTCOMART = '".$_GET['ARKTCOMART']."' AND CNKNNOCTR = ".$_GET['CNKNNOCTR']." ";
$query .= "ELSE INSERT INTO CONTROLE (CNKTSOC, CNKNNOCTR, CNKTCODART, CNKTCOMART, CNCTVALNOM , CNCNMINI , CNCNMAXI, CNKNLIGNOM, ";
$query .= "CNKTTYPE, ";
$query .= "CNKTINDICE, ";
$query .= "CNCNORDRE, ";
$query .= "CNCTLIB, ";
$query .= "CNCTREP, ";
$query .= "CNCTMOYEN, ";
$query .= "CNCNSYMBOL, ";
$query .= "CNCTUNITE, ";
$query .= "CNCTQUALIT, ";
$query .= "CNCTFRQTYP, ";
$query .= "CNCNFRQVAL,";
$query .= "CNCTAUTO, ";
$query .= "CNCJCREA ,";
$query .= "CNCJMODIF ,";
$query .= "CNCTMODIFH, ";
$query .= "CNCTUTILIS";
$query .= ") ";
$query .= "values ('100', ".$_GET['CNKNNOCTR'].", '".$_GET['ARKTCODART']."', '".$_GET['ARKTCOMART']."', '".$_GET['CNCTVALNOM']."', ".$_GET['CNCNMINI']." , ".$_GET['CNCNMAXI'].", ".$_GET['NOKNLIGNOM']." , ";
$query .= "'N', ";
$query .= "'000', ";
$query .= "".$_GET['CNKNNOCTR'].",";
$query .= "'mesure ".$_GET['CNCTVALNOM']."', ";
$query .= "'I', ";
$query .= "'PC', ";
$query .= "1, ";
$query .= "'mm' , ";
$query .= "'' , ";
$query .= "'C' , ";
$query .= "1 , ";
$query .= "'' , ";
$query .= "'".date('Ymd')."' , ";
$query .= "'".date('Ymd')."' , ";
$query .= "".date('Gis').", ";
$query .= "'intranet'";
$query .= ") ";
} else {
$query = "DELETE CONTROLE WHERE CNKTSOC = '100' AND CNKTCODART = '".$_GET['ARKTCODART']."' AND CNKTCOMART = '".$_GET['ARKTCOMART']."' AND CNKNNOCTR = ".$_GET['CNKNNOCTR']." ";
}
//echo $query;
$stmt = sqlsrv_query( $pmi_conn, $query , array(), array( "Scrollable" => SQLSRV_CURSOR_KEYSET ));
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true));
} else {
//print_r($stmt);
return $stmt;
}
$pmi_conn.close;
?> | gpl-2.0 |
guod08/druid | server/src/main/java/io/druid/curator/discovery/NoopServiceAnnouncer.java | 1107 | /*
* Druid - a distributed column store.
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.druid.curator.discovery;
import io.druid.server.DruidNode;
/**
* Does nothing.
*/
public class NoopServiceAnnouncer implements ServiceAnnouncer
{
@Override
public void announce(DruidNode node)
{
}
@Override
public void unannounce(DruidNode node)
{
}
}
| gpl-2.0 |
edgardmessias/glpi | front/ticket.form.php | 9006 | <?php
/**
* ---------------------------------------------------------------------
* GLPI - Gestionnaire Libre de Parc Informatique
* Copyright (C) 2015-2020 Teclib' and contributors.
*
* http://glpi-project.org
*
* based on GLPI - Gestionnaire Libre de Parc Informatique
* Copyright (C) 2003-2014 by the INDEPNET Development Team.
*
* ---------------------------------------------------------------------
*
* LICENSE
*
* This file is part of GLPI.
*
* GLPI is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* GLPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GLPI. If not, see <http://www.gnu.org/licenses/>.
* ---------------------------------------------------------------------
*/
use Glpi\Event;
include ('../inc/includes.php');
Session::checkLoginUser();
$track = new Ticket();
if (!isset($_GET['id'])) {
$_GET['id'] = "";
}
$date_fields = [
'date',
'due_date',
'time_to_own'
];
foreach ($date_fields as $date_field) {
//handle not clean dates...
if (isset($_POST["_$date_field"])
&& isset($_POST[$date_field])
&& trim($_POST[$date_field]) == ''
&& trim($_POST["_$date_field"]) != '') {
$_POST[$date_field] = $_POST["_$date_field"];
}
}
if (isset($_POST["add"])) {
$track->check(-1, CREATE, $_POST);
if ($track->add($_POST)) {
if ($_SESSION['glpibackcreated']) {
Html::redirect($track->getLinkURL());
}
}
Html::back();
} else if (isset($_POST['update'])) {
$track->check($_POST['id'], UPDATE);
$track->update($_POST);
if (isset($_POST['kb_linked_id'])) {
//if solution should be linked to selected KB entry
$params = [
'knowbaseitems_id' => $_POST['kb_linked_id'],
'itemtype' => $track->getType(),
'items_id' => $track->getID()
];
$existing = $DB->request(
'glpi_knowbaseitems_items',
$params
);
if ($existing->numrows() == 0) {
$kb_item_item = new KnowbaseItem_Item();
$kb_item_item->add($params);
}
}
Event::log($_POST["id"], "ticket", 4, "tracking",
//TRANS: %s is the user login
sprintf(__('%s updates an item'), $_SESSION["glpiname"]));
if ($track->can($_POST["id"], READ)) {
$toadd = '';
// Copy solution to KB redirect to KB
if (isset($_POST['_sol_to_kb']) && $_POST['_sol_to_kb']) {
$toadd = "&_sol_to_kb=1";
}
Html::redirect(Ticket::getFormURLWithID($_POST["id"]).$toadd);
}
Session::addMessageAfterRedirect(__('You have been redirected because you no longer have access to this ticket'),
true, ERROR);
Html::redirect($CFG_GLPI["root_doc"]."/front/ticket.php");
} else if (isset($_POST['delete'])) {
$track->check($_POST['id'], DELETE);
if ($track->delete($_POST)) {
Event::log($_POST["id"], "ticket", 4, "tracking",
//TRANS: %s is the user login
sprintf(__('%s deletes an item'), $_SESSION["glpiname"]));
}
$track->redirectToList();
} else if (isset($_POST['purge'])) {
$track->check($_POST['id'], PURGE);
if ($track->delete($_POST, 1)) {
Event::log($_POST["id"], "ticket", 4, "tracking",
//TRANS: %s is the user login
sprintf(__('%s purges an item'), $_SESSION["glpiname"]));
}
$track->redirectToList();
} else if (isset($_POST["restore"])) {
$track->check($_POST['id'], DELETE);
if ($track->restore($_POST)) {
Event::log($_POST["id"], "ticket", 4, "tracking",
//TRANS: %s is the user login
sprintf(__('%s restores an item'), $_SESSION["glpiname"]));
}
$track->redirectToList();
} else if (isset($_POST['sla_delete'])) {
$track->check($_POST["id"], UPDATE);
$track->deleteLevelAgreement("SLA", $_POST["id"], $_POST['type'], $_POST['delete_date']);
Event::log($_POST["id"], "ticket", 4, "tracking",
//TRANS: %s is the user login
sprintf(__('%s updates an item'), $_SESSION["glpiname"]));
Html::redirect(Ticket::getFormURLWithID($_POST["id"]));
} else if (isset($_POST['ola_delete'])) {
$track->check($_POST["id"], UPDATE);
$track->deleteLevelAgreement("OLA", $_POST["id"], $_POST['type'], $_POST['delete_date']);
Event::log($_POST["id"], "ticket", 4, "tracking",
//TRANS: %s is the user login
sprintf(__('%s updates an item'), $_SESSION["glpiname"]));
Html::redirect(Ticket::getFormURLWithID($_POST["id"]));
} else if (isset($_POST['addme_observer'])) {
$track->check($_POST['tickets_id'], READ);
$input = array_merge(Toolbox::addslashes_deep($track->fields), [
'id' => $_POST['tickets_id'],
'_itil_observer' => [
'_type' => "user",
'users_id' => Session::getLoginUserID(),
'use_notification' => 1,
]
]);
$track->update($input);
Event::log($_POST['tickets_id'], "ticket", 4, "tracking",
//TRANS: %s is the user login
sprintf(__('%s adds an actor'), $_SESSION["glpiname"]));
Html::redirect(Ticket::getFormURLWithID($_POST['tickets_id']));
} else if (isset($_POST['addme_assign'])) {
$track->check($_POST['tickets_id'], READ);
$input = array_merge(Toolbox::addslashes_deep($track->fields), [
'id' => $_POST['tickets_id'],
'_itil_assign' => [
'_type' => "user",
'users_id' => Session::getLoginUserID(),
'use_notification' => 1,
]
]);
$track->update($input);
Event::log($_POST['tickets_id'], "ticket", 4, "tracking",
//TRANS: %s is the user login
sprintf(__('%s adds an actor'), $_SESSION["glpiname"]));
Html::redirect(Ticket::getFormURLWithID($_POST['tickets_id']));
} else if (isset($_REQUEST['delete_document'])) {
$track->getFromDB((int)$_REQUEST['tickets_id']);
$doc = new Document();
$doc->getFromDB(intval($_REQUEST['documents_id']));
if ($doc->can($doc->getID(), UPDATE)) {
$document_item = new Document_Item;
$found_document_items = $document_item->find([
$track->getAssociatedDocumentsCriteria(),
'documents_id' => $doc->getID()
]);
foreach ($found_document_items as $item) {
$document_item->delete(Toolbox::addslashes_deep($item), true);
}
}
Html::back();
}
if (isset($_GET["id"]) && ($_GET["id"] > 0)) {
if (Session::getCurrentInterface() == "helpdesk") {
Html::helpHeader(Ticket::getTypeName(Session::getPluralNumber()), '', $_SESSION["glpiname"]);
} else {
Html::header(Ticket::getTypeName(Session::getPluralNumber()), '', "helpdesk", "ticket");
}
$available_options = ['load_kb_sol', '_openfollowup'];
$options = [];
foreach ($available_options as $key) {
if (isset($_GET[$key])) {
$options[$key] = $_GET[$key];
}
}
$options['id'] = $_GET["id"];
$track->display($options);
if (isset($_GET['_sol_to_kb'])) {
Ajax::createIframeModalWindow('savetokb',
KnowbaseItem::getFormURL().
"?_in_modal=1&item_itemtype=Ticket&item_items_id=".
$_GET["id"],
['title' => __('Save solution to the knowledge base'),
'reloadonclose' => false]);
echo Html::scriptBlock('$(function() {' .Html::jsGetElementbyID('savetokb').".dialog('open'); });");
}
} else {
if (Session::getCurrentInterface() != 'central') {
Html::redirect($CFG_GLPI["root_doc"]."/front/helpdesk.public.php?create_ticket=1");
die;
}
Html::header(__('New ticket'), '', "helpdesk", "ticket");
unset($_REQUEST['id']);
unset($_GET['id']);
unset($_POST['id']);
// alternative email must be empty for create ticket
unset($_REQUEST['_users_id_requester_notif']['alternative_email']);
unset($_REQUEST['_users_id_observer_notif']['alternative_email']);
unset($_REQUEST['_users_id_assign_notif']['alternative_email']);
unset($_REQUEST['_suppliers_id_assign_notif']['alternative_email']);
// Add a ticket from item : format data
if (isset($_REQUEST['_add_fromitem'])
&& isset($_REQUEST['itemtype'])
&& isset($_REQUEST['items_id'])) {
$_REQUEST['items_id'] = [$_REQUEST['itemtype'] => [$_REQUEST['items_id']]];
}
$track->display($_REQUEST);
}
if (Session::getCurrentInterface() == "helpdesk") {
Html::helpFooter();
} else {
Html::footer();
}
| gpl-2.0 |
ppoo14152/MonsterMaster | proyecto/dNivel2.java | 647 | import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class dNivel2 here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class dNivel2 extends World
{
/**
* Constructor for objects of class dNivel2.
*
*/
public dNivel2()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(800, 600, 1);
pinta_mundo();
}
private void pinta_mundo()
{
addObject(new dJug(), 400, 550);
addObject(new hEnem(), 600, 550);
}
}
| gpl-2.0 |
cyberchimps/Response-Pro | core/metabox/meta-box-class.php | 27437 | <?php
class Chimps_Metabox {
function __construct($id, $title, $options) {
$this->id = $id;
$this->title = $title;
$this->options = $options;
$this->fields = array();
}
function tab($title) {
$this->add(array('title' => $title, 'type' => 'tab'));
return $this;
}
function add($options) {
$this->fields[] = $options;
}
function end() {
$tabs = array();
foreach($this->fields as $field) {
if($field['type'] === 'tab') {
$tabs[] = array('title' => $field['title'], 'fields' => array());
} else {
$tabs[count($tabs) - 1]['fields'][] = $field;
}
}
$final = array (
'id' => $this->id,
'title' => $this->title,
'pages' => $this->options['pages'],
'tabs' => $tabs
);
new RW_Meta_Box_Taxonomy($final);
}
/**
* Helper Functions
*/
function image($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'image', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
function text($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'text', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
function checkbox($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'checkbox', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
function sliderhelp($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'sliderhelp', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
function reorder($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'reorder', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
function select($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'select', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
function section_order($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'section_order', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
function pagehelp($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'pagehelp', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
function textarea($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'textarea', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
function color($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'color', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
function image_select($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'image_select', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
function single_image($id, $name, $desc, $options = array()) {
$this->add($options + array('type' => 'single_image', 'id' => $id, 'name' => $name, 'desc' => $desc));
return $this;
}
}
/**
* Meta Box class
*/
class RW_Meta_Box {
var $_meta_box;
var $tabs;
// Create meta box based on given data
function __construct($meta_box) {
if (!is_admin()) return;
// assign meta box values to local variables and add it's missed values
$this->_meta_box = $meta_box;
$this->tabs = & $this->_meta_box['tabs'];
$this->add_missed_values();
add_action('admin_menu', array(&$this, 'add')); // add meta box
add_action('save_post', array(&$this, 'save')); // save meta box's data
// check for some special fields and add needed actions for them
$this->check_field_upload();
$this->check_field_color();
}
/******************** BEGIN UPLOAD **********************/
// Check field upload and add needed actions
function check_field_upload() {
if ($this->has_field('image') || $this->has_field('file')) {
add_action('post_edit_form_tag', array(&$this, 'add_enctype')); // add data encoding type for file uploading
add_action('admin_head-post.php', array(&$this, 'add_script_upload')); // add scripts for handling add/delete images
add_action('admin_head-post-new.php', array(&$this, 'add_script_upload'));
add_action('delete_post', array(&$this, 'delete_attachments')); // delete all attachments when delete post
}
}
// Add data encoding type for file uploading
function add_enctype() {
echo ' enctype="multipart/form-data"';
}
// Add scripts for handling add/delete images
function add_script_upload() {
echo '
<script type="text/javascript">
jQuery(document).ready(function($) {
// add more file
$(".rw-add-file").click(function(){
var $first = $(this).parent().find(".file-input:first");
$first.clone().insertAfter($first).show();
return false;
});
// delete file
$(".rw-delete-file").click(function(){
var $parent = $(this).parent(),
data = $(this).attr("rel");
$.post(ajaxurl, {action: \'rw_delete_file\', data: data}, function(response){
$parent.fadeOut("slow");
});
return false;
});
});
</script>';
}
// Delete all attachments when delete post
function delete_attachments($post_id) {
$attachments = get_posts(array(
'numberposts' => -1,
'post_type' => 'attachment',
'post_parent' => $post_id
));
if (!empty($attachments)) {
foreach ($attachments as $att) {
wp_delete_attachment($att->ID);
}
}
}
/******************** END UPLOAD **********************/
/******************** BEGIN COLOR PICKER **********************/
// Check field color
function check_field_color() {
if ($this->has_field('color') && $this->is_edit_page()) {
wp_enqueue_style('farbtastic'); // enqueue built-in script and style for color picker
wp_enqueue_script('farbtastic');
}
}
// Custom script for color picker
function add_script_color() {
$ids = array();
foreach($this->tabs as $tab) {
foreach ($tab['fields'] as $field) {
if ('color' == $field['type']) {
$ids[] = $field['id'];
}
}
}
echo '
<script type="text/javascript">
jQuery(document).ready(function($){
';
foreach ($ids as $id) {
echo "
$('#picker-$id').farbtastic('#$id');
$('#select-$id').click(function(){
$('#picker-$id').toggle();
return false;
});
";
}
echo '
});
</script>
';
}
/******************** END COLOR PICKER **********************/
/******************** BEGIN META BOX PAGE **********************/
// Add meta box for multiple post types
function add() {
foreach ($this->_meta_box['pages'] as $page) {
add_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);
}
}
// Callback function to show fields in meta box
function show() {
global $post;
wp_nonce_field(basename(__FILE__), 'rw_meta_box_nonce');
echo '<div class="metabox-tabs-div">';
foreach($this->_meta_box['tabs'] as $counter => $tab) {
$counter++;
$id = preg_replace("/[^a-zA-Z0-9]+/", "-", $tab['title']);
echo "<div class='subsection' id='subsection-{$id}'>";
echo "<h4>{$tab['title']}<span></span></h4>";
echo "<div class='subsection-items'>";
$this->render_fields($tab['fields'], "tab{$counter}");
echo "</div>";
echo "</div>";
}
echo '</div>';
$this->add_script_color();
}
function render_fields($fields, $tab = '') {
global $post;
echo '<div class="', $tab,'">';
echo '<table class="form-table">';
foreach($fields as $field) {
$meta = get_post_meta($post->ID, $field['id'], !(isset($field['multiple']) && $field['multiple']));
$meta = !empty($meta) ? $meta : (isset($field['std']) ? $field['std'] : '');
echo '<tr class="'.$field['id'].'">';
// call separated methods for displaying each type of field
call_user_func(array(&$this, 'show_field_' . $field['type']), $field, $meta);
echo '</tr>';
}
echo '</table>';
echo '</div>';
}
/******************** END META BOX PAGE **********************/
/******************** BEGIN META BOX FIELDS **********************/
function show_field_begin($field, $meta) {
echo "<th style='width:20%'><label for='{$field['id']}'>{$field['name']}</label></th><td>";
}
function show_field_end($field, $meta) {
echo "<br />{$field['desc']}</td>";
}
function show_field_text($field, $meta) {
$this->show_field_begin($field, $meta);
echo "<input type='text' name='{$field['id']}' id='{$field['id']}' value='$meta' size='30' style='width:60%' />";
$this->show_field_end($field, $meta);
}
function show_field_textarea($field, $meta) {
$this->show_field_begin($field, $meta);
echo "<textarea name='{$field['id']}' cols='60' rows='15' style='width:97%'>$meta</textarea>";
$this->show_field_end($field, $meta);
}
function show_field_select($field, $meta) {
if (!is_array($meta)) $meta = (array) $meta;
$this->show_field_begin($field, $meta);
echo "<select name='{$field['id']}" . ((isset($field['multiple']) && $field['multiple']) ? "[]' multiple='multiple' style='height:auto'" : "'") . ">";
foreach ($field['options'] as $key => $value) {
echo "<option value='$key'" . selected(in_array($key, $meta), true, false) . ">$value</option>";
}
echo "</select>";
$this->show_field_end($field, $meta);
}
function show_field_radio($field, $meta) {
$this->show_field_begin($field, $meta);
foreach ($field['options'] as $key => $value) {
echo "<input type='radio' name='{$field['id']}' value='$key'" . checked($meta, $key, false) . " /> $value ";
}
$this->show_field_end($field, $meta);
}
function show_field_checkbox($field, $meta) {
$this->show_field_begin($field, $meta);
echo "<input type='checkbox' class='checkbox' name='{$field['id']}' id='checkbox-{$field['id']}' " . ($meta === 'on' ? 'checked="checked"' : '' ) . " value='1'/> {$field['desc']}</td>";
}
function show_field_wysiwyg($field, $meta) {
$this->show_field_begin($field, $meta);
echo "<textarea name='{$field['id']}' class='theEditor' cols='60' rows='15' style='width:97%'>$meta</textarea>";
$this->show_field_end($field, $meta);
}
function show_field_pagehelp($field, $meta) {
global $themenamefull, $pagedocs;
$this->show_field_begin($field, $meta);
echo "Visit our $themenamefull Page Options help page here: <a href='$pagedocs' target='_blank'>Page Options Documentation</a></td>";
}
function show_field_sliderhelp($field, $meta) {
global $themenamefull, $sliderdocs;
$this->show_field_begin($field, $meta);
echo "Visit our $themenamefull Slider help page here: <a href='$sliderdocs' target='_blank'>Slider Documentation</a></td>";
}
function show_field_reorder($field, $meta) {
$this->show_field_begin($field, $meta);
echo "Install the <a href='http://wordpress.org/extend/plugins/post-types-order/' target='_blank'>Post Types Order Plugin</a> to control the order of your custom slides.</td>";
}
function show_field_file($field, $meta) {
global $post;
if (!is_array($meta)) $meta = (array) $meta;
$this->show_field_begin($field, $meta);
echo "{$field['desc']}<br />";
if (!empty($meta)) {
// show attached files
$attachs = get_posts(array(
'numberposts' => -1,
'post_type' => 'attachment',
'post_parent' => $post->ID
));
$nonce = wp_create_nonce('rw_ajax_delete_file');
echo '<div style="margin-bottom: 10px"><strong>' . _('Uploaded files') . '</strong></div>';
echo '<ol>';
foreach ($attachs as $att) {
if (wp_attachment_is_image($att->ID)) continue; // what's image uploader for?
$src = wp_get_attachment_url($att->ID);
if (in_array($src, $meta)) {
echo "<li>" . wp_get_attachment_link($att->ID) . " (<a class='rw-delete-file' href='javascript:void(0)' rel='{$post->ID}!{$field['id']}!{$att->ID}!{$src}!{$nonce}'>Delete</a>)</li>";
}
}
echo '</ol>';
}
// show form upload
echo "<div style='clear: both'><strong>" . _('Upload new files') . "</strong></div>
<div class='new-files'>
<div class='file-input'><input type='file' name='{$field['id']}[]' /></div>
<a class='rw-add-file' href='javascript:void(0)'>" . _('Add more file') . "</a>
</div>
</td>";
}
function show_field_image($field, $meta) {
global $post;
if (!is_array($meta)) $meta = (array) $meta;
$this->show_field_begin($field, $meta);
echo "{$field['desc']}<br />";
if (!empty($meta)) {
// show attached images
$attachs = get_posts(array(
'numberposts' => -1,
'post_type' => 'attachment',
'post_parent' => $post->ID,
'post_mime_type' => 'image', // get attached images only
'output' => ARRAY_A
));
$nonce = wp_create_nonce('rw_ajax_delete_file');
echo '<div style="margin-bottom: 10px"><strong>' . _('Uploaded images') . '</strong></div>';
foreach ($attachs as $att) {
$src = wp_get_attachment_image_src($att->ID, 'full');
$src = $src[0];
if (in_array($src, $meta)) {
echo "<div style='margin: 0 10px 10px 0; float: left'><img width='150' src='$src' /><br />
<a class='rw-delete-file' href='javascript:void(0)' rel='{$post->ID}!{$field['id']}!{$att->ID}!{$src}!{$nonce}'>Delete</a>
</div>";
}
}
}
// show form upload
echo "<div style='clear: both'><strong>" . _('Upload new images (Make sure to publish the post to save)') . "</strong></div>
<div class='new-files'>
<div class='file-input'><input type='file' name='{$field['id']}[]' /></div>
</div>
</td>";
}
function show_field_color($field, $meta) {
if (empty($meta)) $meta = '#';
$this->show_field_begin($field, $meta);
echo "<input type='text' name='{$field['id']}' id='{$field['id']}' value='$meta' size='8' />
<a href='#' id='select-{$field['id']}'>" . _('Select a color') . "</a>
<div style='display:none' id='picker-{$field['id']}'></div>";
$this->show_field_end($field, $meta);
}
function show_field_checkbox_list($field, $meta) {
if (!is_array($meta)) $meta = (array) $meta;
$this->show_field_begin($field, $meta);
$html = array();
foreach ($field['options'] as $key => $value) {
$html[] = "<input type='checkbox' name='{$field['id']}[]' value='$key'" . checked(in_array($key, $meta), true, false) . " /> $value";
}
echo implode('<br />', $html);
$this->show_field_end($field, $meta);
}
function show_field_date($field, $meta) {
$this->show_field_text($field, $meta);
}
function show_field_time($field, $meta) {
$this->show_field_text($field, $meta);
}
function show_field_section_order($field, $meta) {
$root = get_template_directory_uri();
$this->show_field_begin($field, $meta);
$meta = explode(",", $meta);
echo "<div class='section_order'>";
echo "<div class='left_list'>";
echo "<div id='inactive'>Inactive Elements</div>";
echo "<div class='list_items'>";
foreach($field['options'] as $key => $value) {
if(in_array($key, $meta)) continue;
echo "<div class='list_item'>";
echo "<img src='$root/images/minus.png' class='action' title='Remove'/>";
echo "<span data-key='{$key}'>{$value}</span>";
echo "</div>";
}
echo "</div>";
echo "</div>";
echo "<div id='arrow'><img src='$root/images/arrowdrag.png' /></div>";
echo "<div class='right_list'>";
echo "<div id='active'>Active Elements</div>";
echo "<div id='drag'>Drag & Drop Elements</div>";
echo "<div class='list_items'>";
foreach($meta as $key) {
if(!$key) continue;
$value = $field['options'][$key];
echo "<div class='list_item'>";
echo "<img src='$root/images/minus.png' class='action' title='Remove'/>";
echo "<span data-key='{$key}'>{$value}</span>";
echo "</div>";
}
echo "</div>";
echo "</div>";
echo "<input type='hidden' id={$field['id']} name={$field['id']} />";
echo "</div>";
?>
<script type="text/javascript">
jQuery(function($) {
function update(base) {
var hidden = base.find("input[type='hidden']");
var val = [];
base.find('.right_list .list_items span').each(function() {
val.push($(this).data('key'));
})
hidden.val(val.join(",")).change();
$('.right_list .action').show();
$('.left_list .action').hide();
}
$(".left_list .list_items").delegate(".action", "click", function() {
var item = $(this).closest('.list_item');
$(this).closest('.section_order').children('.right_list').children('.list_items').append(item);
update($(this).closest(".section_order"));
});
$(".right_list .list_items").delegate(".action", "click", function() {
var item = $(this).closest('.list_item');
$(this).val('Add');
$(this).closest('.section_order').children('.left_list').children('.list_items').append(item);
$(this).hide();
update($(this).closest(".section_order"));
});
$(".right_list .list_items").sortable({
update: function() {
update($(this).closest(".section_order"));
},
connectWith: '.left_list .list_items'
});
$(".left_list .list_items").sortable({
connectWith: '.right_list .list_items'
});
$('.section_order').each(function() {
update($(this));
});
});
</script>
<style type="text/css">
.left_list, .right_list {
float: left;
margin: 20px;
width: 130px;
}
.list_items {
padding-bottom: 5px;
}
</style>
<?php
$this->show_field_end($field, $meta);
}
function show_field_image_select($field, $meta) {
$this->show_field_begin($field, $meta);
// var_dump($field, $meta);
echo "<div class='image_select'>";
foreach($field['options'] as $key=>$option) {
echo "<img data-key='{$key}' class='" . ($key == $meta ? ' selected' : '' ) . "' src='{$option}' />";
}
echo "<input type='hidden' name='{$field['id']}' />";
echo "</div>";
// $this->show_field_end($field, $meta);
}
function show_field_single_image($field, $meta) {
$this->show_field_begin($field, $meta);
if($meta) {
echo "<img class='image_preview' src='{$meta}' /><br/>";
}
echo "<input type='button' class='upload_image_button' value='".__( 'Upload', 'cyberchimps' )."' />";
echo "<br/>".__( 'or enter URL', 'cyberchimps' )."<br/>";
echo "<input class='upload_image_field' type='text' size='50' name='{$field['id']}_url' value='{$meta}'/>";
$this->show_field_end($field, $meta);
}
/******************** END META BOX FIELDS **********************/
/******************** BEGIN META BOX SAVE **********************/
// Save data from meta box
function save($post_id) {
global $pagenow;
// check if this is a revision as the revision id is different to post id. if it is get the parent post id if not then get the post id
$post_revision = wp_is_post_revision( $post_id );
$post_id = ( $post_revision ) ? $post_revision : $post_id;
// check that the save is coming from the edit post page and not the quick edit
if( 'post.php' == $pagenow ) {
if (isset($_POST['post_type'])) {
$post_type = $_POST['post_type'];
}
else {
$post_type = 'null';
}
$post_type_object = get_post_type_object($post_type);
if ((defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) // check autosave
|| (!isset($_POST['post_ID']) || $post_id != $_POST['post_ID']) // check revision
|| (!in_array($_POST['post_type'], $this->_meta_box['pages'])) // check if current post type is supported
|| (!check_admin_referer(basename(__FILE__), 'rw_meta_box_nonce')) // verify nonce
|| (!current_user_can($post_type_object->cap->edit_post, $post_id))) { // check permission
return $post_id;
}
foreach($this->tabs as $tab) {
foreach ($tab['fields'] as $field) {
$name = $field['id'];
$type = $field['type'];
$old = get_post_meta($post_id, $name, !(isset($field['multiple']) && $field['multiple']));
$new = isset($_POST[$name]) ? $_POST[$name] : ((isset($field['multiple']) && $field['multiple']) ? array() : '');
// validate meta value
if (class_exists('RW_Meta_Box_Validate') && method_exists('RW_Meta_Box_Validate', $field['validate_func'])) {
$new = call_user_func(array('RW_Meta_Box_Validate', $field['validate_func']), $new);
}
// call defined method to save meta value, if there's no methods, call common one
$save_func = 'save_field_' . $type;
if (method_exists($this, $save_func)) {
call_user_func(array(&$this, 'save_field_' . $type), $post_id, $field, $old, $new);
} else {
$this->save_field($post_id, $field, $old, $new);
}
}
}
}
}
// Common functions for saving field
function save_field($post_id, $field, $old, $new) {
$name = $field['id'];
// single value
if (!(isset($field['multiple']) && $field['multiple'])) {
if ('' != $new && $new != $old) {
update_post_meta($post_id, $name, $new);
} elseif ('' == $new) {
delete_post_meta($post_id, $name, $old);
}
return;
}
// multiple values
// get new values that need to add and get old values that need to delete
$add = array_diff($new, $old);
$delete = array_diff($old, $new);
foreach ($add as $add_new) {
add_post_meta($post_id, $name, $add_new, false);
}
foreach ($delete as $delete_old) {
delete_post_meta($post_id, $name, $delete_old);
}
}
function save_field_wysiwyg($post_id, $field, $old, $new) {
$new = wpautop($new);
$this->save_field($post_id, $field, $old, $new);
}
function save_field_file($post_id, $field, $old, $new) {
$name = $field['id'];
if (empty($_FILES[$name])) return;
$this->fix_file_array($_FILES[$name]);
foreach ($_FILES[$name] as $position => $fileitem) {
$file = wp_handle_upload($fileitem, array('test_form' => false));
if (empty($file['file'])) continue;
$filename = $file['file'];
$attachment = array(
'post_mime_type' => $file['type'],
'guid' => $file['url'],
'post_parent' => $post_id,
'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),
'post_content' => ''
);
$id = wp_insert_attachment($attachment, $filename, $post_id);
if (!is_wp_error($id)) {
wp_update_attachment_metadata($id, wp_generate_attachment_metadata($id, $filename));
add_post_meta($post_id, $name, $file['url'], false); // save file's url in meta fields
}
}
}
// Save images, call save_field_file, cause they use the same mechanism
function save_field_image($post_id, $field, $old, $new) {
$this->save_field_file($post_id, $field, $old, $new);
}
function save_field_single_image($post_id, $field, $old, $new) {
if(isset($_FILES[$field['id']]) && $_FILES[$field['id']]['tmp_name']) {
$overrides = array('test_form' => false);
$file = wp_handle_upload($_FILES[$field['id']], $overrides);
if(!is_wp_error($file)) {
update_post_meta($post_id, $field['id'], $file['url']);
}
} elseif(isset($_POST[$field['id'] . '_url'])) {
$url = $_POST[$field['id'] . '_url'];
update_post_meta($post_id, $field['id'], $url);
}
}
function save_field_checkbox($post_id, $field, $old, $new) {
$new = $new ? "on" : "off";
update_post_meta($post_id, $field['id'], $new);
}
/******************** END META BOX SAVE **********************/
/******************** BEGIN HELPER FUNCTIONS **********************/
// Add missed values for meta box
function add_missed_values() {
// default values for meta box
$this->_meta_box = array_merge(array(
'context' => 'normal',
'priority' => 'high',
'pages' => array('if_custom_slides')
), $this->_meta_box);
// default values for fields
foreach($this->tabs as $tabkey => $tab) {
foreach ($tab['fields'] as $key => $field) {
$multiple = in_array($field['type'], array('checkbox_list', 'file', 'image')) ? true : false;
$std = $multiple ? array() : '';
$format = 'date' == $field['type'] ? 'yy-mm-dd' : ('time' == $field['type'] ? 'hh:mm' : '');
$this->tabs[$tabkey][$key] = array_merge(array(
'multiple' => $multiple,
'std' => $std,
'desc' => '',
'format' => $format,
'validate_func' => ''
), $field);
}
}
}
// Check if field with $type exists
function has_field($type) {
foreach($this->_meta_box['tabs'] as $tab) {
foreach($tab['fields'] as $field) {
if ($type == $field['type']) return true;
}
}
return false;
}
// Check if current page is edit page
function is_edit_page() {
global $pagenow;
if (in_array($pagenow, array('post.php', 'post-new.php'))) return true;
return false;
}
/**
* Fixes the odd indexing of multiple file uploads from the format:
* $_FILES['field']['key']['index']
* To the more standard and appropriate:
* $_FILES['field']['index']['key']
*/
function fix_file_array(&$files) {
$output = array();
foreach ($files as $key => $list) {
foreach ($list as $index => $value) {
$output[$index][$key] = $value;
}
}
$files = $output;
}
/******************** END HELPER FUNCTIONS **********************/
}
?>
<?php
/********************* BEGIN EXTENDING CLASS ***********************/
/**
* Extend RW_Meta_Box class
* Add field type: 'taxonomy'
*/
class RW_Meta_Box_Taxonomy extends RW_Meta_Box {
function add_missed_values() {
parent::add_missed_values();
// add 'multiple' option to taxonomy field with checkbox_list type
foreach($this->tabs as $keytab => $tab) {
foreach ($tab['fields'] as $key => $field) {
if ('taxonomy' == $field['type'] && 'checkbox_list' == $field['options']['type']) {
$this->tabs[$keytab]['fields'][$key]['multiple'] = true;
}
}
}
}
// show taxonomy list
function show_field_taxonomy($field, $meta) {
global $post;
if (!is_array($meta)) $meta = (array) $meta;
$this->show_field_begin($field, $meta);
$options = $field['options'];
$terms = get_terms($options['taxonomy'], $options['args']);
// checkbox_list
if ('checkbox_list' == $options['type']) {
foreach ($terms as $term) {
echo "<input type='checkbox' name='{$field['id']}[]' value='$term->slug'" . checked(in_array($term->slug, $meta), true, false) . " /> $term->name<br/>";
}
}
// select
else {
echo "<select name='{$field['id']}" . ($field['multiple'] ? "[]' multiple='multiple' style='height:auto'" : "'") . ">";
foreach ($terms as $term) {
echo "<option value='$term->slug'" . selected(in_array($term->slug, $meta), true, false) . ">$term->name</option>";
}
echo "</select>";
}
$this->show_field_end($field, $meta);
}
}
/********************* END EXTENDING CLASS ***********************/
add_action( 'admin_print_styles-post-new.php', 'metabox_enqueue' );
add_action( 'admin_print_styles-post.php', 'metabox_enqueue' );
function metabox_enqueue() {
$path = get_template_directory_uri()."/core/library/js/";
$path2 = get_template_directory_uri()."/css/";
$color = get_user_meta( get_current_user_id(), 'admin_color', true );
wp_register_style( 'metabox-tabs-css', $path2. 'metabox-tabs.css');
wp_register_script ( 'jf-metabox-tabs', $path. 'metabox-tabs.js');
wp_enqueue_script('jf-metabox-tabs');
wp_enqueue_script('media-upload');
wp_enqueue_script('thickbox');
wp_enqueue_style('thickbox');
wp_enqueue_script('jf-metabox-tabs');
wp_enqueue_script('custom', $path . 'custom.js', array('jquery') );
wp_enqueue_script('jquerycustom', get_template_directory_uri().'/core/library/js/jquery-custom.js', array('jquery') );
wp_enqueue_style('metabox-tabs-css');
}
/********************* END DEFINITION OF META BOXES ***********************/
function cyberchimps_add_edit_form_multipart_encoding() {
echo ' enctype="multipart/form-data"';
}
add_action('post_edit_form_tag', 'cyberchimps_add_edit_form_multipart_encoding');
| gpl-2.0 |
RsrchBoy/dpkg-s3fs | src/curl.cpp | 25782 | /*
* s3fs - FUSE-based file system backed by Amazon S3
*
* Copyright 2007-2008 Randy Rizun <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
#include <errno.h>
#include <syslog.h>
#include <pthread.h>
#include <curl/curl.h>
#include <openssl/bio.h>
#include <openssl/buffer.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/md5.h>
#include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <algorithm>
#include "common.h"
#include "curl.h"
#include "string_util.h"
#include "s3fs.h"
using namespace std;
//-------------------------------------------------------------------
// Typedef
//-------------------------------------------------------------------
struct case_insensitive_compare_func {
bool operator ()(const string &a, const string &b) {
return strcasecmp(a.c_str(), b.c_str()) < 0;
}
};
typedef map<string, string, case_insensitive_compare_func> mimes_t;
typedef pair<double, double> progress_t;
//-------------------------------------------------------------------
// Static valiables
//-------------------------------------------------------------------
static pthread_mutex_t curl_handles_lock;
static const EVP_MD* evp_md = EVP_sha1();
static map<CURL*, time_t> curl_times;
static map<CURL*, progress_t> curl_progress;
static string curl_ca_bundle;
static mimes_t mimeTypes;
//-------------------------------------------------------------------
// Class BodyData
//-------------------------------------------------------------------
#define BODYDATA_RESIZE_APPEND_MIN (1 * 1024) // 1KB
#define BODYDATA_RESIZE_APPEND_MID (1 * 1024 * 1024) // 1MB
#define BODYDATA_RESIZE_APPEND_MAX (10 * 1024 * 1024) // 10MB
bool BodyData::Resize(size_t addbytes)
{
if(IsSafeSize(addbytes)){
return true;
}
// New size
size_t need_size = (lastpos + addbytes + 1) - bufsize;
if(BODYDATA_RESIZE_APPEND_MAX < bufsize){
need_size = (BODYDATA_RESIZE_APPEND_MAX < need_size ? need_size : BODYDATA_RESIZE_APPEND_MAX);
}else if(BODYDATA_RESIZE_APPEND_MID < bufsize){
need_size = (BODYDATA_RESIZE_APPEND_MID < need_size ? need_size : BODYDATA_RESIZE_APPEND_MID);
}else if(BODYDATA_RESIZE_APPEND_MIN < bufsize){
need_size = ((bufsize * 2) < need_size ? need_size : (bufsize * 2));
}else{
need_size = (BODYDATA_RESIZE_APPEND_MIN < need_size ? need_size : BODYDATA_RESIZE_APPEND_MIN);
}
// realloc
if(NULL == (text = (char*)realloc(text, (bufsize + need_size)))){
FGPRINT("BodyData::Resize() not enough memory (realloc returned NULL)\n");
SYSLOGDBGERR("not enough memory (realloc returned NULL)\n");
return false;
}
bufsize += need_size;
return true;
}
void BodyData::Clear(void)
{
if(text){
free(text);
text = NULL;
}
lastpos = 0;
bufsize = 0;
}
bool BodyData::Append(void* ptr, size_t bytes)
{
if(!ptr){
return false;
}
if(0 == bytes){
return true;
}
if(!Resize(bytes)){
return false;
}
memcpy(&text[lastpos], ptr, bytes);
lastpos += bytes;
text[lastpos] = '\0';
return true;
}
const char* BodyData::str(void) const
{
static const char* strnull = "";
if(!text){
return strnull;
}
return text;
}
//-------------------------------------------------------------------
// Functions
//-------------------------------------------------------------------
int init_curl_handles_mutex(void)
{
return pthread_mutex_init(&curl_handles_lock, NULL);
}
int destroy_curl_handles_mutex(void)
{
return pthread_mutex_destroy(&curl_handles_lock);
}
size_t header_callback(void *data, size_t blockSize, size_t numBlocks, void *userPtr)
{
headers_t* headers = reinterpret_cast<headers_t*>(userPtr);
string header(reinterpret_cast<char*>(data), blockSize * numBlocks);
string key;
stringstream ss(header);
if (getline(ss, key, ':')) {
// Force to lower, only "x-amz"
string lkey = key;
transform(lkey.begin(), lkey.end(), lkey.begin(), static_cast<int (*)(int)>(std::tolower));
if(lkey.substr(0, 5) == "x-amz"){
key = lkey;
}
string value;
getline(ss, value);
(*headers)[key] = trim(value);
}
return blockSize * numBlocks;
}
CURL *create_curl_handle(void)
{
time_t now;
CURL *curl_handle;
pthread_mutex_lock(&curl_handles_lock);
curl_handle = curl_easy_init();
curl_easy_reset(curl_handle);
curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, true);
curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT, connect_timeout);
curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt(curl_handle, CURLOPT_PROGRESSFUNCTION, my_curl_progress);
curl_easy_setopt(curl_handle, CURLOPT_PROGRESSDATA, curl_handle);
// curl_easy_setopt(curl_handle, CURLOPT_FORBID_REUSE, 1);
if(ssl_verify_hostname.substr(0,1) == "0"){
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYHOST, 0);
}
if(curl_ca_bundle.size() != 0){
curl_easy_setopt(curl_handle, CURLOPT_CAINFO, curl_ca_bundle.c_str());
}
now = time(0);
curl_times[curl_handle] = now;
curl_progress[curl_handle] = progress_t(-1, -1);
pthread_mutex_unlock(&curl_handles_lock);
return curl_handle;
}
void destroy_curl_handle(CURL *curl_handle)
{
if(curl_handle != NULL) {
pthread_mutex_lock(&curl_handles_lock);
curl_times.erase(curl_handle);
curl_progress.erase(curl_handle);
curl_easy_cleanup(curl_handle);
pthread_mutex_unlock(&curl_handles_lock);
}
return;
}
int curl_delete(const char *path)
{
int result;
string date;
string url;
string my_url;
string resource;
auto_curl_slist headers;
CURL *curl = NULL;
resource = urlEncode(service_path + bucket + path);
url = host + resource;
date = get_date();
headers.append("Date: " + date);
headers.append("Content-Type: ");
if(public_bucket.substr(0,1) != "1"){
headers.append("Authorization: AWS " + AWSAccessKeyId + ":" +
calc_signature("DELETE", "", date, headers.get(), resource));
}
my_url = prepare_url(url.c_str());
curl = create_curl_handle();
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers.get());
curl_easy_setopt(curl, CURLOPT_URL, my_url.c_str());
result = my_curl_easy_perform(curl);
destroy_curl_handle(curl);
return result;
}
int curl_get_headers(const char *path, headers_t &meta)
{
int result;
CURL *curl;
FGPRINT(" curl_headers[path=%s]\n", path);
string resource(urlEncode(service_path + bucket + path));
string url(host + resource);
headers_t responseHeaders;
curl = create_curl_handle();
curl_easy_setopt(curl, CURLOPT_NOBODY, true); // HEAD
curl_easy_setopt(curl, CURLOPT_FILETIME, true); // Last-Modified
curl_easy_setopt(curl, CURLOPT_HEADERDATA, &responseHeaders);
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback);
auto_curl_slist headers;
string date = get_date();
headers.append("Date: " + date);
headers.append("Content-Type: ");
if(public_bucket.substr(0,1) != "1") {
headers.append("Authorization: AWS " + AWSAccessKeyId + ":" +
calc_signature("HEAD", "", date, headers.get(), resource));
}
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers.get());
string my_url = prepare_url(url.c_str());
curl_easy_setopt(curl, CURLOPT_URL, my_url.c_str());
result = my_curl_easy_perform(curl);
destroy_curl_handle(curl);
if(result != 0){
return result;
}
// file exists in s3
// fixme: clean this up.
meta.clear();
for (headers_t::iterator iter = responseHeaders.begin(); iter != responseHeaders.end(); ++iter) {
string key = (*iter).first;
string value = (*iter).second;
if(key == "Content-Type"){
meta[key] = value;
}else if(key == "Content-Length"){
meta[key] = value;
}else if(key == "ETag"){
meta[key] = value;
}else if(key == "Last-Modified"){
meta[key] = value;
}else if(key.substr(0, 5) == "x-amz"){
meta[key] = value;
}else{
// Check for upper case
transform(key.begin(), key.end(), key.begin(), static_cast<int (*)(int)>(std::tolower));
if(key.substr(0, 5) == "x-amz"){
meta[key] = value;
}
}
}
return 0;
}
CURL *create_head_handle(head_data *request_data)
{
CURL *curl_handle = create_curl_handle();
string resource = urlEncode(service_path + bucket + request_data->path);
string url = host + resource;
// libcurl 7.17 does deep copy of url, deep copy "stable" url
string my_url = prepare_url(url.c_str());
request_data->url = new string(my_url.c_str());
request_data->requestHeaders = 0;
request_data->responseHeaders = new headers_t;
curl_easy_setopt(curl_handle, CURLOPT_URL, request_data->url->c_str());
curl_easy_setopt(curl_handle, CURLOPT_NOBODY, true); // HEAD
curl_easy_setopt(curl_handle, CURLOPT_FILETIME, true); // Last-Modified
// requestHeaders
string date = get_date();
request_data->requestHeaders = curl_slist_append(
request_data->requestHeaders, string("Date: " + date).c_str());
request_data->requestHeaders = curl_slist_append(
request_data->requestHeaders, string("Content-Type: ").c_str());
if(public_bucket.substr(0,1) != "1") {
request_data->requestHeaders = curl_slist_append(
request_data->requestHeaders, string("Authorization: AWS " + AWSAccessKeyId + ":" +
calc_signature("HEAD", "", date, request_data->requestHeaders, resource)).c_str());
}
curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, request_data->requestHeaders);
// responseHeaders
curl_easy_setopt(curl_handle, CURLOPT_HEADERDATA, request_data->responseHeaders);
curl_easy_setopt(curl_handle, CURLOPT_HEADERFUNCTION, header_callback);
return curl_handle;
}
/**
* @return fuse return code
*/
int my_curl_easy_perform(CURL* curl, BodyData* body, BodyData* head, FILE* f)
{
char url[256];
time_t now;
char* ptr_url = url;
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL , &ptr_url);
SYSLOGDBG("connecting to URL %s", ptr_url);
// curl_easy_setopt(curl, CURLOPT_VERBOSE, true);
if(ssl_verify_hostname.substr(0,1) == "0"){
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
}
if(curl_ca_bundle.size() != 0){
curl_easy_setopt(curl, CURLOPT_CAINFO, curl_ca_bundle.c_str());
}
long responseCode;
// 1 attempt + retries...
int t = retries + 1;
while (t-- > 0) {
if (f) {
rewind(f);
}
CURLcode curlCode = curl_easy_perform(curl);
switch (curlCode) {
case CURLE_OK:
// Need to look at the HTTP response code
if (curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &responseCode) != 0) {
SYSLOGERR("curl_easy_getinfo failed while trying to retrieve HTTP response code");
return -EIO;
}
SYSLOGDBG("HTTP response code %ld", responseCode);
if (responseCode < 400) {
return 0;
}
if (responseCode >= 500) {
SYSLOGERR("###HTTP response=%ld", responseCode);
sleep(4);
break;
}
// Service response codes which are >= 400 && < 500
switch(responseCode) {
case 400:
SYSLOGDBGERR("HTTP response code 400 was returned");
SYSLOGDBGERR("Body Text: %s", (body ? body->str() : ""));
SYSLOGDBG("Now returning EIO");
return -EIO;
case 403:
SYSLOGDBGERR("HTTP response code 403 was returned");
SYSLOGDBGERR("Body Text: %s", (body ? body->str() : ""));
return -EPERM;
case 404:
SYSLOGDBG("HTTP response code 404 was returned");
SYSLOGDBG("Body Text: %s", (body ? body->str() : ""));
SYSLOGDBG("Now returning ENOENT");
return -ENOENT;
default:
SYSLOGERR("###response=%ld", responseCode);
SYSLOGDBG("Body Text: %s", (body ? body->str() : ""));
FGPRINT("responseCode %ld\n", responseCode);
FGPRINT("Body Text: %s", (body ? body->str() : ""));
return -EIO;
}
break;
case CURLE_WRITE_ERROR:
SYSLOGERR("### CURLE_WRITE_ERROR");
sleep(2);
break;
case CURLE_OPERATION_TIMEDOUT:
SYSLOGERR("### CURLE_OPERATION_TIMEDOUT");
sleep(2);
break;
case CURLE_COULDNT_RESOLVE_HOST:
SYSLOGERR("### CURLE_COULDNT_RESOLVE_HOST");
sleep(2);
break;
case CURLE_COULDNT_CONNECT:
SYSLOGERR("### CURLE_COULDNT_CONNECT");
sleep(4);
break;
case CURLE_GOT_NOTHING:
SYSLOGERR("### CURLE_GOT_NOTHING");
sleep(4);
break;
case CURLE_ABORTED_BY_CALLBACK:
SYSLOGERR("### CURLE_ABORTED_BY_CALLBACK");
sleep(4);
now = time(0);
curl_times[curl] = now;
break;
case CURLE_PARTIAL_FILE:
SYSLOGERR("### CURLE_PARTIAL_FILE");
sleep(4);
break;
case CURLE_SEND_ERROR:
SYSLOGERR("### CURLE_SEND_ERROR");
sleep(2);
break;
case CURLE_RECV_ERROR:
SYSLOGERR("### CURLE_RECV_ERROR");
sleep(2);
break;
case CURLE_SSL_CACERT:
// try to locate cert, if successful, then set the
// option and continue
if (curl_ca_bundle.size() == 0) {
locate_bundle();
if (curl_ca_bundle.size() != 0) {
t++;
curl_easy_setopt(curl, CURLOPT_CAINFO, curl_ca_bundle.c_str());
// break for switch-case, and continue loop.
break;
}
}
SYSLOGERR("curlCode: %i msg: %s", curlCode, curl_easy_strerror(curlCode));
fprintf (stderr, "%s: curlCode: %i -- %s\n",
program_name.c_str(),
curlCode,
curl_easy_strerror(curlCode));
exit(EXIT_FAILURE);
break;
#ifdef CURLE_PEER_FAILED_VERIFICATION
case CURLE_PEER_FAILED_VERIFICATION:
first_pos = bucket.find_first_of(".");
if (first_pos != string::npos) {
fprintf (stderr, "%s: curl returned a CURL_PEER_FAILED_VERIFICATION error\n", program_name.c_str());
fprintf (stderr, "%s: security issue found: buckets with periods in their name are incompatible with https\n", program_name.c_str());
fprintf (stderr, "%s: This check can be over-ridden by using the -o ssl_verify_hostname=0\n", program_name.c_str());
fprintf (stderr, "%s: The certificate will still be checked but the hostname will not be verified.\n", program_name.c_str());
fprintf (stderr, "%s: A more secure method would be to use a bucket name without periods.\n", program_name.c_str());
} else {
fprintf (stderr, "%s: my_curl_easy_perform: curlCode: %i -- %s\n",
program_name.c_str(),
curlCode,
curl_easy_strerror(curlCode));
}
exit(EXIT_FAILURE);
break;
#endif
// This should be invalid since curl option HTTP FAILONERROR is now off
case CURLE_HTTP_RETURNED_ERROR:
SYSLOGERR("### CURLE_HTTP_RETURNED_ERROR");
if (curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &responseCode) != 0) {
return -EIO;
}
SYSLOGERR("###response=%ld", responseCode);
// Let's try to retrieve the
if (responseCode == 404) {
return -ENOENT;
}
if (responseCode < 500) {
return -EIO;
}
break;
// Unknown CURL return code
default:
SYSLOGERR("###curlCode: %i msg: %s", curlCode, curl_easy_strerror(curlCode));
exit(EXIT_FAILURE);
break;
}
if(body){
body->Clear();
}
if(head){
head->Clear();
}
SYSLOGERR("###retrying...");
}
SYSLOGERR("###giving up");
return -EIO;
}
// libcurl callback
size_t WriteMemoryCallback(void *ptr, size_t blockSize, size_t numBlocks, void *data)
{
BodyData* body = (BodyData*)data;
if(!body->Append(ptr, blockSize, numBlocks)){
FGPRINT("WriteMemoryCallback(): BodyData.Append() returned false.\n");
S3FS_FUSE_EXIT();
return -1;
}
return (blockSize * numBlocks);
}
// read_callback
// http://curl.haxx.se/libcurl/c/post-callback.html
size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
{
struct WriteThis *pooh = (struct WriteThis *)userp;
if(size*nmemb < 1){
return 0;
}
if(pooh->sizeleft) {
*(char *)ptr = pooh->readptr[0]; /* copy one single byte */
pooh->readptr++; /* advance pointer */
pooh->sizeleft--; /* less data left */
return 1; /* we return 1 byte at a time! */
}
return 0; /* no more data left to deliver */
}
// homegrown timeout mechanism
int my_curl_progress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
{
CURL* curl = static_cast<CURL*>(clientp);
time_t now = time(0);
progress_t p(dlnow, ulnow);
pthread_mutex_lock(&curl_handles_lock);
// any progress?
if(p != curl_progress[curl]) {
// yes!
curl_times[curl] = now;
curl_progress[curl] = p;
} else {
// timeout?
if (now - curl_times[curl] > readwrite_timeout) {
pthread_mutex_unlock( &curl_handles_lock );
SYSLOGERR("timeout now: %li curl_times[curl]: %lil readwrite_timeout: %li",
(long int)now, curl_times[curl], (long int)readwrite_timeout);
return CURLE_ABORTED_BY_CALLBACK;
}
}
pthread_mutex_unlock(&curl_handles_lock);
return 0;
}
/**
* Returns the Amazon AWS signature for the given parameters.
*
* @param method e.g., "GET"
* @param content_type e.g., "application/x-directory"
* @param date e.g., get_date()
* @param resource e.g., "/pub"
*/
string calc_signature(string method, string content_type, string date, curl_slist* headers, string resource)
{
int ret;
int bytes_written;
int offset;
int write_attempts = 0;
string Signature;
string StringToSign;
StringToSign += method + "\n";
StringToSign += "\n"; // md5
StringToSign += content_type + "\n";
StringToSign += date + "\n";
int count = 0;
if(headers != 0) {
do {
if(strncmp(headers->data, "x-amz", 5) == 0) {
++count;
StringToSign += headers->data;
StringToSign += 10; // linefeed
}
} while ((headers = headers->next) != 0);
}
StringToSign += resource;
const void* key = AWSSecretAccessKey.data();
int key_len = AWSSecretAccessKey.size();
const unsigned char* d = reinterpret_cast<const unsigned char*>(StringToSign.data());
int n = StringToSign.size();
unsigned int md_len;
unsigned char md[EVP_MAX_MD_SIZE];
HMAC(evp_md, key, key_len, d, n, md, &md_len);
BIO* b64 = BIO_new(BIO_f_base64());
BIO* bmem = BIO_new(BIO_s_mem());
b64 = BIO_push(b64, bmem);
offset = 0;
for(;;) {
bytes_written = BIO_write(b64, &(md[offset]), md_len);
write_attempts++;
// -1 indicates that an error occurred, or a temporary error, such as
// the server is busy, occurred and we need to retry later.
// BIO_write can do a short write, this code addresses this condition
if(bytes_written <= 0) {
// Indicates whether a temporary error occurred or a failure to
// complete the operation occurred
if ((ret = BIO_should_retry(b64))) {
// Wait until the write can be accomplished
if(write_attempts <= 10)
continue;
// Too many write attempts
SYSLOGERR("Failure during BIO_write, returning null String");
BIO_free_all(b64);
Signature.clear();
return Signature;
} else {
// If not a retry then it is an error
SYSLOGERR("Failure during BIO_write, returning null String");
BIO_free_all(b64);
Signature.clear();
return Signature;
}
}
// The write request succeeded in writing some Bytes
offset += bytes_written;
md_len -= bytes_written;
// If there is no more data to write, the request sending has been
// completed
if(md_len <= 0){
break;
}
}
// Flush the data
ret = BIO_flush(b64);
if ( ret <= 0) {
SYSLOGERR("Failure during BIO_flush, returning null String");
BIO_free_all(b64);
Signature.clear();
return Signature;
}
BUF_MEM *bptr;
BIO_get_mem_ptr(b64, &bptr);
Signature.resize(bptr->length - 1);
memcpy(&Signature[0], bptr->data, bptr->length-1);
BIO_free_all(b64);
return Signature;
}
void locate_bundle(void)
{
// See if environment variable CURL_CA_BUNDLE is set
// if so, check it, if it is a good path, then set the
// curl_ca_bundle variable to it
char *CURL_CA_BUNDLE;
if(curl_ca_bundle.size() == 0) {
CURL_CA_BUNDLE = getenv("CURL_CA_BUNDLE");
if(CURL_CA_BUNDLE != NULL) {
// check for existance and readability of the file
ifstream BF(CURL_CA_BUNDLE);
if(BF.good()) {
BF.close();
curl_ca_bundle.assign(CURL_CA_BUNDLE);
} else {
fprintf(stderr, "%s: file specified by CURL_CA_BUNDLE environment variable is not readable\n",
program_name.c_str());
exit(EXIT_FAILURE);
}
return;
}
}
// not set via environment variable, look in likely locations
///////////////////////////////////////////
// from curl's (7.21.2) acinclude.m4 file
///////////////////////////////////////////
// dnl CURL_CHECK_CA_BUNDLE
// dnl -------------------------------------------------
// dnl Check if a default ca-bundle should be used
// dnl
// dnl regarding the paths this will scan:
// dnl /etc/ssl/certs/ca-certificates.crt Debian systems
// dnl /etc/pki/tls/certs/ca-bundle.crt Redhat and Mandriva
// dnl /usr/share/ssl/certs/ca-bundle.crt old(er) Redhat
// dnl /usr/local/share/certs/ca-root.crt FreeBSD
// dnl /etc/ssl/cert.pem OpenBSD
// dnl /etc/ssl/certs/ (ca path) SUSE
ifstream BF("/etc/pki/tls/certs/ca-bundle.crt");
if(BF.good()) {
BF.close();
curl_ca_bundle.assign("/etc/pki/tls/certs/ca-bundle.crt");
return;
}
return;
}
string md5sum(int fd)
{
MD5_CTX c;
char buf[512];
char hexbuf[3];
ssize_t bytes;
char md5[2 * MD5_DIGEST_LENGTH + 1];
unsigned char *result = (unsigned char *) malloc(MD5_DIGEST_LENGTH);
memset(buf, 0, 512);
MD5_Init(&c);
while((bytes = read(fd, buf, 512)) > 0) {
MD5_Update(&c, buf, bytes);
memset(buf, 0, 512);
}
MD5_Final(result, &c);
memset(md5, 0, 2 * MD5_DIGEST_LENGTH + 1);
for(int i = 0; i < MD5_DIGEST_LENGTH; i++) {
snprintf(hexbuf, 3, "%02x", result[i]);
strncat(md5, hexbuf, 2);
}
free(result);
lseek(fd, 0, 0);
return string(md5);
}
bool InitMimeType(const char* file)
{
if(!file){
return false;
}
string line;
ifstream MT(file);
if (MT.good()) {
while (getline(MT, line)) {
if(line[0]=='#'){
continue;
}
if(line.size() == 0){
continue;
}
stringstream tmp(line);
string mimeType;
tmp >> mimeType;
while (tmp) {
string ext;
tmp >> ext;
if (ext.size() == 0){
continue;
}
mimeTypes[ext] = mimeType;
}
}
}
return true;
}
/**
* @param s e.g., "index.html"
* @return e.g., "text/html"
*/
string lookupMimeType(string s)
{
string result("application/octet-stream");
string::size_type last_pos = s.find_last_of('.');
string::size_type first_pos = s.find_first_of('.');
string prefix, ext, ext2;
// No dots in name, just return
if(last_pos == string::npos){
return result;
}
// extract the last extension
if(last_pos != string::npos){
ext = s.substr(1+last_pos, string::npos);
}
if (last_pos != string::npos) {
// one dot was found, now look for another
if (first_pos != string::npos && first_pos < last_pos) {
prefix = s.substr(0, last_pos);
// Now get the second to last file extension
string::size_type next_pos = prefix.find_last_of('.');
if (next_pos != string::npos) {
ext2 = prefix.substr(1+next_pos, string::npos);
}
}
}
// if we get here, then we have an extension (ext)
mimes_t::const_iterator iter = mimeTypes.find(ext);
// if the last extension matches a mimeType, then return
// that mime type
if (iter != mimeTypes.end()) {
result = (*iter).second;
return result;
}
// return with the default result if there isn't a second extension
if(first_pos == last_pos){
return result;
}
// Didn't find a mime-type for the first extension
// Look for second extension in mimeTypes, return if found
iter = mimeTypes.find(ext2);
if (iter != mimeTypes.end()) {
result = (*iter).second;
return result;
}
// neither the last extension nor the second-to-last extension
// matched a mimeType, return the default mime type
return result;
}
| gpl-2.0 |
AMMD/AMMDWebsite2012 | tmp/cache/skel/html_558bb5144e8c0164905c9c3152dc4256.php | 16854 | <?php
/*
* Squelette : ../prive/objets/liste/articles.html
* Date : Tue, 20 Nov 2012 08:52:40 GMT
* Compile : Tue, 16 Apr 2013 09:45:07 GMT
* Boucles : _auteurs, _liste_art
*/
function BOUCLE_auteurshtml_558bb5144e8c0164905c9c3152dc4256(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
if (!isset($command['table'])) {
$command['table'] = 'auteurs';
$command['id'] = '_auteurs';
$command['from'] = array('auteurs' => 'spip_auteurs','L1' => 'spip_auteurs_liens');
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array("auteurs.id_auteur",
"auteurs.nom");
$command['orderby'] = array();
$command['join'] = array('L1' => array('auteurs','id_auteur'));
$command['limit'] = '';
$command['having'] =
array();
}
$command['where'] =
array(
quete_condition_statut('auteurs.statut','!5poubelle','!5poubelle',''),
array('=', 'L1.id_objet', sql_quote($Pile[$SP]['id_article'],'','bigint(21) NOT NULL DEFAULT \'0\'')),
array('=', 'L1.objet', sql_quote('article')));
$t0 = "";
// REQUETE
$iter = IterFactory::create(
"SQL",
$command,
array('../prive/objets/liste/articles.html','html_558bb5144e8c0164905c9c3152dc4256','_auteurs',27,$GLOBALS['spip_lang'])
);
if (!$iter->err()) {
$SP++;
// RESULTATS
while ($Pile[$SP]=$iter->fetch()) {
$t1 = (
'<a href="' .
generer_url_entite($Pile[$SP]['id_auteur'],'auteur') .
'">' .
interdire_scripts(typo(supprimer_numero($Pile[$SP]['nom']), "TYPO", $connect, $Pile[0])) .
'</a>');
$t0 .= ((strlen($t1) && strlen($t0)) ? ', ' : '') . $t1;
}
$iter->free();
}
return $t0;
}
function BOUCLE_liste_arthtml_558bb5144e8c0164905c9c3152dc4256(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$in = array();
if (!(is_array($a = (@$Pile[0]['id_article']))))
$in[]= $a;
else $in = array_merge($in, $a);
$in1 = array();
if (!(is_array($a = (@$Pile[0]['id_rubrique']))))
$in1[]= $a;
else $in1 = array_merge($in1, $a);
$in2 = array();
if (!(is_array($a = (@$Pile[0]['id_mot']))))
$in2[]= $a;
else $in2 = array_merge($in2, $a);
$in3 = array();
if (!(is_array($a = (@$Pile[0]['id_auteur']))))
$in3[]= $a;
else $in3 = array_merge($in3, $a);
$in4 = array();
if (!(is_array($a = (@$Pile[0]['statut']))))
$in4[]= $a;
else $in4 = array_merge($in4, $a);
// RECHERCHE
if (!strlen((isset($Pile[0]["recherche"])?$Pile[0]["recherche"]:(isset($GLOBALS["recherche"])?$GLOBALS["recherche"]:"")))){
list($rech_select, $rech_where) = array("0 as points","");
} else
{
$prepare_recherche = charger_fonction('prepare_recherche', 'inc');
list($rech_select, $rech_where) = $prepare_recherche((isset($Pile[0]["recherche"])?$Pile[0]["recherche"]:(isset($GLOBALS["recherche"])?$GLOBALS["recherche"]:"")), "articles", "?","",array (
'criteres' =>
array (
'id_article' => true,
'id_rubrique' => true,
'statut' => true,
),
'lien' => true,
),"id_article");
}
$senstri = '';
$tri = (($t=(isset($Pile[0]['tri'.'_liste_art']))?$Pile[0]['tri'.'_liste_art']:interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'par', null), 'date'),true)))?tri_protege_champ($t):'');
if ($tri){
$senstri = ((intval($t=(isset($Pile[0]['sens'.'_liste_art']))?$Pile[0]['sens'.'_liste_art']:(is_array($s=table_valeur($Pile["vars"], (string)'defaut_tri', null))?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_liste_art']))?$Pile[0]['tri'.'_liste_art']:interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'par', null), 'date'),true)))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s))==-1 OR $t=='inverse')?-1:1);
$senstri = ($senstri<0)?' DESC':'';
};
$command['pagination'] = array((isset($Pile[0]['debut_liste_art']) ? $Pile[0]['debut_liste_art'] : null), (($a = intval(interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'nb', null), '10'),true)))) ? $a : 10));
if (!isset($command['table'])) {
$command['table'] = 'articles';
$command['id'] = '_liste_art';
$command['from'] = array('articles' => 'spip_articles','L1' => 'spip_mots_liens','L2' => 'spip_auteurs_liens','resultats' => 'spip_resultats');
$command['type'] = array();
$command['groupby'] = array("articles.id_article");
$command['join'] = array('L1' => array('articles','id_objet','id_article','L1.objet='.sql_quote('article')), 'L2' => array('articles','id_objet','id_article','L2.objet='.sql_quote('article')), 'resultats' => array('articles','id','id_article'));
$command['limit'] = '';
$command['having'] =
array();
}
$command['select'] = array("articles.id_article",
"$rech_select",
"".tri_champ_select($tri)."",
"articles.titre",
"articles.statut",
"articles.id_rubrique",
"articles.titre AS titre_rang",
"articles.date");
$command['orderby'] = array(tri_champ_order($tri,$command['from']).$senstri, 'articles.titre');
$command['where'] =
array((!(is_array(@$Pile[0]['id_article'])?count(@$Pile[0]['id_article']):strlen(@$Pile[0]['id_article'])) ? '' : ((is_array(@$Pile[0]['id_article'])) ? sql_in('articles.id_article',sql_quote($in)) :
array('=', 'articles.id_article', sql_quote(@$Pile[0]['id_article'],'','bigint(21) NOT NULL AUTO_INCREMENT')))), (!(is_array(@$Pile[0]['id_rubrique'])?count(@$Pile[0]['id_rubrique']):strlen(@$Pile[0]['id_rubrique'])) ? '' : ((is_array(@$Pile[0]['id_rubrique'])) ? sql_in('articles.id_rubrique',sql_quote($in1)) :
array('=', 'articles.id_rubrique', sql_quote(@$Pile[0]['id_rubrique'],'','bigint(21) NOT NULL DEFAULT \'0\'')))), (!(is_array(@$Pile[0]['id_mot'])?count(@$Pile[0]['id_mot']):strlen(@$Pile[0]['id_mot'])) ? '' : ((is_array(@$Pile[0]['id_mot'])) ? sql_in('L1.id_mot',sql_quote($in2)) :
array('=', 'L1.id_mot', sql_quote(@$Pile[0]['id_mot'],'','bigint(21) NOT NULL DEFAULT \'0\'')))), (!(is_array(@$Pile[0]['id_auteur'])?count(@$Pile[0]['id_auteur']):strlen(@$Pile[0]['id_auteur'])) ? '' : ((is_array(@$Pile[0]['id_auteur'])) ? sql_in('L2.id_auteur',sql_quote($in3)) :
array('=', 'L2.id_auteur', sql_quote(@$Pile[0]['id_auteur'],'','bigint(21) NOT NULL DEFAULT \'0\'')))), ((@$Pile[0]["where"]) ? (@$Pile[0]["where"]) : ''), (!(is_array(@$Pile[0]['statut'])?count(@$Pile[0]['statut']):strlen(@$Pile[0]['statut'])) ? '' : ((is_array(@$Pile[0]['statut'])) ? sql_in('articles.statut',sql_quote($in4)) :
array('=', 'articles.statut', sql_quote(@$Pile[0]['statut'],'','varchar(10) NOT NULL DEFAULT \'0\'')))), $rech_where?$rech_where:'');
$t0 = "";
// REQUETE
$iter = IterFactory::create(
"SQL",
$command,
array('../prive/objets/liste/articles.html','html_558bb5144e8c0164905c9c3152dc4256','_liste_art',7,$GLOBALS['spip_lang'])
);
if (!$iter->err()) {
// COMPTEUR
$Numrows['_liste_art']['compteur_boucle'] = 0;
$Numrows['_liste_art']['total'] = @intval($iter->count());
$debut_boucle = isset($Pile[0]['debut_liste_art']) ? $Pile[0]['debut_liste_art'] : _request('debut_liste_art');
if(substr($debut_boucle,0,1)=='@'){
$debut_boucle = $Pile[0]['debut_liste_art'] = quete_debut_pagination('id_article',$Pile[0]['@id_article'] = substr($debut_boucle,1),(($a = intval(interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'nb', null), '10'),true)))) ? $a : 10),$iter);
$iter->seek(0);
}
$debut_boucle = intval($debut_boucle);
$debut_boucle = (($tout=($debut_boucle == -1))?0:($debut_boucle));
$debut_boucle = max(0,min($debut_boucle,floor(($Numrows['_liste_art']['total']-1)/((($a = intval(interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'nb', null), '10'),true)))) ? $a : 10)))*((($a = intval(interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'nb', null), '10'),true)))) ? $a : 10))));
$fin_boucle = min(($tout ? $Numrows['_liste_art']['total'] : $debut_boucle+(($a = intval(interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'nb', null), '10'),true)))) ? $a : 10) - 1), $Numrows['_liste_art']['total'] - 1);
$Numrows['_liste_art']['grand_total'] = $Numrows['_liste_art']['total'];
$Numrows['_liste_art']["total"] = max(0,$fin_boucle - $debut_boucle + 1);
if ($debut_boucle>0 AND $debut_boucle < $Numrows['_liste_art']['grand_total'] AND $iter->seek($debut_boucle,'continue'))
$Numrows['_liste_art']['compteur_boucle'] = $debut_boucle;
$l1 = _T('public|spip|ecrire:info_numero_abbreviation');$SP++;
// RESULTATS
while ($Pile[$SP]=$iter->fetch()) {
$Numrows['_liste_art']['compteur_boucle']++;
if ($Numrows['_liste_art']['compteur_boucle'] <= $debut_boucle) continue;
if ($Numrows['_liste_art']['compteur_boucle']-1 > $fin_boucle) break;
$t0 .= (
'
<tr class="' .
alterner($Numrows['_liste_art']['compteur_boucle'],'row_odd','row_even') .
'">
<td class=\'statut\'>' .
interdire_scripts(filtre_puce_statut_dist($Pile[$SP]['statut'],'article',$Pile[$SP]['id_article'],$Pile[$SP]['id_rubrique'])) .
'</td>
<td class=\'titre principale\'>' .
filtrer('image_graver',filtrer('image_reduire',
((!is_array($l = quete_logo('id_article', 'ON', $Pile[$SP]['id_article'],'', 0))) ? '':
("<img class=\"spip_logos\" alt=\"\" src=\"$l[0]\"" . $l[2] . ($l[1] ? " onmouseover=\"this.src='$l[1]'\" onmouseout=\"this.src='$l[0]'\"" : "") . ' />')),'20','26')) .
'<a href="' .
generer_url_entite($Pile[$SP]['id_article'],'article') .
'"
title="' .
attribut_html($l1) .
' ' .
$Pile[$SP]['id_article'] .
'">' .
(($t1 = strval(recuperer_numero($Pile[$SP]['titre_rang'])))!=='' ?
($t1 . '. ') :
'') .
interdire_scripts(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])) .
'</a></td>
<td class=\'auteur\'>' .
BOUCLE_auteurshtml_558bb5144e8c0164905c9c3152dc4256($Cache, $Pile, $doublons, $Numrows, $SP) .
'</td>
<td class=\'date secondaire\'>' .
interdire_scripts(affdate_jourcourt(normaliser_date($Pile[$SP]['date']))) .
'</td>
<td class=\'id\'>' .
invalideur_session($Cache, (((function_exists("autoriser")||include_spip("inc/autoriser"))&&autoriser('modifier', 'article', invalideur_session($Cache, $Pile[$SP]['id_article']))?" ":"") ? ( '<a href="' .
invalideur_session($Cache, generer_url_ecrire('article_edit',( 'id_article=' .
invalideur_session($Cache, $Pile[$SP]['id_article'])))) .
'">' .
invalideur_session($Cache, $Pile[$SP]['id_article']) .
'</a>'):( invalideur_session($Cache, $Pile[$SP]['id_article']) .
'
'))) .
'</td>
</tr>
');
}
$iter->free();
}
return $t0;
}
//
// Fonction principale du squelette ../prive/objets/liste/articles.html
// Temps de compilation total: 17.218 ms
//
function html_558bb5144e8c0164905c9c3152dc4256($Cache, $Pile, $doublons=array(), $Numrows=array(), $SP=0) {
if (isset($Pile[0]["doublons"]) AND is_array($Pile[0]["doublons"]))
$doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
$connect = '';
$page = (
(($t1 = strval(vide($Pile['vars'][(string)'defaut_tri'] = array('date' => interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'date_sens', null), '-1'),true)), 'num titre' => '1', 'id_article' => '1', 'points' => '-1
'))))!=='' ?
($t1 . '
') :
'') .
(($t1 = BOUCLE_liste_arthtml_558bb5144e8c0164905c9c3152dc4256($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
(( '
' .
filtre_pagination_dist($Numrows["_liste_art"]["grand_total"],
'_liste_art',
isset($Pile[0]['debut_liste_art'])?$Pile[0]['debut_liste_art']:intval(_request('debut_liste_art')),
(($a = intval(interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'nb', null), '10'),true)))) ? $a : 10), false, '', '', array()) .
'
<div class="liste-objets articles">
<table class=\'spip liste\'>
' .
(($t3 = strval(interdire_scripts(sinon(table_valeur(@$Pile[0], (string)'titre', null), singulier_ou_pluriel((isset($Numrows['_liste_art']['grand_total'])
? $Numrows['_liste_art']['grand_total'] : $Numrows['_liste_art']['total']),'info_1_article','info_nb_articles')))))!=='' ?
('<caption><strong class="caption">' . $t3 . '</strong></caption>') :
'') .
'
<thead>
<tr class=\'first_row\'>
<th class=\'statut\' scope=\'col\'>' .
lien_ou_expose(parametre_url(self(),(($s=in_array('statut',array('>','<')))?'sens':'tri').'_liste_art',$s?(strpos('< >','statut')-1):'statut'),( '<span title="' .
attribut_html(_T('public|spip|ecrire:lien_trier_statut')) .
'">#</span>'),$s?(((intval($t=(isset($Pile[0]['sens'.'_liste_art']))?$Pile[0]['sens'.'_liste_art']:(is_array($s=table_valeur($Pile["vars"], (string)'defaut_tri', null))?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_liste_art']))?$Pile[0]['tri'.'_liste_art']:interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'par', null), 'date'),true)))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','statut')-1)):((($t=(isset($Pile[0]['tri'.'_liste_art']))?$Pile[0]['tri'.'_liste_art']:interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'par', null), 'date'),true)))?tri_protege_champ($t):'')=='statut'),'ajax') .
'</th>
<th class=\'titre principale\' scope=\'col\'>' .
lien_ou_expose(parametre_url(self(),(($s=in_array('num titre',array('>','<')))?'sens':'tri').'_liste_art',$s?(strpos('< >','num titre')-1):'num titre'),_T('public|spip|ecrire:info_titre'),$s?(((intval($t=(isset($Pile[0]['sens'.'_liste_art']))?$Pile[0]['sens'.'_liste_art']:(is_array($s=table_valeur($Pile["vars"], (string)'defaut_tri', null))?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_liste_art']))?$Pile[0]['tri'.'_liste_art']:interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'par', null), 'date'),true)))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','num titre')-1)):((($t=(isset($Pile[0]['tri'.'_liste_art']))?$Pile[0]['tri'.'_liste_art']:interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'par', null), 'date'),true)))?tri_protege_champ($t):'')=='num titre'),'ajax') .
'</th>
<th class=\'auteur\' scope=\'col\'>' .
_T('public|spip|ecrire:auteur') .
'</th>
<th class=\'date secondaire\' scope=\'col\'>' .
lien_ou_expose(parametre_url(self(),(($s=in_array('date',array('>','<')))?'sens':'tri').'_liste_art',$s?(strpos('< >','date')-1):'date'),_T('public|spip|ecrire:date'),$s?(((intval($t=(isset($Pile[0]['sens'.'_liste_art']))?$Pile[0]['sens'.'_liste_art']:(is_array($s=table_valeur($Pile["vars"], (string)'defaut_tri', null))?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_liste_art']))?$Pile[0]['tri'.'_liste_art']:interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'par', null), 'date'),true)))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','date')-1)):((($t=(isset($Pile[0]['tri'.'_liste_art']))?$Pile[0]['tri'.'_liste_art']:interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'par', null), 'date'),true)))?tri_protege_champ($t):'')=='date'),'ajax') .
'</th>
<th class=\'id\' scope=\'col\'>' .
lien_ou_expose(parametre_url(self(),(($s=in_array('id_article',array('>','<')))?'sens':'tri').'_liste_art',$s?(strpos('< >','id_article')-1):'id_article'),_T('public|spip|ecrire:info_numero_abbreviation'),$s?(((intval($t=(isset($Pile[0]['sens'.'_liste_art']))?$Pile[0]['sens'.'_liste_art']:(is_array($s=table_valeur($Pile["vars"], (string)'defaut_tri', null))?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_liste_art']))?$Pile[0]['tri'.'_liste_art']:interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'par', null), 'date'),true)))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','id_article')-1)):((($t=(isset($Pile[0]['tri'.'_liste_art']))?$Pile[0]['tri'.'_liste_art']:interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'par', null), 'date'),true)))?tri_protege_champ($t):'')=='id_article'),'ajax') .
'</th>
</tr>
</thead>
<tbody>
') . $t1 . ( '
</tbody>
</table>
' .
(($t3 = strval(filtre_pagination_dist($Numrows["_liste_art"]["grand_total"],
'_liste_art',
isset($Pile[0]['debut_liste_art'])?$Pile[0]['debut_liste_art']:intval(_request('debut_liste_art')),
(($a = intval(interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'nb', null), '10'),true)))) ? $a : 10), true, interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'pagination', null), 'prive'),true)), '', array())))!=='' ?
('<p class=\'pagination\'>' . $t3 . '</p>') :
'') .
'
</div>
')) :
((($t2 = strval(interdire_scripts(sinon(table_valeur(@$Pile[0], (string)'sinon', null), ''))))!=='' ?
('
<div class="liste-objets articles caption-wrap"><strong class="caption">' . $t2 . '</strong></div>
') :
''))) .
'
');
return analyse_resultat_skel('html_558bb5144e8c0164905c9c3152dc4256', $Cache, $page, '../prive/objets/liste/articles.html');
}
?> | gpl-2.0 |
jakkaj/TechPresentations | Short/ASPNet/BasicClassicMVC/ClassicMVC/ClassicMVC/App_Start/FilterConfig.cs | 265 | ๏ปฟusing System.Web;
using System.Web.Mvc;
namespace ClassicMVC
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
}
}
| gpl-2.0 |
ramadhanfebbry/system-app | templates_c/%%2C^2C5^2C523EA9%%details.tpl.php | 7373 | <?php /* Smarty version 2.6.26, created on 2014-12-22 02:59:09
compiled from /Applications/XAMPP/xamppfiles/htdocs/GALIH//templates/common/details.tpl */ ?>
<table border="0" width=100% cellspacing="4" cellpadding="1">
<form name="data">
<input type="hidden" name="to" value="<?php echo $this->_tpl_vars['file_detail']['to_value']; ?>
" />
<input type="hidden" name="subject" value="<?php echo $this->_tpl_vars['file_detail']['subject_value']; ?>
" />
<input type="hidden" name="comments" value="<?php echo $this->_tpl_vars['file_detail']['comments_value']; ?>
" />
</FORM>
<tr>
<td align="right">
<?php if ($this->_tpl_vars['file_detail']['file_unlocked']): ?>
<img src="images/file_unlocked.png" alt="" border="0" align="absmiddle">
<?php else: ?>
<img src="images/file_locked.png" alt="" border="0" align="absmiddle">
<?php endif; ?>
</td>
<td align="left">
<font size="+1"><?php echo $this->_tpl_vars['file_detail']['realname']; ?>
</font>
</td>
</tr>
<tr>
<th valign=top align=right><?php echo $this->_tpl_vars['g_lang_category']; ?>
:</th><td><?php echo $this->_tpl_vars['file_detail']['category']; ?>
</td>
</tr>
<?php echo $this->_tpl_vars['file_detail']['udf_details_display']; ?>
<tr>
<th valign=top align=right><?php echo $this->_tpl_vars['g_lang_label_size']; ?>
:</th><td><?php echo $this->_tpl_vars['file_detail']['filesize']; ?>
</td>
</tr>
<tr>
<th valign=top align=right><?php echo $this->_tpl_vars['g_lang_label_created_date']; ?>
:</th><td> <?php echo $this->_tpl_vars['file_detail']['created']; ?>
</td>
</tr>
<tr>
<th valign=top align=right><?php echo $this->_tpl_vars['g_lang_owner']; ?>
:</th>
<td>
<a href="mailto:<?php echo $this->_tpl_vars['file_detail']['owner_email']; ?>
?Subject=Regarding%20your%20document:<?php echo $this->_tpl_vars['file_detail']['realname']; ?>
&Body=Hello%20<?php echo $this->_tpl_vars['file_detail']['owner_fullname']; ?>
"> <?php echo $this->_tpl_vars['file_detail']['owner']; ?>
</a>
</td>
</tr>
<tr>
<th valign=top align=right><?php echo $this->_tpl_vars['g_lang_label_description']; ?>
:</th><td> <?php echo $this->_tpl_vars['file_detail']['description']; ?>
</td>
</tr>
<tr>
<th valign=top align=right><?php echo $this->_tpl_vars['g_lang_label_comment']; ?>
:</th><td> <?php echo $this->_tpl_vars['file_detail']['comments_value']; ?>
</td>
</tr>
<tr>
<th valign=top align=right><?php echo $this->_tpl_vars['g_lang_revision']; ?>
:</th><td> <div id="details_revision"><?php echo $this->_tpl_vars['file_detail']['revision']; ?>
</div></td>
</tr>
<?php if ($this->_tpl_vars['file_detail']['file_under_review']): ?>
<tr>
<th valign=top align=right><?php echo $this->_tpl_vars['g_lang_label_reviewer']; ?>
:</th>
<td> <?php echo $this->_tpl_vars['file_detail']['reviewer']; ?>
(<a href='javascript:showMessage()'><?php echo $this->_tpl_vars['g_lang_message_reviewers_comments_re_rejection']; ?>
</a>)</td>
</tr>
<?php endif; ?>
<?php if ($this->_tpl_vars['file_detail']['status'] > 0): ?>
<tr>
<th valign=top align=right><?php echo $this->_tpl_vars['g_lang_detailspage_file_checked_out_to']; ?>
:</th><td><a href="mailto:<?php echo $this->_tpl_vars['checkout_person_email']; ?>
?Subject=Regarding%20your%20checked-out%20document:<?php echo $this->_tpl_vars['file_detail']['realname']; ?>
&Body=Hello%20<?php echo $this->_tpl_vars['checkout_person_full_name'][$this->_tpl_vars['fullname']][0]; ?>
"> <?php echo $this->_tpl_vars['checkout_person_full_name'][1]; ?>
, <?php echo $this->_tpl_vars['checkout_person_full_name'][0]; ?>
</a></td>
</tr>
<?php endif; ?>
<!-- available actions -->
<tr>
<td colspan="2" align="center">
<table border="0" cellspacing="5" cellpadding="5">
<tr>
<!-- inner table begins -->
<!-- view option available at all time, place it outside the block -->
<?php if ($this->_tpl_vars['view_link'] != ''): ?>
<td align="center">
<div class="buttons">
<a href="<?php echo $this->_tpl_vars['view_link']; ?>
" class="positive"><img src="images/view.png" alt="view"/><?php echo $this->_tpl_vars['g_lang_detailspage_view']; ?>
</a>
</div>
</td>
<?php endif; ?>
<?php if ($this->_tpl_vars['check_out_link'] != ''): ?>
<td align="center">
<div class="buttons">
<a href="<?php echo $this->_tpl_vars['check_out_link']; ?>
" class="regular"><img src="images/check-out.png" alt="check out"/><?php echo $this->_tpl_vars['g_lang_detailspage_check_out']; ?>
</a>
</div>
</td>
<?php endif; ?>
<?php if ($this->_tpl_vars['edit_link'] != ''): ?>
<td align="center">
<div class="buttons">
<a href="<?php echo $this->_tpl_vars['edit_link']; ?>
" class="regular"><img src="images/edit.png" alt="edit"/><?php echo $this->_tpl_vars['g_lang_detailspage_edit']; ?>
</a>
</div>
</td>
<td align="center">
<div class="buttons">
<a href="javascript:my_delete()" class="negative"><img src="images/delete.png" alt="delete"/><?php echo $this->_tpl_vars['g_lang_detailspage_delete']; ?>
</a>
</div>
</td>
<?php endif; ?>
<td align="center">
<div class="buttons">
<a href="<?php echo $this->_tpl_vars['history_link']; ?>
" class="regular"><img src="images/history.png" alt="history"/><?php echo $this->_tpl_vars['g_lang_detailspage_history']; ?>
</a>
</div>
</td>
</tr>
<!-- inner table ends -->
</table>
</td>
</tr>
</table>
<?php echo '
<script type="text/javascript">
var message_window;
var mesg_window_frm;
function my_delete()
{
if(window.confirm("'; ?>
<?php echo $this->_tpl_vars['g_lang_detailspage_are_sure']; ?>
<?php echo '")) {
window.location = "'; ?>
<?php echo $this->_tpl_vars['my_delete_link']; ?>
<?php echo '";
}
}
function sendFields()
{
mesg_window_frm = message_window.document.author_note_form;
if(mesg_window_frm) {
mesg_window_frm.to.value = document.data.to.value;
mesg_window_frm.subject.value = document.data.subject.value;
mesg_window_frm.comments.value = document.data.comments.value;
}
}
function showMessage()
{
message_window = window.open(\''; ?>
<?php echo $this->_tpl_vars['comments_link']; ?>
<?php echo '\' , \'comment_wins\', \'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=450,height=200\');
message_window.focus();
setTimeout("sendFields();", 500);
}
</script>
'; ?> | gpl-2.0 |
nurulimamnotes/banten-it-wordpress-theme | inc/custom-style.php | 9246 | <?php
if(!function_exists('get_post_templates')) {
function get_post_templates() {
$themes = get_themes();
$theme = get_current_theme();
$templates = $themes[$theme]['Template Files'];
$post_templates = array();
$base = array(trailingslashit(get_template_directory()), trailingslashit(get_stylesheet_directory()));
foreach ((array)$templates as $template) {
$template = WP_CONTENT_DIR . str_replace(WP_CONTENT_DIR, '', $template);
$basename = str_replace($base, '', $template);
if (false !== strpos($basename, '/'))
continue;
$template_data = implode('', file( $template ));
$name = '';
if (preg_match( '|Style : (.*)$|mi', $template_data, $name))
$name = _cleanup_header_comment($name[1]);
if (!empty($name)) {
if(basename($template) != basename(__FILE__))
$post_templates[trim($name)] = $basename;}
}return $post_templates;}}
if(!function_exists('post_templates_dropdown')) {
function post_templates_dropdown() {
global $post;
$post_templates = get_post_templates();
foreach ($post_templates as $template_name => $template_file) {
if ($template_file == get_post_meta($post->ID, '_wp_post_template', true)) { $selected = ' selected="selected"'; } else { $selected = ''; }
$opt = '<option value="' . $template_file . '"' . $selected . '>' . $template_name . '</option>';
echo $opt;}}}
add_filter('single_template', 'get_post_template');
if(!function_exists('get_post_template')) {
function get_post_template($template) {
global $post;
$custom_field = get_post_meta($post->ID, '_wp_post_template', true);
if(!empty($custom_field) && file_exists(get_template_directory() . "/{$custom_field}")) {
$template = get_template_directory() . "/{$custom_field}"; }
return $template;}}
add_action('admin_menu', 'pt_add_custom_box');
function pt_add_custom_box() {
if(get_post_templates() && function_exists( 'add_meta_box' )) {
add_meta_box( 'pt_post_templates', __( 'Style Replacement', 'pt' ),
'pt_inner_custom_box', 'post', 'normal', 'high' ); }}
function pt_inner_custom_box() {
global $post;
echo '<input type="hidden" name="pt_noncename" id="pt_noncename" value="' . wp_create_nonce( basename(__FILE__) ) . '" />';
echo '<p>' . __("Note : Change the style of your posts with combo box options. You can also implement a blogazine with a different style in every post. You can choose the style you've created. You must create a new template with a different style. Insert the following code at the very top of the file :<br /><br /><code><?php<br />/*<br />Style : [Your Template Name]<br />*/<br />?></code><br /><br />Download sample template from <a href=\"http://www.nurulimam.com/plugin-style-replacement/\">Blogazine Template Collections</a>", 'pt' ) . '</p>';
echo '<label class="hidden" for="post_template">' . __("Post Template", 'pt' ) . '</label><br />';
echo '<select name="_wp_post_template" id="post_template" class="dropdown">';
echo '<option value="">Default Style</option>';
post_templates_dropdown();
echo '</select><br /><br />';}
add_action('save_post', 'pt_save_postdata', 1, 2);
function pt_save_postdata($post_id, $post) {
if ( !wp_verify_nonce( $_POST['pt_noncename'], basename(__FILE__) )) {
return $post->ID;}
if ( 'page' == $_POST['post_type'] ) {
if ( !current_user_can( 'edit_page', $post->ID ))
return $post->ID;
} else {
if ( !current_user_can( 'edit_post', $post->ID ))
return $post->ID;}
$mydata['_wp_post_template'] = $_POST['_wp_post_template'];
foreach ($mydata as $key => $value) {
if( $post->post_type == 'revision' ) return;
$value = implode(',', (array)$value);
if(get_post_meta($post->ID, $key, FALSE)) {
update_post_meta($post->ID, $key, $value);
} else {
add_post_meta($post->ID, $key, $value);}
if(!$value) delete_post_meta($post->ID, $key);}}
?>
<?php
function custom_style_post_sheets() {
global $post;
if (is_single() ) {
$file = '/style-'.$post->ID.'.css';
$web = get_template_directory_uri().$file;
if ( file_exists(get_template_directory().$file) )
echo "<link rel='stylesheet' type=text/css' href='$web' media='screen' />"."\n";}}
add_action('wp_head', 'custom_style_post_sheets');
ob_start('blank_save');
function blank_save($artd_buffer) {
global $single_styles;
$data = "\n".$single_styles;
$artd_buffer = str_replace('</head>', $data."\n</head>", $artd_buffer);
return $artd_buffer;}
add_action('the_content', 'blank_inline');
function blank_inline($data) {
global $post, $single_styles;
if(is_single() or is_page())
$single_styles .= str_replace( '#postid', $post->ID, get_post_meta($post->ID, 'blank_custom_single', true) )."\n";
return $data;}
add_action('publish_page','blank_save_postdata');
add_action('publish_post','blank_save_postdata');
add_action('save_post','blank_save_postdata');
add_action('edit_post','blank_save_postdata');
function blank_save_postdata( $post_id ) {
if ( !wp_verify_nonce( $_POST['blank-custom-nonce'], basename(__FILE__) ) )
return $post_id;
if ( 'page' == $_POST['post_type'] ) {
if ( !current_user_can( 'edit_page', $post_id ) )
return $post_id;
} else {
if ( !current_user_can( 'edit_post', $post_id ) )
return $post_id;}
delete_post_meta( $post_id, 'blank_custom_single' );
if(trim($_POST['custom-single']) != '')
add_post_meta( $post_id, 'blank_custom_single', stripslashes($_POST['custom-single']) );
return true;}
add_action('admin_menu', 'blank_add_meta_box');
add_action('admin_head', 'blank_admin_head');
function blank_admin_head() { ?>
<style type="text/css"> .clear { clear: both; }#custom-single {width: 100%;height: 500px;font-family:"Courier New", Courier, monospace;font-size:10px;}.box {width:100%;}.blank-submit {clear: both;}
</style>
<?php }
function blank_add_meta_box() {
if( function_exists( 'add_meta_box' ) ) {
if( current_user_can('edit_posts') )
add_meta_box( 'kotak', __( 'Custom Style, Script, & Meta Tags', 'blank-custom' ),
'blank_meta_box', 'post', 'normal' );
if( current_user_can('edit_pages') )
add_meta_box( 'kotak', __( 'Custom Style, Script, & Meta Tags', 'blank-custom' ),
'blank_meta_box', 'page', 'normal' );}}
function blank_meta_box() {
global $post; ?>
<form action="blank-custom_submit" method="get" accept-charset="utf-8">
<?php echo '<input type="hidden" name="blank-custom-nonce" id="blank-custom-nonce" value="' . wp_create_nonce(basename(__FILE__) ) . '" />'; ?>
<script type="text/javascript" charset="utf-8">
/* <![CDATA[ */
jQuery(document).ready(function() {
jQuery('#kotak textarea').focus(function() {
jQuery('#location').attr('class', this.id);
var location = jQuery('#location').attr('class');
});
jQuery('#insert-style').click(function() {
var location = jQuery('#location').attr('class');
edInsertContent(location, '<' + 'style type="text/css"'+'>'+"\n\n"+'<'+'/style'+'>');
});
jQuery('#insert-script').click(function() {
var location = jQuery('#location').attr('class');
edInsertContent(location, '<'+'script type="text/javascript"'+'>'+"\n\n"+'<'+'/script'+'>');
});
jQuery('#meta-desc').click(function() {
var location = jQuery('#location').attr('class');
edInsertContent(location, '<'+'meta name="description" content="Insert your meta description" />');
});
jQuery('#meta-key').click(function() {
var location = jQuery('#location').attr('class');
edInsertContent(location, '<'+'meta name="keywords" content="Insert your keywords separated by comma" />');
});
function edInsertContent(which, myValue) {
myField = document.getElementById(which);
if (document.selection) {
myField.focus();
sel = document.selection.createRange();
sel.text = myValue;
myField.focus();
}
else if (myField.selectionStart || myField.selectionStart == '0') {
var startPos = myField.selectionStart;
var endPos = myField.selectionEnd;
var scrollTop = myField.scrollTop;
myField.value = myField.value.substring(0, startPos)
+ myValue
+ myField.value.substring(endPos, myField.value.length);
myField.focus();
myField.selectionStart = startPos + myValue.length;
myField.selectionEnd = startPos + myValue.length;
myField.scrollTop = scrollTop;
} else {
myField.value += myValue;
myField.focus();}}
});
/* ]]> */
</script>
<p>Note : You can insert CSS, JavaScript, Favicon, Meta desription & keywords here.<br /><br />Example CSS : <code><link rel='stylesheet' href='http://url-css-here/style.css' type='text/css' media='all' /></code><br /><br />Example JS : <code><script type='text/javascript' src='http://url-js-here/style.css'></script></code><br /><br />Example Meta Description : <code><meta name="description" content="Insert Description Here" /></code><br /><br />
Example Meta Keywords : <code><meta name="keywords" content="Insert Keywords Here" /></code></p>
<input type="hidden" name="location" value="" id="location" />
<p><input type="button" name="insert-style" class="button" value="Insert CSS" id="insert-style" />
<input type="button" name="insert-script" class="button" value="Insert JavaScript" id="insert-script" />
<input type="button" name="meta-desc" class="button" value="Insert Meta Description" id="meta-desc" />
<input type="button" name="meta-key" class="button" value="Insert Meta Keywords" id="meta-key" /></p>
<div class="box"><textarea id="custom-single" name="custom-single" rows="10" cols="40"><?php echo esc_attr( get_post_meta( $post->ID,'blank_custom_single', true ) ); ?></textarea></div><div class="clear"></div></form>
<?php }?> | gpl-2.0 |
OssFate/EvoStuffz | ProjectMono/evoStuffz/Testing/Properties/AssemblyInfo.cs | 989 | ๏ปฟusing System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("Testing")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyright ("oswald")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
| gpl-2.0 |
rajdeepd/dockersamples | golang/dockersamples/get_container_state.go | 922 | package main
import (
"encoding/json"
"fmt"
"github.com/rajdeepd/dockersamples/golang/dockersamples/sampleutils"
"os"
)
type ContainerInfo struct {
Names []string
Id string
}
func main() {
if len(os.Args) > 1 {
name := os.Args[1]
getContainerState(name)
} else {
fmt.Printf("Please specify container name on the command line\n")
}
}
func getContainerState(name string) (containerState string) {
containerId := ""
containerId = sampleutils.GetContainerId(name)
if containerId != "" {
_, body, err := sampleutils.SockRequest("GET", "/containers/"+containerId+"/json", nil)
var inspectJSON struct {
Id string
State string
}
if err = json.Unmarshal(body, &inspectJSON); err != nil {
fmt.Printf("unable to unmarshal response body: %v", err)
}
containerState := string(inspectJSON.State)
return containerState
} else {
fmt.Printf("Container doesn't exist")
return ""
}
}
| gpl-2.0 |
gaurav/taxondna | src/main/java/com/ggvaidya/TaxonDNA/SpeciesIdentifier/Messages.java | 5246 | /**
* Stores 'Messages' (strings which can be retrieved, and hence modified, from a central source).
* We're trying to be simple: there'll be a set of codes, you call
* Messages.getMessage(Messages.FILE_NOT_FOUND) to get a standard FILE_NOT_FOUND error string. Some
* messages need an arguments (cast via Object), such as
* Messages.getMessage(Messages.FILE_NOT_FOUND, file)
*
* @author Gaurav Vaidya, [email protected]
*/
/*
TaxonDNA
Copyright (C) Gaurav Vaidya, 2005
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package com.ggvaidya.TaxonDNA.SpeciesIdentifier;
import java.io.*;
public class Messages {
public static int SUCCESS = 0;
public static int FILE_NOT_FOUND = 1;
public static int CANT_READ_FILE = 2;
public static int SAVE_FILE_FORMAT = 3;
public static int READING_FILE = 4;
public static int IOEXCEPTION_READING = 5;
public static int IOEXCEPTION_WRITING = 6;
public static int IOEXCEPTION_WRITING_NO_FILENAME = 7;
public static int COPY_TO_CLIPBOARD_FAILED = 8;
public static int NEED_SPECIES_SUMMARY = 9;
private static String[] errorMessages = {
// SUCCESS: No arguments
"This operation was completely successfully.",
// FILE_NOT_FOUND: The file which was not found
"The file '$1$' was not found. Please ensure that the file exists.",
// CANT_READ_FILE: The file which could not be read
"The file '$1$' could not be read. Please check whether the file exists, and that you have sufficient permissions to read this file.",
// SAVE_FILE_FORMAT
"Saving file '$1$' in the $2$ format. To save export this file to another format, you may use the 'Export' menu.",
// READING_FILE:
"Reading sequences from '$1$' into SpeciesIdentifier. This might take some time.",
// IOEXCEPTION_READING: file, exception
"There was an error while reading from '$1$'. Please ensure that the file exists, that you have permission to read it, and that there are no problems with the drive on which the file is being read from.\n\nThe technical description of this error is: $2$",
// IOEXCEPTION_WRITING: file, exception
"There was an error while writing to '$1$'. Please ensure that you have permission to create or modify this file, that the drive on which the file is being written is not full or set 'write-only'.\n\nThe technical description of this error is: $2$",
// IOEXCEPTION_WRITING_NO_FILENAME: exception
"There was an error while trying to write a file. Please ensure that the drive on which the file is being written is not full or set 'write-only'.\n\nThe technical description of this error is: $1$",
// COPY_TO_CLIPBOARD_FAILED: exception
"There was an error copying to the clipboard. The text was probably not copied. Please try again; if this doesn't work, please report it as a bug.\n\nTechnical explanation: $1$",
// NEED_SPECIES_SUMMARY
"To carry out this operation, I need the Species Summary module, which was not built into your SpeciesIdentifier. You can try downloading the most recent one, or download the \"definitive\" copy from http://taxondna.sf.net/"
};
public static String getMessage(int code) {
if (code >= 0 && code < errorMessages.length) {
return errorMessages[code];
}
return "An illegal error code occured (error code "
+ code
+ "). This is a programming error. Please contact the developer(s) at http://taxondna.sf.net/.";
}
public static String getMessage(int code, Object arg) {
String message = getMessage(code);
String textArg = makeText(arg);
if (textArg != null)
message = message.replaceAll("\\$1\\$", textArg.replaceAll("\\\\", "\\\\\\\\"));
return message;
}
public static String getMessage(int code, Object arg, Object arg2) {
String message = getMessage(code);
String textArg = makeText(arg);
String textArg2 = makeText(arg2);
if (textArg != null)
message = message.replaceAll("\\$1\\$", textArg.replaceAll("\\\\", "\\\\\\\\"));
if (textArg2 != null)
message = message.replaceAll("\\$2\\$", textArg2.replaceAll("\\\\", "\\\\\\\\"));
return message;
}
private static String makeText(Object obj) {
// handle null objects
if (obj == null) return "(null)";
// see if it's a class we recognize
if (File.class.isAssignableFrom(obj.getClass())) {
// it's a file!
return ((File) obj).getAbsolutePath();
}
if (String.class.isAssignableFrom(obj.getClass())) {
// it's a string!
return (String) obj;
}
return obj.toString();
}
}
| gpl-2.0 |
btalberg/CTS-Connected | wp-content/plugins/bp-reply-by-email/includes/bp-rbe-functions.php | 47257 | <?php
/**
* BP Reply By Email Functions
*
* @package BP_Reply_By_Email
* @subpackage Functions
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
/** RBE All-purpose *****************************************************/
/**
* Checks to see if minimum requirements are completed (admin settings, webhost requirements).
*
* @param mixed $settings If you already have a settings array available, pass it. Otherwise, default is false.
* @return bool
* @since 1.0-beta
*/
function bp_rbe_is_required_completed( $settings = false ) {
global $bp_rbe;
$settings = !$settings ? $bp_rbe->settings : $settings;
// also check if the IMAP extension is enabled
if ( !is_array( $settings ) || !function_exists( 'imap_open' ) )
return false;
$required_key = array( 'servername', 'port', 'tag', 'username', 'password', 'key', 'keepalive', 'connect' );
foreach ( $required_key as $required ) :
if ( empty( $settings[$required] ) )
return false;
endforeach;
return true;
}
/**
* Check to see if we're connected to the IMAP inbox.
*
* To check if we're connected, a DB entry is updated in {@link BP_Reply_By_Email_IMAP::connect()}
* and in {@link BP_Reply_By_Email_IMAP::close()}.
*
* @return bool
* @since 1.0-beta
*/
function bp_rbe_is_connected() {
$is_connected = bp_get_option( 'bp_rbe_is_connected' );
if ( ! empty( $is_connected ) ) {
return true;
}
return false;
}
/**
* Cleanup RBE.
*
* Clears RBE's scheduled hook from WP, as well as any DB entries and
* files.
*
* @since 1.0-RC1
*/
function bp_rbe_cleanup() {
// clear RBE's scheduled hook
wp_clear_scheduled_hook( 'bp_rbe_schedule' );
// remove remnants from any previous failed attempts to stop the inbox
bp_rbe_should_stop();
// clear RBE's connected marker
bp_delete_option( 'bp_rbe_is_connected' );
// clear connecting lock if available
delete_site_transient( 'bp_rbe_lock' );
// update RBE's spawn cron so we spawn cron on the next user visit
bp_update_option( 'bp_rbe_spawn_cron', 1 );
}
/**
* Get execution time for IMAP loop.
* This is the amount of time that RBE stays connected to the IMAP inbox.
*
* If safe mode is enabled, we use the max_execution_time as set in PHP.
* Otherwise, this value is configurable from the admin page.
*
* @see BP_Reply_By_Email_IMAP:::run()
* @param string $value Either 'seconds' or 'minutes'. Default is 'seconds'.
* @return int The execution time in either seconds or minutes
* @since 1.0-beta
* @todo Remove safe mode support as safe mode is being deprecated in PHP 5.3+.
*/
function bp_rbe_get_execution_time( $value = 'seconds' ) {
global $bp_rbe;
// if webhost has enabled safe mode, we cannot set the time limit, so
// we have to accommodate their max execution time
if ( ini_get( 'safe_mode' ) ) :
// value is in seconds
$time = ini_get( 'max_execution_time' );
if ( $value == 'minutes' )
$time = floor( ini_get( 'max_execution_time' ) / 60 );
// apply a filter just in case someone wants to override this!
$time = apply_filters( 'bp_rbe_safe_mode_execution_time', $time );
else :
// if keepalive setting exists, use it; otherwise, set default keepalive to 15 minutes
$time = !empty( $bp_rbe->settings['keepalive'] ) ? $bp_rbe->settings['keepalive'] : 15;
if ( $value == 'seconds' )
$time = $time * 60;
endif;
return $time;
}
/**
* Injects address tag into the IMAP email address.
*
* eg. [email protected] -> [email protected]
*
* @param string $param The parameters we want to add to an email address.
* @since 1.0-beta
* @todo Add subdomain addressing support in a future release
*/
function bp_rbe_inject_qs_in_email( $qs ) {
global $bp_rbe;
$email = $bp_rbe->settings['email'];
$at_pos = strpos( $email, '@' );
// Address tag + $qs
$tag_qs = $bp_rbe->settings['tag'] . $qs;
return apply_filters( 'bp_rbe_inject_qs_in_email', substr_replace( $email, $tag_qs, $at_pos, 0 ), $tag_qs );
}
/**
* Encodes a string.
*
* By default, uses AES encryption from {@link http://phpseclib.sourceforge.net/ phpseclib}.
* Licensed under the {@link http://www.opensource.org/licenses/mit-license.html MIT License}.
*
* Thanks phpseclib! :)
*
* @param array $args Array of arguments. See inline doc of function for full details.
* @return string The encoded string
* @since 1.0-beta
*/
function bp_rbe_encode( $args = array() ) {
global $bp_rbe;
$defaults = array (
'string' => false, // the content we want to encode
'key' => $bp_rbe->settings['key'], // the key used to aid in encryption; defaults to the key set in the admin area
'param' => false, // the string we want to prepend to the key; handy to set different keys
'mode' => 'aes', // mode of encryption; defaults to 'aes'
);
$args = wp_parse_args( $args, $defaults );
extract( $args );
if ( empty( $string ) || empty( $key ) )
return false;
if ( $param )
$key = $param . $key;
$encrypt = false;
// default mode is AES
// you can override this with the filter below to prevent the AES library from loading
// to modify the return value, use the 'bp_rbe_encode' filter
$mode = apply_filters( 'bp_rbe_encode_mode', $mode );
if ( $mode == 'aes' ) {
if ( ! class_exists( 'Crypt_AES' ) ) {
require( BP_RBE_DIR . '/includes/phpseclib/AES.php' );
}
$cipher = new Crypt_AES();
$cipher->setKey( $key );
// converts AES binary string to hexadecimal
$encrypt = bin2hex( $cipher->encrypt( $string ) );
}
return apply_filters( 'bp_rbe_encode', $encrypt, $string, $mode, $key, $param );
}
/**
* Decodes an encrypted string.
*
* By default, uses AES decryption from {@link http://phpseclib.sourceforge.net/ phpseclib}.
* Licensed under the {@link http://www.opensource.org/licenses/mit-license.html MIT License}.
*
* Thanks phpseclib! :)
*
* @param array $args Array of arguments. See inline doc of function for full details.
* @return string The decoded string
* @since 1.0-beta
*/
function bp_rbe_decode( $args = array() ) {
global $bp_rbe;
$defaults = array (
'string' => false, // the encoded string we want to dencode
'key' => $bp_rbe->settings['key'], // the key used to aid in encryption; defaults to the key set in the admin area
'param' => false, // the string we want to prepend to the key; handy to set different keys
'mode' => 'aes', // mode of decryption; defaults to 'aes'
);
$args = wp_parse_args( $args, $defaults );
extract( $args );
if ( empty( $string ) || empty( $key ) )
return false;
if ( $param )
$key = $param . $key;
$decrypt = false;
// default mode is AES
// you can override this with the filter below to prevent the AES library from loading
// to modify the return value, use the 'bp_rbe_decode' filter
$mode = apply_filters( 'bp_rbe_encode_mode', $mode );
if ( $mode == 'aes' ) {
if ( ! class_exists( 'Crypt_AES' ) ) {
require( BP_RBE_DIR . '/includes/phpseclib/AES.php' );
}
$cipher = new Crypt_AES();
$cipher->setKey( $key );
// converts hexadecimal AES string back to binary and then decrypts string back to plain-text
$decrypt = $cipher->decrypt( hex2bin( $string ) );
}
return apply_filters( 'bp_rbe_decode', $decrypt, $string, $mode, $key, $param );
}
if ( ! function_exists( 'hex2bin' ) ) :
/**
* hex2bin() isn't available in PHP < 5.4.
*
* So let's add our compatible version here.
*
* @uses pack()
* @param string $text Hexadecimal representation of data.
* @return mixed Returns the binary representation of the given data or FALSE on failure.
*/
function hex2bin( $text ) {
return pack( 'H*', $text );
}
endif;
/**
* Is IMAP SSL support enabled?
*
* Check to see if both the OpenSSL and IMAP modules are loaded.
*
* @uses get_loaded_extensions() Gets names of all PHP modules that are compiled and loaded.
* @return bool
* @since 1.0-beta
*/
function bp_rbe_is_imap_ssl() {
$modules = get_loaded_extensions();
if ( ! in_array( 'openssl', $modules ) )
return false;
if ( ! in_array( 'imap', $modules ) )
return false;
return true;
}
/**
* Logs BP Reply To Email actions to a debug log.
*
* @uses error_log()
* @since 1.0-beta
*/
function bp_rbe_log( $message ) {
// if debugging is off, stop now.
if ( ! constant( 'BP_RBE_DEBUG' ) )
return;
if ( empty( $message ) )
return;
error_log( '[' . gmdate( 'd-M-Y H:i:s' ) . '] ' . $message . "\n", 3, BP_RBE_DEBUG_LOG_PATH );
}
/**
* Returns an array containing X number of rows from the end of a file.
*
* Function is renamed from Dan Roscoe's PHP-Tail function:
* https://github.com/ruscoe/PHP-Tail
*
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
* Thanks Dan! Thdan!
*
* @param string $filename
* @param int $lines_to_display
* @return array
* @link https://github.com/ruscoe/PHP-Tail
* @since 1.0-RC1
*/
function bp_rbe_tail( $filename, $lines_to_display ) {
// Open the file.
if ( !$open_file = fopen( $filename, 'r' ) ) {
return false;
}
// Ignore new line characters at the end of the file
$pointer = -2;
$char = '';
$beginning_of_file = false;
$lines = array();
for ( $i=1; $i <= $lines_to_display; $i++ ) {
if ( $beginning_of_file == true ) {
continue;
}
/**
* Starting at the end of the file, move the pointer back one
* character at a time until it lands on a new line sequence.
*/
while ( $char != "\n" ) {
// If the beginning of the file is passed
if( fseek( $open_file, $pointer, SEEK_END ) < 0 ) {
$beginning_of_file = true;
// Move the pointer to the first character
rewind( $open_file );
break;
}
// Subtract one character from the pointer position
$pointer--;
// Move the pointer relative to the end of the file
fseek( $open_file, $pointer, SEEK_END );
// Get the current character at the pointer
$char = fgetc( $open_file );
}
array_push( $lines, fgets( $open_file ) );
// Reset the character.
$char = '';
}
// Close the file.
fclose( $open_file );
/**
* Return the array of lines reversed, so they appear in the same
* order they appear in the file.
*/
return array_reverse( $lines );
}
/** Hook-related ********************************************************/
/**
* Overrides an activity comment's action string.
*
* BP doesn't pass the $user_id in the "bp_activity_comment_action" filter.
* So, a little bit of hackery is done just to add the words "via email" to the comment action! :)
*
* @since 1.0-beta
*/
function bp_rbe_activity_comment_action_filter( $user_id ) {
global $bp_rbe;
// hack to pass user ID!
$bp_rbe->filter = new stdClass;
$bp_rbe->filter->user_id = $user_id;
add_filter( 'bp_activity_comment_action', 'bp_rbe_activity_comment_action' );
}
/**
* Callback for "bp_activity_comment_action" filter.
* Uses the passed user ID from {@link bp_rbe_activity_comment_action_filter()}.
*
* @since 1.0-beta
*/
function bp_rbe_activity_comment_action( $action ) {
global $bp_rbe;
// use our passed user ID from hack above
return sprintf( __( '%s posted a new activity comment via email:', 'bp-rbe' ), bp_core_get_userlink( $bp_rbe->filter->user_id ) );
}
/**
* Adds anchor to an activity comment's "View" link.
*
* Who likes scrolling all the way down the page to find their comment!
*
* @since 1.0-beta
*/
function bp_rbe_activity_comment_view_link( $link, $activity ) {
if ( $activity->type == 'activity_comment' ) {
$action = apply_filters_ref_array( 'bp_get_activity_action_pre_meta', array( $activity->action, &$activity ) );
$time_since = apply_filters_ref_array( 'bp_activity_time_since', array( '<span class="time-since">' . bp_core_time_since( $activity->date_recorded ) . '</span>', &$activity ) );
return $action . ' <a href="' . bp_activity_get_permalink( $activity->id ) . '#acomment-' . $activity->id . '" class="view activity-time-since" title="' . __( 'View Discussion', 'buddypress' ) . '">' . $time_since . '</a>';
}
return $link;
}
/**
* When posting via email, we also update the last activity entries in BuddyPress.
*
* This is so your BuddyPress site doesn't look dormant when your members
* are emailing each other back and forth! :)
*
* @param array $args Depending on the filter that this function is hooked into, contents will vary
* @since 1.0-RC1
*/
function bp_rbe_log_last_activity( $args ) {
// get user id from activity entry
if ( ! empty( $args['user_id'] ) )
$user_id = $args['user_id'];
// get user id from PM
elseif ( ! empty( $args['sender_id'] ) )
$user_id = $args['sender_id'];
else
$user_id = false;
// if no user ID, return now
if ( empty( $user_id ) )
return;
// update 'last_activity' user meta entry
bp_update_user_meta( $user_id, 'last_activity', bp_core_current_time() );
// now update 'last_activity' group meta entry if applicable
if ( ! empty( $args['type'] ) ) {
switch ( $args['type'] ) {
case 'new_forum_topic' :
case 'new_forum_post' :
case 'bbp_topic_create' :
case 'bbp_reply_create' :
// sanity check!
if ( ! bp_is_active( 'groups' ) )
return;
groups_update_last_activity( $args['item_id'] );
break;
// for group activity comments, we have to look up the parent activity to see
// if the activity comment came from a group
case 'activity_comment' :
// we don't need to proceed if the groups component was disabled
if ( ! bp_is_active( 'groups' ) )
return;
// sanity check!
if ( ! bp_is_active( 'activity' ) )
return;
// grab the parent activity
$activity = bp_activity_get_specific( 'activity_ids=' . $args['item_id'] );
if ( ! empty( $activity['activities'][0] ) ) {
$parent_activity = $activity['activities'][0];
// if parent activity update is from the groups component,
// that means the activity comment was in a group!
// so update group 'last_activity' meta entry
if ( $parent_activity->component == 'groups' )
groups_update_last_activity( $parent_activity->item_id );
}
break;
}
}
}
/**
* Clear user cache when no match is found.
*
* @since 1.0-RC1
*
* @param resource $imap The current IMAP connection
* @param int $i The current message number
* @param array $headers The email headers
* @param sring $type The type of error
*/
function bp_rbe_clear_user_cache( $imap, $i, $headers, $type ) {
switch ( $type ) {
case 'no_user_id' :
$email = BP_Reply_By_Email_IMAP::address_parser( $headers, 'From' );
wp_cache_delete( $email, 'useremail' );
break;
case 'user_is_spammer' :
$user_id = email_exists( BP_Reply_By_Email_IMAP::address_parser( $headers, 'From' ) );
wp_cache_delete( $user_id, 'users' );
break;
}
}
/**
* Removes end of line (EOL) and a given character from content.
* Used to remove the trailing ">" character from email replies. Wish Basecamp did this!
*
* @param string $content The content we want to modify
* @return string Either content without EOL + $char or the unmodified content.
* @since 1.0-beta
*/
function bp_rbe_remove_eol_char( $content ) {
$char = apply_filters( 'bp_rbe_eol_char', '>' );
if ( substr( $content, -strlen( $char ) ) == $char )
return substr( $content, 0, strrpos( $content, chr( 10 ) . $char ) );
return $content;
}
/**
* Converts HTML to plain-text.
*
* Uses the html2text functions from the {@link http://openiaml.org/ IAML Modelling Platform}
* by {@link mailto:[email protected] Jevon Wright}.
*
* Licensed under the Eclipse Public License v1.0:
* {@link http://www.eclipse.org/legal/epl-v10.html}
*
* Thanks Jevon! :)
*
* @link https://code.google.com/p/iaml/source/browse/trunk/org.openiaml.model.runtime/src/include/html2text/html2text.php
* @uses convert_html_to_text() Converts HTML to plain-text.
* @param string $content The HTML content we want to convert to plain-text.
* @return string Converted plain-text.
*/
function bp_rbe_html_to_plaintext( $content ) {
if ( ! function_exists( 'convert_html_to_text' ) )
require( BP_RBE_DIR . '/includes/functions.html2text.php' );
return convert_html_to_text( $content );
}
/**
* Removes line wrap from plain-text emails.
*
* Plain-text emails usually wrap after a certain amount of characters
* (GMail wraps after ~78 characters) and this will also be reflected on
* the frontend of BuddyPress.
*
* This function attempts to remove the line wrap from plain-text emails
* during email parsing so things will look pretty on the frontend.
*
* But, this isn't used at the moment due to bugginess!
* If you want to try it, hook this function to the 'bp_rbe_parse_email_body' filter.
*
* Note: Github's RBE doesn't strip line wraps.
*
* @param string $body The body we want to remove line-wraps for
* @param obj $structure The structure of the email from imap_fetchstructure()
* @return string Converted plain-text.
* @todo Need to check line endings on other OSs... might use PHP_EOL instead
*/
function bp_rbe_remove_line_wrap_from_plaintext( $body, $structure ) {
// just in case, we only do this to emails that are not HTML-only
if ( $structure->subtype != 'html' ) {
// replace double CRLF with double LF
$body = str_replace( "\r\n\r\n", "\n\n", $body );
// keep line breaks for certain instances
// hacky at best... :(
// doesn't handle numbered list items
// @todo craft a nice regex to do this instead and cover all instances?
// any line ending with a colon
$body = str_replace( ":\r\n", ':<RAY>', $body );
// any line beginning with '-', '*', ' '
$body = str_replace( "\r\n-", '<RAY>-', $body );
$body = str_replace( "\r\n*", '<RAY>*', $body );
$body = str_replace( "\r\n ", '<RAY> ', $body );
// now remove single CRLF so line wrap is gone!
$body = str_replace( "\r\n", ' ', $body );
// add back the line breaks
$body = str_replace( '<RAY>', "\n", $body );
}
return $body;
}
/**
* Tries to remove the email signature of *most* common email clients from email replies.
*
* Keyword here is *most*! :) A work-in-progress!
*
* @param string $content The content we want to modify
* @return string
* @since 1.0-beta
*/
function bp_rbe_remove_email_client_signature( $content ) {
// Good reference article:
// http://stackoverflow.com/questions/1372694/strip-signatures-and-replies-from-emails#answer-2193937
//
// I've implemented basically everything except #2 and #6
// helpful ascii whitespace debugger
//var_dump( str_replace( array( "\r\n", "\r", "\n", "\t"), array( '\\r\\n', '\\r', '\\n', '\\t' ), $content ) );
// (1) Standard email sig delimiter
//
// eg. "--\r\n
// John Doe"
//
if ( strpos( $content, chr( 10 ) . '--' . chr( 13 ) . chr( 10 ) ) !== false ) {
$content = substr( $content, 0, strpos( $content, chr( 10 ) . '--' . chr( 13 ) . chr( 10 ) ) );
}
// (2) Common mobile email client sigs:
// check to see if any line begins with "Sent from my "
elseif ( strrpos( $content, chr( 10 ) . 'Sent from my ' ) !== false ) {
$content = substr( $content, 0, strrpos( $content, chr( 10 ) . 'Sent from my ' ) );
}
// (3)(i) Miscellaneous email sigs: Outlook Desktop, Novell Groupwise Web Access
//
// These clients (and probably others) use an indeterminate amount of dashes to
// separate the body and the signature; let's check for at least 20 occurences in a row
// @todo Perhaps use a longer length to be extra safe?
elseif ( strrpos( $content, chr( 10 ) . '--------------------' ) !== false ) {
$content = substr( $content, 0, strrpos( $content, chr( 10 ) . '--------------------' ) );
}
// (3)(ii) Miscellaneous email sigs: Outlook Web Access
//
// Outlook Web Access sigs look like this:
//
// ________________________________________
// From: ...
//
// Since the multiple underscores are sometimes of an indeterminant length,
// we check for at least 20 occurences
// @todo Perhaps use a longer length to be extra safe?
elseif ( strrpos( $content, chr( 10 ) . '____________________' ) !== false ) {
$content = substr( $content, 0, strrpos( $content, chr( 10 ) . '____________________' ) );
}
// (3)(iii) Miscellaneous email sigs: Outlook Desktop
//
// Some Outlook Desktop sigs look like this:
//
// -----Original Message-----
// From: ...
//
elseif ( strrpos( $content, chr( 10 ) . '-----Original Message-----' ) !== false ) {
$content = substr( $content, 0, strrpos( $content, chr( 10 ) . '-----Original Message-----' ) );
}
// (3)(iv) Miscellaneous email sigs: Lotus Notes
//
// eg. "-----Blah <blah.com> wrote: -----"
//
// The reason we do two checks here is people might use five dashes to emulate a <hr> tag.
elseif ( strrpos( $content, chr( 10 ) . '-----' ) !== false && strrpos( $content, ': -----' ) !== false ) {
$content = substr( $content, 0, strrpos( $content, chr( 10 ) . '-----' ) );
}
// (4) Common email client sigs:
// check if last character of last line ends with a colon.
//
// eg. 'On DATE, USER wrote:'
// 'USER wrote:'
//
// This is the last check because it's slightly more intensive than the others
else {
// split email into an array of lines; reverse the order
$lines = array_reverse( preg_split( '/$\R?^/m', $content ) );
//print_r($lines);
// last character of last line ends with a colon!
if ( substr( rtrim( $lines[0] ), -1 ) === ':' ) {
$i = 0;
// now we check to see if the sig was wrapped after a certain character limit.
//
// eg. 'On DATE, USER
// wrote:'
//
// chances are this sig takes up a maximum of two lines, but just to be safe, I'm using this method!
//
// this is done by checking if each line from the last line is less than the last line
while ( ! empty( $lines[$i + 1] ) ) {
// if the nth-to-last line is less than the current line, stop now!
if ( strlen( $lines[$i + 1] ) < strlen( $lines[$i] ) )
break;
// iterate!
++$i;
// strip from the beginning of the sig
$content = substr( $content, 0, strrpos( $content, $lines[$i] ) );
}
// if $i didn't iterate, this means the sig is on the last line only
if ( $i == 0 ) {
$content = substr( $content, 0, strrpos( $content, $lines[0] ) );
}
}
}
return $content;
}
/**
* Logs no match errors during IMAP inbox checks and also sends a failure
* message back to the original sender for feedback purposes.
*
* @uses bp_rbe_log() Logs error messages in a custom log
* @param resource $imap The current IMAP connection
* @param int $i The current message number
* @param array $headers The email headers
* @param sring $type The type of error
* @since 1.0-beta
*/
function bp_rbe_imap_log_no_matches( $imap, $i, $headers, $type ) {
$log = $message = false;
// log messages based on the type
switch ( $type ) {
/** RBE **********************************************************/
case 'no_address_tag' :
$log = __( 'error - no address tag could be found', 'bp-rbe' );
break;
case 'no_user_id' :
$log = __( 'error - no user ID could be found', 'bp-rbe' );
$sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
$message = sprintf( __( 'Hi there,
You tried to use the email address - %s - to reply by email. Unfortunately, we could not find this email address in our system.
This can happen in a couple of different ways:
* You have configured your email client to reply with a custom "From:" email address.
* You read email addressed to more than one account inside of a single Inbox.
Make sure that, when replying by email, your "From:" email address is the same as the address you\'ve registered at %s.
If you have any questions, please let us know.', 'bp-rbe' ), BP_Reply_By_Email_IMAP::address_parser( $headers, 'From' ), $sitename );
break;
case 'user_is_spammer' :
$log = __( 'notice - user is marked as a spammer. reply not posted!', 'bp-rbe' );
break;
case 'no_params' :
$log = __( 'error - no parameters were found', 'bp-rbe' );
break;
case 'no_reply_body' :
$log = __( 'error - body message for reply was empty', 'bp-rbe' );
$message = sprintf( __( 'Hi there,
Your reply could not be posted because we could not find the "%s" marker in the body of your email.
In the future, please make sure you reply *above* this line for your comment to be posted on the site.
If you have any questions, please let us know.', 'bp-rbe' ), __( '--- Reply ABOVE THIS LINE to add a comment ---', 'bp-rbe' ) );
break;
/** ACTIVITY *****************************************************/
case 'root_activity_deleted' :
$log = __( 'error - root activity update was deleted before this could be posted', 'bp-rbe' );
$message = sprintf( __( 'Hi there,
Your reply:
"%s"
Could not be posted because the activity entry you were replying to no longer exists.
We apologize for any inconvenience this may have caused.', 'bp-rbe' ), BP_Reply_By_Email_IMAP::body_parser( $imap, $i ) );
break;
case 'root_or_parent_activity_deleted' :
$log = __( 'error - root or parent activity update was deleted before this could be posted', 'bp-rbe' );
$message = sprintf( __( 'Hi there,
Your reply:
"%s"
Could not be posted because the activity entry you were replying to no longer exists.
We apologize for any inconvenience this may have caused.', 'bp-rbe' ), BP_Reply_By_Email_IMAP::body_parser( $imap, $i ) );
break;
/** GROUP FORUMS *************************************************/
case 'user_not_group_member' :
$log = __( 'error - user is not a member of the group. forum reply not posted.', 'bp-rbe' );
$message = sprintf( __( 'Hi there,
Your forum reply:
"%s"
Could not be posted because you are no longer a member of this group. To comment on the forum thread, please rejoin the group.
We apologize for any inconvenience this may have caused.', 'bp-rbe' ), BP_Reply_By_Email_IMAP::body_parser( $imap, $i ) );
break;
case 'user_banned_from_group' :
$log = __( 'notice - user is banned from group. forum reply not posted.', 'bp-rbe' );
break;
case 'new_forum_topic_empty' :
$log = __( 'error - body message for new forum topic was empty', 'bp-rbe' );
$message = __( 'Hi there,
We could not post your new forum topic by email because we could not find any text in the body of the email.
In the future, please make sure to type something in your email! :)
If you have any questions, please let us know.', 'bp-rbe' );
break;
case 'forum_reply_fail' :
$log = __( 'error - forum topic was deleted before reply could be posted', 'bp-rbe' );
$message = sprintf( __( 'Hi there,
Your forum reply:
"%s"
Could not be posted because the forum topic you were replying to no longer exists.
We apologize for any inconvenience this may have caused.', 'bp-rbe' ), BP_Reply_By_Email_IMAP::body_parser( $imap, $i ) );
break;
case 'forum_topic_fail' :
$log = __( 'error - forum topic failed to be created', 'bp-rbe' );
// this is a pretty generic message...
$message = sprintf( __( 'Hi there,
Your forum topic titled "%s" could not be posted due to an error.
We apologize for any inconvenience this may have caused.', 'bp-rbe' ), BP_Reply_By_Email_IMAP::address_parser( $headers, 'Subject' ) );
break;
/** PRIVATE MESSAGES *********************************************/
// most likely a spammer trying to infiltrate an existing PM thread
case 'private_message_not_in_thread' :
$log = __( 'error - user is not a part of the existing PM conversation', 'bp-rbe' );
break;
case 'private_message_thread_deleted' :
$log = __( 'error - private message thread was deleted by all parties before this could be posted', 'bp-rbe' );
$message = sprintf( __( 'Hi there,
Your private message reply:
"%s"
Could not be posted because the private message thread you were replying to no longer exists.
We apologize for any inconvenience this may have caused.', 'bp-rbe' ), BP_Reply_By_Email_IMAP::body_parser( $imap, $i ) );
break;
case 'private_message_fail' :
$log = __( 'error - private message failed to post', 'bp-rbe' );
$message = sprintf( __( 'Hi there,
Your reply:
"%s"
Could not be posted due to an error.
We apologize for any inconvenience this may have caused.', 'bp-rbe' ), BP_Reply_By_Email_IMAP::body_parser( $imap, $i ) );
break;
// 3rd-party plugins can filter the two variables below to add their own logs and email messages.
default :
$log = apply_filters( 'bp_rbe_extend_log_no_match', $log, $type, $headers, $i, $imap );
$message = apply_filters( 'bp_rbe_extend_log_no_match_email_message', $message, $type, $headers, $i, $imap );
break;
}
// internal logging
if ( $log )
bp_rbe_log( sprintf( __( 'Message #%d: %s', 'bp-rbe' ), $i, $log ) );
// failure message to author
// if you want to turn off failure messages, use the filter below
if ( apply_filters( 'bp_rbe_enable_failure_message', true ) && $message ) {
$to = BP_Reply_By_Email_IMAP::address_parser( $headers, 'From' );
if ( ! empty( $to ) ) {
$sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
$subject = sprintf( __( '[%s] Your Reply By Email message could not be posted', 'bp-rbe' ), $sitename );
wp_mail( $to, $subject, $message );
}
}
}
/**
* Failsafe for RBE.
*
* RBE occasionally hangs during the inbox loop. This function tries
* to snap RBE out of it by checking the last few lines of the RBE
* debug log.
*
* If all lines match our failed cronjob message, then reset RBE so
* RBE can run fresh on the next scheduled run.
*
* @uses bp_rbe_tail() Grabs the last N lines from the RBE debug log
* @uses bp_rbe_cleanup() Cleans up the DB entries that RBE uses
* @since 1.0-RC1
*/
function bp_rbe_failsafe() {
// get the last N lines from the RBE debug log
$last_entries = bp_rbe_tail( constant( 'BP_RBE_DEBUG_LOG_PATH' ), constant( 'BP_RBE_TAIL_LINES' ) );
if ( empty( $last_entries ) )
return;
// count the number of tines our 'cronjob wants to connect' message occurs
$counter = 0;
// see if each line contains our cronjob fail string
foreach ( $last_entries as $entry ) {
if ( strpos( $entry, '--- Cronjob wants to connect - however according to our DB indicator, we already have an active IMAP connection! ---' ) !== false )
++$counter;
}
// if all lines match the cronjob fail string, reset RBE!
if ( $counter == constant( 'BP_RBE_TAIL_LINES' ) ) {
bp_rbe_log( '--- Uh-oh! Looks like RBE is stuck! - FORCE RBE cleanup ---' );
// cleanup RBE!
bp_rbe_cleanup();
// use this hook to perhaps send an email to the admin?
do_action( 'bp_rbe_failsafe_complete' );
}
}
/**
* When RBE posts a new group forum post, record the post meta in bundled bbPress
* so we can reference it later in the topic post loop.
*
* @uses bb_update_postmeta() To add post meta in bundled bbPress.
* @since 1.0-RC1
*/
function bp_rbe_group_forum_record_meta( $id ) {
// since we post items outside of BP's screen functions, it should be safe
// to just check if BP's current component and actions are false
if ( ! bp_current_component() && ! bp_current_action() )
bb_update_postmeta( $id, 'bp_rbe', 1 );
}
/**
* When RBE posts a new activity item, record the activity meta.
*
* Could be used in a custom activity loop to grab activities made by RBE later.
*
* @uses bp_activity_update_meta() To add activity meta.
* @since 1.0-RC1
*/
function bp_rbe_activity_record_meta( $args ) {
bp_activity_update_meta( $args['activity_id'], 'bp_rbe', 1 );
}
/**
* Modify the topic post timestamp to append our custom RBE string.
*
* Checks to see if the current topic post was posted by RBE, if so, alter the
* timestamp string.
*
* @since 1.0-RC1
*/
function bp_rbe_alter_forum_post_timestamp( $timestamp ) {
global $topic_template;
// if the forum post was made via email, alter the post timestamp to add our custom string ;)
// hackalicious!
if ( ! empty( $topic_template->post->bp_rbe ) )
// piggyback off of GES' email icon with the 'gemail_icon' class!
return $timestamp . ' <span class="bp-forum-post-rbe gemail_icon">' . __( 'via email', 'bp-rbe' ) . '</span>';
return $timestamp;
}
/**
* Some basic CSS to style our group forum topic by email block.
*
* @since 1.0-beta
*/
function bp_rbe_new_topic_info_css() {
$current_group = groups_get_current_group();
$show_css = apply_filters( 'bp_rbe_new_topic_info_css', bp_is_group_forum() && ! bp_action_variables() && bp_loggedin_user_id() && ! empty( $current_group->is_member ) );
if ( $show_css ) :
?>
<style type="text/css">
#rbe-toggle { display:none; }
#rbe-message { background: #FFF9DB; border: 1px solid #FFE8C4; padding:1em; }
#rbe-message ul { list-style-type:disc; margin:1em 1.5em; }
</style>
<?php
endif;
}
/**
* Content block to show group members how to post new forum topics via email.
* Javascript-degradable.
*
* @uses bp_rbe_groups_get_encoded_email_address()
* @since 1.0-beta
*/
function bp_rbe_new_topic_info() {
global $bp;
$group = groups_get_current_group();
// if current user is not a member of the group, stop now!
if ( empty( $group->is_member ) )
return;
?>
<h4><?php _e( 'Post New Topics via Email', 'bp-rbe' ) ?></h4>
<p><?php _e( 'You can post new topics to this group from the comfort of your email inbox.', 'bp-rbe' ) ?> <a href="javascript:;" id="rbe-toggle"><?php _e( 'Find out how!', 'bp-rbe' ) ?></a></p>
<div id="rbe-message">
<h5><?php printf( __( 'Send an email to <strong><a href="%s">%s</strong></a> and a new forum topic will be posted in %s.', 'bp-rbe' ), "mailto: " . bp_get_current_group_name() . " <" . bp_rbe_groups_get_encoded_email_address(). ">", bp_rbe_groups_get_encoded_email_address(), bp_get_current_group_name() ); ?></h5>
<ul>
<li><?php printf( __( 'Compose a new email from the same email address you registered with – %s', 'bp-rbe' ), '<strong>' . $bp->loggedin_user->userdata->user_email . '</strong>' ) ?>.</li>
<li><?php _e( 'Put the address above in the "To:" field of the email.', 'bp-rbe' ) ?></li>
<li><?php _e( 'The email subject will become the topic title.', 'bp-rbe' ) ?></li>
<?php do_action( 'bp_rbe_new_topic_info_extra' ) ?>
</ul>
<p><?php _e( '<strong>Note:</strong> The email address above is unique to you and this group. Do not share this email address with anyone else! (Each group member will have their own unique email address.)', 'bp-rbe' ) ?></p>
</div>
<script type="text/javascript">
jQuery(function() {
jQuery('#rbe-toggle').show();
jQuery('#rbe-message').hide();
jQuery('#rbe-toggle').click(function() {
jQuery('#rbe-message').toggle(300);
});
});
</script>
<?php
}
/** Cron ****************************************************************/
/**
* Add custom cron schedule to WP
*
* @since 1.0-beta
*/
function bp_rbe_custom_cron_schedule( $schedules ) {
$schedules['bp_rbe_custom'] = array(
'interval' => bp_rbe_get_execution_time(), // interval in seconds
'display' => sprintf( __( 'Every %s minutes', 'bp-rbe' ), bp_rbe_get_execution_time( 'minutes' ) )
);
return $schedules;
}
/**
* Schedule our task
*
* @since 1.0-beta
*/
function bp_rbe_cron() {
if ( ! wp_next_scheduled( 'bp_rbe_schedule' ) )
wp_schedule_event( time(), 'bp_rbe_custom', 'bp_rbe_schedule' );
// if we need to spawn cron, do it here
// @see BP_Reply_By_Email_IMAP::run()
if ( bp_get_option( 'bp_rbe_spawn_cron' ) ) {
// manually spawn cron
spawn_cron();
// remove our DB marker
bp_delete_option( 'bp_rbe_spawn_cron' );
}
}
/**
* Run scheduled task action set in {@link bp_rbe_cron()}
*
* @uses BP_Reply_By_Email_IMAP::init()
* @uses bp_rbe_is_connected()
* @since 1.0-beta
*/
function bp_rbe_check_imap_inbox() {
// check to see if we're connected via our DB marker
if ( bp_rbe_is_connected() ) {
bp_rbe_log( '--- Cronjob wants to connect - however according to our DB indicator, we already have an active IMAP connection! ---' );
// hook to do some checks if connected
do_action( 'bp_rbe_log_already_connected' );
return;
}
// run our inbox check
$imap = BP_Reply_By_Email_IMAP::init();
$imap->run();
}
/**
* Poor man's daemon stopper.
*
* Adds a text file that gets checked by {@link BP_Reply_By_Email_IMAP::should_stop()}
* in order to stop an existing IMAP inbox loop.
*
* @see BP_Reply_By_Email_IMAP::run()
* @since 1.0-beta
*/
function bp_rbe_stop_imap() {
touch( bp_core_avatar_upload_path() . '/bp-rbe-stop.txt' );
}
/**
* Returns true when the main IMAP loop should finally stop in our version of a poor man's daemon.
*
* Info taken from Christopher Nadeau's post - {@link http://devlog.info/2010/03/07/creating-daemons-in-php/#lphp-4}.
*
* @see bp_rbe_stop_imap()
* @uses clearstatcache() Clear stat cache. Needed when using file_exists() in a script like this.
* @uses file_exists() Checks to see if our special txt file is created.
* @uses unlink() Deletes this txt file so we can do another check later.
* @return bool
*/
function bp_rbe_should_stop() {
clearstatcache();
if ( file_exists( bp_core_avatar_upload_path() . '/bp-rbe-stop.txt' ) ) {
unlink( bp_core_avatar_upload_path() . '/bp-rbe-stop.txt' ); // delete the file for next time
return true;
}
return false;
}
/** Modified BP functions ***********************************************/
/**
* Modified version of {@link groups_new_group_forum_post()}.
*
* Duplicated because:
* - groups_new_group_forum_post() hardcodes the $user_id.
* - groups_new_group_forum_post() doesn't check if the corresponding topic is deleted before posting.
* - $bp->groups->current_group doesn't exist outside the BP groups component.
* - {@link groups_record_activity()} restricts a bunch of parameters - use full {@link bp_activity_add()} instead.
*
* @param mixed $args Arguments can be passed as an associative array or as a URL argument string
* @return mixed If forum reply is successful, returns the forum post ID; false on failure
* @since 1.0-beta
*/
function bp_rbe_groups_new_group_forum_post( $args = '' ) {
global $bp;
$defaults = array(
'post_text' => false,
'topic_id' => false,
'user_id' => false,
'group_id' => false,
'page' => false // Integer of the page where the next forum post resides
);
$r = apply_filters( 'bp_rbe_groups_new_group_forum_post_args', wp_parse_args( $args, $defaults ) );
extract( $r );
if ( empty( $post_text ) )
return false;
// apply BP's filters
$post_text = apply_filters( 'group_forum_post_text_before_save', $post_text );
$topic_id = apply_filters( 'group_forum_post_topic_id_before_save', $topic_id );
// initialize bundled bbPress
// @todo perhaps use $wpdb instead and do away with the 'bbpress_init' hook as it's hella intensive
do_action( 'bbpress_init' );
global $bbdb;
// do a direct bbPress DB call
if ( isset( $bbdb ) ) {
$topic = $bbdb->get_row( $bbdb->prepare( "SELECT * FROM {$bbdb->topics} WHERE topic_id = %d", $topic_id ) );
}
// if the topic was deleted, stop now!
if ( $topic->topic_status == 1 )
return false;
if ( $post_id = bp_forums_insert_post( array( 'post_text' => $post_text, 'topic_id' => $topic_id, 'poster_id' => $user_id ) ) ) {
$group = groups_get_group( 'group_id=' . $group_id );
// If no page passed, calculate the page where the new post will reside.
// I should backport this to BP.
if ( !$page ) {
$pag_num = apply_filters( 'bp_rbe_topic_pag_num', 15 );
$page = ceil( $topic->topic_posts / $pag_num );
}
$activity_action = sprintf( __( '%s replied to the forum topic %s in the group %s via email:', 'bp-rbe'), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $group ) . 'forum/topic/' . $topic->topic_slug .'/">' . esc_attr( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $group ) . '">' . esc_attr( $group->name ) . '</a>' );
$activity_content = bp_create_excerpt( $post_text );
$primary_link = bp_get_group_permalink( $group ) . 'forum/topic/' . $topic->topic_slug . '/?topic_page=' . $page;
/* Record this in activity streams */
$activity_id = bp_activity_add( array(
'user_id' => $user_id,
'action' => apply_filters( 'groups_activity_new_forum_post_action', $activity_action, $post_id, $post_text, $topic ),
'content' => apply_filters( 'groups_activity_new_forum_post_content', $activity_content, $post_id, $post_text, $topic ),
'primary_link' => apply_filters( 'groups_activity_new_forum_post_primary_link', "{$primary_link}#post-{$post_id}" ),
'component' => $bp->groups->id,
'type' => 'new_forum_post',
'item_id' => $group_id,
'secondary_item_id' => $post_id,
'hide_sitewide' => ( $group->status == 'public' ) ? false : true
) );
// special hook for RBE activity items
do_action( 'bp_rbe_new_activity', array(
'activity_id' => $activity_id,
'type' => 'new_forum_post',
'user_id' => $user_id,
'item_id' => $group_id,
'secondary_item_id' => $post_id,
'content' => $activity_content
) );
// apply BP's group forum post hook
do_action( 'groups_new_forum_topic_post', $group_id, $post_id );
return $post_id;
}
return false;
}
/**
* Modified version of {@link groups_new_group_forum_topic()}.
*
* Duplicated because:
* - groups_new_group_forum_topic() hardcodes the $user_id.
* - $bp->groups->current_group doesn't exist outside the BP groups component.
* - {@link groups_record_activity()} restricts a bunch of parameters - use full {@link bp_activity_add()} instead.
*
* @param mixed $args Arguments can be passed as an associative array or as a URL argument string
* @return mixed If forum topic is successful, returns the forum topic ID; false on failure
* @since 1.0-beta
*/
function bp_rbe_groups_new_group_forum_topic( $args = '' ) {
global $bp;
$defaults = array(
'topic_title' => false,
'topic_text' => false,
'topic_tags' => false,
'forum_id' => false,
'user_id' => false,
'group_id' => false
);
$r = apply_filters( 'bp_rbe_groups_new_group_forum_topic_args', wp_parse_args( $args, $defaults ) );
extract( $r );
if ( empty( $topic_title ) || empty( $topic_text ) )
return false;
if ( empty( $forum_id ) )
$forum_id = groups_get_groupmeta( $group_id, 'forum_id' );
// apply BP's filters
$topic_title = apply_filters( 'group_forum_topic_title_before_save', $topic_title );
$topic_text = apply_filters( 'group_forum_topic_text_before_save', $topic_text );
$topic_tags = apply_filters( 'group_forum_topic_tags_before_save', $topic_tags );
$forum_id = apply_filters( 'group_forum_topic_forum_id_before_save', $forum_id );
if ( $topic_id = bp_forums_new_topic( array(
'topic_title' => $topic_title,
'topic_text' => $topic_text,
'topic_tags' => $topic_tags,
'forum_id' => $forum_id,
'topic_poster' => $user_id,
'topic_last_poster' => $user_id,
'topic_poster_name' => bp_core_get_user_displayname( $user_id ),
'topic_last_poster_name' => bp_core_get_user_displayname( $user_id )
) ) ) {
// initialize bundled bbPress
do_action( 'bbpress_init' );
global $bbdb;
// do a direct bbPress DB call
if ( isset( $bbdb ) ) {
$topic = $bbdb->get_row( $bbdb->prepare( "SELECT * FROM {$bbdb->topics} WHERE topic_id = {$topic_id}" ) );
}
$group = groups_get_group( 'group_id=' . $group_id );
$activity_action = sprintf( __( '%s started the forum topic %s in the group %s via email:', 'bp-rbe' ), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $group ) . 'forum/topic/' . $topic->topic_slug .'/">' . esc_attr( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $group ) . '">' . esc_attr( $group->name ) . '</a>' );
$activity_content = bp_create_excerpt( $topic_text );
/* Record this in activity streams */
$activity_id = bp_activity_add( array(
'user_id' => $user_id,
'action' => apply_filters( 'groups_activity_new_forum_topic_action', $activity_action, $topic_text, $topic ),
'content' => apply_filters( 'groups_activity_new_forum_topic_content', $activity_content, $topic_text, $topic ),
'primary_link' => apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $group ) . 'forum/topic/' . $topic->topic_slug . '/' ),
'component' => $bp->groups->id,
'type' => 'new_forum_topic',
'item_id' => $group_id,
'secondary_item_id' => $topic_id,
'hide_sitewide' => ( $group->status == 'public' ) ? false : true
) );
// special hook for RBE activity items
do_action( 'bp_rbe_new_activity', array(
'activity_id' => $activity_id,
'type' => 'new_forum_topic',
'user_id' => $user_id,
'item_id' => $group_id,
'secondary_item_id' => $topic_id,
'content' => $activity_content
) );
// apply BP's group forum topic hook
do_action( 'groups_new_forum_topic', $group_id, $topic );
return $topic;
}
return false;
}
/**
* Get a group member's info.
*
* Basically a copy of {@link BP_Groups_Member::populate()} without the
* extra {@link BP_Core_User()} call.
*
* @param int $user_id The user ID
* @param int $group_id The group ID
* @param mixed Object of group member data on success. NULL on failure.
* @since 1.0-RC1
*/
function bp_rbe_get_group_member_info( $user_id = false, $group_id = false ) {
if ( ! $user_id || ! $group_id )
return false;
global $bp, $wpdb;
$sql = $wpdb->prepare( "SELECT * FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d", $user_id, $group_id );
return $wpdb->get_row( $sql );
}
/** Template ************************************************************/
/**
* Template tag to output an encoded group email address for a user.
*
* @uses bp_rbe_groups_get_encoded_email_address()
* @since 1.0-beta
*/
function bp_rbe_groups_encoded_email_address( $user_id = false, $group_id = false ) {
echo bp_rbe_groups_get_encoded_email_address( $user_id, $group_id );
}
/**
* Returns the encoded group email address for a user.
* Note: Each user gets their own, individual email address per group.
*
* Takes $user_id and $group_id as parameters.
* If no parameters are passed, uses logged in user and current group respectively.
*
* @since 1.0-beta
*/
function bp_rbe_groups_get_encoded_email_address( $user_id = false, $group_id = false ) {
$user_id = ! $user_id ? bp_loggedin_user_id() : $user_id;
$group_id = ! $group_id ? bp_get_current_group_id() : $group_id;
if ( ! $user_id || ! $group_id )
return false;
$gstring = 'g=' . $group_id;
$querystring = apply_filters( 'bp_rbe_encode_group_querystring', bp_rbe_encode( array( 'string' => $gstring, 'param' => $user_id ) ), $user_id, $group_id );
return bp_rbe_inject_qs_in_email( $querystring . '-new' );
}
?> | gpl-2.0 |
levythu/levyink | models/db.js | 539 | var mongojs = require('mongojs');
var AUTHOR = "author";
var BLOG = "blog";
var METADATA = "metadata";
var TILE = "tile";
var SUBSCRIPTION = "subscription";
exports.AUTHOR = AUTHOR;
exports.BLOG = BLOG;
exports.TILE = TILE;
exports.METADATA = METADATA; //{type:"overview"/"visit"}
exports.SUBS=SUBSCRIPTION;
exports.cList=[AUTHOR,BLOG,METADATA,TILE,SUBSCRIPTION];
exports.db = mongojs('mongodb://localhost/levyink', exports.cList);
exports.getIDClass=function(idValue)
{
idValue=""+idValue;
return mongojs.ObjectId(idValue);
}
| gpl-2.0 |
vanilla/vanilla | tests/Library/Vanilla/AddonsEnableDisablePart3Test.php | 425 | <?php
/**
* @author Adam Charron <[email protected]>
* @copyright 2009-2021 Vanilla Forums Inc.
* @license GPL-2.0-only
*/
namespace VanillaTests\Library\Vanilla;
/**
* Test enabling/disabling every 3rd addon from 3.
*/
class AddonsEnableDisablePart3Test extends AbstractAddonEnableDisableTest {
/**
* @inheritdoc
*/
public function getDisibilityRemainder(): int {
return 2;
}
}
| gpl-2.0 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.