code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
4
991
language
stringclasses
9 values
license
stringclasses
15 values
size
int32
3
1.05M
using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Autodesk.Max; using ExplodeScript.UI; using ManagedServices; using MaxCustomControls; using CustomControls; using Test_ExplodeScript.UI; namespace Test_ExplodeScript { public class ExplodeView { private readonly IGlobal m_Global; //private readonly BufferedTreeView m_TreeView; private MaxFormEx m_MaxForm; private ButtonLabel m_ExplodeAndExportButton; private HelpPanel m_HelpPanel; public IGlobal Global { get { return m_Global; } } private Controller m_Controller; public ExplodeView(IGlobal global) { m_Global = global; //Pass m_Global to DebugMethod class so it can print to the listener DebugMethods.SetGlobal(m_Global); //Create UI elements: m_MaxForm = new MaxFormEx { Size = new Size(302, 500), Text = "Explode", BackColor = Color.FromArgb(68, 68, 68), FormBorderStyle = FormBorderStyle.None }; var treeviewManager = new TreeviewManager(); //Create Controller m_Controller = new Controller(this, treeviewManager); //give treeview a controller treeviewManager.Controller = m_Controller; //Hook up event m_Controller.ExplodeChanged += m_Controller_ExplodeChanged; m_Controller.DebugTextChanged += m_Controller_DebugTextChanged; //Create UI m_HelpPanel = new HelpPanel { Location = new Point(1, 306), }; var addButton = new ButtonLabel { Size = new Size(125, 25), Location = new Point(10, 327), BackColor = Color.FromArgb(90, 90, 90), ForeColor = Color.FromArgb(220, 220, 220), Text = "Add LP", TextAlign = ContentAlignment.MiddleCenter, MouseDownProperty = false }; addButton.MouseUp += addButton_MouseUp; var addHPButton = new ButtonLabel { Size = new Size(125, 25), Location = new Point(151, 327), BackColor = Color.FromArgb(90, 90, 90), ForeColor = Color.FromArgb(220, 220, 220), Text = "Add HP", TextAlign = ContentAlignment.MiddleCenter, MouseDownProperty = false }; addHPButton.MouseUp += addHPButton_MouseUp; var explodeButton = new ButtonLabel { Size = new Size(125, 25), Location = new Point(10, 377), BackColor = Color.FromArgb(90, 90, 90), ForeColor = Color.FromArgb(220, 220, 220), Text = "Explode", TextAlign = ContentAlignment.MiddleCenter, MouseDownProperty = false }; explodeButton.MouseUp += explodeButton_MouseUp; var exportButton = new ButtonLabel { Size = new Size(125, 25), Location = new Point(151, 377), BackColor = Color.FromArgb(90, 90, 90), ForeColor = Color.FromArgb(220, 220, 220), Text = "Export", TextAlign = ContentAlignment.MiddleCenter, MouseDownProperty = false }; exportButton.MouseUp += exportButton_MouseUp; m_ExplodeAndExportButton = new ButtonLabel { Size = new Size(266, 25), Location = new Point(10, 409), BackColor = Color.FromArgb(90, 90, 90), ForeColor = Color.FromArgb(220, 220, 220), Text = "Explode & Export", TextAlign = ContentAlignment.MiddleCenter, MouseDownProperty = false }; m_ExplodeAndExportButton.MouseUp += explodeAndExportButton_MouseUp; //Add Controls m_MaxForm.Controls.Add(treeviewManager); m_MaxForm.Controls.Add(m_HelpPanel); m_MaxForm.Controls.Add(addButton); m_MaxForm.Controls.Add(addHPButton); m_MaxForm.Controls.Add(explodeButton); m_MaxForm.Controls.Add(exportButton); m_MaxForm.Controls.Add(m_ExplodeAndExportButton); //Show form IntPtr maxHandle = global.COREInterface.MAXHWnd; m_MaxForm.Show(new ArbitraryWindow(maxHandle)); #if DEBUG Form debugForm = new Form(); debugForm.Size = new Size(300, 300); debugForm.Show(new ArbitraryWindow(maxHandle)); debugForm.Closing += debugForm_Closing; Button button = new Button(); button.Size = new Size(200, 25); button.Location = new Point(10, 10); button.Text = "Create BB for Parent Node"; button.Click +=button_Click; Button movebutton = new Button(); movebutton.Size = new Size(200, 25); movebutton.Location = new Point(10, 90); movebutton.Text = "movesomething"; movebutton.Click += movebutton_Click; Button getVertInfoFromID = new Button(); getVertInfoFromID.Size = new Size(200, 25); getVertInfoFromID.Location = new Point(10, 50); getVertInfoFromID.Text = "Close"; getVertInfoFromID.Click += getVertInfoFromID_Click; debugForm.Controls.Add(button); debugForm.Controls.Add(getVertInfoFromID); debugForm.Controls.Add(movebutton); #endif } void m_Controller_ExplodeChanged(bool exploded) { m_ExplodeAndExportButton.Text = exploded ? "Collapse" : "Explode"; } void m_Controller_DebugTextChanged(string debugString) { m_HelpPanel.Push(debugString, true); } void movebutton_Click(object sender, EventArgs e) { //m_Controller.DebugMoveSelectNodeVerts(); //m_Controller.CheckForExtraCollision(); } void debugForm_Closing(object sender, System.ComponentModel.CancelEventArgs e) { m_MaxForm.Close(); } void getVertInfoFromID_Click(object sender, EventArgs e) { //m_Controller.PrintVertexPos((ushort)(((sender as Button).Tag) as NumericUpDown).Value); m_Controller.Cleanup(); m_MaxForm.Close(); ((sender as Button).Parent as Form).Close(); } void button_Click(object sender, EventArgs e) { m_Controller.CreateDebugBoundingBox(); } void addButton_MouseUp(object sender, MouseEventArgs e) { if (m_Controller.AddLPObjects()) m_Controller.PopulateTreeview(); } void addHPButton_MouseUp(object sender, MouseEventArgs e) { m_Controller.AddHPObject(); //Todo don't call populateTreeview if nothing was added. //m_Controller.PopulateTreeview(); } void explodeButton_MouseUp(object sender, MouseEventArgs e) { m_HelpPanel.Push("> Explode", true); } void exportButton_MouseUp(object sender, MouseEventArgs e) { m_HelpPanel.Push("> Exporting", false); } void explodeAndExportButton_MouseUp(object sender, MouseEventArgs e) { //m_MaxForm.Close(); m_Controller.Explode(); } //void labelIDSplit_Click(object sender, EventArgs e) //{ // var idLabel = sender as CheckLabel; // var elementLabel = (sender as CheckLabel).checkLabel; // if (!idLabel.Checked) // { // if (elementLabel.Checked) // elementLabel.Checked = false; // idLabel.Checked = true; // } // else // { // idLabel.Checked = false; // } // idLabel.Refresh(); // elementLabel.Refresh(); // m_MaxForm.Close(); // //Send updated values to Controller //} //void labelElementSplit_Click(object sender, EventArgs e) //{ // var elementLabel = sender as CheckLabel; // var idLabel = (sender as CheckLabel).checkLabel; // if (!elementLabel.Checked) // { // if (idLabel.Checked) // idLabel.Checked = false; // elementLabel.Checked = true; // } // else // { // elementLabel.Checked = false; // } // elementLabel.Refresh(); // idLabel.Refresh(); // //Send updated values to Controller //} } }
VinCal/Explode
ExplodeView.cs
C#
gpl-2.0
9,143
<?php /** * Ajax Controller Module * * PHP version 5 * * Copyright (C) Villanova University 2010. * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category VuFind2 * @package Controller * @author Chris Hallberg <challber@villanova.edu> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org/wiki/building_a_recommendations_module Wiki */ namespace VuFind\Controller; use VuFind\Config\Reader as ConfigReader, VuFind\Connection\Manager as ConnectionManager, VuFind\Exception\Auth as AuthException, VuFind\Export; /** * This controller handles global AJAX functionality * * @category VuFind2 * @package Controller * @author Chris Hallberg <challber@villanova.edu> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://vufind.org/wiki/building_a_recommendations_module Wiki */ class AjaxController extends AbstractBase { // define some status constants const STATUS_OK = 'OK'; // good const STATUS_ERROR = 'ERROR'; // bad const STATUS_NEED_AUTH = 'NEED_AUTH'; // must login first protected $outputMode; protected $account; protected static $php_errors = array(); /** * Constructor */ public function __construct() { // Add notices to a key in the output set_error_handler(array('VuFind\Controller\AjaxController', "storeError")); } /** * Handles passing data to the class * * @return mixed */ public function jsonAction() { // Set the output mode to JSON: $this->outputMode = 'json'; // Call the method specified by the 'method' parameter as long as it is // valid and will not result in an infinite loop! $method = $this->params()->fromQuery('method'); if ($method != 'init' && $method != '__construct' && $method != 'output' && method_exists($this, $method) ) { try { return $this->$method(); } catch (\Exception $e) { $debugMsg = ('development' == APPLICATION_ENV) ? ': ' . $e->getMessage() : ''; return $this->output( $this->translate('An error has occurred') . $debugMsg, self::STATUS_ERROR ); } } else { return $this->output( $this->translate('Invalid Method'), self::STATUS_ERROR ); } } /** * Load a recommendation module via AJAX. * * @return \Zend\Http\Response */ public function recommendAction() { // Process recommendations -- for now, we assume Solr-based search objects, // since deferred recommendations work best for modules that don't care about // the details of the search objects anyway: $sm = $this->getSearchManager(); $rm = $this->getServiceLocator()->get('RecommendPluginManager'); $module = clone($rm->get($this->params()->fromQuery('mod'))); $module->setConfig($this->params()->fromQuery('params')); $params = $sm->setSearchClassId('Solr')->getParams(); $module->init($params, $this->getRequest()->getQuery()); $results = $sm->setSearchClassId('Solr')->getResults($params); $module->process($results); // Set headers: $response = $this->getResponse(); $headers = $response->getHeaders(); $headers->addHeaderLine('Content-type', 'text/html'); $headers->addHeaderLine('Cache-Control', 'no-cache, must-revalidate'); $headers->addHeaderLine('Expires', 'Mon, 26 Jul 1997 05:00:00 GMT'); // Render recommendations: $recommend = $this->getViewRenderer()->plugin('recommend'); $response->setContent($recommend($module)); return $response; } /** * Get the contents of a lightbox; note that unlike most methods, this * one actually returns HTML rather than JSON. * * @return mixed */ public function getLightbox() { // Turn layouts on for this action since we want to render the // page inside a lightbox: $this->layout()->setTemplate('layout/lightbox'); // Call the requested action: return $this->forwardTo( $this->params()->fromQuery('submodule'), $this->params()->fromQuery('subaction') ); } /** * Support method for getItemStatuses() -- filter suppressed locations from the * array of item information for a particular bib record. * * @param array $record Information on items linked to a single * bib record * @param \VuFind\ILS\Connection $catalog ILS connection * * @return array Filtered version of $record */ protected function filterSuppressedLocations($record, $catalog) { static $hideHoldings = false; if ($hideHoldings === false) { $logic = new \VuFind\ILS\Logic\Holds($this->getAuthManager(), $catalog); $hideHoldings = $logic->getSuppressedLocations(); } $filtered = array(); foreach ($record as $current) { if (!in_array($current['location'], $hideHoldings)) { $filtered[] = $current; } } return $filtered; } /** * Get Item Statuses * * This is responsible for printing the holdings information for a * collection of records in JSON format. * * @return \Zend\Http\Response * @author Chris Delis <cedelis@uillinois.edu> * @author Tuan Nguyen <tuan@yorku.ca> */ public function getItemStatuses() { $catalog = $this->getILS(); $ids = $this->params()->fromQuery('id'); $results = $catalog->getStatuses($ids); if (!is_array($results)) { // If getStatuses returned garbage, let's turn it into an empty array // to avoid triggering a notice in the foreach loop below. $results = array(); } // In order to detect IDs missing from the status response, create an // array with a key for every requested ID. We will clear keys as we // encounter IDs in the response -- anything left will be problems that // need special handling. $missingIds = array_flip($ids); // Get access to PHP template renderer for partials: $renderer = $this->getViewRenderer(); // Load messages for response: $messages = array( 'available' => $renderer->render('ajax/status-available.phtml'), 'unavailable' => $renderer->render('ajax/status-unavailable.phtml'), 'unknown' => $renderer->render('ajax/status-unknown.phtml') ); // Load callnumber and location settings: $config = ConfigReader::getConfig(); $callnumberSetting = isset($config->Item_Status->multiple_call_nos) ? $config->Item_Status->multiple_call_nos : 'msg'; $locationSetting = isset($config->Item_Status->multiple_locations) ? $config->Item_Status->multiple_locations : 'msg'; $showFullStatus = isset($config->Item_Status->show_full_status) ? $config->Item_Status->show_full_status : false; // Loop through all the status information that came back $statuses = array(); foreach ($results as $recordNumber=>$record) { // Filter out suppressed locations: $record = $this->filterSuppressedLocations($record, $catalog); // Skip empty records: if (count($record)) { if ($locationSetting == "group") { $current = $this->getItemStatusGroup( $record, $messages, $callnumberSetting ); } else { $current = $this->getItemStatus( $record, $messages, $locationSetting, $callnumberSetting ); } // If a full status display has been requested, append the HTML: if ($showFullStatus) { $current['full_status'] = $renderer->render( 'ajax/status-full.phtml', array('statusItems' => $record) ); } $current['record_number'] = array_search($current['id'], $ids); $statuses[] = $current; // The current ID is not missing -- remove it from the missing list. unset($missingIds[$current['id']]); } } // If any IDs were missing, send back appropriate dummy data foreach ($missingIds as $missingId => $recordNumber) { $statuses[] = array( 'id' => $missingId, 'availability' => 'false', 'availability_message' => $messages['unavailable'], 'location' => $this->translate('Unknown'), 'locationList' => false, 'reserve' => 'false', 'reserve_message' => $this->translate('Not On Reserve'), 'callnumber' => '', 'missing_data' => true, 'record_number' => $recordNumber ); } // Done return $this->output($statuses, self::STATUS_OK); } /** * Support method for getItemStatuses() -- when presented with multiple values, * pick which one(s) to send back via AJAX. * * @param array $list Array of values to choose from. * @param string $mode config.ini setting -- first, all or msg * @param string $msg Message to display if $mode == "msg" * * @return string */ protected function pickValue($list, $mode, $msg) { // Make sure array contains only unique values: $list = array_unique($list); // If there is only one value in the list, or if we're in "first" mode, // send back the first list value: if ($mode == 'first' || count($list) == 1) { return $list[0]; } else if (count($list) == 0) { // Empty list? Return a blank string: return ''; } else if ($mode == 'all') { // All values mode? Return comma-separated values: return implode(', ', $list); } else { // Message mode? Return the specified message, translated to the // appropriate language. return $this->translate($msg); } } /** * Support method for getItemStatuses() -- process a single bibliographic record * for location settings other than "group". * * @param array $record Information on items linked to a single bib * record * @param array $messages Custom status HTML * (keys = available/unavailable) * @param string $locationSetting The location mode setting used for * pickValue() * @param string $callnumberSetting The callnumber mode setting used for * pickValue() * * @return array Summarized availability information */ protected function getItemStatus($record, $messages, $locationSetting, $callnumberSetting ) { // Summarize call number, location and availability info across all items: $callNumbers = $locations = array(); $use_unknown_status = $available = false; foreach ($record as $info) { // Find an available copy if ($info['availability']) { $available = true; } // Check for a use_unknown_message flag if (isset($info['use_unknown_message']) && $info['use_unknown_message'] == true ) { $use_unknown_status = true; } // Store call number/location info: $callNumbers[] = $info['callnumber']; $locations[] = $info['location']; } // Determine call number string based on findings: $callNumber = $this->pickValue( $callNumbers, $callnumberSetting, 'Multiple Call Numbers' ); // Determine location string based on findings: $location = $this->pickValue( $locations, $locationSetting, 'Multiple Locations' ); $availability_message = $use_unknown_status ? $messages['unknown'] : $messages[$available ? 'available' : 'unavailable']; // Send back the collected details: return array( 'id' => $record[0]['id'], 'availability' => ($available ? 'true' : 'false'), 'availability_message' => $availability_message, 'location' => htmlentities($location, ENT_COMPAT, 'UTF-8'), 'locationList' => false, 'reserve' => ($record[0]['reserve'] == 'Y' ? 'true' : 'false'), 'reserve_message' => $record[0]['reserve'] == 'Y' ? $this->translate('on_reserve') : $this->translate('Not On Reserve'), 'callnumber' => htmlentities($callNumber, ENT_COMPAT, 'UTF-8') ); } /** * Support method for getItemStatuses() -- process a single bibliographic record * for "group" location setting. * * @param array $record Information on items linked to a single * bib record * @param array $messages Custom status HTML * (keys = available/unavailable) * @param string $callnumberSetting The callnumber mode setting used for * pickValue() * * @return array Summarized availability information */ protected function getItemStatusGroup($record, $messages, $callnumberSetting) { // Summarize call number, location and availability info across all items: $locations = array(); $use_unknown_status = $available = false; foreach ($record as $info) { // Find an available copy if ($info['availability']) { $available = $locations[$info['location']]['available'] = true; } // Check for a use_unknown_message flag if (isset($info['use_unknown_message']) && $info['use_unknown_message'] == true ) { $use_unknown_status = true; } // Store call number/location info: $locations[$info['location']]['callnumbers'][] = $info['callnumber']; } // Build list split out by location: $locationList = false; foreach ($locations as $location => $details) { $locationCallnumbers = array_unique($details['callnumbers']); // Determine call number string based on findings: $locationCallnumbers = $this->pickValue( $locationCallnumbers, $callnumberSetting, 'Multiple Call Numbers' ); $locationInfo = array( 'availability' => isset($details['available']) ? $details['available'] : false, 'location' => htmlentities($location, ENT_COMPAT, 'UTF-8'), 'callnumbers' => htmlentities($locationCallnumbers, ENT_COMPAT, 'UTF-8') ); $locationList[] = $locationInfo; } $availability_message = $use_unknown_status ? $messages['unknown'] : $messages[$available ? 'available' : 'unavailable']; // Send back the collected details: return array( 'id' => $record[0]['id'], 'availability' => ($available ? 'true' : 'false'), 'availability_message' => $availability_message, 'location' => false, 'locationList' => $locationList, 'reserve' => ($record[0]['reserve'] == 'Y' ? 'true' : 'false'), 'reserve_message' => $record[0]['reserve'] == 'Y' ? $this->translate('on_reserve') : $this->translate('Not On Reserve'), 'callnumber' => false ); } /** * Check one or more records to see if they are saved in one of the user's list. * * @return \Zend\Http\Response */ protected function getSaveStatuses() { // check if user is logged in $user = $this->getUser(); if (!$user) { return $this->output( $this->translate('You must be logged in first'), self::STATUS_NEED_AUTH ); } // loop through each ID check if it is saved to any of the user's lists $result = array(); $ids = $this->params()->fromQuery('id', array()); $sources = $this->params()->fromQuery('source', array()); if (!is_array($ids) || !is_array($sources)) { return $this->output( $this->translate('Argument must be array.'), self::STATUS_ERROR ); } foreach ($ids as $i => $id) { $source = isset($sources[$i]) ? $sources[$i] : 'VuFind'; $data = $user->getSavedData($id, null, $source); if ($data) { // if this item was saved, add it to the list of saved items. foreach ($data as $list) { $result[] = array( 'record_id' => $id, 'record_source' => $source, 'resource_id' => $list->id, 'list_id' => $list->list_id, 'list_title' => $list->list_title, 'record_number' => $i ); } } } return $this->output($result, self::STATUS_OK); } /** * Send output data and exit. * * @param mixed $data The response data * @param string $status Status of the request * * @return \Zend\Http\Response */ protected function output($data, $status) { if ($this->outputMode == 'json') { $response = $this->getResponse(); $headers = $response->getHeaders(); $headers->addHeaderLine( 'Content-type', 'application/javascript' ); $headers->addHeaderLine( 'Cache-Control', 'no-cache, must-revalidate' ); $headers->addHeaderLine( 'Expires', 'Mon, 26 Jul 1997 05:00:00 GMT' ); $output = array('data'=>$data,'status'=>$status); if ('development' == APPLICATION_ENV && count(self::$php_errors) > 0) { $output['php_errors'] = self::$php_errors; } $response->setContent(json_encode($output)); return $response; } else { throw new \Exception('Unsupported output mode: ' . $this->outputMode); } } /** * Store the errors for later, to be added to the output * * @param string $errno Error code number * @param string $errstr Error message * @param string $errfile File where error occured * @param string $errline Line number of error * * @return bool Always true to cancel default error handling */ public static function storeError($errno, $errstr, $errfile, $errline) { self::$php_errors[] = "ERROR [$errno] - ".$errstr."<br />\n" . " Occurred in ".$errfile." on line ".$errline."."; return true; } /** * Generate the "salt" used in the salt'ed login request. * * @return string */ protected function generateSalt() { return str_replace( '.', '', $this->getRequest()->getServer()->get('REMOTE_ADDR') ); } /** * Send the "salt" to be used in the salt'ed login request. * * @return \Zend\Http\Response */ protected function getSalt() { return $this->output($this->generateSalt(), self::STATUS_OK); } /** * Login with post'ed username and encrypted password. * * @return \Zend\Http\Response */ protected function login() { // Fetch Salt $salt = $this->generateSalt(); // HexDecode Password $password = pack('H*', $this->params()->fromPost('password')); // Decrypt Password $password = \VuFind\Crypt\RC4::encrypt($salt, $password); // Update the request with the decrypted password: $this->getRequest()->getPost()->set('password', $password); // Authenticate the user: try { $this->getAuthManager()->login($this->getRequest()); } catch (AuthException $e) { return $this->output( $this->translate($e->getMessage()), self::STATUS_ERROR ); } return $this->output(true, self::STATUS_OK); } /** * Tag a record. * * @return \Zend\Http\Response */ protected function tagRecord() { $user = $this->getUser(); if ($user === false) { return $this->output( $this->translate('You must be logged in first'), self::STATUS_NEED_AUTH ); } // empty tag try { $driver = $this->getRecordLoader()->load( $this->params()->fromPost('id'), $this->params()->fromPost('source', 'VuFind') ); $tag = $this->params()->fromPost('tag', ''); if (strlen($tag) > 0) { // don't add empty tags $driver->addTags($user, $tag); } } catch (\Exception $e) { return $this->output( $this->translate('Failed'), self::STATUS_ERROR ); } return $this->output($this->translate('Done'), self::STATUS_OK); } /** * Get all tags for a record. * * @return \Zend\Http\Response */ protected function getRecordTags() { // Retrieve from database: $tagTable = $this->getTable('Tags'); $tags = $tagTable->getForResource( $this->params()->fromQuery('id'), $this->params()->fromQuery('source', 'VuFind') ); // Build data structure for return: $tagList = array(); foreach ($tags as $tag) { $tagList[] = array('tag'=>$tag->tag, 'cnt'=>$tag->cnt); } // If we don't have any tags, provide a user-appropriate message: if (empty($tagList)) { $msg = $this->translate('No Tags') . ', ' . $this->translate('Be the first to tag this record') . '!'; return $this->output($msg, self::STATUS_ERROR); } return $this->output($tagList, self::STATUS_OK); } /** * Get map data on search results and output in JSON * * @param array $fields Solr fields to retrieve data from * * @author Chris Hallberg <crhallberg@gmail.com> * @author Lutz Biedinger <lutz.biedinger@gmail.com> * * @return \Zend\Http\Response */ public function getMapData($fields = array('long_lat')) { $sm = $this->getSearchManager(); $params = $sm->setSearchClassId('Solr')->getParams(); $params->initFromRequest($this->getRequest()->getQuery()); $results = $sm->setSearchClassId('Solr')->getResults($params); $facets = $results->getFullFieldFacets($fields, false); $markers=array(); $i = 0; $list = isset($facets['long_lat']['data']['list']) ? $facets['long_lat']['data']['list'] : array(); foreach ($list as $location) { $longLat = explode(',', $location['value']); $markers[$i] = array( 'title' => (string)$location['count'], //needs to be a string 'location_facet' => $location['value'], //needed to load in the location 'lon' => $longLat[0], 'lat' => $longLat[1] ); $i++; } return $this->output($markers, self::STATUS_OK); } /** * Get entry information on entries tied to a specific map location * * @param array $fields Solr fields to retrieve data from * * @author Chris Hallberg <crhallberg@gmail.com> * @author Lutz Biedinger <lutz.biedinger@gmail.com> * * @return mixed */ public function resultgooglemapinfoAction($fields = array('long_lat')) { // Set layout to render the page inside a lightbox: $this->layout()->setTemplate('layout/lightbox'); $sm = $this->getSearchManager(); $params = $sm->setSearchClassId('Solr')->getParams(); $params->initFromRequest($this->getRequest()->getQuery()); $results = $sm->setSearchClassId('Solr')->getResults($params); return $this->createViewModel( array( 'results' => $results, 'recordSet' => $results->getResults(), 'recordCount' => $results->getResultTotal(), 'completeListUrl' => $results->getUrlQuery()->getParams() ) ); } /** * AJAX for timeline feature (PubDateVisAjax) * * @param array $fields Solr fields to retrieve data from * * @author Chris Hallberg <crhallberg@gmail.com> * @author Till Kinstler <kinstler@gbv.de> * * @return \Zend\Http\Response */ public function getVisData($fields = array('publishDate')) { $sm = $this->getSearchManager(); $params = $sm->setSearchClassId('Solr')->getParams(); $params->initFromRequest($this->getRequest()->getQuery()); $results = $sm->setSearchClassId('Solr')->getResults($params); $filters = $params->getFilters(); $dateFacets = $this->params()->fromQuery('facetFields'); $dateFacets = empty($dateFacets) ? array() : explode(':', $dateFacets); $fields = $this->processDateFacets($filters, $dateFacets, $results); $facets = $this->processFacetValues($fields, $results); foreach ($fields as $field => $val) { $facets[$field]['min'] = $val[0] > 0 ? $val[0] : 0; $facets[$field]['max'] = $val[1] > 0 ? $val[1] : 0; $facets[$field]['removalURL'] = $results->getUrlQuery()->removeFacet( $field, isset($filters[$field][0]) ? $filters[$field][0] : null, false ); } return $this->output($facets, self::STATUS_OK); } /** * Support method for getVisData() -- extract details from applied filters. * * @param array $filters Current filter list * @param array $dateFacets Objects containing the date * ranges * @param \VuFind\Search\Solr\Results $results Search results object * * @return array */ protected function processDateFacets($filters, $dateFacets, $results) { $result = array(); foreach ($dateFacets as $current) { $from = $to = ''; if (isset($filters[$current])) { foreach ($filters[$current] as $filter) { if (preg_match('/\[\d+ TO \d+\]/', $filter)) { $range = explode(' TO ', trim($filter, '[]')); $from = $range[0] == '*' ? '' : $range[0]; $to = $range[1] == '*' ? '' : $range[1]; break; } } } $result[$current] = array($from, $to); $result[$current]['label'] = $results->getParams()->getFacetLabel($current); } return $result; } /** * Support method for getVisData() -- filter bad values from facet lists. * * @param array $fields Processed date information from * processDateFacets * @param \VuFind\Search\Solr\Results $results Search results object * * @return array */ protected function processFacetValues($fields, $results) { $facets = $results->getFullFieldFacets(array_keys($fields)); $retVal = array(); foreach ($facets as $field => $values) { $newValues = array('data' => array()); foreach ($values['data']['list'] as $current) { // Only retain numeric values! if (preg_match("/^[0-9]+$/", $current['value'])) { $newValues['data'][] = array($current['value'],$current['count']); } } $retVal[$field] = $newValues; } return $retVal; } /** * Save a record to a list. * * @return \Zend\Http\Response */ public function saveRecord() { $user = $this->getUser(); if (!$user) { return $this->output( $this->translate('You must be logged in first'), self::STATUS_NEED_AUTH ); } $driver = $this->getRecordLoader()->load( $this->params()->fromPost('id'), $this->params()->fromPost('source', 'VuFind') ); $driver->saveToFavorites($this->getRequest()->getPost()->toArray(), $user); return $this->output('Done', self::STATUS_OK); } /** * Saves records to a User's favorites * * @return \Zend\Http\Response */ public function bulkSave() { // Without IDs, we can't continue $ids = $this->params()->fromPost('ids', array()); if (empty($ids)) { return $this->output( array('result'=>$this->translate('bulk_error_missing')), self::STATUS_ERROR ); } $user = $this->getUser(); if (!$user) { return $this->output( $this->translate('You must be logged in first'), self::STATUS_NEED_AUTH ); } try { $this->favorites()->saveBulk( $this->getRequest()->getPost()->toArray(), $user ); return $this->output( array( 'result' => array('list' => $this->params()->fromPost('list')), 'info' => $this->translate("bulk_save_success") ), self::STATUS_OK ); } catch (\Exception $e) { return $this->output( array('info' => $this->translate('bulk_save_error')), self::STATUS_ERROR ); } } /** * Add a list. * * @return \Zend\Http\Response */ public function addList() { $user = $this->getUser(); try { $table = $this->getTable('UserList'); $list = $table->getNew($user); $id = $list->updateFromRequest($user, $this->getRequest()->getPost()); } catch (\Exception $e) { switch(get_class($e)) { case 'VuFind\Exception\LoginRequired': return $this->output( $this->translate('You must be logged in first'), self::STATUS_NEED_AUTH ); break; case 'VuFind\Exception\ListPermission': case 'VuFind\Exception\MissingField': return $this->output( $this->translate($e->getMessage()), self::STATUS_ERROR ); default: throw $e; } } return $this->output(array('id' => $id), self::STATUS_OK); } /** * Get Autocomplete suggestions. * * @return \Zend\Http\Response */ public function getACSuggestions() { $query = $this->getRequest()->getQuery(); $autocompleteManager = $this->getServiceLocator() ->get('AutocompletePluginManager'); return $this->output( $autocompleteManager->getSuggestions($query), self::STATUS_OK ); } /** * Text a record. * * @return \Zend\Http\Response */ public function smsRecord() { // Attempt to send the email: try { $record = $this->getRecordLoader()->load( $this->params()->fromPost('id'), $this->params()->fromPost('source', 'VuFind') ); $this->getServiceLocator()->get('SMS')->textRecord( $this->params()->fromPost('provider'), $this->params()->fromPost('to'), $record, $this->getViewRenderer() ); return $this->output( $this->translate('sms_success'), self::STATUS_OK ); } catch (\Exception $e) { return $this->output( $this->translate($e->getMessage()), self::STATUS_ERROR ); } } /** * Email a record. * * @return \Zend\Http\Response */ public function emailRecord() { // Attempt to send the email: try { $record = $this->getRecordLoader()->load( $this->params()->fromPost('id'), $this->params()->fromPost('source', 'VuFind') ); $this->getServiceLocator()->get('Mailer')->sendRecord( $this->params()->fromPost('to'), $this->params()->fromPost('from'), $this->params()->fromPost('message'), $record, $this->getViewRenderer() ); return $this->output( $this->translate('email_success'), self::STATUS_OK ); } catch (\Exception $e) { return $this->output( $this->translate($e->getMessage()), self::STATUS_ERROR ); } } /** * Email a search. * * @return \Zend\Http\Response */ public function emailSearch() { // Make sure URL is properly formatted -- if no protocol is specified, run it // through the serverurl helper: $url = $this->params()->fromPost('url'); if (substr($url, 0, 4) != 'http') { $urlHelper = $this->getViewRenderer()->plugin('serverurl'); $url = $urlHelper($url); } // Attempt to send the email: try { $this->getServiceLocator()->get('Mailer')->sendLink( $this->params()->fromPost('to'), $this->params()->fromPost('from'), $this->params()->fromPost('message'), $url, $this->getViewRenderer(), $this->params()->fromPost('subject') ); return $this->output( $this->translate('email_success'), self::STATUS_OK ); } catch (\Exception $e) { return $this->output( $this->translate($e->getMessage()), self::STATUS_ERROR ); } } /** * Check Request is Valid * * @return \Zend\Http\Response */ public function checkRequestIsValid() { $id = $this->params()->fromQuery('id'); $data = $this->params()->fromQuery('data'); if (!empty($id) && !empty($data)) { // check if user is logged in $user = $this->getUser(); if (!$user) { return $this->output( $this->translate('You must be logged in first'), self::STATUS_NEED_AUTH ); } try { $catalog = $this->getILS(); $patron = $this->getAuthManager()->storedCatalogLogin(); if ($patron) { $results = $catalog->checkRequestIsValid($id, $data, $patron); $msg = $results ? $this->translate('request_place_text') : $this->translate('hold_error_blocked'); return $this->output( array('status' => $results, 'msg' => $msg), self::STATUS_OK ); } } catch (\Exception $e) { // Do nothing -- just fail through to the error message below. } } return $this->output( $this->translate('An error has occurred'), self::STATUS_ERROR ); } /** * Comment on a record. * * @return \Zend\Http\Response */ public function commentRecord() { $user = $this->getUser(); if ($user === false) { return $this->output( $this->translate('You must be logged in first'), self::STATUS_NEED_AUTH ); } $id = $this->params()->fromPost('id'); $comment = $this->params()->fromPost('comment'); if (empty($id) || empty($comment)) { return $this->output( $this->translate('An error has occurred'), self::STATUS_ERROR ); } $table = $this->getTable('Resource'); $resource = $table->findResource( $id, $this->params()->fromPost('source', 'VuFind') ); $id = $resource->addComment($comment, $user); return $this->output($id, self::STATUS_OK); } /** * Delete a comment on a record. * * @return \Zend\Http\Response */ public function deleteRecordComment() { $user = $this->getUser(); if ($user === false) { return $this->output( $this->translate('You must be logged in first'), self::STATUS_NEED_AUTH ); } $id = $this->params()->fromQuery('id'); $table = $this->getTable('Comments'); if (empty($id) || !$table->deleteIfOwnedByUser($id, $user)) { return $this->output( $this->translate('An error has occurred'), self::STATUS_ERROR ); } return $this->output($this->translate('Done'), self::STATUS_OK); } /** * Get list of comments for a record as HTML. * * @return \Zend\Http\Response */ public function getRecordCommentsAsHTML() { $driver = $this->getRecordLoader()->load( $this->params()->fromQuery('id'), $this->params()->fromQuery('source', 'VuFind') ); $html = $this->getViewRenderer() ->render('record/comments-list.phtml', array('driver' => $driver)); return $this->output($html, self::STATUS_OK); } /** * Delete multiple items from favorites or a list. * * @return \Zend\Http\Response */ protected function deleteFavorites() { $user = $this->getUser(); if ($user === false) { return $this->output( $this->translate('You must be logged in first'), self::STATUS_NEED_AUTH ); } $listID = $this->params()->fromPost('listID'); $ids = $this->params()->fromPost('ids'); if (!is_array($ids)) { return $this->output( $this->translate('delete_missing'), self::STATUS_ERROR ); } $this->favorites()->delete($ids, $listID, $user); return $this->output( array('result' => $this->translate('fav_delete_success')), self::STATUS_OK ); } /** * Delete records from a User's cart * * @return \Zend\Http\Response */ protected function removeItemsCart() { // Without IDs, we can't continue $ids = $this->params()->fromPost('ids'); if (empty($ids)) { return $this->output( array('result'=>$this->translate('bulk_error_missing')), self::STATUS_ERROR ); } $this->getServiceLocator()->get('Cart')->removeItems($ids); return $this->output(array('delete' => true), self::STATUS_OK); } /** * Process an export request * * @return \Zend\Http\Response */ protected function exportFavorites() { $format = $this->params()->fromPost('format'); $url = Export::getBulkUrl( $this->getViewRenderer(), $format, $this->params()->fromPost('ids', array()) ); $html = $this->getViewRenderer()->render( 'ajax/export-favorites.phtml', array('url' => $url, 'format' => $format) ); return $this->output( array( 'result' => $this->translate('Done'), 'result_additional' => $html ), self::STATUS_OK ); } /** * Fetch Links from resolver given an OpenURL and format as HTML * and output the HTML content in JSON object. * * @return \Zend\Http\Response * @author Graham Seaman <Graham.Seaman@rhul.ac.uk> */ protected function getResolverLinks() { $openUrl = $this->params()->fromQuery('openurl', ''); $config = ConfigReader::getConfig(); $resolverType = isset($config->OpenURL->resolver) ? $config->OpenURL->resolver : 'other'; $pluginManager = $this->getServiceLocator() ->get('ResolverDriverPluginManager'); if (!$pluginManager->has($resolverType)) { return $this->output( $this->translate("Could not load driver for $resolverType"), self::STATUS_ERROR ); } $resolver = new \VuFind\Resolver\Connection( $pluginManager->get($resolverType) ); if (isset($config->OpenURL->resolver_cache)) { $resolver->enableCache($config->OpenURL->resolver_cache); } $result = $resolver->fetchLinks($openUrl); // Sort the returned links into categories based on service type: $electronic = $print = $services = array(); foreach ($result as $link) { switch (isset($link['service_type']) ? $link['service_type'] : '') { case 'getHolding': $print[] = $link; break; case 'getWebService': $services[] = $link; break; case 'getDOI': // Special case -- modify DOI text for special display: $link['title'] = $this->translate('Get full text'); $link['coverage'] = ''; case 'getFullTxt': default: $electronic[] = $link; break; } } // Get the OpenURL base: if (isset($config->OpenURL) && isset($config->OpenURL->url)) { // Trim off any parameters (for legacy compatibility -- default config // used to include extraneous parameters): list($base) = explode('?', $config->OpenURL->url); } else { $base = false; } // Render the links using the view: $view = array( 'openUrlBase' => $base, 'openUrl' => $openUrl, 'print' => $print, 'electronic' => $electronic, 'services' => $services ); $html = $this->getViewRenderer()->render('ajax/resolverLinks.phtml', $view); // output HTML encoded in JSON object return $this->output($html, self::STATUS_OK); } }
no-reply/cbpl-vufind
module/VuFind/src/VuFind/Controller/AjaxController.php
PHP
gpl-2.0
44,602
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package delay.model; /** * * @author M3 New */ public class Pesawat { private String namaPesawat; private String idPesawat; private String idMaskapai; public Pesawat(){ } public Pesawat(String namaPesawat, String idPesawat, String idMaskapai) { this.namaPesawat = namaPesawat; this.idPesawat = idPesawat; this.idMaskapai = idMaskapai; } public String getNamaPesawat() { return namaPesawat; } public String getIdMaskapai() { return idMaskapai; } public void setIdMaskapai(String idMaskapai) { this.idMaskapai = idMaskapai; } public void setNamaPesawat(String namaPesawat) { this.namaPesawat = namaPesawat; } public String getIdPesawat() { return idPesawat; } public void setIdPesawat(String idPesawat) { this.idPesawat = idPesawat; } }
6306120058/Delay-Plane-Display-App
src/delay/model/Pesawat.java
Java
gpl-2.0
1,027
package edu.cmu.cs.dickerson.kpd.solver.exception; public class SolverException extends Exception { private static final long serialVersionUID = 1L; public SolverException(String message) { super(message); } }
JohnDickerson/KidneyExchange
src/edu/cmu/cs/dickerson/kpd/solver/exception/SolverException.java
Java
gpl-2.0
219
<?php /** * The template for displaying Comments. * * The area of the page that contains both current comments * and the comment form. The actual display of comments is * handled by a callback to gp_comment() which is * located in the functions.php file. * * @package GeoProjects */ ?> <?php /* * If the current post is protected by a password and * the visitor has not yet entered the password we will * return early without loading the comments. */ if ( post_password_required() ) return; ?> <div id="comments" class="comments-area"> <?php // You can start editing here -- including this comment! ?> <?php if ( have_comments() ) : ?> <h2 class="comments-title txt-on-bg"> <?php _e( 'Comments', 'lang_geoprojects' ); ?> </h2> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> <nav role="navigation" id="comment-nav-above" class="site-navigation comment-navigation"> <h1 class="assistive-text"><?php _e( 'Comment navigation', 'lang_geoprojects' ); ?></h1> <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'lang_geoprojects' ) ); ?></div> <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'lang_geoprojects' ) ); ?></div> </nav> <?php endif; // check for comment navigation ?> <ol class="commentlist"> <?php /* Loop through and list the comments. Tell wp_list_comments() * to use gp_comment() to format the comments. * If you want to overload this in a child theme then you can * define gp_comment() and that will be used instead. * See gp_comment() in inc/template-tags.php for more. */ wp_list_comments( array( 'callback' => 'gp_comment' ) ); ?> </ol> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> <nav role="navigation" id="comment-nav-below" class="site-navigation comment-navigation"> <h1 class="assistive-text"><?php _e( 'Comment navigation', 'lang_geoprojects' ); ?></h1> <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'lang_geoprojects' ) ); ?></div> <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'lang_geoprojects' ) ); ?></div> </nav> <?php endif; // check for comment navigation ?> <?php endif; // have_comments() ?> <?php // If comments are closed and there are comments, let's leave a little note, shall we? if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?> <p class="nocomments"><?php _e( 'Comments are closed.', 'lang_geoprojects' ); ?></p> <?php endif; ?> <?php $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $aria_req = ( $req ? " aria-required='true'" : '' ); $html5 = 'html5'; comment_form( array( 'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a> - <a href="%3$s" title="Log out of this account">Log out?</a>', 'lang_geoprojects' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink() ) ) ) . '</p>', 'fields' => apply_filters( 'comment_form_default_fields', array( 'author' => '<div class="comment-form-text-fields clearfix"><p class="comment-form-author">' . '<label for="author">' . __( 'Name', 'lang_geoprojects' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>', 'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email', 'lang_geoprojects' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . '<input id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>', 'url' => '<p class="comment-form-url"><label for="url">' . __( 'Website', 'lang_geoprojects' ) . '</label> ' . '<input id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p></div>' )), 'comment_notes_after' => '' )); ?> </div>
Labomedia/geoprojects
comments.php
PHP
gpl-2.0
4,461
<?php /*------------------------------------------------------------------------ # mod_universal_ajaxlivesearch - Universal AJAX Live Search # ------------------------------------------------------------------------ # author Janos Biro # copyright Copyright (C) 2011 Offlajn.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.offlajn.com -------------------------------------------------------------------------*/ ?><?php defined('_JEXEC') or die('Restricted access'); $searchareawidth = $this->params->get('searchareawidth', 150); if($searchareawidth[strlen($searchareawidth)-1] != '%'){ $searchareawidth.='px'; } $align = ""; if($this->params->get('searchareaalign') == 'center') { $align = "margin-left: auto; margin-right: auto;"; } else { $align = "float: ".$this->params->get('searchareaalign', 'left').";"; } ?> #offlajn-ajax-search<?php echo $module->id; ?>{ width: <?php print $searchareawidth; ?>; <?php echo $align; ?> } #offlajn-ajax-search<?php echo $module->id; ?> .offlajn-ajax-search-container{ background: #<?php echo substr($this->params->get('searchboxborder', 'E4EAEEff'),0,6); ?>; background: RGBA(<?php $co = $this->params->get('searchboxborder', 'E4EAEEff'); echo intval(substr($co,0,2),16).','.intval(substr($co,2,2),16).','.intval(substr($co,4,2),16).','.(intval(substr($co,6,2),16)/255); ?>); padding: <?php echo intval($this->params->get('borderw', 4)); ?>px; margin:0; <?php if($this->params->get('rounded')):?> -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; <?php endif; ?> } #search-form<?php echo $module->id; ?> div{ margin:0; padding:0; } #offlajn-ajax-search<?php echo $module->id; ?> .offlajn-ajax-search-inner{ width:100%; } #search-form<?php echo $module->id; ?>{ margin:0; padding:0; position: relative; width: 100%; } #search-form<?php echo $module->id; ?> input{ background-color: #<?php echo $this->params->get('searchboxbg', 'ffffff') ?>; /*font chooser*/ padding-top: 1px; <?php $f = $searchboxfont; ?> color: #<?php echo $f[6]?>; font-family: <?php echo ($f[0] ? '"'.$f[2].'"':'').($f[1] && $f[0] ? ',':'').$f[1];?>; font-weight: <?php echo $f[4]? 'bold' : 'normal';?>; font-style: <?php echo $f[5]? 'italic' : 'normal';?>; font-size: <?php echo $f[3]?>; <?php if($f[7]): ?> text-shadow: #<?php echo $f[11]?> <?php echo $f[8]?> <?php echo $f[9]?> <?php echo $f[10]?>; <?php else: ?> text-shadow: none; <?php endif; ?> text-decoration: <?php echo $f[12]?>; text-transform: <?php echo $f[13]?>; line-height: <?php echo $f[14]?>; /*font chooser*/ } #search-form<?php echo $module->id; ?> input:focus{ /* background-color: #<?php echo $this->params->get('searchboxactivebg', 'ffffff') ?>; */ } .dj_ie7 #search-form<?php echo $module->id; ?>{ padding-bottom:0px; } #search-form<?php echo $module->id; ?> .category-chooser{ height: 25px; width: 23px; border: 1px #b2c4d4 solid; /* border-right: none;*/ -moz-border-radius-topleft: 3px; -moz-border-radius-bottomleft: 3px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; background-color: #f2f2f2; position: absolute; left: 0px; z-index: 5; } #search-form<?php echo $module->id; ?> .category-chooser:hover{ -webkit-transition: background 200ms ease-out; -moz-transition: background 200ms ease-out; -o-transition: background 200ms ease-out; transition: background 200ms ease-out; /* background-color: #ffffff; */ } #search-form<?php echo $module->id; ?> .category-chooser.opened{ height:26px; border-bottom: none; -moz-border-radius-bottomleft: 0px; border-bottom-left-radius: 0px; background-color: #ffffff; } #search-form<?php echo $module->id; ?> .category-chooser .arrow{ height: 25px; width: 23px; background: url(<?php print ($themeurl.'images/arrow/arrow.png');?>) no-repeat center center; } input#search-area<?php echo $module->id; ?>{ display: block; position: relative; height: 27px; padding: 0 39px 0 5px; width: 100%; background-color: transparent; box-sizing: border-box !important; /* css3 rec */ -moz-box-sizing: border-box !important; /* ff2 */ -ms-box-sizing: border-box !important; /* ie8 */ -webkit-box-sizing: border-box !important; /* safari3 */ -khtml-box-sizing: border-box !important; /* konqueror */ border: 1px #b2c4d4 solid; border-right: none; line-height: 27px; <?php if($this->params->get('rounded')):?> -moz-border-radius: 3px; border-radius: 3px; <?php endif; ?> float: left; margin: 0; z-index:4; /*if category chooser enabled*/ <?php if($this->params->get('catchooser')):?> padding-left:28px; <?php endif; ?> } .dj_ie #search-area<?php echo $module->id; ?>{ line-height: 24px; } .dj_ie7 #search-area<?php echo $module->id; ?>{ height: 25px; line-height: 25px; } input#suggestion-area<?php echo $module->id; ?>{ display: block; position: absolute; height: 27px; width: 100%; top: 0px; left: 1px; padding: 0 60px 0 5px; box-sizing: border-box !important; /* css3 rec */ -moz-box-sizing: border-box !important; /* ff2 */ -ms-box-sizing: border-box !important; /* ie8 */ -webkit-box-sizing: border-box !important; /* safari3 */ -khtml-box-sizing: border-box !important; /* konqueror */ color:rgba(0, 0, 0, 0.25); border: none; line-height: 27px; <?php if($this->params->get('rounded')):?> -moz-border-radius: 3px; border-radius: 3px; <?php endif; ?> -webkit-box-shadow: inset 0px 1px 2px rgba(0,0,0,0.2); -moz-box-shadow: inset 0px 1px 2px rgba(0,0,0,0.2); box-shadow: inset 0px 1px 2px rgba(0,0,0,0.2); float: left; margin: 0; z-index:1; /*if category chooser enabled*/ <?php if($this->params->get('catchooser')):?> padding-left:28px; <?php endif; ?> } .dj_chrome input#suggestion-area<?php echo $module->id; ?>, .dj_ie input#suggestion-area<?php echo $module->id; ?>{ top: 0px; } .dj_ie8 input#suggestion-area<?php echo $module->id; ?>{ line-height: 25px; } .search-caption-on{ color: #aaa; } #search-form<?php echo $module->id; ?> #search-area-close<?php echo $module->id; ?>.search-area-loading{ background: url(<?php print $themeurl.'images/loaders/'.$this->params->get('ajaxloaderimage');?>) no-repeat center center; } #search-form<?php echo $module->id; ?> #search-area-close<?php echo $module->id; ?>{ <?php if($this->params->get('closeimage') != -1 && file_exists(dirname(__FILE__).'/images/close/'.$this->params->get('closeimage'))): ?> background: url(<?php print $themeurl.'images/close/'.$this->params->get('closeimage');?>) no-repeat center center; background-image: url('<?php echo $this->cacheUrl.$helper->NewColorizeImage(dirname(__FILE__).'/images/close/'.$this->params->get('closeimage'), $this->params->get('closeimagecolor') , '548722'); ?>'); <?php endif; ?> height: 16px; width: 22px; top:50%; margin-top:-8px; right: 40px; position: absolute; cursor: pointer; visibility: hidden; z-index:5; } #ajax-search-button<?php echo $module->id; ?>{ <?php $gradient = explode('-', $this->params->get('searchbuttongradient')); $gradientimg = $helper->generateGradient(1, 40, $gradient[1], $gradient[2], 'vertical'); ?> height: 25px; width: 32px; border: 1px #<?php print $gradient[2]?> solid; -webkit-box-shadow: inset 1px 1px 0px rgba(255,255,255,0.4); -moz-box-shadow: inset 1px 1px 0px rgba(255,255,255,0.4); box-shadow: inset 1px 1px 0px rgba(255,255,255,0.4); <?php if($this->params->get('rounded')):?> -moz-border-radius-topright: 3px; -moz-border-radius-bottomright: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; <?php endif; ?> <?php if($gradient[0] == 1): ?> background: #<?php echo $gradient[2]; ?> url('<?php echo $this->cacheUrl.$gradientimg; ?>') repeat-x ; background-size: auto 100%; background: -moz-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* FF 3.6+ */ background: -ms-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* IE10 */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #<?php echo $gradient[1];?>), color-stop(100%, #<?php echo $gradient[2]; ?>)); /* Safari 4+, Chrome 2+ */ background: -webkit-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* Safari 5.1+, Chrome 10+ */ background: -o-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* Opera 11.10 */ background: linear-gradient( top, #<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?> ); <?php else: ?> background: none; <?php endif; ?> float: left; cursor: pointer; position: absolute; top: 0px; right: 0px; z-index:5; } .dj_ie7 #ajax-search-button<?php echo $module->id; ?>{ top: 1px; right: -1px; } .dj_opera #ajax-search-button<?php echo $module->id; ?>{ border-radius: 0; } #ajax-search-button<?php echo $module->id; ?> .magnifier{ <?php if($this->params->get('searchbuttonimage') != -1 && file_exists(dirname(__FILE__).'/images/search_button/'.$this->params->get('searchbuttonimage'))): ?> background: url(<?php print $themeurl.'images/search_button/'.$this->params->get('searchbuttonimage');?>) no-repeat center center; <?php endif; ?> height: 26px; width: 32px; padding:0; margin:0; } #ajax-search-button<?php echo $module->id; ?>:hover{ <?php $gradient = explode('-', $this->params->get('searchbuttonhovergradient')); $gradientimg = $helper->generateGradient(1, 40, $gradient[1], $gradient[2], 'vertical'); if($gradient[0] == 1): ?> background: #<?php echo $gradient[2]; ?> url('<?php echo $this->cacheUrl.$gradientimg; ?>') repeat-x ; background-size: auto 100%; background: -moz-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* FF 3.6+ */ background: -ms-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* IE10 */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #<?php echo $gradient[1];?>), color-stop(100%, #<?php echo $gradient[2]; ?>)); /* Safari 4+, Chrome 2+ */ background: -webkit-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* Safari 5.1+, Chrome 10+ */ background: -o-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* Opera 11.10 */ background: linear-gradient( top, #<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?> ); <?php else: ?> background: none; <?php endif; ?> } #ajax-search-button<?php echo $module->id; ?>:active{ -webkit-box-shadow: inset 0px 2px 4px rgba(0,0,0,0.5); -moz-box-shadow: inset 0px 2px 4px rgba(0,0,0,0.5); box-shadow: inset 2px 2px 3px rgba(0,0,0,0.4); border-bottom: none; border-right: none; } #search-results<?php echo $module->id; ?>{ position: absolute; top:0px; left:0px; margin-top: 2px; visibility: hidden; text-decoration: none; z-index:1000; font-size:12px; width: <?php print $searchresultwidth;?>px; } #search-results-moovable<?php echo $module->id; ?>{ position: relative; overflow: hidden; height: 0px; background-color: #<?php print $this->params->get('resultcolor');?>; border: 1px #<?php print $this->params->get('resultbordertopcolor');?> solid; <?php if($this->params->get('rounded')):?> -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; <?php endif; ?> <?php if($this->params->get('boxshadow')):?> -webkit-box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.6); -moz-box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.6); box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.6); <?php endif; ?> } #search-results-inner<?php echo $module->id; ?>{ position: relative; width: <?php print $searchresultwidth;?>px; /**/ overflow: hidden; <?php /* if($this->params->get('seemoreenable')){ print("padding-bottom: 0px;"); }else{ print("padding-bottom: 10px;"); }*/ ?> } .dj_ie #search-results-inner<?php echo $module->id; ?>{ padding-bottom: 0px; } #search-results<?php echo $module->id; ?> .plugin-title{ <?php $gradient = explode('-', $this->params->get('plugintitlegradient')); $gradientimg = $helper->generateGradient(1, 40, $gradient[1], $gradient[2], 'vertical'); ?> -webkit-box-shadow: inset 0px 0px 2px rgba(255, 255, 255, 0.4); -moz-box-shadow: inset 0px 0px 2px rgba(255, 255, 255, 0.4); box-shadow: inset 0px 0px 2px rgba(255, 255, 255, 0.4); line-height: 26px; font-size: 14px; <?php if($gradient[0] == 1): ?> background: #<?php echo $gradient[2]; ?> url('<?php echo $this->cacheUrl.$gradientimg; ?>') repeat-x ; background-size: auto 100%; background: -moz-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* FF 3.6+ */ background: -ms-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* IE10 */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #<?php echo $gradient[1];?>), color-stop(100%, #<?php echo $gradient[2]; ?>)); /* Safari 4+, Chrome 2+ */ background: -webkit-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* Safari 5.1+, Chrome 10+ */ background: -o-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* Opera 11.10 */ background: linear-gradient( top, #<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?> ); <?php else: ?> background: none; <?php endif; ?> text-align: left; border-top: 1px solid #<?php print $this->params->get('resultbordertopcolor');?>; border-bottom: 1px solid #<?php print $this->params->get('resultborderbottomcolor');?>; font-weight: bold; height: 100%; margin:0; padding:0; } .dj_opera #search-results<?php echo $module->id; ?> .plugin-title{ background: #<?php print $gradient[1]; ?> ; } #search-results<?php echo $module->id; ?> .plugin-title.first{ <?php $gradient = explode('-', $this->params->get('plugintitlegradient')); ob_start(); include(dirname(__FILE__).'/images/bgtitletop.svg.php'); $operagradient = ob_get_contents(); ob_end_clean(); ?> -webkit-box-shadow: inset 0px 0px 2px rgba(255, 255, 255, 0.4); -moz-box-shadow: inset 0px 0px 2px rgba(255, 255, 255, 0.4); box-shadow: inset 0px 0px 2px rgba(255, 255, 255, 0.4); <?php if($this->params->get('rounded')):?> -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; <?php endif; ?> margin-top: -1px; } .dj_ie #search-results<?php echo $module->id; ?> .plugin-title.first{ margin-top: 0; } #search-results<?php echo $module->id; ?> .ie-fix-plugin-title{ border-top: 1px solid #B2BCC1; border-bottom: 1px solid #000000; } #search-results<?php echo $module->id; ?> .plugin-title-inner{ /* -moz-box-shadow:0 1px 2px #B2BCC1 inset;*/ -moz-user-select:none; padding-left:10px; padding-right:5px; float: <?php echo ($this->params->get('resultalign', 0)) ? 'right' : 'left' ?>; cursor: default; /*font chooser*/ <?php $f = $plugintitlefont; ?> color: #<?php echo $f[6]?>; font-family: <?php echo ($f[0] ? '"'.$f[2].'"':'').($f[1] && $f[0] ? ',':'').$f[1];?>; font-weight: <?php echo $f[4]? 'bold' : 'normal';?>; font-style: <?php echo $f[5]? 'italic' : 'normal';?>; font-size: <?php echo $f[3]?>; <?php if($f[7]): ?> text-shadow: #<?php echo $f[11]?> <?php echo $f[8]?> <?php echo $f[9]?> <?php echo $f[10]?>; <?php else: ?> text-shadow: none; <?php endif; ?> text-decoration: <?php echo $f[12]?>; text-transform: <?php echo $f[13]?>; line-height: <?php echo $f[14]?>; text-align: center; /*font chooser*/ } #search-results<?php echo $module->id; ?> .pagination{ margin: 8px; margin-left: 0px; float: right; float: <?php echo ($this->params->get('resultalign', 0)) ? 'left' : 'right' ?>; width: auto; height: auto; } #search-results<?php echo $module->id; ?> .pager{ width: 10px; height: 10px; margin: 0px 0px 0px 5px; <?php if($this->params->get('inactivepaginatorimage') != -1 && file_exists(dirname(__FILE__).'/images/paginators/'.$this->params->get('inactivepaginatorimage'))): ?> background-image: url('<?php echo $this->cacheUrl.$helper->NewColorizeImage(dirname(__FILE__).'/images/paginators/'.$this->params->get('inactivepaginatorimage'), $this->params->get('inactivepaginatorcolor') , '548722'); ?>'); <?php endif; ?> float: left; padding:0; } #search-results<?php echo $module->id; ?> .pager:hover{ <?php if($this->params->get('hoverpaginatorimage') != -1 && file_exists(dirname(__FILE__).'/images/paginators/'.$this->params->get('hoverpaginatorimage'))): ?> background-image: url('<?php echo $this->cacheUrl.$helper->NewColorizeImage(dirname(__FILE__).'/images/paginators/'.$this->params->get('hoverpaginatorimage'), $this->params->get('hoverpaginatorcolor') , '548722'); ?>'); <?php endif; ?> cursor: pointer; } #search-results<?php echo $module->id; ?> .pager.active, #search-results<?php echo $module->id; ?> .pager.active:hover{ <?php if($this->params->get('actualpaginatorimage') != -1 && file_exists(dirname(__FILE__).'/images/paginators/'.$this->params->get('actualpaginatorimage'))): ?> background-image: url('<?php echo $this->cacheUrl.$helper->NewColorizeImage(dirname(__FILE__).'/images/paginators/'.$this->params->get('actualpaginatorimage'), $this->params->get('actualpaginatorcolor') , '548722'); ?>'); <?php endif; ?> cursor: default; } #search-results<?php echo $module->id; ?> .page-container{ position: relative; overflow: hidden; height: <?php print (intval($this->params->get('imageh', 60))+6)*$productsperplugin;?>px; /* 66x num of elements */ width: <?php print $searchresultwidth;?>px; /**/ } #search-results<?php echo $module->id; ?> .page-band{ position: absolute; left: 0; width: 10000px; } #search-results<?php echo $module->id; ?> .page-element{ float: left; left: 0; cursor: hand; } #search-results<?php echo $module->id; ?> #search-results-inner<?php echo $module->id; ?> .result-element:hover, #search-results<?php echo $module->id; ?> #search-results-inner<?php echo $module->id; ?> .selected-element{ <?php $gradient = explode('-', $this->params->get('activeresultgradient')); $gradientimg = $helper->generateGradient(1, 40, $gradient[1], $gradient[2], 'vertical'); ?> text-decoration: none; <?php if($gradient[0] == 1): ?> background: #<?php echo $gradient[2]; ?> url('<?php echo $this->cacheUrl.$gradientimg; ?>') repeat-x ; background-size: auto 100%; background: -moz-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* FF 3.6+ */ background: -ms-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* IE10 */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #<?php echo $gradient[1];?>), color-stop(100%, #<?php echo $gradient[2]; ?>)); /* Safari 4+, Chrome 2+ */ background: -webkit-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* Safari 5.1+, Chrome 10+ */ background: -o-linear-gradient(#<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?>); /* Opera 11.10 */ background: linear-gradient( top, #<?php echo $gradient[1];?>, #<?php echo $gradient[2]; ?> ); <?php else: ?> background: none; <?php endif; ?> /* border-top: 1px solid #188dd9;*/ border-top: none; padding-top: 1px; -webkit-box-shadow: inset 0px 2px 3px rgba(0,0,0,0.7); -moz-box-shadow: inset 0px 2px 3px rgba(0,0,0,0.7); box-shadow: inset 0px 2px 3px rgba(0,0,0,0.7); } #search-results<?php echo $module->id; ?> #search-results-inner<?php echo $module->id; ?> .result-element:hover span, #search-results<?php echo $module->id; ?> #search-results-inner<?php echo $module->id; ?> .selected-element span{ /*font chooser*/ <?php $f = $resulthovertitlefont; ?> color: #<?php echo $f[6]?>; font-family: <?php echo ($f[0] ? '"'.$f[2].'"':'').($f[1] && $f[0] ? ',':'').$f[1];?>; font-weight: <?php echo $f[4]? 'bold' : 'normal';?>; font-style: <?php echo $f[5]? 'italic' : 'normal';?>; font-size: <?php echo $f[3]?>; <?php if($f[7]): ?> text-shadow: #<?php echo $f[11]?> <?php echo $f[8]?> <?php echo $f[9]?> <?php echo $f[10]?>; <?php else: ?> text-shadow: none; <?php endif; ?> text-decoration: <?php echo $f[12]?>; text-transform: <?php echo $f[13]?>; line-height: <?php echo $f[14]?>; /*font chooser*/ } #search-results<?php echo $module->id; ?> #search-results-inner<?php echo $module->id; ?> .result-element:hover span.small-desc, #search-results<?php echo $module->id; ?> #search-results-inner<?php echo $module->id; ?> .selected-element span.small-desc{ /*font chooser*/ <?php $f = $resulthoverintrotextfont; ?> color: #<?php echo $f[6]?>; font-family: <?php echo ($f[0] ? '"'.$f[2].'"':'').($f[1] && $f[0] ? ',':'').$f[1];?>; font-weight: <?php echo $f[4]? 'bold' : 'normal';?>; font-style: <?php echo $f[5]? 'italic' : 'normal';?>; font-size: <?php echo $f[3]?>; <?php if($f[7]): ?> text-shadow: #<?php echo $f[11]?> <?php echo $f[8]?> <?php echo $f[9]?> <?php echo $f[10]?>; <?php else: ?> text-shadow: none; <?php endif; ?> text-decoration: <?php echo $f[12]?>; text-transform: <?php echo $f[13]?>; line-height: <?php echo $f[14]?>; } #search-results<?php echo $module->id; ?> .result-element{ display: block; width: <?php print $searchresultwidth;?>px; /**/ height: <?php echo intval($this->params->get('imageh', 60))+4; ?>px; /*height*/ font-weight: bold; border-top: 1px solid #<?php print $this->params->get('resultbordertopcolor');?>; border-bottom: 1px solid #<?php print $this->params->get('resultborderbottomcolor');?>; overflow: hidden; } #search-results<?php echo $module->id; ?> .result-element img{ display: block; float: <?php echo ($this->params->get('resultalign', 0)) ? 'right' : 'left' ?>; padding: 2px; padding-right:10px; border: 0; } .ajax-clear{ clear: both; } #search-results<?php echo $module->id; ?> .result-element span{ display: block; float: left; width: <?php print $searchresultwidth-17;?>px; /* margin:5+12 */ margin-left:5px; margin-right:12px; line-height: 14px; text-align: <?php echo ($this->params->get('resultalign', 0)) ? 'right' : 'left' ?>; cursor: pointer; margin-top: 5px; /*font chooser*/ <?php $f = $resulttitlefont; ?> color: #<?php echo $f[6]?>; font-family: <?php echo ($f[0] ? '"'.$f[2].'"':'').($f[1] && $f[0] ? ',':'').$f[1];?>; font-weight: <?php echo $f[4]? 'bold' : 'normal';?>; font-style: <?php echo $f[5]? 'italic' : 'normal';?>; font-size: <?php echo $f[3]?>; <?php if($f[7]): ?> text-shadow: #<?php echo $f[11]?> <?php echo $f[8]?> <?php echo $f[9]?> <?php echo $f[10]?>; <?php else: ?> text-shadow: none; <?php endif; ?> text-decoration: <?php echo $f[12]?>; text-transform: <?php echo $f[13]?>; line-height: <?php echo $f[14]?>; /*font chooser*/ } #search-results<?php echo $module->id; ?> .result-element:hover span{ color: #<?php print $this->params->get('activeresultfntcolor');?>; } #search-results<?php echo $module->id; ?> .result-element span.small-desc{ margin-top : 2px; font-weight: normal; line-height: 13px; /*font chooser*/ <?php $f = $resultintrotextfont; ?> color: #<?php echo $f[6]?>; font-family: <?php echo ($f[0] ? '"'.$f[2].'"':'').($f[1] && $f[0] ? ',':'').$f[1];?>; font-weight: <?php echo $f[4]? 'bold' : 'normal';?>; font-style: <?php echo $f[5]? 'italic' : 'normal';?>; font-size: <?php echo $f[3]?>; <?php if($f[7]): ?> text-shadow: #<?php echo $f[11]?> <?php echo $f[8]?> <?php echo $f[9]?> <?php echo $f[10]?>; <?php else: ?> text-shadow: none; <?php endif; ?> text-decoration: <?php echo $f[12]?>; text-transform: <?php echo $f[13]?>; line-height: <?php echo $f[14]?>; /*font chooser*/ } #search-results<?php echo $module->id; ?> .result-element:hover span.small-desc, #search-results<?php echo $module->id; ?> .selected-element span.small-desc{ color: #DDDDDD; } #search-results<?php echo $module->id; ?> .result-products span{ /* text-align: center;*/ width: <?php print $searchresultwidth-12-intval($this->params->get('imagew', 60))-17;?>px; /* padding and pictures: 10+2+60, margin:5+12 */ margin-top: 5px; } #search-results<?php echo $module->id; ?> .no-result{ display: block; width: <?php print $searchresultwidth;?>px; /**/ height: 30px; /*height*/ font-weight: bold; border-top: 1px solid #<?php print $this->params->get('resultbordertopcolor');?>; border-bottom: 1px solid #<?php print $this->params->get('resultborderbottomcolor');?>; overflow: hidden; text-align: center; padding-top:10px; } #search-results<?php echo $module->id; ?> .no-result-suggest { display: block; font-weight: bold; border-top: 1px solid #<?php print $this->params->get('resultbordertopcolor');?>; border-bottom: 1px solid #<?php print $this->params->get('resultborderbottomcolor');?>; overflow: hidden; text-align: center; padding-top:10px; padding-bottom: 6px; padding-left: 5px; padding-right: 5px; } #search-results<?php echo $module->id; ?> .no-result-suggest a { cursor: pointer; font-weight: bold; text-decoration: none; padding-left: 4px; } #search-results<?php echo $module->id; ?> .no-result-suggest, #search-results<?php echo $module->id; ?> .no-result-suggest a{ /*font chooser*/ <?php $f = $resulttitlefont; ?> color: #<?php echo $f[6]?>; font-family: <?php echo ($f[0] ? '"'.$f[2].'"':'').($f[1] && $f[0] ? ',':'').$f[1];?>; font-weight: <?php echo $f[4]? 'bold' : 'normal';?>; font-style: <?php echo $f[5]? 'italic' : 'normal';?>; font-size: <?php echo $f[3]?>; <?php if($f[7]): ?> text-shadow: #<?php echo $f[11]?> <?php echo $f[8]?> <?php echo $f[9]?> <?php echo $f[10]?>; <?php else: ?> text-shadow: none; <?php endif; ?> text-decoration: <?php echo $f[12]?>; text-transform: <?php echo $f[13]?>; line-height: <?php echo $f[14]?>; /*font chooser*/ } #search-results<?php echo $module->id; ?> .no-result-suggest a:hover { text-decoration: underline; } #search-results<?php echo $module->id; ?> .no-result span{ width: <?php print $searchresultwidth-17;?>px; /* margin:5+12 */ line-height: 20px; text-align: left; cursor: default; -moz-user-select:none; } #search-categories<?php echo $module->id; ?>{ border: 1px #b2c4d4 solid; border-top: none; background-color: #f2f2f2; position: absolute; top:0px; left:0px; visibility: hidden; text-decoration: none; z-index:1001; font-size:12px; <?php if($this->params->get('rounded')):?> -webkit-border-radius-bottomleft: 5px; -webkit-border-radius-bottomright: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; border-radius-bottomleft: 5px; border-radius-bottomright: 5px; <?php endif; ?> } #search-categories<?php echo $module->id; ?> .search-categories-inner div{ padding:7px 15px 5px 30px; border-bottom: 1px #b2c4d4 solid; cursor: default; /*font chooser*/ <?php $f = $catchooserfont; ?> color: #<?php echo $f[6]?>; font-family: <?php echo ($f[0] ? '"'.$f[2].'"':'').($f[1] && $f[0] ? ',':'').$f[1];?>; font-weight: <?php echo $f[4]? 'bold' : 'normal';?>; font-style: <?php echo $f[5]? 'italic' : 'normal';?>; font-size: <?php echo $f[3]?>; <?php if($f[7]): ?> text-shadow: #<?php echo $f[11]?> <?php echo $f[8]?> <?php echo $f[9]?> <?php echo $f[10]?>; <?php else: ?> text-shadow: none; <?php endif; ?> text-decoration: <?php echo $f[12]?>; text-transform: <?php echo $f[13]?>; line-height: <?php echo $f[14]?>; /*font chooser*/ background: url(<?php print ($themeurl.'images/selections/unselected.png');?>) no-repeat 5px center; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; } #search-categories<?php echo $module->id; ?> .search-categories-inner div.last{ border:none; <?php if($this->params->get('rounded')):?> -webkit-border-radius-bottomleft: 5px; -webkit-border-radius-bottomright: 5px; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; border-radius-bottomleft: 5px; border-radius-bottomright: 5px; <?php endif; ?> } #search-categories<?php echo $module->id; ?> .search-categories-inner div.selected{ background: url(<?php print ($themeurl.'images/selections/selected.png');?>) no-repeat 5px center; background-color: #ffffff; } #search-results-inner<?php echo $module->id; ?>.withoutseemore{ padding-bottom: 10px; } #search-results<?php echo $module->id; ?> .seemore{ padding-top: 5px; padding-bottom: 5px; cursor: pointer; /*border-bottom: 1px solid #B2BCC1;*/ background-color: #ffffff; /*f2f2f2*/ text-align: right; padding-right: 10px; } #search-results<?php echo $module->id; ?> .seemore:hover{ background-color: #ffffff; } #search-results<?php echo $module->id; ?> .seemore:hover span{ /*font chooser*/ <?php $f = $seemorefonthover; ?> color: #<?php echo $f[6]?>; font-family: <?php echo ($f[0] ? '"'.$f[2].'"':'').($f[1] && $f[0] ? ',':'').$f[1];?>; font-weight: <?php echo $f[4]? 'bold' : 'normal';?>; font-style: <?php echo $f[5]? 'italic' : 'normal';?>; font-size: <?php echo $f[3]?>; <?php if($f[7]): ?> text-shadow: #<?php echo $f[11]?> <?php echo $f[8]?> <?php echo $f[9]?> <?php echo $f[10]?>; <?php else: ?> text-shadow: none; <?php endif; ?> text-decoration: <?php echo $f[12]?>; text-transform: <?php echo $f[13]?>; line-height: <?php echo $f[14]?>; text-align: center; /*font chooser*/ } #search-results<?php echo $module->id; ?> .seemore span{ /*font chooser*/ <?php $f = $seemorefont; ?> color: #<?php echo $f[6]?>; font-family: <?php echo ($f[0] ? '"'.$f[2].'"':'').($f[1] && $f[0] ? ',':'').$f[1];?>; font-weight: <?php echo $f[4]? 'bold' : 'normal';?>; font-style: <?php echo $f[5]? 'italic' : 'normal';?>; font-size: <?php echo $f[3]?>; <?php if($f[7]): ?> text-shadow: #<?php echo $f[11]?> <?php echo $f[8]?> <?php echo $f[9]?> <?php echo $f[10]?>; <?php else: ?> text-shadow: none; <?php endif; ?> text-decoration: <?php echo $f[12]?>; text-transform: <?php echo $f[13]?>; line-height: <?php echo $f[14]?>; text-align: center; /*font chooser*/ }
isengartz/food
modules/mod_universal_ajaxlivesearch/themes/elegant/theme.css.php
PHP
gpl-2.0
30,438
package com.mediatek.gallery3d.ext; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import java.util.ArrayList; /** * The composite pattern class. * It will deliver every action to its leaf hookers. */ public class ActivityHookerGroup extends ActivityHooker { private ArrayList<IActivityHooker> mHooks = new ArrayList<IActivityHooker>(); /** * Add hooker to current group. * @param hooker * @return */ public boolean addHooker(IActivityHooker hooker) { return mHooks.add(hooker); } /** * Remove hooker from current group. * @param hooker * @return */ public boolean removeHooker(IActivityHooker hooker) { return mHooks.remove(hooker); } /** * Hooker size of current group. * @return */ public int size() { return mHooks.size(); } /** * Get hooker of requested location. * @param index * @return */ public IActivityHooker getHooker(int index) { return mHooks.get(index); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); for (IActivityHooker hook : mHooks) { hook.onCreate(savedInstanceState); } } @Override public void onStart() { super.onStart(); for (IActivityHooker hook : mHooks) { hook.onStart(); } } @Override public void onResume() { super.onResume(); for (IActivityHooker hook : mHooks) { hook.onResume(); } } @Override public void onPause() { super.onPause(); for (IActivityHooker hook : mHooks) { hook.onPause(); } } @Override public void onStop() { super.onStop(); for (IActivityHooker hook : mHooks) { hook.onStop(); } } @Override public void onDestroy() { super.onDestroy(); for (IActivityHooker hook : mHooks) { hook.onDestroy(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); boolean handle = false; for (IActivityHooker hook : mHooks) { boolean one = hook.onCreateOptionsMenu(menu); if (!handle) { handle = one; } } return handle; } @Override public boolean onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); boolean handle = false; for (IActivityHooker hook : mHooks) { boolean one = hook.onPrepareOptionsMenu(menu); if (!handle) { handle = one; } } return handle; } @Override public boolean onOptionsItemSelected(MenuItem item) { super.onOptionsItemSelected(item); boolean handle = false; for (IActivityHooker hook : mHooks) { boolean one = hook.onOptionsItemSelected(item); if (!handle) { handle = one; } } return handle; } @Override public void setParameter(String key, Object value) { super.setParameter(key, value); for (IActivityHooker hook : mHooks) { hook.setParameter(key, value); } } @Override public void init(Activity context, Intent intent) { super.init(context, intent); for (IActivityHooker hook : mHooks) { hook.init(context, intent); } } }
rex-xxx/mt6572_x201
packages/apps/Gallery2/ext/src/com/mediatek/gallery3d/ext/ActivityHookerGroup.java
Java
gpl-2.0
3,654
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Framework Package. This package holds all Data Management, and # Web-UI helpful to run brain-simulations. To use it, you also need do download # TheVirtualBrain-Scientific Package (for simulators). See content of the # documentation-folder for more details. See also http://www.thevirtualbrain.org # # (c) 2012-2013, Baycrest Centre for Geriatric Care ("Baycrest") # # 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, you can download it here # http://www.gnu.org/licenses/old-licenses/gpl-2.0 # # # CITATION: # When using The Virtual Brain for scientific publications, please cite it as follows: # # Paula Sanz Leon, Stuart A. Knock, M. Marmaduke Woodman, Lia Domide, # Jochen Mersmann, Anthony R. McIntosh, Viktor Jirsa (2013) # The Virtual Brain: a simulator of primate brain network dynamics. # Frontiers in Neuroinformatics (7:10. doi: 10.3389/fninf.2013.00010) # # """ Install TVB Framework package for developers. Execute: python setup.py install/develop """ import os import shutil import setuptools VERSION = "1.4" TVB_TEAM = "Mihai Andrei, Lia Domide, Ionel Ortelecan, Bogdan Neacsa, Calin Pavel, " TVB_TEAM += "Stuart Knock, Marmaduke Woodman, Paula Sansz Leon, " TVB_INSTALL_REQUIREMENTS = ["apscheduler", "beautifulsoup", "cherrypy", "genshi", "cfflib", "formencode==1.3.0a1", "h5py==2.3.0", "lxml", "minixsv", "mod_pywebsocket", "networkx", "nibabel", "numpy", "numexpr", "psutil", "scikit-learn", "scipy", "simplejson", "PIL>=1.1.7", "sqlalchemy==0.7.8", "sqlalchemy-migrate==0.7.2", "matplotlib==1.2.1"] EXCLUDE_INTROSPECT_FOLDERS = [folder for folder in os.listdir(".") if os.path.isdir(os.path.join(".", folder)) and folder != "tvb"] setuptools.setup(name="tvb", version=VERSION, packages=setuptools.find_packages(exclude=EXCLUDE_INTROSPECT_FOLDERS), license="GPL v2", author=TVB_TEAM, author_email='lia.domide@codemart.ro', include_package_data=True, install_requires=TVB_INSTALL_REQUIREMENTS, extras_require={'postgres': ["psycopg2"]}) ## Clean after install shutil.rmtree('tvb.egg-info', True)
rajul/tvb-framework
setup.py
Python
gpl-2.0
2,824
/*____________________________________________________________________________ ExifPro Image Viewer Copyright (C) 2000-2015 Michael Kowalski ____________________________________________________________________________*/ // ImgBatchModeDlg.cpp : implementation file // #include "stdafx.h" #include "resource.h" #include "ImgBatchModeDlg.h" #include "BalloonMsg.h" #include "Path.h" #include "FolderSelect.h" #include "RString.h" extern String ReplaceIllegalChars(const String& text); #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif // ImgBatchModeDlg dialog ImgBatchModeDlg::ImgBatchModeDlg(CWnd* parent /*=NULL*/) : CDialog(ImgBatchModeDlg::IDD, parent) { dest_folder_ = 0; suffix_ = _T("_modified"); } ImgBatchModeDlg::~ImgBatchModeDlg() {} void ImgBatchModeDlg::DoDataExchange(CDataExchange* DX) { CDialog::DoDataExchange(DX); DDX_Radio(DX, IDC_SAME_DIR, dest_folder_); DDX_Text(DX, IDC_DEST_PATH, dest_folder_str_); DDX_Control(DX, IDC_SUFFIX, edit_suffix_); DDX_Text(DX, IDC_SUFFIX, suffix_); DDX_Control(DX, IDC_EXAMPLE, example_wnd_); DDX_Control(DX, IDC_DEST_PATH, edit_dest_path_); } BEGIN_MESSAGE_MAP(ImgBatchModeDlg, CDialog) ON_WM_SIZE() ON_EN_CHANGE(IDC_SUFFIX, OnChangeSuffix) ON_BN_CLICKED(IDC_SAME_DIR, OnSameDir) ON_BN_CLICKED(IDC_SELECT, OnSelectDir) ON_BN_CLICKED(IDC_BROWSE, OnBrowse) END_MESSAGE_MAP() bool ImgBatchModeDlg::Finish() { if (!UpdateData()) return false; extern const TCHAR* PathIllegalChars(); if (!suffix_.IsEmpty()) if (suffix_.FindOneOf(PathIllegalChars()) >= 0) { String msg= _T("Suffix text cannot contain any of the following characters: "); msg += PathIllegalChars(); new BalloonMsg(&edit_suffix_, _T("Illegal Characters"), msg.c_str(), BalloonMsg::IERROR); return false; } if (dest_folder_ == 0) { if (suffix_.IsEmpty()) { new BalloonMsg(&edit_suffix_, _T("Empty Suffix"), _T("Please enter suffix text, so the destination file names differ from the source file names."), BalloonMsg::IERROR); return false; } } else { Path path(dest_folder_str_); if (path.empty()) { new BalloonMsg(&edit_dest_path_, _T("Missing Destination Folder"), _T("Please specify folder where transformed images will be stored."), BalloonMsg::IERROR); return false; } else { if (!path.CreateIfDoesntExist(&edit_dest_path_)) return false; } } return true; } // ImgBatchModeDlg message handlers bool ImgBatchModeDlg::Create(CWnd* parent) { return !!CDialog::Create(IDD, parent); } void ImgBatchModeDlg::OnSize(UINT type, int cx, int cy) { CDialog::OnSize(type, cx, cy); dlg_resize_map_.Resize(); } BOOL ImgBatchModeDlg::OnInitDialog() { CDialog::OnInitDialog(); edit_suffix_.LimitText(100); dlg_resize_map_.BuildMap(this); dlg_resize_map_.SetWndResizing(IDC_FRAME, DlgAutoResize::RESIZE_H); dlg_resize_map_.SetWndResizing(IDC_DEST_PATH, DlgAutoResize::RESIZE_H); dlg_resize_map_.SetWndResizing(IDC_BROWSE, DlgAutoResize::MOVE_H); dlg_resize_map_.SetWndResizing(IDC_LABEL_1, DlgAutoResize::MOVE_H); dlg_resize_map_.SetWndResizing(IDC_SUFFIX, DlgAutoResize::MOVE_H); dlg_resize_map_.SetWndResizing(IDC_LABEL_2, DlgAutoResize::MOVE_H); dlg_resize_map_.SetWndResizing(IDC_EXAMPLE, DlgAutoResize::MOVE_H); UpdateExample(); UpdateDirs(); return true; } void ImgBatchModeDlg::UpdateExample() { if (edit_suffix_.m_hWnd != 0) { CString suffix; edit_suffix_.GetWindowText(suffix); suffix = ReplaceIllegalChars(static_cast<const TCHAR*>(suffix)).c_str(); example_wnd_.SetWindowText(_T("DSC01234") + suffix + _T(".jpg")); } } void ImgBatchModeDlg::OnChangeSuffix() { UpdateExample(); } void ImgBatchModeDlg::OnSameDir() { UpdateDirs(); } void ImgBatchModeDlg::OnSelectDir() { UpdateDirs(); } void ImgBatchModeDlg::UpdateDirs() { if (edit_dest_path_.m_hWnd != 0) { bool same_dir= !!IsDlgButtonChecked(IDC_SAME_DIR); edit_dest_path_.EnableWindow(!same_dir); GetDlgItem(IDC_BROWSE)->EnableWindow(!same_dir); } } void ImgBatchModeDlg::OnBrowse() { CString dest_path; edit_dest_path_.GetWindowText(dest_path); if (dest_path.IsEmpty()) dest_path = _T("c:\\"); CFolderSelect fs(this); CString path= fs.DoSelectPath(RString(IDS_SELECT_OUTPUT_FOLDER), dest_path); if (path.IsEmpty()) return; edit_dest_path_.SetWindowText(path); }
mikekov/ExifPro
src/ImgBatchModeDlg.cpp
C++
gpl-2.0
4,565
var State = Backbone.State = function(options) { options || (options = {}); }; _.extend(State.prototype, Backbone.Events, { classes: [], before: null, on: null, after: null, events: {}, triggers: [], multistate: [], _isStateDescribedInSet: function( set, state ) { var isDescribed = false; _.each( set, function( entry ) { if( state.match( entry ) ) { isDescribed = true; } }); return isDescribed; }, isStateDescribedInAllowed: function( state ) { return _isStateDescribedInSet( this.multistate.allow, state ); }, isStateDescribedInDisallowed: function( state ) { return _isStateDescribedInSet( this.multistate.disallow, state ); }, isStatePermitted: function( state ) { var allowed = false; if (this.multistate == "any" || this.multistate == "all") { return true; } if(this.isStateDescribedInAllowed( state )) return true; if(this.isStateDescribedInDisallowed( state )) return false; }, }); // Generic State Machine var StateMachine = Backbone.StateMachine = function(options) { options || (options = {}); if( options.el ) { this.setElement( options.el ); } } _.extend(StateMachine.prototype, Backbone.Events, { states: {}, state: null, el: null, $el: null, setElement: function( el ) { this.el = el; this.$el = this.el ? $(this.el) : null; }, get classes( ) { if(this.$el) { return _.toArray( this.$el.attr('class').split(/\s+/) ); } else { return null; } }, set classes( newClasses ) { if( !$this.el) if( typeof newClasses === 'string' ) { this.$el.attr('class', newClasses); } else { this.$el.attr('class', newClasses.join(' ')); } }, createState: function( name, state ) { state = (typeof state === State) ? state : new State( state ); this.states[name] = state; return this; }, // Private method for applying a state _applyState: function( state ) { this.events = _.union( this.events, state.events); this.classes = _.union( this.classes, state.classes); this.state = state; }, // Private method for cleaning up the previous state _removeState: function( state ) { this.events = _.difference( this.events, state.events ); this.classes = _.difference( this.classes, state.classes ); this.state = null; }, //Public method for changing the state pushState: function( name ) { var oldState = this.state, newState = this.states[name]; // Old State if(oldState) { this._removeState( state ); if(oldState.after) oldState.after( name ); } // New State if(newState && newState.before) { newState.before(); } this._applyState( newState ); if(this.state && this.state.on) { this.state.on(); } this.trigger("stateChanged", { oldState: oldState, newState: newState }); } });
jonathanrevell/tokamak
backbone.states.js
JavaScript
gpl-2.0
2,952
'use strict'; module.exports = require('./EuCookies');
Dununan/reactjs-eu-cookies
build/index.js
JavaScript
gpl-2.0
55
<?php get_header(); ?> <!-- header End --> <!-- container Start --> <?php if (have_posts()) : while (have_posts()) : the_post(); $prev_post = get_previous_post(); $next_post = get_next_post(); ?> <div class="pre_link link_wiki"> <a id="pre_link" title="<?php echo $prev_post->post_title; ?>" href="<?php echo get_permalink( $prev_post->ID ); ?>" class="pre_link_tag"> <i class="icon_chevron_left"></i> <div class="link_card">上一篇</div> </a> </div> <div class="next_link link_topic"> <a id="next_link" title="<?php echo $next_post->post_title; ?>" href="<?php echo get_permalink( $next_post->ID ); ?>" class="next_link_tag"> <i class="icon_chevron_right"></i> <div class="link_card">下一篇</div> </a> </div> <article class="main wrapper"> <section class="main_left"> <section class="content"> <article> <nav class="breadcrumb"> <?php wpmee_breadcrumbs(); ?> </nav> <section class="post_header"> <h1><?php the_title();?></h1> <div class="post_meta"> <?php the_time('20y-m-d') ?> Share by <?php the_author_posts_link(); ?><span class="post_cate">From <?php the_category(', ')?>&nbsp;</span> <?php edit_post_link('[编辑]'); ?> <div class="post_statistics"> <a title="阅读次数"><i class="icon_eye"></i><?php setPostViews(get_the_ID());echo getPostViews(get_the_ID());?></a> <a href="javascript:;" onclick="scrollTo(&#39;#comment&#39;,110,0)" title="评论次数"><i class="fa fa-comment"></i><?php echo get_post($post->ID)->comment_count; ?></a> </div> </div> </section> <section class="article"> <?php if(has_excerpt()): ?> <div class="post_lead"> <div class="post_lead_l"> <span>导语<i class="triangle_top_left"></i> </span> </div> <div class="post_lead_r"> <?php the_excerpt(); ?> </div> </div> <?php endif; the_content();?> <p><strong>本文由Morketing原创或整理,转载请注明出处及本文链接 </strong></br><strong>本文地址:</strong> <a href=”<?php the_permalink() ?>” title=”<?php the_title(); ?>”><?php the_permalink(); ?></a> </p> </section> <section class="post_involve clear"> <div class="post_involve_wiki" style="width:100%"> <h2>文章涉及标签:</h2> <div class="post_wiki_tag"> <?php the_tags('<button>','</button><button>','</button>'); ?> </div> </div> </section> <section class="post-like"> <a title="喜欢就赞一个!" href="javascript:;" data-action="ding" data-id="<?php the_ID(); ?>" class="favorite<?php if(isset($_COOKIE['bigfa_ding_'.$post->ID])) echo ' done';?>"><i class="fa fa-heart"></i> Like <span class="count"> <?php if( get_post_meta($post->ID,'bigfa_ding',true) ){ echo get_post_meta($post->ID,'bigfa_ding',true); } else { echo '0'; }?></span> </a> </section> <section class="post_relate"> <h2>了解更多</h2> <ul class="clear"> <?php include('includes/moreposts.php') ?> </ul> </section> <?php comments_template(); ?> </article> </section> </section> <?php endwhile;endif;?> <?php get_sidebar();?> <?php get_footer(); ?>
wangshijun101/morketing.cn
wp-content/themes/mi/single.php
PHP
gpl-2.0
3,214
<?php /* -------------------------------------------------------------- PayoneCheckoutCreditRiskContentView.inc.php 2013-10-04 mabr Gambio GmbH http://www.gambio.de Copyright (c) 2013 Gambio GmbH Released under the GNU General Public License (Version 2) [http://www.gnu.org/licenses/gpl-2.0.html] -------------------------------------------------------------- */ class PayoneCheckoutCreditRiskContentView extends ContentView { protected $_payone; public function PayoneCheckoutCreditRiskContentView() { $this->set_content_template('module/checkout_payone_cr.html'); $this->_payone = new GMPayOne(); } function get_html() { $config = $this->_payone->getConfig(); if($_SERVER['REQUEST_METHOD'] == 'POST') { header('Content-Type: text/plain'); if(isset($_POST['confirm'])) { // A/B testing: only perform scoring every n-th time $do_score = true; if($config['credit_risk']['abtest']['active'] == 'true') { $ab_value = max(1, (int)$config['credit_risk']['abtest']['value']); $score_count = (int)gm_get_conf('PAYONE_CONSUMERSCORE_ABCOUNTER'); $do_score = ($score_count % $ab_value) == 0; gm_set_conf('PAYONE_CONSUMERSCORE_ABCOUNTER', $score_count + 1); } if($do_score) { $score = $this->_payone->scoreCustomer($_SESSION['billto']); } else { $score = false; } if($score instanceof Payone_Api_Response_Consumerscore_Valid) { switch((string)$score->getScore()) { case 'G': $_SESSION['payone_cr_result'] = 'green'; break; case 'Y': $_SESSION['payone_cr_result'] = 'yellow'; break; case 'R': $_SESSION['payone_cr_result'] = 'red'; break; default: $_SESSION['payone_cr_result'] = $config['credit_risk']['newclientdefault']; } $_SESSION['payone_cr_hash'] = $this->_payone->getAddressHash($_SESSION['billto']); } else { // could not get a score value $_SESSION['payone_cr_result'] = $config['credit_risk']['newclientdefault']; $_SESSION['payone_cr_hash'] = $this->_payone->getAddressHash($_SESSION['billto']); } if($config['credit_risk']['timeofcheck'] == 'before') { xtc_redirect(GM_HTTP_SERVER.DIR_WS_CATALOG.FILENAME_CHECKOUT_PAYMENT); } else { xtc_redirect(GM_HTTP_SERVER.DIR_WS_CATALOG.FILENAME_CHECKOUT_CONFIRMATION); } } else if(isset($_POST['noconfirm'])) { if($config['credit_risk']['timeofcheck'] == 'before') { xtc_redirect(GM_HTTP_SERVER.DIR_WS_CATALOG.FILENAME_CHECKOUT_PAYMENT.'?p1crskip=1'); } else { xtc_redirect(GM_HTTP_SERVER.DIR_WS_CATALOG.FILENAME_CHECKOUT_CONFIRMATION.'?p1crskip=1'); } } } $this->set_content_data('notice', $config['credit_risk']['notice']['text']); $this->set_content_data('confirmation', $config['credit_risk']['confirmation']['text']); $t_html_output = $this->build_html(); return $t_html_output; } }
khadim-raath/gambioTest
system/classes/external/payone/PayoneCheckoutCreditRiskContentView.inc.php
PHP
gpl-2.0
3,005
<?php require_once 'View/ViewHelper.php'; /** * Description of View * * @author Jessica */ class View extends ViewHelper { /** * WordPress Screen name, ex. post.php, edit.php. Can * be an array for multiple screens * * @var string|array */ protected $_hook = array(); /** * Sanitized short-name. Usually post-type or taxonomy. * * @var string */ protected $_name = ""; /** * Post-type that is to be used for enqueuing. Can be * an array for multiple post-types * * @var string|array */ protected $_post_type = array(); /** * Array of stylesheet handles registered by wp_register_style() * * @var array */ protected $_styles = array(); /** * Array of script handles registered by wp_register_script() * * @var array */ protected $_scripts = array(); /** * Path to scripts/styles * * @var string */ protected $_path; /** * Script/style version # * * @var string */ protected $_ver = '1.0'; // default version number public function init() { // set up default styles arrays $default_edit_styles = array( $this->_path . "css/{$this->_name}-edit-screen.css", $this->_path . "modules" . ucwords($this->_name) . "/css/{$this->_name}-edit-screen.css", $this->_path . "css/edit-screen.css", "/framework/css/edit-screen.css", ); $default_post_styles = array( $this->_path . "css/{$this->_name}-post-screen.css", $this->_path . "modules" . ucwords($this->_name) . "/css/{$this->_name}-post-screen.css", $this->_path . "css/post-screen.css", "/framework/css/post-screen.css", ); wp_register_style( "{$this->_name}-edit-screen", $this->locate_stylesheet($default_edit_styles), null, $this->_ver, 'screen' ); wp_register_style( "{$this->_name}-post-screen", $this->locate_stylesheet($default_post_styles), null, $this->_ver, 'screen' ); add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts')); add_action('admin_enqueue_scripts', array($this, 'enqueue_styles')); add_action('admin_enqueue_scripts', array($this, 'enqueue_default_styles')); } /** * Set the relative path to the scripts/styles * * @param string $path Path to scripts/styles * @return \View */ public function set_path($path) { $this->_path = $path; return $this; } /** * Set the hook that the scripts and styles are to be enqueued. * * @param string $hook Screen hook name * @return \View */ public function set_hook($hook) { $this->_hook = $hook; return $this; } public function get_hook() { return $this->_hook; } public function set_post_type($post_type) { $this->_post_type = $post_type; return $this; } public function set_ver($ver) { $this->_ver = $ver; return $this; } /** * Set JS files for enqueuing. * * @param array $scripts Array of JS script handles to be enqueued. * @return PostType_Class */ public function set_js_scripts($scripts = array()) { $this->_scripts = $scripts; return $this; } /** * Set CSS files for enqueuing. * * @param array $styles Array of CSS file handles to be enqueued. * @return PostType_Class */ public function set_css_styles($styles = array()) { $this->_styles = $styles; return $this; } /** * Enqueues all styles and scripts. Runs when admin_enqueue_scripts is * called. * * @global string $post_type * @global string $hook_suffix * @return void */ public function enqueue_styles() { global $post_type, $hook_suffix; $is_post_type = $this->is_post_type($post_type); $is_screen = $this->is_screen_hook($hook_suffix); if (($is_post_type && $is_screen) || ($post_type == null) && $is_screen) { $scripts = $this->_styles; foreach ($scripts as $script) { wp_enqueue_style($script); } } return $this; } /** * Enqueues all scripts. Runs when admin_enqueue_scripts is * called. * * @global string $post_type * @global string $hook_suffix * @return void */ public function enqueue_scripts() { global $post_type, $hook_suffix; $is_post_type = $this->is_post_type($post_type); $is_screen = $this->is_screen_hook($hook_suffix); if (($is_post_type && $is_screen) || ($post_type == null) && $is_screen) { $scripts = $this->_scripts; foreach ($scripts as $script) { wp_enqueue_script($script); } } return $this; } /** * Enqueues default styles for Add New & Edit screens * * @global string $post_type * @global string $hook_suffix * @return void */ public function enqueue_default_styles() { global $post_type, $hook_suffix; $valid_suffices = array('post.php', 'post-new.php'); if ($this->is_post_type($post_type) && in_array($hook_suffix, $valid_suffices) ) { wp_enqueue_style("{$this->_name}-post-screen"); } else if ($this->is_post_type($post_type) && $hook_suffix == 'edit.php') { wp_enqueue_style("{$this->_name}-edit-screen"); } return $this; } } ?>
gbish/bernard
wp-content/plugins/mangapress/framework/View.php
PHP
gpl-2.0
6,134
using System; using System.Linq; using LeagueSharp; using LeagueSharp.Common; using SharpDX; using SharpDX.Direct3D9; using Color = System.Drawing.Color; namespace TAC_Kalista { class DrawingHandler { public static Device DxDevice = Drawing.Direct3DDevice; public static Line DxLine; public static Obj_AI_Hero Unit { get; set; } public static float Width = 104; public static float Hight = 9; public static int MinRange = 100; public static void Init() { DxLine = new Line(DxDevice) { Width = 9 }; Drawing.OnDraw += OnDraw; Drawing.OnEndScene += OnEndScene; } public static void OnDraw(EventArgs args) { if(Kalista.Drawings) { if (MenuHandler.Config.Item("JumpTo").GetValue<KeyBind>().Active) { GetAvailableJumpSpots(); } Spell[] spellList = { SkillHandler.Q, SkillHandler.W, SkillHandler.E, SkillHandler.R }; foreach (var spell in spellList) { var menuItem = MenuHandler.Config.Item(spell.Slot+"Range").GetValue<Circle>(); if (menuItem.Active && spell.Level > 0) Utility.DrawCircle(ObjectManager.Player.Position, spell.Range, menuItem.Color); } bool drawHp = MenuHandler.Config.Item("drawHp").GetValue<bool>(); bool drawStacks = MenuHandler.Config.Item("drawStacks").GetValue<bool>(); if (drawHp || drawStacks) { var stacks = 0; foreach (var enemy in ObjectManager.Get<Obj_AI_Hero>().Where(ene => !ene.IsDead && ene.IsEnemy && ene.IsVisible)) { if (drawHp) { Unit = enemy; DrawDmg(MathHandler.GetDamageToTarget(enemy), enemy.Health < MathHandler.GetRealDamage(enemy) ? Color.Red : Color.Yellow); } if (drawStacks) { var firstOrDefault = enemy.Buffs.FirstOrDefault(b => b.Name.ToLower() == "kalistaexpungemarker"); if (firstOrDefault != null) stacks = firstOrDefault.Count; if (stacks > 0) { Drawing.DrawText(enemy.HPBarPosition.X, enemy.HPBarPosition.Y - 5, Color.Red, "E:" + stacks + "H:" + (int)enemy.Health + "/D:" + (int)MathHandler.GetRealDamage(enemy), enemy); } } } } if (MenuHandler.Config.Item("drawESlow").GetValue<bool>()) { Utility.DrawCircle(ObjectManager.Player.Position, SkillHandler.E.Range - 110, Color.Pink); } } } /** * @author detuks * */ public static void OnEndScene(EventArgs args) { if (MenuHandler.Config.Item("drawHp").GetValue<bool>()) { foreach (var enemy in ObjectManager.Get<Obj_AI_Hero>().Where(ene => !ene.IsDead && ene.IsEnemy && ene.IsVisible)) { Unit = enemy; DrawDmg(MathHandler.GetDamageToTarget(enemy), enemy.Health < MathHandler.GetRealDamage(enemy) ? Color.Red : Color.Yellow); } } } private static Vector2 Offset { get { if (Unit != null) { return Unit.IsAlly ? new Vector2(34, 9) : new Vector2(10, 20); } return new Vector2(); } } public static Vector2 StartPosition { get { return new Vector2(Unit.HPBarPosition.X + Offset.X, Unit.HPBarPosition.Y + Offset.Y); } } private static float GetHpProc(float dmg = 0) { var health = ((Unit.Health - dmg) > 0) ? (Unit.Health - dmg) : 0; return (health / Unit.MaxHealth); } private static Vector2 GetHpPosAfterDmg(float dmg) { var w = GetHpProc(dmg) * Width; return new Vector2(StartPosition.X + w, StartPosition.Y); } public static void DrawDmg(float dmg, Color color) { var hpPosNow = GetHpPosAfterDmg(0); var hpPosAfter = GetHpPosAfterDmg(dmg); fillHPBar(hpPosNow, hpPosAfter, color); } public static ColorBGRA ColorBgra(Color c) { return ColorBGRA.FromRgba(c.ToArgb()); } private static void fillHPBar(Vector2 from, Vector2 to, Color c) { DxLine.Begin(); DxLine.Draw(new[] { new Vector2((int)from.X, (int)from.Y + 4f), new Vector2( (int)to.X, (int)to.Y + 4f) },ColorBgra(c)); DxLine.End(); } public static bool IsLyingInCone(Vector2 position, Vector2 apexPoint, Vector2 circleCenter, float aperture) { var halfAperture = aperture / 2.0f; var apexToXVect = apexPoint - position; var axisVect = apexPoint - circleCenter; var isInInfiniteCone = DotProd(apexToXVect, axisVect) / Magn(apexToXVect) / Magn(axisVect) > Math.Cos(halfAperture); if (!isInInfiniteCone) return false; return DotProd(apexToXVect, axisVect) / Magn(axisVect) < Magn(axisVect); } public static float DotProd(Vector2 a, Vector2 b){ return a.X * b.X + a.Y * b.Y; } public static float Magn(Vector2 a){ return (float)(Math.Sqrt(a.X * a.X + a.Y * a.Y)); } public static void GetAvailableJumpSpots() { const int size = 295; const int n = 15; if (!SkillHandler.Q.IsReady()) { Drawing.DrawText(Drawing.Width * 0.44f, Drawing.Height * 0.80f, Color.Red, "Jumping mode active, but Q isn't."); } else { Drawing.DrawText(Drawing.Width * 0.39f, Drawing.Height * 0.80f, Color.White, "Hover the spot to jump to "); } var playerPosition = ObjectManager.Player.Position; Drawing.DrawCircle(ObjectManager.Player.Position, size, Color.RoyalBlue); var target = SimpleTs.GetTarget(SkillHandler.Q.Range, SimpleTs.DamageType.Physical); for (var i = 1; i <= n; i++) { var x = size * Math.Cos(2 * Math.PI * i / n); var y = size * Math.Sin(2 * Math.PI * i / n); var drawWhere = new Vector3((int)(playerPosition.X + x), (float)(playerPosition.Y + y), playerPosition.Z); if (drawWhere.IsWall()) continue; if (SkillHandler.Q.IsReady() && Game.CursorPos.Distance(drawWhere) <= 80f) { if (target != null) FightHandler.CustomQCast(target); else SkillHandler.Q.Cast(new Vector2(drawWhere.X, drawWhere.Y), true); Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(drawWhere.X, drawWhere.Y)).Send(); return; } Utility.DrawCircle(drawWhere, 20, Color.Red); } } } }
thanhdongsl1990/Twightlight_Y2Knight
TAC_Kalista/TAC Kalista/DrawingHandler.cs
C#
gpl-2.0
7,697
/* $Id: UIGraphicsRotatorButton.cpp $ */ /** @file * VBox Qt GUI - UIGraphicsRotatorButton class definition. */ /* * Copyright (C) 2012 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it and/or modify it under the terms of the GNU * General Public License (GPL) as published by the Free Software * Foundation, in version 2 as it comes in the "COPYING" file of the * VirtualBox OSE distribution. VirtualBox OSE is distributed in the * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. */ #ifdef VBOX_WITH_PRECOMPILED_HEADERS # include <precomp.h> #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ /* Qt includes: */ # include <QStateMachine> # include <QPropertyAnimation> # include <QSignalTransition> /* GUI includes: */ # include "UIGraphicsRotatorButton.h" # include "UIIconPool.h" #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ #include <QMouseEventTransition> UIGraphicsRotatorButton::UIGraphicsRotatorButton(QIGraphicsWidget *pParent, const QString &strPropertyName, bool fToggled, bool fReflected /* = false */, int iAnimationDuration /* = 300 */) : UIGraphicsButton(pParent, UIIconPool::iconSet(":/expanding_collapsing_16px.png")) , m_fReflected(fReflected) , m_state(fToggled ? UIGraphicsRotatorButtonState_Rotated : UIGraphicsRotatorButtonState_Default) , m_pAnimationMachine(0) , m_iAnimationDuration(iAnimationDuration) , m_pForwardButtonAnimation(0) , m_pBackwardButtonAnimation(0) , m_pForwardSubordinateAnimation(0) , m_pBackwardSubordinateAnimation(0) { /* Configure: */ setAutoHandleButtonClick(true); /* Create state machine: */ m_pAnimationMachine = new QStateMachine(this); /* Create 'default' state: */ QState *pStateDefault = new QState(m_pAnimationMachine); pStateDefault->assignProperty(this, "state", QVariant::fromValue(UIGraphicsRotatorButtonState_Default)); pStateDefault->assignProperty(this, "rotation", m_fReflected ? 180 : 0); /* Create 'animating' state: */ QState *pStateAnimating = new QState(m_pAnimationMachine); pStateAnimating->assignProperty(this, "state", QVariant::fromValue(UIGraphicsRotatorButtonState_Animating)); /* Create 'rotated' state: */ QState *pStateRotated = new QState(m_pAnimationMachine); pStateRotated->assignProperty(this, "state", QVariant::fromValue(UIGraphicsRotatorButtonState_Rotated)); pStateRotated->assignProperty(this, "rotation", 90); /* Forward button animation: */ m_pForwardButtonAnimation = new QPropertyAnimation(this, "rotation", this); m_pForwardButtonAnimation->setDuration(m_iAnimationDuration); m_pForwardButtonAnimation->setStartValue(m_fReflected ? 180 : 0); m_pForwardButtonAnimation->setEndValue(90); /* Backward button animation: */ m_pBackwardButtonAnimation = new QPropertyAnimation(this, "rotation", this); m_pBackwardButtonAnimation->setDuration(m_iAnimationDuration); m_pBackwardButtonAnimation->setStartValue(90); m_pBackwardButtonAnimation->setEndValue(m_fReflected ? 180 : 0); /* Forward subordinate animation: */ m_pForwardSubordinateAnimation = new QPropertyAnimation(pParent, strPropertyName.toLatin1(), this); m_pForwardSubordinateAnimation->setDuration(m_iAnimationDuration); m_pForwardSubordinateAnimation->setEasingCurve(QEasingCurve::InCubic); /* Backward subordinate animation: */ m_pBackwardSubordinateAnimation = new QPropertyAnimation(pParent, strPropertyName.toLatin1(), this); m_pBackwardSubordinateAnimation->setDuration(m_iAnimationDuration); m_pBackwardSubordinateAnimation->setEasingCurve(QEasingCurve::InCubic); /* Default => Animating: */ QSignalTransition *pDefaultToAnimating = pStateDefault->addTransition(this, SIGNAL(sigToAnimating()), pStateAnimating); pDefaultToAnimating->addAnimation(m_pForwardButtonAnimation); pDefaultToAnimating->addAnimation(m_pForwardSubordinateAnimation); /* Animating => Rotated: */ connect(m_pForwardButtonAnimation, SIGNAL(finished()), this, SIGNAL(sigToRotated()), Qt::QueuedConnection); pStateAnimating->addTransition(this, SIGNAL(sigToRotated()), pStateRotated); /* Rotated => Animating: */ QSignalTransition *pRotatedToAnimating = pStateRotated->addTransition(this, SIGNAL(sigToAnimating()), pStateAnimating); pRotatedToAnimating->addAnimation(m_pBackwardButtonAnimation); pRotatedToAnimating->addAnimation(m_pBackwardSubordinateAnimation); /* Animating => Default: */ connect(m_pBackwardButtonAnimation, SIGNAL(finished()), this, SIGNAL(sigToDefault()), Qt::QueuedConnection); pStateAnimating->addTransition(this, SIGNAL(sigToDefault()), pStateDefault); /* Default => Rotated: */ pStateDefault->addTransition(this, SIGNAL(sigToRotated()), pStateRotated); /* Rotated => Default: */ pStateRotated->addTransition(this, SIGNAL(sigToDefault()), pStateDefault); /* Initial state is 'default': */ m_pAnimationMachine->setInitialState(!fToggled ? pStateDefault : pStateRotated); /* Start state-machine: */ m_pAnimationMachine->start(); /* Refresh: */ refresh(); } void UIGraphicsRotatorButton::setAutoHandleButtonClick(bool fEnabled) { /* Disconnect button-click signal: */ disconnect(this, SIGNAL(sigButtonClicked()), this, SLOT(sltButtonClicked())); if (fEnabled) { /* Connect button-click signal: */ connect(this, SIGNAL(sigButtonClicked()), this, SLOT(sltButtonClicked())); } } void UIGraphicsRotatorButton::setToggled(bool fToggled, bool fAnimated /* = true */) { /* Not during animation: */ if (isAnimationRunning()) return; /* Make sure something has changed: */ switch (state()) { case UIGraphicsRotatorButtonState_Default: { if (!fToggled) return; break; } case UIGraphicsRotatorButtonState_Rotated: { if (fToggled) return; break; } default: break; } /* Should be animated? */ if (fAnimated) { /* Rotation start: */ emit sigRotationStart(); emit sigToAnimating(); } else { if (fToggled) emit sigToRotated(); else emit sigToDefault(); } } void UIGraphicsRotatorButton::setAnimationRange(int iStart, int iEnd) { m_pForwardSubordinateAnimation->setStartValue(iStart); m_pForwardSubordinateAnimation->setEndValue(iEnd); m_pBackwardSubordinateAnimation->setStartValue(iEnd); m_pBackwardSubordinateAnimation->setEndValue(iStart); } bool UIGraphicsRotatorButton::isAnimationRunning() const { return m_pForwardSubordinateAnimation->state() == QAbstractAnimation::Running || m_pBackwardSubordinateAnimation->state() == QAbstractAnimation::Running; } void UIGraphicsRotatorButton::sltButtonClicked() { /* Toggle state: */ switch (state()) { case UIGraphicsRotatorButtonState_Default: setToggled(true); break; case UIGraphicsRotatorButtonState_Rotated: setToggled(false); break; default: break; } } void UIGraphicsRotatorButton::refresh() { /* Update rotation center: */ QSizeF sh = minimumSizeHint(); setTransformOriginPoint(sh.width() / 2, sh.height() / 2); /* Update rotation state: */ updateRotationState(); /* Call to base-class: */ UIGraphicsButton::refresh(); } void UIGraphicsRotatorButton::updateRotationState() { switch (state()) { case UIGraphicsRotatorButtonState_Default: setRotation(m_fReflected ? 180 : 0); break; case UIGraphicsRotatorButtonState_Rotated: setRotation(90); break; default: break; } } UIGraphicsRotatorButtonState UIGraphicsRotatorButton::state() const { return m_state; } void UIGraphicsRotatorButton::setState(UIGraphicsRotatorButtonState state) { m_state = state; switch (m_state) { case UIGraphicsRotatorButtonState_Default: { emit sigRotationFinish(false); break; } case UIGraphicsRotatorButtonState_Rotated: { emit sigRotationFinish(true); break; } default: break; } }
miguelinux/vbox
src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsRotatorButton.cpp
C++
gpl-2.0
8,544
#include <iostream> #include <cstdlib> #include <vector> #include <fstream> #include "strings.cpp" #define NAMEFILE "./names.txt" #define JOBFILE "./jobs.txt" #define TRIM (after(buffer,':')) //Define global variables vector<string> femaleNames; vector<string> maleNames; vector<string> lastNames; /* //!Return number between floor and ceiling int ranNum(int floor, int ceiling) { return (floor + (rand()%ceiling)) - 1; } */ int ranNum(int min, int max) { return (rand() % (max - min + 1)) + min; } void loadNames() { string buffer; ifstream in(NAMEFILE); for(int i = 0; getline(in,buffer); i++) { if(buffer.find("female")!=-1) femaleNames.push_back(TRIM); else if(buffer.find("male")!=-1) maleNames.push_back(TRIM); else if(buffer.find("last:")!=-1) lastNames.push_back(TRIM); else break; } } string name(unsigned int t) { loadNames(); switch(t) { case 0: //return maleNames[(ranNum(1,maleNames.capacity()))]; return maleNames[(ranNum(1,maleNames.size()))]; case 1: //return femaleNames[(ranNum(1,femaleNames.capacity()))]; return femaleNames[(ranNum(1,femaleNames.size()))]; case 2: //return lastNames[(ranNum(1,lastNames.capacity()))]; return lastNames[(ranNum(1,lastNames.size()))]; default: break; } return ""; } void getJob(string title, unsigned int salary) { title = "TEST"; salary = 69; cout << "gottajob" << endl; }
SexualLobster/ActualEntity
func.cpp
C++
gpl-2.0
1,463
// $Id$ /* Copyright (C) 2004-2006 John B. Shumway, Jr. 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 "RandomPermutationChooser.h" #include "util/RandomNumGenerator.h" #include "util/Permutation.h" RandomPermutationChooser::RandomPermutationChooser(const int nsize) : PermutationChooser(nsize), nsize(nsize) { } bool RandomPermutationChooser::choosePermutation() { for (int ifrom=0; ifrom<nsize;) { int ito = (int)(nsize*RandomNumGenerator::getRand()); if (ito==nsize) ito=nsize-1; for (int jfrom=0; jfrom<=ifrom; ++jfrom) { if (jfrom==ifrom) (*permutation)[ifrom++]=ito; if ((*permutation)[jfrom]==ito) break; } } return true; }
ShaningSoul/pi-qmc
src/sampler/RandomPermutationChooser.cc
C++
gpl-2.0
1,389
/* Copyright 2004-2015 Manuel Baptista This file is part of GODESS GODESS 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. GODESS 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 */ #include "odebase.h" #include <string> template <class RHSC,class TY,class TS> runge_kutta_4<RHSC,TY,TS>::runge_kutta_4(RHSC & rhs__, const TY & y0__, const TS & t0__, const TS & dt__): odebase<RHSC,TY,TS>(rhs__,y0__,t0__,dt__) { } template <class RHSC,class TY,class TS> runge_kutta_4<RHSC,TY,TS>::~runge_kutta_4() { } template <class RHSC,class TY,class TS> void runge_kutta_4<RHSC,TY,TS>::iterate() { TY aux1(rhs_(y0_,t0_)); aux1*=dt_; TY aux2(rhs_(y0_+aux1*.5,t0_+.5*dt_)); aux2*=dt_; TY aux3(rhs_(y0_+aux2*.5,t0_+.5*dt_)); aux3*=dt_; TY aux4(rhs_(y0_+aux3,t0_+dt_)); aux4*=dt_; y_=y0_+(aux1+aux2*2.+aux3*2.+aux4)/6.; ++it_; t0_+=dt_; y0_=y_; }
mbaptist/godess
src/runge_kutta_4.C
C++
gpl-2.0
1,440
#!/usr/bin/env python '''# shufflez.py ''' # 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 the <organization> 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 <COPYRIGHT HOLDER> 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. __author__ = ["A'mmer Almadani:Mad_Dev", "sysbase.org"] __email__ = ["mad_dev@linuxmail.org", "mail@sysbase.org"] import random import urllib2 from search import GoogleSearch, SearchError import time from multiprocessing import Process from threading import Timer class shufflez: def __init__(self): self.word_list = 'lists/wordlist.txt' self.websites = 'lists/websites.txt' self.user_agent = 'lists/user_agent.txt' def together(self, *functions): process = [] for function in functions: s = Process(target=function) s.start() process.append(s) for s in process: s.join() def randomize(self, r, typ): '''Return Random List r (range): int typ : word | site | user-agent ''' lst = [] if typ == 'word': list_to_parse = self.word_list elif typ == 'site': list_to_parse = self.websites elif typ == 'user-agent': list_to_parse = self.user_agent a = open(list_to_parse, 'r') for i in a.readlines(): lst.append(i) random.shuffle(lst) if typ == 'site': return map(lambda x:x if 'http://' in x else 'http://' +x, lst)[0:int(r)] else: return lst[0:int(r)] def append_to_list(self, typ, lst): if typ == 'word': l = self.word_list elif typ == 'link': l = self.websites li = open(l, 'a') for i in lst: li.write(i+'\n') li.close() def open_url(self, url, user_agent): try: header = { 'User-Agent' : str(user_agent) } req = urllib2.Request(url, headers=header) response = urllib2.urlopen(req) print 'STATUS', response.getcode() except: pass def google(self, term): links_from_google = [] words_from_google = [] try: gs = GoogleSearch(term) gs.results_per_page = 10 results = gs.get_results() for res in results: words_from_google.append(res.title.encode('utf8')) print '\033[92mGot new words from Google...appending to list\n\033[0m' self.append_to_list('word', words_from_google) links_from_google.append(res.url.encode('utf8')) print '\033[92mGot new link from Google...appending to list\n\033[0m' self.append_to_list('link', links_from_google) except SearchError, e: print "Search failed: %s" % e mask = shufflez() def random_websites(): count = random.randint(1,15) for i, e, in zip(mask.randomize(10, 'site'), mask.randomize(10, 'user-agent')): if count == random.randint(1,15): break else: sleep_time = str(random.randint(1,5)) +'.'+ str(random.randint(1,9)) print 'VISITING', '\033[92m', i , '\033[0m', 'USING', '\033[94m', e, '\033[0m', 'SLEEPING FOR', '\033[95m', sleep_time, 'SECONDS', '\033[0m' time.sleep(float(sleep_time)) mask.open_url(i, e) print '\n' def random_google(): count = random.randint(1,15) for i in mask.randomize(10, 'word'): if count == random.randint(1,15): break else: sleep_time = str(random.randint(1,5)) +'.'+ str(random.randint(1,9)) print 'SEARCHING FOR', '\033[92m', i ,'\033[0m', 'SLEEPING FOR', '\033[95m', sleep_time, 'SECONDS', '\033[0m', '\n' time.sleep(float(sleep_time)) mask.google(i) #while True: # try: # mask.together(random_google(), random_websites()) # except KeyboardInterrupt: # print 'Exit' # break
Logic-gate/shuffelz
shuffelz.py
Python
gpl-2.0
4,742
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('codecompetitions', '0006_auto_20140805_2234'), ] operations = [ migrations.AddField( model_name='problem', name='expected_output', field=models.TextField(default=''), preserve_default=False, ), migrations.AddField( model_name='problem', name='input_data', field=models.TextField(blank=True, null=True), preserve_default=True, ), migrations.AddField( model_name='problem', name='read_from_file', field=models.CharField(blank=True, null=True, max_length=80), preserve_default=True, ), migrations.AddField( model_name='problem', name='time_limit', field=models.PositiveIntegerField(default=5), preserve_default=True, ), ]
baryon5/mercury
codecompetitions/migrations/0007_auto_20140805_2253.py
Python
gpl-2.0
1,067
/* Copyright_License { XCSoar Glide Computer - http://www.xcsoar.org/ Copyright (C) 2000-2011 The XCSoar Project A detailed list of copyright holders can be found in the file "AUTHORS". 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. } */ #include "AircraftStateFilter.hpp" #include "Navigation/Geometry/GeoVector.hpp" #include <assert.h> AircraftStateFilter::AircraftStateFilter(const fixed cutoff_wavelength) :x_diff_filter(fixed_zero), y_diff_filter(fixed_zero), alt_diff_filter(fixed_zero), x_low_pass(cutoff_wavelength), y_low_pass(cutoff_wavelength), alt_low_pass(cutoff_wavelength), x(fixed_zero), y(fixed_zero) {} void AircraftStateFilter::Reset(const AircraftState &state) { last_state = state; x = fixed_zero; y = fixed_zero; v_x = fixed_zero; v_y = fixed_zero; v_alt = fixed_zero; x_low_pass.reset(fixed_zero); y_low_pass.reset(fixed_zero); alt_low_pass.reset(fixed_zero); x_diff_filter.reset(x, fixed_zero); y_diff_filter.reset(y, fixed_zero); alt_diff_filter.reset(state.altitude, fixed_zero); } void AircraftStateFilter::Update(const AircraftState &state) { fixed dt = state.time - last_state.time; if (negative(dt) || dt > fixed(60)) { Reset(state); return; } if (!positive(dt)) return; GeoVector vec(last_state.location, state.location); const fixed MACH_1 = fixed_int_constant(343); if (vec.Distance > fixed(1000) || vec.Distance / dt > MACH_1) { Reset(state); return; } x += vec.Bearing.sin() * vec.Distance; y += vec.Bearing.cos() * vec.Distance; v_x = x_low_pass.update(x_diff_filter.update(x)); v_y = y_low_pass.update(y_diff_filter.update(y)); v_alt = alt_low_pass.update(alt_diff_filter.update(state.altitude)); last_state = state; } fixed AircraftStateFilter::GetSpeed() const { return hypot(v_x, v_y); } Angle AircraftStateFilter::GetBearing() const { return Angle::from_xy(v_y, v_x).as_bearing(); } bool AircraftStateFilter::Design(const fixed cutoff_wavelength) { bool ok = true; ok &= x_low_pass.design(cutoff_wavelength); ok &= y_low_pass.design(cutoff_wavelength); ok &= alt_low_pass.design(cutoff_wavelength); assert(ok); return ok; } AircraftState AircraftStateFilter::GetPredictedState(const fixed &in_time) const { AircraftState state_next = last_state; state_next.ground_speed = GetSpeed(); state_next.vario = GetClimbRate(); state_next.altitude = last_state.altitude + state_next.vario * in_time; state_next.location = GeoVector(state_next.ground_speed * in_time, GetBearing()).end_point(last_state.location); return state_next; }
smurry/XCSoar
src/Engine/Util/AircraftStateFilter.cpp
C++
gpl-2.0
3,293
/* * Copyright (c) 2015 High Tech Kids. All rights reserved * HighTechKids is on the web at: http://www.hightechkids.org * This code is released under GPL; see LICENSE.txt for details. */ package fll.web.report; import java.io.IOException; import java.sql.Connection; import java.sql.SQLException; import java.util.Set; import jakarta.servlet.ServletContext; import jakarta.servlet.ServletException; import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpSession; import javax.sql.DataSource; import fll.Tournament; import fll.db.Queries; import fll.web.ApplicationAttributes; import fll.web.AuthenticationContext; import fll.web.BaseFLLServlet; import fll.web.SessionAttributes; import fll.web.UserRole; import fll.web.WebUtils; /** * Support for and handle the result from promptSummarizeScores.jsp. */ @WebServlet("/report/PromptSummarizeScores") public class PromptSummarizeScores extends BaseFLLServlet { private static final org.apache.logging.log4j.Logger LOGGER = org.apache.logging.log4j.LogManager.getLogger(); /** * Session variable key for the URL to redirect to after score summarization. */ public static final String SUMMARY_REDIRECT_KEY = "summary_redirect"; @Override protected void processRequest(final HttpServletRequest request, final HttpServletResponse response, final ServletContext application, final HttpSession session) throws IOException, ServletException { final AuthenticationContext auth = SessionAttributes.getAuthentication(session); if (!auth.requireRoles(request, response, session, Set.of(UserRole.HEAD_JUDGE), false)) { return; } if (null != request.getParameter("recompute")) { WebUtils.sendRedirect(application, response, "summarizePhase1.jsp"); } else { final String url = SessionAttributes.getAttribute(session, SUMMARY_REDIRECT_KEY, String.class); LOGGER.debug("redirect is {}", url); if (null == url) { WebUtils.sendRedirect(application, response, "index.jsp"); } else { WebUtils.sendRedirect(application, response, url); } } } /** * Check if summary scores need to be updated. If they do, redirect and set * the session variable SUMMARY_REDIRECT to point to * redirect. * * @param response used to send a redirect * @param application the application context * @param session the session context * @param redirect the page to visit once the scores have been summarized * @return if the summary scores need to be updated, the calling method should * return immediately if this is true as a redirect has been executed. */ public static boolean checkIfSummaryUpdated(final HttpServletResponse response, final ServletContext application, final HttpSession session, final String redirect) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("top check if summary updated"); } final AuthenticationContext auth = SessionAttributes.getAuthentication(session); if (!auth.isHeadJudge()) { // only the head judge can summarize scores, so don't prompt others to summarize // the scores return false; } final DataSource datasource = ApplicationAttributes.getDataSource(application); try (Connection connection = datasource.getConnection()) { final int tournamentId = Queries.getCurrentTournament(connection); final Tournament tournament = Tournament.findTournamentByID(connection, tournamentId); if (tournament.checkTournamentNeedsSummaryUpdate(connection)) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("Needs summary update"); } if (null != session.getAttribute(SUMMARY_REDIRECT_KEY)) { LOGGER.debug("redirect has already been set, it must be the case that the user is skipping summarization, allow it"); return false; } else { session.setAttribute(SUMMARY_REDIRECT_KEY, redirect); WebUtils.sendRedirect(application, response, "/report/promptSummarizeScores.jsp"); return true; } } else { if (LOGGER.isTraceEnabled()) { LOGGER.trace("No updated needed"); } return false; } } catch (final SQLException e) { LOGGER.error(e, e); throw new RuntimeException(e); } catch (final IOException e) { LOGGER.error(e, e); throw new RuntimeException(e); } } }
jpschewe/fll-sw
src/main/java/fll/web/report/PromptSummarizeScores.java
Java
gpl-2.0
4,759
<div class="register-login-alert alert hide">Error</div> <div class="row"> <div class="col-md-12"> <div class="content-text"></div> </div> </div> <div class="row"> <div class="col-md-6"> <form role="form" class="register-form" method="POST"> <h3>Register</h3> <div class="form-group"> <input type="text" class="form-control" id="firstname" name="firstname" placeholder="First Name"> </div> <div class="form-group"> <input type="text" class="form-control" id="lastname" name="lastname" placeholder="Last Name"> </div> <div class="form-group"> <input type="email" class="form-control" id="emailaddress" name="emailaddress" placeholder="Enter email"> </div> <div class="form-group"> <input type="text" class="form-control" id="phone" name="phone" placeholder="Phone Number"> </div> <input type="hidden" name="current_action" class="current_action"> <input type="hidden" name="data_post" class="data_post"> <button type="submit" class="btn btn-primary registersend">Sign-up</button> </form> </div> <div class="col-md-6"> <form role="form" class="login-form"> <h3>Login</h3> <div class="form-group"> <input type="text" class="form-control" name="emailaddress" id="emailaddress" placeholder="Email Address"> </div> <div class="form-group"> <input type="password" class="form-control" name="password" id="password" placeholder="Password"> </div> <div class="form-group"> <a href="<?php echo home_url('wp-login.php?action=lostpassword');?>">Forgot password</a> </div> <input type="hidden" name="current_action" class="current_action"> <input type="hidden" name="data_post" class="data_post"> <button type="submit" class="btn btn-primary modal-login">Login</button> </form> <h3>Or</h3> <div class="social-login"> <?php if( !is_user_logged_in() ){ ?> <div class="social-signin"> <div id="status"></div> <?php \MD_Facebook_App::get_instance()->login_button(); ?> </div> <?php } ?> <div class="login-indicator"></div> </div> <p></p> </div> </div>
wp-plugins/wp-real-estate-property-listing-crm
components/signupform/view/form.php
PHP
gpl-2.0
2,080
package exec import ( "bytes" "fmt" "io" "os" osexec "os/exec" "strings" "github.com/zimmski/backup" ) // Combined executes a command with given arguments and returns the combined output func Combined(name string, args ...string) (string, error) { if backup.Verbose { fmt.Fprintln(os.Stderr, "Execute: ", name, strings.Join(args, " ")) } cmd := osexec.Command(name, args...) out, err := cmd.CombinedOutput() return string(out), err } // CombinedWithDirectOutput executes a command with given arguments and prints (to StdOut) and returns the combined output func CombinedWithDirectOutput(name string, args ...string) (string, error) { if backup.Verbose { fmt.Fprintln(os.Stderr, "Execute: ", name, strings.Join(args, " ")) } cmd := osexec.Command(name, args...) var buf bytes.Buffer out := io.MultiWriter(os.Stdout, &buf) cmd.Stderr = out cmd.Stdout = out err := cmd.Run() return buf.String(), err } // Command returns a generic exec command func Command(name string, args ...string) *osexec.Cmd { if backup.Verbose { fmt.Fprintln(os.Stderr, "Execute: ", name, strings.Join(args, " ")) } return osexec.Command(name, args...) }
zimmski/backup
exec/exec.go
GO
gpl-2.0
1,171
package io.github.phantamanta44.botah.core.context; import io.github.phantamanta44.botah.core.rate.RateLimitedChannel; import io.github.phantamanta44.botah.util.MessageUtils; import sx.blah.discord.api.Event; import sx.blah.discord.handle.obj.IChannel; import sx.blah.discord.handle.obj.IGuild; import sx.blah.discord.handle.obj.IMessage; import sx.blah.discord.handle.obj.IUser; import java.lang.reflect.Method; public class GenericEventContext implements IEventContext { private Class<? extends Event> clazz; private long timestamp; private IGuild guild; private IChannel channel; private IUser user; private IMessage msg; public GenericEventContext(Event event) { timestamp = System.currentTimeMillis(); clazz = event.getClass(); Method[] methods = clazz.getMethods(); for (Method m : methods) { try { if (m.getName().equalsIgnoreCase("getUser")) user = (IUser)m.invoke(event); else if (m.getName().equalsIgnoreCase("getChannel")) { channel = new RateLimitedChannel((IChannel)m.invoke(event)); guild = channel.getGuild(); } else if (m.getName().equalsIgnoreCase("getMessage")) { msg = (IMessage)m.invoke(event); user = msg.getAuthor(); channel = new RateLimitedChannel(msg.getChannel()); guild = channel.getGuild(); } } catch (Exception ex) { ex.printStackTrace(); } } } @Override public void sendMessage(String msg) { if (channel != null) MessageUtils.sendMessage(channel, msg); else throw new UnsupportedOperationException(); } @Override public void sendMessage(String format, Object... args) { sendMessage(String.format(format, args)); } @Override public long getTimestamp() { return timestamp; } @Override public Class<? extends Event> getType() { return clazz; } @Override public IGuild getGuild() { return guild; } @Override public IChannel getChannel() { return channel; } @Override public IUser getUser() { return user; } @Override public IMessage getMessage() { return msg; } }
phantamanta44/BotAgainstHumanity
src/main/java/io/github/phantamanta44/botah/core/context/GenericEventContext.java
Java
gpl-2.0
2,047
#include <cln/number.h> #include <cln/io.h> #include <cln/float.h> #include <cln/float_io.h> #include <cln/real.h> #include <cln/random.h> #include <cstdlib> #include <cstring> #include <cln/timing.h> using namespace std; using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); #if 0 uintL len = atoi(argv[1]); extern cl_LF compute_pi_brent_salamin (uintC len); extern cl_LF compute_pi_brent_salamin_quartic (uintC len); extern cl_LF compute_pi_ramanujan_163 (uintC len); extern cl_LF compute_pi_ramanujan_163_fast (uintC len); cl_LF p; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_pi_brent_salamin(len); } } // cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_pi_brent_salamin_quartic(len); } } // cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_pi_ramanujan_163(len); } } // cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_pi_ramanujan_163_fast(len); } } // cout << p << endl; #else // Here the argument is N *decimal* digits, not N*32 bits! int n = atoi(argv[1]); float_format_t prec = float_format(n); cl_F p; cerr << "Computing pi" << endl; { CL_TIMING; p = pi(prec); } cerr << "Converting pi to decimal" << endl; { CL_TIMING; cout << p << endl << endl; } #endif }
ARudik/feelpp.cln
tests/timepi.cc
C++
gpl-2.0
1,530
<?php /** * File containing the eZTSTranslator class. * * @copyright Copyright (C) 1999-2011 eZ Systems AS. All rights reserved. * @license http://ez.no/licenses/gnu_gpl GNU General Public License v2.0 * @version 4.2011 * @package lib * @subpackage i18n */ /** * Provides internationalization using XML (.ts) files * @package lib * @subpackage i18n */ class eZTSTranslator extends eZTranslatorHandler { /** * Constructs the translator and loads the translation file $file if it is set and exists. * @param string $locale * @param string $filename * @param bool $useCache */ function eZTSTranslator( $locale, $filename = null, $useCache = true ) { $this->UseCache = $useCache; if ( isset( $GLOBALS['eZSiteBasics'] ) ) { $siteBasics = $GLOBALS['eZSiteBasics']; if ( isset( $siteBasics['no-cache-adviced'] ) && $siteBasics['no-cache-adviced'] ) $this->UseCache = false; } $this->BuildCache = false; $this->eZTranslatorHandler( true ); $this->Locale = $locale; $this->File = $filename; $this->Messages = array(); $this->CachedMessages = array(); $this->HasRestoredCache = false; $this->RootCache = false; } /** * Initialize the ts translator and context if this is not already done * * @param string $context * @param string $locale * @param string $filename * @param bool $useCache * @return eZTSTranslator */ static function initialize( $context, $locale, $filename, $useCache = true ) { $instance = false; $file = $locale . '/' . $filename; if ( !empty( $GLOBALS['eZTSTranslationTables'][$file] ) ) { $instance = $GLOBALS['eZTSTranslationTables'][$file]; if ( $instance->hasInitializedContext( $context ) ) { return $instance; } } eZDebug::createAccumulatorGroup( 'tstranslator', 'TS translator' ); eZDebug::accumulatorStart( 'tstranslator_init', 'tstranslator', 'TS init' ); if ( !$instance ) { $instance = new eZTSTranslator( $locale, $filename, $useCache ); $GLOBALS['eZTSTranslationTables'][$file] = $instance; $manager = eZTranslatorManager::instance(); $manager->registerHandler( $instance ); } $instance->load( $context ); eZDebug::accumulatorStop( 'tstranslator_init' ); return $instance; } /** * Checks if a context has been initialized (cached) * * @param string $context * @return bool True if the context was initialized before, false if it wasn't */ function hasInitializedContext( $context ) { return isset( $this->CachedMessages[$context] ); } /** * Tries to load the context $requestedContext for the translation and returns true if was successful. * * @param string $requestedContext * @return bool True if load was successful, false otherwise */ function load( $requestedContext ) { return $this->loadTranslationFile( $this->Locale, $this->File, $requestedContext ); } /** * Loads a translation file * Will load from cache if possible, or generate cache if needed * * Also checks for translation files expiry based on mtime if RegionalSettings.TranslationCheckMTime is enabled * * @access private * @param string $locale * @param string $filename * @param string $requestedContext * * @return bool The operation status, true or false */ function loadTranslationFile( $locale, $filename, $requestedContext ) { // First try for current charset $charset = eZTextCodec::internalCharset(); $tsTimeStamp = false; $ini = eZINI::instance(); $checkMTime = $ini->variable( 'RegionalSettings', 'TranslationCheckMTime' ) === 'enabled'; if ( !$this->RootCache ) { $roots = array( $ini->variable( 'RegionalSettings', 'TranslationRepository' ) ); $extensionBase = eZExtension::baseDirectory(); $translationExtensions = $ini->variable( 'RegionalSettings', 'TranslationExtensions' ); foreach ( $translationExtensions as $translationExtension ) { $extensionPath = $extensionBase . '/' . $translationExtension . '/translations'; if ( !$checkMTime || file_exists( $extensionPath ) ) { $roots[] = $extensionPath; } } $this->RootCache = array( 'roots' => $roots ); } else { $roots = $this->RootCache['roots']; if ( isset( $this->RootCache['timestamp'] ) ) $tsTimeStamp = $this->RootCache['timestamp']; } // Load cached translations if possible if ( $this->UseCache == true ) { if ( !$tsTimeStamp ) { $expiry = eZExpiryHandler::instance(); $globalTsTimeStamp = $expiry->getTimestamp( self::EXPIRY_KEY, 0 ); $localeTsTimeStamp = $expiry->getTimestamp( self::EXPIRY_KEY . '-' . $locale, 0 ); $tsTimeStamp = max( $globalTsTimeStamp, $localeTsTimeStamp ); if ( $checkMTime && $tsTimeStamp < time() )// no need if ts == time() { // iterate over each known TS file, and get the highest timestamp // this value will be used to check for cache validity foreach ( $roots as $root ) { $path = eZDir::path( array( $root, $locale, $charset, $filename ) ); if ( file_exists( $path ) ) { $timestamp = filemtime( $path ); if ( $timestamp > $tsTimeStamp ) $tsTimeStamp = $timestamp; } else { $path = eZDir::path( array( $root, $locale, $filename ) ); if ( file_exists( $path ) ) { $timestamp = filemtime( $path ); if ( $timestamp > $tsTimeStamp ) $tsTimeStamp = $timestamp; } } } } $this->RootCache['timestamp'] = $tsTimeStamp; } $key = 'cachecontexts'; if ( $this->HasRestoredCache or eZTranslationCache::canRestoreCache( $key, $tsTimeStamp ) ) { eZDebug::accumulatorStart( 'tstranslator_cache_load', 'tstranslator', 'TS cache load' ); if ( !$this->HasRestoredCache ) { if ( !eZTranslationCache::restoreCache( $key ) ) { $this->BuildCache = true; } $contexts = eZTranslationCache::contextCache( $key ); if ( !is_array( $contexts ) ) $contexts = array(); $this->HasRestoredCache = $contexts; } else $contexts = $this->HasRestoredCache; if ( !$this->BuildCache ) { $contextName = $requestedContext; if ( !isset( $this->CachedMessages[$contextName] ) ) { eZDebug::accumulatorStart( 'tstranslator_context_load', 'tstranslator', 'TS context load' ); if ( eZTranslationCache::canRestoreCache( $contextName, $tsTimeStamp ) ) { if ( !eZTranslationCache::restoreCache( $contextName ) ) { $this->BuildCache = true; } $this->CachedMessages[$contextName] = eZTranslationCache::contextCache( $contextName ); foreach ( $this->CachedMessages[$contextName] as $key => $msg ) { $this->Messages[$key] = $msg; } } eZDebug::accumulatorStop( 'tstranslator_context_load' ); } } eZDebugSetting::writeNotice( 'i18n-tstranslator', "Loading cached translation", __METHOD__ ); eZDebug::accumulatorStop( 'tstranslator_cache_load' ); if ( !$this->BuildCache ) { return true; } } eZDebugSetting::writeNotice( 'i18n-tstranslator', "Translation cache has expired. Will rebuild it from source.", __METHOD__ ); $this->BuildCache = true; } $status = false; // first process country translation files // then process country variation translation files $localeParts = explode( '@', $locale ); $triedPaths = array(); $loadedPaths = array(); $ini = eZINI::instance( "i18n.ini" ); $fallbacks = $ini->variable( 'TranslationSettings', 'FallbackLanguages' ); foreach ( $localeParts as $localePart ) { $localeCodeToProcess = isset( $localeCodeToProcess ) ? $localeCodeToProcess . '@' . $localePart: $localePart; // array with alternative subdirs to check $alternatives = array( array( $localeCodeToProcess, $charset, $filename ), array( $localeCodeToProcess, $filename ), ); if ( isset( $fallbacks[$localeCodeToProcess] ) && $fallbacks[$localeCodeToProcess] ) { if ( $fallbacks[$localeCodeToProcess] === 'eng-GB' ) // Consider eng-GB fallback as "untranslated" since eng-GB does not provide any ts file { $fallbacks[$localeCodeToProcess] = 'untranslated'; } $alternatives[] = array( $fallbacks[$localeCodeToProcess], $charset, $filename ); $alternatives[] = array( $fallbacks[$localeCodeToProcess], $filename ); } foreach ( $roots as $root ) { if ( !file_exists( $root ) ) { continue; } unset( $path ); foreach ( $alternatives as $alternative ) { $pathParts = $alternative; array_unshift( $pathParts, $root ); $pathToTry = eZDir::path( $pathParts ); $triedPaths[] = $pathToTry; if ( file_exists( $pathToTry ) ) { $path = $pathToTry; break; } } if ( !isset( $path ) ) { continue; } eZDebug::accumulatorStart( 'tstranslator_load', 'tstranslator', 'TS load' ); $doc = new DOMDocument( '1.0', 'utf-8' ); $success = $doc->load( $path ); if ( !$success ) { eZDebug::writeWarning( "Unable to load XML from file $path", __METHOD__ ); continue; } if ( !$this->validateDOMTree( $doc ) ) { eZDebug::writeWarning( "XML text for file $path did not validate", __METHOD__ ); continue; } $loadedPaths[] = $path; $status = true; $treeRoot = $doc->documentElement; $children = $treeRoot->childNodes; for ($i = 0; $i < $children->length; $i++ ) { $child = $children->item( $i ); if ( $child->nodeType == XML_ELEMENT_NODE ) { if ( $child->tagName == "context" ) { $this->handleContextNode( $child ); } } } eZDebug::accumulatorStop( 'tstranslator_load' ); } } eZDebugSetting::writeDebug( 'i18n-tstranslator', implode( PHP_EOL, $triedPaths ), __METHOD__ . ': tried paths' ); eZDebugSetting::writeDebug( 'i18n-tstranslator', implode( PHP_EOL, $loadedPaths ), __METHOD__ . ': loaded paths' ); // Save translation cache if ( $this->UseCache == true && $this->BuildCache == true ) { eZDebug::accumulatorStart( 'tstranslator_store_cache', 'tstranslator', 'TS store cache' ); if ( eZTranslationCache::contextCache( 'cachecontexts' ) == null ) { $contexts = array_keys( $this->CachedMessages ); eZTranslationCache::setContextCache( 'cachecontexts', $contexts ); eZTranslationCache::storeCache( 'cachecontexts' ); $this->HasRestoredCache = $contexts; } foreach ( $this->CachedMessages as $contextName => $context ) { if ( eZTranslationCache::contextCache( $contextName ) == null ) eZTranslationCache::setContextCache( $contextName, $context ); eZTranslationCache::storeCache( $contextName ); } $this->BuildCache = false; eZDebug::accumulatorStop( 'tstranslator_store_cache' ); } return $status; } /** * Validates the DOM tree $tree and returns true if it is correct * @param DOMDocument $tree * @return bool True if the DOMDocument is valid, false otherwise */ static function validateDOMTree( $tree ) { if ( !is_object( $tree ) ) return false; $isValid = $tree->RelaxNGValidate( 'schemas/translation/ts.rng' ); return $isValid; } /** * Handles a DOM Context node and the messages it contains * @param DOMNode $context * @return bool */ function handleContextNode( $context ) { $contextName = null; $messages = array(); $context_children = $context->childNodes; for( $i = 0; $i < $context_children->length; $i++ ) { $context_child = $context_children->item( $i ); if ( $context_child->nodeType == XML_ELEMENT_NODE ) { if ( $context_child->tagName == "name" ) { $name_el = $context_child->firstChild; if ( $name_el ) { $contextName = $name_el->nodeValue; } } break; } } if ( !$contextName ) { eZDebug::writeError( "No context name found, skipping context", __METHOD__ ); return false; } foreach( $context_children as $context_child ) { if ( $context_child->nodeType == XML_ELEMENT_NODE ) { $childName = $context_child->tagName; if ( $childName == "message" ) { $this->handleMessageNode( $contextName, $context_child ); } else if ( $childName == "name" ) { /* Skip name tags */ } else { eZDebug::writeError( "Unknown element name: $childName", __METHOD__ ); } } } if ( $contextName === null ) { eZDebug::writeError( "No context name found, skipping context", __METHOD__ ); return false; } if ( !isset( $this->CachedMessages[$contextName] ) ) $this->CachedMessages[$contextName] = array(); return true; } /** * Handles a translation message DOM node * @param string $contextName * @param DOMNode $message */ function handleMessageNode( $contextName, $message ) { $source = null; $translation = null; $comment = null; $message_children = $message->childNodes; for( $i = 0; $i < $message_children->length; $i++ ) { $message_child = $message_children->item( $i ); if ( $message_child->nodeType == XML_ELEMENT_NODE ) { $childName = $message_child->tagName; if ( $childName == "source" ) { if ( $message_child->childNodes->length > 0 ) { $source = ''; foreach ( $message_child->childNodes as $textEl ) { if ( $textEl instanceof DOMText ) { $source .= $textEl->nodeValue; } else if ( $textEl instanceof DOMElement && $textEl->tagName == 'byte' ) { $source .= chr( intval( '0' . $textEl->getAttribute( 'value' ) ) ); } } } } else if ( $childName == "translation" ) { if ( $message_child->childNodes->length > 0 ) { $translation = ''; foreach ( $message_child->childNodes as $textEl ) { if ( $textEl instanceof DOMText ) { $translation .= $textEl->nodeValue; } else if ( $textEl instanceof DOMElement && $textEl->tagName == 'byte' ) { $translation .= chr( intval( '0' . $textEl->getAttribute( 'value' ) ) ); } } } } else if ( $childName == "comment" ) { $comment_el = $message_child->firstChild; $comment = $comment_el->nodeValue; } else if ( $childName == "translatorcomment" ) { //Ignore it. } else if ( $childName == "location" ) { //Handle location element. No functionality yet. } else eZDebug::writeError( "Unknown element name: " . $childName, __METHOD__ ); } } if ( $source === null ) { eZDebug::writeError( "No source name found, skipping message in context '{$contextName}'", __METHOD__ ); return false; } if ( $translation === null ) // No translation provided, then take the source as a reference { // eZDebug::writeError( "No translation, skipping message", __METHOD__ ); $translation = $source; } /* we need to convert ourselves if we're using libxml stuff here */ if ( $message instanceof DOMElement ) { $codec = eZTextCodec::instance( "utf8" ); $source = $codec->convertString( $source ); $translation = $codec->convertString( $translation ); $comment = $codec->convertString( $comment ); } $this->insert( $contextName, $source, $translation, $comment ); return true; } /** * Returns the message that matches a translation md5 key * @param string $key * @return array|false The message, as an array, or false if not found */ function findKey( $key ) { $msg = null; if ( isset( $this->Messages[$key] ) ) { $msg = $this->Messages[$key]; } return $msg; } /** * Returns the message that matches a context / source / comment * @param string $context * @param string $source * @param string $comment * @return array|false The message, as an array, or false if not found */ function findMessage( $context, $source, $comment = null ) { // First try with comment, $man = eZTranslatorManager::instance(); $key = $man->createKey( $context, $source, $comment ); if ( !isset( $this->Messages[$key] ) ) { // then try without comment for general translation $key = $man->createKey( $context, $source ); } return $this->findKey( $key ); } /** * Returns the translation for a translation md5 key * @param string $key * @return string|false */ function keyTranslate( $key ) { $msg = $this->findKey( $key ); if ( $msg !== null ) return $msg["translation"]; else { return null; } } /** * Translates a context + source + comment * @param string $context * @param string $source * @param string $comment * @return string|false */ function translate( $context, $source, $comment = null ) { $msg = $this->findMessage( $context, $source, $comment ); if ( $msg !== null ) { return $msg["translation"]; } return null; } /** * Inserts the translation $translation for the context $context and source $source as a translation message. * Returns the key for the message. If $comment is non-null it will be included in the message. * * If the translation message exists no new message is created and the existing key is returned. * * @param string $context * @param string $source * @param string $translation * @param string $comment * * @return string The translation (md5) key */ function insert( $context, $source, $translation, $comment = null ) { if ( $context == "" ) $context = "default"; $man = eZTranslatorManager::instance(); $key = $man->createKey( $context, $source, $comment ); $msg = $man->createMessage( $context, $source, $comment, $translation ); $msg["key"] = $key; $this->Messages[$key] = $msg; // Set array of messages to be cached if ( $this->UseCache == true && $this->BuildCache == true ) { if ( !isset( $this->CachedMessages[$context] ) ) $this->CachedMessages[$context] = array(); $this->CachedMessages[$context][$key] = $msg; } return $key; } /** * Removes the translation message with context $context and source $source. * * If you have the translation key use removeKey() instead. * * @param string $context * @param string $source * @param string $message * * @return bool true if the message was removed, false otherwise */ function remove( $context, $source, $message = null ) { if ( $context == "" ) $context = "default"; $man = eZTranslatorManager::instance(); $key = $man->createKey( $context, $source, $message ); if ( isset( $this->Messages[$key] ) ) unset( $this->Messages[$key] ); } /** * Removes the translation message with the key $key. * * @param string $key The translation md5 key * * @return bool true if the message was removed, false otherwise */ function removeKey( $key ) { if ( isset( $this->Messages[$key] ) ) unset( $this->Messages[$key] ); } /** * Fetches the list of available translations, as an eZTSTranslator for each translation. * * @param array $localList * * @return array( eZTSTranslator ) list of eZTranslator objects representing available translations */ static function fetchList( $localeList = array() ) { $ini = eZINI::instance(); $dir = $ini->variable( 'RegionalSettings', 'TranslationRepository' ); $fileInfoList = array(); $translationList = array(); $locale = ''; if ( count( $localeList ) == 0 ) { $localeList = eZDir::findSubdirs( $dir ); } foreach( $localeList as $locale ) { if ( $locale != 'untranslated' ) { $translationFiles = eZDir::findSubitems( $dir . '/' . $locale, 'f' ); foreach( $translationFiles as $translationFile ) { if ( eZFile::suffix( $translationFile ) == 'ts' ) { $translationList[] = new eZTSTranslator( $locale, $translationFile ); } } } } return $translationList; } /** * Resets the in-memory translations table * @return void */ static function resetGlobals() { unset( $GLOBALS['eZTSTranslationTables'] ); unset( $GLOBALS['eZTranslationCacheTable'] ); } /** * Expires the translation cache * * @param int $timestamp An optional timestamp cache should be exired from. Current timestamp used by default * @param string $locale Optional translation's locale to expire specifically. Expires global ts cache by default. * * @return void */ public static function expireCache( $timestamp = false, $locale = null ) { eZExpiryHandler::registerShutdownFunction(); if ( $timestamp === false ) $timestamp = time(); $handler = eZExpiryHandler::instance(); if ( $locale ) $handler->setTimestamp( self::EXPIRY_KEY . '-' . $locale, $timestamp ); else $handler->setTimestamp( self::EXPIRY_KEY, $timestamp ); $handler->store(); self::resetGlobals(); } /** * Contains the hash table with message translations * @var array */ public $Messages; public $File; public $UseCache; public $BuildCache; public $CachedMessages; /** * Translation expiry key used by eZExpiryHandler to manage translation caches */ const EXPIRY_KEY = 'ts-translation-cache'; } ?>
imadkaf/lsdoEZ4
lib/ezi18n/classes/eztstranslator.php
PHP
gpl-2.0
27,009
/* $port: miscsettings_menu.cpp,v 1.3 2010/12/05 22:32:12 tuxbox-cvs Exp $ miscsettings_menu implementation - Neutrino-GUI Copyright (C) 2010 T. Graf 'dbt' Homepage: http://www.dbox2-tuning.net/ 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 <global.h> #include <neutrino.h> #include <mymenu.h> #include <neutrino_menue.h> #include <system/setting_helpers.h> #include <system/helpers.h> #include <system/debug.h> #include <gui/miscsettings_menu.h> #include <gui/cec_setup.h> #include <gui/filebrowser.h> #include <gui/keybind_setup.h> #include <gui/plugins.h> #include <gui/sleeptimer.h> #include <gui/zapit_setup.h> #if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE #include <gui/kerneloptions.h> #endif #include <gui/widget/icons.h> #include <gui/widget/stringinput.h> #include <gui/widget/messagebox.h> #include <driver/screen_max.h> #include <driver/scanepg.h> #include <zapit/femanager.h> #include <eitd/sectionsd.h> #include <cs_api.h> #include <video.h> extern CPlugins * g_PluginList; extern cVideo *videoDecoder; CMiscMenue::CMiscMenue() { width = 40; epg_save = NULL; epg_save_standby = NULL; epg_save_frequently = NULL; epg_read = NULL; epg_dir = NULL; } CMiscMenue::~CMiscMenue() { } int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey) { printf("init extended settings menu...\n"); if(parent != NULL) parent->hide(); if(actionKey == "epgdir") { const char *action_str = "epg"; if(chooserDir(g_settings.epg_dir, true, action_str)) CNeutrinoApp::getInstance()->SendSectionsdConfig(); return menu_return::RETURN_REPAINT; } else if(actionKey == "plugin_dir") { const char *action_str = "plugin"; if(chooserDir(g_settings.plugin_hdd_dir, false, action_str)) g_PluginList->loadPlugins(); return menu_return::RETURN_REPAINT; } else if(actionKey == "movieplayer_plugin") { CMenuWidget MoviePluginSelector(LOCALE_MOVIEPLAYER_DEFPLUGIN, NEUTRINO_ICON_FEATURES); MoviePluginSelector.addItem(GenericMenuSeparator); char id[5]; int cnt = 0; int enabled_count = 0; for(unsigned int count=0;count < (unsigned int) g_PluginList->getNumberOfPlugins();count++) { if (!g_PluginList->isHidden(count)) { sprintf(id, "%d", count); enabled_count++; MoviePluginSelector.addItem(new CMenuForwarder(g_PluginList->getName(count), true, NULL, new CMoviePluginChangeExec(), id, CRCInput::convertDigitToKey(count)), (cnt == 0)); cnt++; } } MoviePluginSelector.exec(NULL, ""); return menu_return::RETURN_REPAINT; } else if(actionKey == "info") { unsigned num = CEitManager::getInstance()->getEventsCount(); char str[128]; sprintf(str, "Event count: %d", num); ShowMsg(LOCALE_MESSAGEBOX_INFO, str, CMessageBox::mbrBack, CMessageBox::mbBack); return menu_return::RETURN_REPAINT; } else if(actionKey == "energy") { return showMiscSettingsMenuEnergy(); } else if(actionKey == "channellist") { return showMiscSettingsMenuChanlist(); } return showMiscSettingsMenu(); } #define MISCSETTINGS_FB_DESTINATION_OPTION_COUNT 3 const CMenuOptionChooser::keyval MISCSETTINGS_FB_DESTINATION_OPTIONS[MISCSETTINGS_FB_DESTINATION_OPTION_COUNT] = { { 0, LOCALE_OPTIONS_NULL }, { 1, LOCALE_OPTIONS_SERIAL }, { 2, LOCALE_OPTIONS_FB } }; #define MISCSETTINGS_FILESYSTEM_IS_UTF8_OPTION_COUNT 2 const CMenuOptionChooser::keyval MISCSETTINGS_FILESYSTEM_IS_UTF8_OPTIONS[MISCSETTINGS_FILESYSTEM_IS_UTF8_OPTION_COUNT] = { { 0, LOCALE_FILESYSTEM_IS_UTF8_OPTION_ISO8859_1 }, { 1, LOCALE_FILESYSTEM_IS_UTF8_OPTION_UTF8 } }; #define CHANNELLIST_NEW_ZAP_MODE_OPTION_COUNT 3 const CMenuOptionChooser::keyval CHANNELLIST_NEW_ZAP_MODE_OPTIONS[CHANNELLIST_NEW_ZAP_MODE_OPTION_COUNT] = { { 0, LOCALE_CHANNELLIST_NEW_ZAP_MODE_OFF }, { 1, LOCALE_CHANNELLIST_NEW_ZAP_MODE_ALLOW }, { 2, LOCALE_CHANNELLIST_NEW_ZAP_MODE_ACTIVE } }; #ifdef CPU_FREQ #if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE #define CPU_FREQ_OPTION_COUNT 6 const CMenuOptionChooser::keyval_ext CPU_FREQ_OPTIONS[CPU_FREQ_OPTION_COUNT] = { { 0, LOCALE_CPU_FREQ_DEFAULT, NULL }, { 450, NONEXISTANT_LOCALE, "450 Mhz"}, { 500, NONEXISTANT_LOCALE, "500 Mhz"}, { 550, NONEXISTANT_LOCALE, "550 Mhz"}, { 600, NONEXISTANT_LOCALE, "600 Mhz"}, { 650, NONEXISTANT_LOCALE, "650 Mhz"} }; #define CPU_FREQ_OPTION_STANDBY_COUNT 11 const CMenuOptionChooser::keyval_ext CPU_FREQ_OPTIONS_STANDBY[CPU_FREQ_OPTION_STANDBY_COUNT] = { { 0, LOCALE_CPU_FREQ_DEFAULT, NULL }, { 200, NONEXISTANT_LOCALE, "200 Mhz"}, { 250, NONEXISTANT_LOCALE, "250 Mhz"}, { 300, NONEXISTANT_LOCALE, "300 Mhz"}, { 350, NONEXISTANT_LOCALE, "350 Mhz"}, { 400, NONEXISTANT_LOCALE, "400 Mhz"}, { 450, NONEXISTANT_LOCALE, "450 Mhz"}, { 500, NONEXISTANT_LOCALE, "500 Mhz"}, { 550, NONEXISTANT_LOCALE, "550 Mhz"}, { 600, NONEXISTANT_LOCALE, "600 Mhz"}, { 650, NONEXISTANT_LOCALE, "650 Mhz"} }; #else #define CPU_FREQ_OPTION_COUNT 13 const CMenuOptionChooser::keyval_ext CPU_FREQ_OPTIONS[CPU_FREQ_OPTION_COUNT] = { { 0, LOCALE_CPU_FREQ_DEFAULT, NULL }, { 50, NONEXISTANT_LOCALE, "50 Mhz"}, { 100, NONEXISTANT_LOCALE, "100 Mhz"}, { 150, NONEXISTANT_LOCALE, "150 Mhz"}, { 200, NONEXISTANT_LOCALE, "200 Mhz"}, { 250, NONEXISTANT_LOCALE, "250 Mhz"}, { 300, NONEXISTANT_LOCALE, "300 Mhz"}, { 350, NONEXISTANT_LOCALE, "350 Mhz"}, { 400, NONEXISTANT_LOCALE, "400 Mhz"}, { 450, NONEXISTANT_LOCALE, "450 Mhz"}, { 500, NONEXISTANT_LOCALE, "500 Mhz"}, { 550, NONEXISTANT_LOCALE, "550 Mhz"}, { 600, NONEXISTANT_LOCALE, "600 Mhz"} }; #endif #endif /*CPU_FREQ*/ const CMenuOptionChooser::keyval EPG_SCAN_OPTIONS[] = { { CEpgScan::SCAN_CURRENT, LOCALE_MISCSETTINGS_EPG_SCAN_BQ }, { CEpgScan::SCAN_FAV, LOCALE_MISCSETTINGS_EPG_SCAN_FAV }, { CEpgScan::SCAN_SEL, LOCALE_MISCSETTINGS_EPG_SCAN_SEL } }; #define EPG_SCAN_OPTION_COUNT (sizeof(EPG_SCAN_OPTIONS)/sizeof(CMenuOptionChooser::keyval)) const CMenuOptionChooser::keyval EPG_SCAN_MODE_OPTIONS[] = { { CEpgScan::MODE_OFF, LOCALE_OPTIONS_OFF }, { CEpgScan::MODE_STANDBY, LOCALE_MISCSETTINGS_EPG_SCAN_STANDBY }, { CEpgScan::MODE_LIVE, LOCALE_MISCSETTINGS_EPG_SCAN_LIVE }, { CEpgScan::MODE_ALWAYS, LOCALE_MISCSETTINGS_EPG_SCAN_ALWAYS } }; #define EPG_SCAN_MODE_OPTION_COUNT (sizeof(EPG_SCAN_MODE_OPTIONS)/sizeof(CMenuOptionChooser::keyval)) #define SLEEPTIMER_MIN_OPTION_COUNT 7 const CMenuOptionChooser::keyval_ext SLEEPTIMER_MIN_OPTIONS[SLEEPTIMER_MIN_OPTION_COUNT] = { { 0, NONEXISTANT_LOCALE, "EPG" }, { 30, NONEXISTANT_LOCALE, "30 min" }, { 60, NONEXISTANT_LOCALE, "60 min" }, { 90, NONEXISTANT_LOCALE, "90 min" }, { 120, NONEXISTANT_LOCALE, "120 min" }, { 150, NONEXISTANT_LOCALE, "150 min" } }; //show misc settings menue int CMiscMenue::showMiscSettingsMenu() { //misc settings fanNotifier = new CFanControlNotifier(); sectionsdConfigNotifier = new CSectionsdConfigNotifier(); CMenuWidget misc_menue(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP); misc_menue.addIntroItems(LOCALE_MISCSETTINGS_HEAD); //general CMenuWidget misc_menue_general(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP_GENERAL); showMiscSettingsMenuGeneral(&misc_menue_general); CMenuForwarder * mf = new CMenuForwarder(LOCALE_MISCSETTINGS_GENERAL, true, NULL, &misc_menue_general, NULL, CRCInput::RC_red); mf->setHint("", LOCALE_MENU_HINT_MISC_GENERAL); misc_menue.addItem(mf); //energy, shutdown if (g_info.hw_caps->can_shutdown) { mf = new CMenuForwarder(LOCALE_MISCSETTINGS_ENERGY, true, NULL, this, "energy", CRCInput::RC_green); mf->setHint("", LOCALE_MENU_HINT_MISC_ENERGY); misc_menue.addItem(mf); } //epg CMenuWidget misc_menue_epg(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP_EPG); showMiscSettingsMenuEpg(&misc_menue_epg); mf = new CMenuForwarder(LOCALE_MISCSETTINGS_EPG_HEAD, true, NULL, &misc_menue_epg, NULL, CRCInput::RC_yellow); mf->setHint("", LOCALE_MENU_HINT_MISC_EPG); misc_menue.addItem(mf); //filebrowser settings CMenuWidget misc_menue_fbrowser(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP_FILEBROWSER); showMiscSettingsMenuFBrowser(&misc_menue_fbrowser); mf = new CMenuForwarder(LOCALE_FILEBROWSER_HEAD, true, NULL, &misc_menue_fbrowser, NULL, CRCInput::RC_blue); mf->setHint("", LOCALE_MENU_HINT_MISC_FILEBROWSER); misc_menue.addItem(mf); misc_menue.addItem(GenericMenuSeparatorLine); //cec settings CCECSetup cecsetup; if (g_info.hw_caps->can_cec) { mf = new CMenuForwarder(LOCALE_VIDEOMENU_HDMI_CEC, true, NULL, &cecsetup, NULL, CRCInput::RC_1); mf->setHint("", LOCALE_MENU_HINT_MISC_CEC); misc_menue.addItem(mf); } if (!g_info.hw_caps->can_shutdown) { /* we don't have the energy menu, but put the sleeptimer directly here */ mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, NULL, new CSleepTimerWidget(true)); mf->setHint("", LOCALE_MENU_HINT_INACT_TIMER); misc_menue.addItem(mf); } //channellist mf = new CMenuForwarder(LOCALE_MISCSETTINGS_CHANNELLIST, true, NULL, this, "channellist", CRCInput::RC_2); mf->setHint("", LOCALE_MENU_HINT_MISC_CHANNELLIST); misc_menue.addItem(mf); //start channels CZapitSetup zapitsetup; mf = new CMenuForwarder(LOCALE_ZAPITSETUP_HEAD, true, NULL, &zapitsetup, NULL, CRCInput::RC_3); mf->setHint("", LOCALE_MENU_HINT_MISC_ZAPIT); misc_menue.addItem(mf); #ifdef CPU_FREQ //CPU CMenuWidget misc_menue_cpu(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width); showMiscSettingsMenuCPUFreq(&misc_menue_cpu); mf = new CMenuForwarder(LOCALE_MISCSETTINGS_CPU, true, NULL, &misc_menue_cpu, NULL, CRCInput::RC_4); mf->setHint("", LOCALE_MENU_HINT_MISC_CPUFREQ); misc_menue.addItem(mf); #endif /*CPU_FREQ*/ #if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE // kerneloptions CKernelOptions kernelOptions; mf = new CMenuForwarder(LOCALE_KERNELOPTIONS_HEAD, true, NULL, &kernelOptions, NULL, CRCInput::RC_5); mf->setHint("", LOCALE_MENU_HINT_MISC_KERNELOPTIONS); misc_menue.addItem(mf); #endif int res = misc_menue.exec(NULL, ""); delete fanNotifier; delete sectionsdConfigNotifier; return res; } const CMenuOptionChooser::keyval DEBUG_MODE_OPTIONS[DEBUG_MODES] = { { DEBUG_NORMAL , LOCALE_DEBUG_LEVEL_1 }, { DEBUG_INFO , LOCALE_DEBUG_LEVEL_2 }, { DEBUG_DEBUG , LOCALE_DEBUG_LEVEL_3 } }; //general settings void CMiscMenue::showMiscSettingsMenuGeneral(CMenuWidget *ms_general) { ms_general->addIntroItems(LOCALE_MISCSETTINGS_GENERAL); //standby after boot CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_EXTRA_START_TOSTANDBY, &g_settings.power_standby, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_START_TOSTANDBY); ms_general->addItem(mc); mc = new CMenuOptionChooser(LOCALE_EXTRA_CACHE_TXT, (int *)&g_settings.cacheTXT, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_CACHE_TXT); ms_general->addItem(mc); //fan speed if (g_info.has_fan) { #if defined (BOXMODEL_IPBOX9900) || defined (BOXMODEL_IPBOX99) CMenuOptionNumberChooser * mn = new CMenuOptionNumberChooser(LOCALE_FAN_SPEED, &g_settings.fan_speed, true, 0, 1, fanNotifier, CRCInput::RC_nokey, NULL, 0, 0, LOCALE_OPTIONS_OFF); #else CMenuOptionNumberChooser * mn = new CMenuOptionNumberChooser(LOCALE_FAN_SPEED, &g_settings.fan_speed, true, 1, 14, fanNotifier, CRCInput::RC_nokey, NULL, 0, 0, LOCALE_OPTIONS_OFF); #endif mn->setHint("", LOCALE_MENU_HINT_FAN_SPEED); ms_general->addItem(mn); } ms_general->addItem(GenericMenuSeparatorLine); CMenuForwarder * mf = new CMenuForwarder(LOCALE_PLUGINS_HDD_DIR, true, g_settings.plugin_hdd_dir, this, "plugin_dir"); mf->setHint("", LOCALE_MENU_HINT_PLUGINS_HDD_DIR); ms_general->addItem(mf); mf = new CMenuForwarder(LOCALE_MPKEY_PLUGIN, true, g_settings.movieplayer_plugin, this, "movieplayer_plugin"); mf->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_PLUGIN); ms_general->addItem(mf); //set debug level ms_general->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_DEBUG)); CMenuOptionChooser * md = new CMenuOptionChooser(LOCALE_DEBUG_LEVEL, &debug, DEBUG_MODE_OPTIONS, DEBUG_MODES, true); // mc->setHint("", LOCALE_MENU_HINT_START_TOSTANDBY); ms_general->addItem(md); } #define VIDEOMENU_HDMI_CEC_MODE_OPTION_COUNT 2 const CMenuOptionChooser::keyval VIDEOMENU_HDMI_CEC_MODE_OPTIONS[VIDEOMENU_HDMI_CEC_MODE_OPTION_COUNT] = { { VIDEO_HDMI_CEC_MODE_OFF , LOCALE_OPTIONS_OFF }, { VIDEO_HDMI_CEC_MODE_TUNER , LOCALE_OPTIONS_ON } }; //energy and shutdown settings int CMiscMenue::showMiscSettingsMenuEnergy() { CMenuWidget *ms_energy = new CMenuWidget(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP_ENERGY); ms_energy->addIntroItems(LOCALE_MISCSETTINGS_ENERGY); CMenuOptionChooser *m1 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL_RCDELAY, &g_settings.shutdown_real_rcdelay, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, !g_settings.shutdown_real); m1->setHint("", LOCALE_MENU_HINT_SHUTDOWN_RCDELAY); std::string shutdown_count = to_string(g_settings.shutdown_count); if (shutdown_count.length() < 3) shutdown_count.insert(0, 3 - shutdown_count.length(), ' '); CStringInput * miscSettings_shutdown_count = new CStringInput(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, &shutdown_count, 3, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT2, "0123456789 "); CMenuForwarder *m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, !g_settings.shutdown_real, shutdown_count, miscSettings_shutdown_count); m2->setHint("", LOCALE_MENU_HINT_SHUTDOWN_COUNT); COnOffNotifier * miscNotifier = new COnOffNotifier(1); miscNotifier->addItem(m1); miscNotifier->addItem(m2); CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL, &g_settings.shutdown_real, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, miscNotifier); mc->setHint("", LOCALE_MENU_HINT_SHUTDOWN_REAL); ms_energy->addItem(mc); ms_energy->addItem(m1); ms_energy->addItem(m2); m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SLEEPTIMER, true, NULL, new CSleepTimerWidget(true)); m2->setHint("", LOCALE_MENU_HINT_INACT_TIMER); ms_energy->addItem(m2); CMenuOptionChooser * m4 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SLEEPTIMER_MIN, &g_settings.sleeptimer_min, SLEEPTIMER_MIN_OPTIONS, SLEEPTIMER_MIN_OPTION_COUNT, true); m4->setHint("", LOCALE_MENU_HINT_SLEEPTIMER_MIN); ms_energy->addItem(m4); int res = ms_energy->exec(NULL, ""); g_settings.shutdown_count = atoi(shutdown_count.c_str()); delete ms_energy; delete miscNotifier; return res; } //EPG settings void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg) { ms_epg->addIntroItems(LOCALE_MISCSETTINGS_EPG_HEAD); ms_epg->addKey(CRCInput::RC_info, this, "info"); epg_save = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE, &g_settings.epg_save, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); epg_save->setHint("", LOCALE_MENU_HINT_EPG_SAVE); epg_save_standby = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE_STANDBY, &g_settings.epg_save_standby, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.epg_save); epg_save_standby->setHint("", LOCALE_MENU_HINT_EPG_SAVE_STANDBY); epg_save_frequently = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE_FREQUENTLY, &g_settings.epg_save_frequently, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.epg_save, sectionsdConfigNotifier); epg_save_frequently->setHint("", LOCALE_MENU_HINT_EPG_SAVE_FREQUENTLY); epg_read = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_READ, &g_settings.epg_read, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); epg_read->setHint("", LOCALE_MENU_HINT_EPG_READ); epg_dir = new CMenuForwarder(LOCALE_MISCSETTINGS_EPG_DIR, (g_settings.epg_save || g_settings.epg_read), g_settings.epg_dir, this, "epgdir"); epg_dir->setHint("", LOCALE_MENU_HINT_EPG_DIR); epg_cache = to_string(g_settings.epg_cache); if (epg_cache.length() < 2) epg_cache.insert(0, 2 - epg_cache.length(), ' '); CStringInput * miscSettings_epg_cache = new CStringInput(LOCALE_MISCSETTINGS_EPG_CACHE, &epg_cache, 2,LOCALE_MISCSETTINGS_EPG_CACHE_HINT1, LOCALE_MISCSETTINGS_EPG_CACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier); CMenuForwarder * mf = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_CACHE, true, epg_cache, miscSettings_epg_cache); mf->setHint("", LOCALE_MENU_HINT_EPG_CACHE); epg_extendedcache = to_string(g_settings.epg_extendedcache); if (epg_extendedcache.length() < 3) epg_extendedcache.insert(0, 3 - epg_extendedcache.length(), ' '); CStringInput * miscSettings_epg_cache_e = new CStringInput(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, &epg_extendedcache, 3,LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT1, LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier); CMenuForwarder * mf1 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, true, epg_extendedcache, miscSettings_epg_cache_e); mf1->setHint("", LOCALE_MENU_HINT_EPG_EXTENDEDCACHE); epg_old_events = to_string(g_settings.epg_old_events); if (epg_old_events.length() < 3) epg_old_events.insert(0, 3 - epg_old_events.length(), ' '); CStringInput * miscSettings_epg_old_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, &epg_old_events, 3,LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier); CMenuForwarder * mf2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, true, epg_old_events, miscSettings_epg_old_events); mf2->setHint("", LOCALE_MENU_HINT_EPG_OLD_EVENTS); epg_max_events = to_string(g_settings.epg_max_events); if (epg_max_events.length() < 6) epg_max_events.insert(0, 6 - epg_max_events.length(), ' '); CStringInput * miscSettings_epg_max_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, &epg_max_events, 6,LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier); CMenuForwarder * mf3 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, true, epg_max_events, miscSettings_epg_max_events); mf3->setHint("", LOCALE_MENU_HINT_EPG_MAX_EVENTS); epg_scan = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SCAN_BOUQUETS, &g_settings.epg_scan, EPG_SCAN_OPTIONS, EPG_SCAN_OPTION_COUNT, g_settings.epg_scan_mode != CEpgScan::MODE_OFF && g_settings.epg_save_mode == 0); epg_scan->setHint("", LOCALE_MENU_HINT_EPG_SCAN); CMenuOptionChooser * mc3 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SCAN, &g_settings.epg_scan_mode, EPG_SCAN_MODE_OPTIONS, CFEManager::getInstance()->getEnabledCount() > 1 ? EPG_SCAN_MODE_OPTION_COUNT : 2, true, this); mc3->setHint("", LOCALE_MENU_HINT_EPG_SCAN_MODE); CMenuOptionChooser * mc4 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE_MODE, &g_settings.epg_save_mode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); mc4->setHint("", LOCALE_MENU_HINT_EPG_SAVE_MODE); ms_epg->addItem(epg_save); ms_epg->addItem(epg_save_standby); ms_epg->addItem(epg_save_frequently); ms_epg->addItem(epg_read); ms_epg->addItem(epg_dir); ms_epg->addItem(GenericMenuSeparatorLine); ms_epg->addItem(mf); ms_epg->addItem(mf1); ms_epg->addItem(mf2); ms_epg->addItem(mf3); ms_epg->addItem(mc4); ms_epg->addItem(GenericMenuSeparatorLine); ms_epg->addItem(mc3); ms_epg->addItem(epg_scan); } //filebrowser settings void CMiscMenue::showMiscSettingsMenuFBrowser(CMenuWidget *ms_fbrowser) { ms_fbrowser->addIntroItems(LOCALE_FILEBROWSER_HEAD); CMenuOptionChooser * mc; mc = new CMenuOptionChooser(LOCALE_FILESYSTEM_IS_UTF8 , &g_settings.filesystem_is_utf8 , MISCSETTINGS_FILESYSTEM_IS_UTF8_OPTIONS, MISCSETTINGS_FILESYSTEM_IS_UTF8_OPTION_COUNT, true ); mc->setHint("", LOCALE_MENU_HINT_FILESYSTEM_IS_UTF8); ms_fbrowser->addItem(mc); mc = new CMenuOptionChooser(LOCALE_FILEBROWSER_SHOWRIGHTS , &g_settings.filebrowser_showrights , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ); mc->setHint("", LOCALE_MENU_HINT_FILEBROWSER_SHOWRIGHTS); ms_fbrowser->addItem(mc); mc = new CMenuOptionChooser(LOCALE_FILEBROWSER_DENYDIRECTORYLEAVE, &g_settings.filebrowser_denydirectoryleave, MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ); mc->setHint("", LOCALE_MENU_HINT_FILEBROWSER_DENYDIRECTORYLEAVE); ms_fbrowser->addItem(mc); } //channellist int CMiscMenue::showMiscSettingsMenuChanlist() { CMenuWidget * ms_chanlist = new CMenuWidget(LOCALE_MISCSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP_CHANNELLIST); ms_chanlist->addIntroItems(LOCALE_MISCSETTINGS_CHANNELLIST); bool make_hd_list = g_settings.make_hd_list; bool make_webtv_list = g_settings.make_webtv_list; bool show_empty_favorites = g_settings.show_empty_favorites; CMenuOptionChooser * mc; mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_MAKE_HDLIST , &g_settings.make_hd_list , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_MAKE_HDLIST); ms_chanlist->addItem(mc); mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_MAKE_WEBTVLIST , &g_settings.make_webtv_list , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_MAKE_WEBTVLIST); ms_chanlist->addItem(mc); mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_MAKE_NEWLIST, &g_settings.make_new_list , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_MAKE_NEWLIST); ms_chanlist->addItem(mc); mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_MAKE_REMOVEDLIST, &g_settings.make_removed_list , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_MAKE_REMOVEDLIST); ms_chanlist->addItem(mc); mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_KEEP_NUMBERS, &g_settings.keep_channel_numbers , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_KEEP_NUMBERS); ms_chanlist->addItem(mc); mc = new CMenuOptionChooser(LOCALE_EXTRA_ZAP_CYCLE , &g_settings.zap_cycle , OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_ZAP_CYCLE); ms_chanlist->addItem(mc); mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_NEW_ZAP_MODE, &g_settings.channellist_new_zap_mode, CHANNELLIST_NEW_ZAP_MODE_OPTIONS, CHANNELLIST_NEW_ZAP_MODE_OPTION_COUNT, true ); mc->setHint("", LOCALE_MENU_HINT_NEW_ZAP_MODE); ms_chanlist->addItem(mc); mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_NUMERIC_ADJUST, &g_settings.channellist_numeric_adjust, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_NUMERIC_ADJUST); ms_chanlist->addItem(mc); mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_SHOW_EMPTY_FAVS, &g_settings.show_empty_favorites, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SHOW_EMPTY_FAVS); ms_chanlist->addItem(mc); int res = ms_chanlist->exec(NULL, ""); delete ms_chanlist; if (make_hd_list != g_settings.make_hd_list || make_webtv_list != g_settings.make_webtv_list || show_empty_favorites != g_settings.show_empty_favorites) g_RCInput->postMsg(NeutrinoMessages::EVT_SERVICESCHANGED, 0); return res; } #ifdef CPU_FREQ //CPU void CMiscMenue::showMiscSettingsMenuCPUFreq(CMenuWidget *ms_cpu) { ms_cpu->addIntroItems(LOCALE_MISCSETTINGS_CPU); CCpuFreqNotifier * cpuNotifier = new CCpuFreqNotifier(); ms_cpu->addItem(new CMenuOptionChooser(LOCALE_CPU_FREQ_NORMAL, &g_settings.cpufreq, CPU_FREQ_OPTIONS, CPU_FREQ_OPTION_COUNT, true, cpuNotifier)); #if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE ms_cpu->addItem(new CMenuOptionChooser(LOCALE_CPU_FREQ_STANDBY, &g_settings.standby_cpufreq, CPU_FREQ_OPTIONS_STANDBY, CPU_FREQ_OPTION_STANDBY_COUNT, true)); #else ms_cpu->addItem(new CMenuOptionChooser(LOCALE_CPU_FREQ_STANDBY, &g_settings.standby_cpufreq, CPU_FREQ_OPTIONS, CPU_FREQ_OPTION_COUNT, true)); #endif } #endif /*CPU_FREQ*/ bool CMiscMenue::changeNotify(const neutrino_locale_t OptionName, void * /*data*/) { int ret = menu_return::RETURN_NONE; if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_HDMI_CEC)) { printf("[neutrino CEC Settings] %s set CEC settings...\n", __FUNCTION__); g_settings.hdmi_cec_standby = 0; g_settings.hdmi_cec_view_on = 0; if (g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF) { g_settings.hdmi_cec_standby = 1; g_settings.hdmi_cec_view_on = 1; g_settings.hdmi_cec_mode = VIDEO_HDMI_CEC_MODE_TUNER; } videoDecoder->SetCECAutoStandby(g_settings.hdmi_cec_standby == 1); videoDecoder->SetCECAutoView(g_settings.hdmi_cec_view_on == 1); videoDecoder->SetCECMode((VIDEO_HDMI_CEC_MODE)g_settings.hdmi_cec_mode); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_SAVE)) { if (g_settings.epg_save) g_settings.epg_read = true; epg_save_standby->setActive(g_settings.epg_save); epg_save_frequently->setActive(g_settings.epg_save); epg_dir->setActive(g_settings.epg_save || g_settings.epg_read); CNeutrinoApp::getInstance()->SendSectionsdConfig(); ret = menu_return::RETURN_REPAINT; } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_READ)) { epg_dir->setActive(g_settings.epg_save || g_settings.epg_read); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_SCAN)) { epg_scan->setActive(g_settings.epg_scan_mode != CEpgScan::MODE_OFF && g_settings.epg_save_mode == 0); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_SAVE_MODE)) { g_settings.epg_scan = CEpgScan::SCAN_FAV; epg_scan->setActive(g_settings.epg_scan_mode != CEpgScan::MODE_OFF && g_settings.epg_save_mode == 0); ret = menu_return::RETURN_REPAINT; } return ret; }
lexandr0s/nmp-sdl
src/gui/miscsettings_menu.cpp
C++
gpl-2.0
26,742
# Copyright (C) 2009 Jeremy S. Sanders # Email: Jeremy Sanders <jeremy@jeremysanders.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, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ############################################################################## """A paint engine to produce EMF exports. Requires: PyQt-x11-gpl-4.6-snapshot-20090906.tar.gz sip-4.9-snapshot-20090906.tar.gz pyemf """ import struct import pyemf from .. import qtall as qt inch_mm = 25.4 scale = 100 def isStockObject(obj): """Is this a stock windows object.""" return (obj & 0x80000000) != 0 class _EXTCREATEPEN(pyemf._EMR._EXTCREATEPEN): """Extended pen creation record with custom line style.""" typedef = [ ('i','handle',0), ('i','offBmi',0), ('i','cbBmi',0), ('i','offBits',0), ('i','cbBits',0), ('i','style'), ('i','penwidth'), ('i','brushstyle'), ('i','color'), ('i','brushhatch',0), ('i','numstyleentries') ] def __init__(self, style=pyemf.PS_SOLID, width=1, color=0, styleentries=[]): """Create pen. styleentries is a list of dash and space lengths.""" pyemf._EMR._EXTCREATEPEN.__init__(self) self.style = style self.penwidth = width self.color = pyemf._normalizeColor(color) self.brushstyle = 0x0 # solid if style & pyemf.PS_STYLE_MASK != pyemf.PS_USERSTYLE: styleentries = [] self.numstyleentries = len(styleentries) if styleentries: self.unhandleddata = struct.pack( "i"*self.numstyleentries, *styleentries) def hasHandle(self): return True class EMFPaintEngine(qt.QPaintEngine): """Custom EMF paint engine.""" def __init__(self, width_in, height_in, dpi=75): qt.QPaintEngine.__init__( self, qt.QPaintEngine.Antialiasing | qt.QPaintEngine.PainterPaths | qt.QPaintEngine.PrimitiveTransform | qt.QPaintEngine.PaintOutsidePaintEvent | qt.QPaintEngine.PatternBrush ) self.width = width_in self.height = height_in self.dpi = dpi def begin(self, paintdevice): self.emf = pyemf.EMF(self.width, self.height, int(self.dpi*scale)) self.pen = self.emf.GetStockObject(pyemf.BLACK_PEN) self.pencolor = (0, 0, 0) self.brush = self.emf.GetStockObject(pyemf.NULL_BRUSH) self.paintdevice = paintdevice return True def drawLines(self, lines): """Draw lines to emf output.""" for line in lines: self.emf.Polyline( [ (int(line.x1()*scale), int(line.y1()*scale)), (int(line.x2()*scale), int(line.y2()*scale)) ] ) def drawPolygon(self, points, mode): """Draw polygon on output.""" # print "Polygon" pts = [(int(p.x()*scale), int(p.y()*scale)) for p in points] if mode == qt.QPaintEngine.PolylineMode: self.emf.Polyline(pts) else: self.emf.SetPolyFillMode({ qt.QPaintEngine.WindingMode: pyemf.WINDING, qt.QPaintEngine.OddEvenMode: pyemf.ALTERNATE, qt.QPaintEngine.ConvexMode: pyemf.WINDING }) self.emf.Polygon(pts) def drawEllipse(self, rect): """Draw an ellipse.""" # print "ellipse" args = ( int(rect.left()*scale), int(rect.top()*scale), int(rect.right()*scale), int(rect.bottom()*scale), int(rect.left()*scale), int(rect.top()*scale), int(rect.left()*scale), int(rect.top()*scale), ) self.emf.Pie(*args) self.emf.Arc(*args) def drawPoints(self, points): """Draw points.""" # print "points" for pt in points: x, y = (pt.x()-0.5)*scale, (pt.y()-0.5)*scale self.emf.Pie( int(x), int(y), int((pt.x()+0.5)*scale), int((pt.y()+0.5)*scale), int(x), int(y), int(x), int(y) ) def drawPixmap(self, r, pixmap, sr): """Draw pixmap to display.""" # convert pixmap to BMP format bytearr = qt.QByteArray() buf = qt.QBuffer(bytearr) buf.open(qt.QIODevice.WriteOnly) pixmap.save(buf, "BMP") # chop off bmp header to get DIB bmp = bytes(buf.data()) dib = bmp[0xe:] hdrsize, = struct.unpack('<i', bmp[0xe:0x12]) dataindex, = struct.unpack('<i', bmp[0xa:0xe]) datasize, = struct.unpack('<i', bmp[0x22:0x26]) epix = pyemf._EMR._STRETCHDIBITS() epix.rclBounds_left = int(r.left()*scale) epix.rclBounds_top = int(r.top()*scale) epix.rclBounds_right = int(r.right()*scale) epix.rclBounds_bottom = int(r.bottom()*scale) epix.xDest = int(r.left()*scale) epix.yDest = int(r.top()*scale) epix.cxDest = int(r.width()*scale) epix.cyDest = int(r.height()*scale) epix.xSrc = int(sr.left()) epix.ySrc = int(sr.top()) epix.cxSrc = int(sr.width()) epix.cySrc = int(sr.height()) epix.dwRop = 0xcc0020 # SRCCOPY offset = epix.format.minstructsize + 8 epix.offBmiSrc = offset epix.cbBmiSrc = hdrsize epix.offBitsSrc = offset + dataindex - 0xe epix.cbBitsSrc = datasize epix.iUsageSrc = 0x0 # DIB_RGB_COLORS epix.unhandleddata = dib self.emf._append(epix) def _createPath(self, path): """Convert qt path to emf path""" self.emf.BeginPath() count = path.elementCount() i = 0 #print "Start path" while i < count: e = path.elementAt(i) if e.type == qt.QPainterPath.MoveToElement: self.emf.MoveTo( int(e.x*scale), int(e.y*scale) ) #print "M", e.x*scale, e.y*scale elif e.type == qt.QPainterPath.LineToElement: self.emf.LineTo( int(e.x*scale), int(e.y*scale) ) #print "L", e.x*scale, e.y*scale elif e.type == qt.QPainterPath.CurveToElement: e1 = path.elementAt(i+1) e2 = path.elementAt(i+2) params = ( ( int(e.x*scale), int(e.y*scale) ), ( int(e1.x*scale), int(e1.y*scale) ), ( int(e2.x*scale), int(e2.y*scale) ), ) self.emf.PolyBezierTo(params) #print "C", params i += 2 else: assert False i += 1 ef = path.elementAt(0) el = path.elementAt(count-1) if ef.x == el.x and ef.y == el.y: self.emf.CloseFigure() #print "closing" self.emf.EndPath() def drawPath(self, path): """Draw a path on the output.""" # print "path" self._createPath(path) self.emf.StrokeAndFillPath() def drawTextItem(self, pt, textitem): """Convert text to a path and draw it. """ # print "text", pt, textitem.text() path = qt.QPainterPath() path.addText(pt, textitem.font(), textitem.text()) fill = self.emf.CreateSolidBrush(self.pencolor) self.emf.SelectObject(fill) self._createPath(path) self.emf.FillPath() self.emf.SelectObject(self.brush) self.emf.DeleteObject(fill) def end(self): return True def saveFile(self, filename): self.emf.save(filename) def _updatePen(self, pen): """Update the pen to the currently selected one.""" # line style style = { qt.Qt.NoPen: pyemf.PS_NULL, qt.Qt.SolidLine: pyemf.PS_SOLID, qt.Qt.DashLine: pyemf.PS_DASH, qt.Qt.DotLine: pyemf.PS_DOT, qt.Qt.DashDotLine: pyemf.PS_DASHDOT, qt.Qt.DashDotDotLine: pyemf.PS_DASHDOTDOT, qt.Qt.CustomDashLine: pyemf.PS_USERSTYLE, }[pen.style()] if style != pyemf.PS_NULL: # set cap style style |= { qt.Qt.FlatCap: pyemf.PS_ENDCAP_FLAT, qt.Qt.SquareCap: pyemf.PS_ENDCAP_SQUARE, qt.Qt.RoundCap: pyemf.PS_ENDCAP_ROUND, }[pen.capStyle()] # set join style style |= { qt.Qt.MiterJoin: pyemf.PS_JOIN_MITER, qt.Qt.BevelJoin: pyemf.PS_JOIN_BEVEL, qt.Qt.RoundJoin: pyemf.PS_JOIN_ROUND, qt.Qt.SvgMiterJoin: pyemf.PS_JOIN_MITER, }[pen.joinStyle()] # use proper widths of lines style |= pyemf.PS_GEOMETRIC width = int(pen.widthF()*scale) qc = pen.color() color = (qc.red(), qc.green(), qc.blue()) self.pencolor = color if pen.style() == qt.Qt.CustomDashLine: # make an extended pen if we need a custom dash pattern dash = [int(pen.widthF()*scale*f) for f in pen.dashPattern()] newpen = self.emf._appendHandle( _EXTCREATEPEN( style, width=width, color=color, styleentries=dash)) else: # use a standard create pen newpen = self.emf.CreatePen(style, width, color) self.emf.SelectObject(newpen) # delete old pen if it is not a stock object if not isStockObject(self.pen): self.emf.DeleteObject(self.pen) self.pen = newpen def _updateBrush(self, brush): """Update to selected brush.""" style = brush.style() qc = brush.color() color = (qc.red(), qc.green(), qc.blue()) # print "brush", color if style == qt.Qt.SolidPattern: newbrush = self.emf.CreateSolidBrush(color) elif style == qt.Qt.NoBrush: newbrush = self.emf.GetStockObject(pyemf.NULL_BRUSH) else: try: hatch = { qt.Qt.HorPattern: pyemf.HS_HORIZONTAL, qt.Qt.VerPattern: pyemf.HS_VERTICAL, qt.Qt.CrossPattern: pyemf.HS_CROSS, qt.Qt.BDiagPattern: pyemf.HS_BDIAGONAL, qt.Qt.FDiagPattern: pyemf.HS_FDIAGONAL, qt.Qt.DiagCrossPattern: pyemf.HS_DIAGCROSS }[brush.style()] except KeyError: newbrush = self.emf.CreateSolidBrush(color) else: newbrush = self.emf.CreateHatchBrush(hatch, color) self.emf.SelectObject(newbrush) if not isStockObject(self.brush): self.emf.DeleteObject(self.brush) self.brush = newbrush def _updateClipPath(self, path, operation): """Update clipping path.""" # print "clip" if operation != qt.Qt.NoClip: self._createPath(path) clipmode = { qt.Qt.ReplaceClip: pyemf.RGN_COPY, qt.Qt.IntersectClip: pyemf.RGN_AND, }[operation] else: # is this the only wave to get rid of clipping? self.emf.BeginPath() self.emf.MoveTo(0,0) w = int(self.width*self.dpi*scale) h = int(self.height*self.dpi*scale) self.emf.LineTo(w, 0) self.emf.LineTo(w, h) self.emf.LineTo(0, h) self.emf.CloseFigure() self.emf.EndPath() clipmode = pyemf.RGN_COPY self.emf.SelectClipPath(mode=clipmode) def _updateTransform(self, m): """Update transformation.""" self.emf.SetWorldTransform( m.m11(), m.m12(), m.m21(), m.m22(), m.dx()*scale, m.dy()*scale) def updateState(self, state): """Examine what has changed in state and call apropriate function.""" ss = state.state() if ss & qt.QPaintEngine.DirtyPen: self._updatePen(state.pen()) if ss & qt.QPaintEngine.DirtyBrush: self._updateBrush(state.brush()) if ss & qt.QPaintEngine.DirtyTransform: self._updateTransform(state.transform()) if ss & qt.QPaintEngine.DirtyClipPath: self._updateClipPath(state.clipPath(), state.clipOperation()) if ss & qt.QPaintEngine.DirtyClipRegion: path = qt.QPainterPath() path.addRegion(state.clipRegion()) self._updateClipPath(path, state.clipOperation()) def type(self): return qt.QPaintEngine.PostScript class EMFPaintDevice(qt.QPaintDevice): """Paint device for EMF paint engine.""" def __init__(self, width_in, height_in, dpi=75): qt.QPaintDevice.__init__(self) self.engine = EMFPaintEngine(width_in, height_in, dpi=dpi) def paintEngine(self): return self.engine def metric(self, m): """Return the metrics of the painter.""" if m == qt.QPaintDevice.PdmWidth: return int(self.engine.width * self.engine.dpi) elif m == qt.QPaintDevice.PdmHeight: return int(self.engine.height * self.engine.dpi) elif m == qt.QPaintDevice.PdmWidthMM: return int(self.engine.width * inch_mm) elif m == qt.QPaintDevice.PdmHeightMM: return int(self.engine.height * inch_mm) elif m == qt.QPaintDevice.PdmNumColors: return 2147483647 elif m == qt.QPaintDevice.PdmDepth: return 24 elif m == qt.QPaintDevice.PdmDpiX: return int(self.engine.dpi) elif m == qt.QPaintDevice.PdmDpiY: return int(self.engine.dpi) elif m == qt.QPaintDevice.PdmPhysicalDpiX: return int(self.engine.dpi) elif m == qt.QPaintDevice.PdmPhysicalDpiY: return int(self.engine.dpi) elif m == qt.QPaintDevice.PdmDevicePixelRatio: return 1 # Qt >= 5.6 elif m == getattr(qt.QPaintDevice, 'PdmDevicePixelRatioScaled', -1): return 1 else: # fall back return qt.QPaintDevice.metric(self, m)
veusz/veusz
veusz/document/emf_export.py
Python
gpl-2.0
14,778
<?php $captcha_word = '5TPM'; ?>
CoordCulturaDigital-Minc/culturadigital.br
wp-content/plugins/si-captcha-for-wordpress/captcha-secureimage/captcha-temp/g6ddI5ewlcLUFATp.php
PHP
gpl-2.0
32
/* Syntax highlighting with language autodetection. http://softwaremaniacs.org/soft/highlight/ */ var DEFAULT_LANGUAGES = ['python', 'ruby', 'perl', 'php', 'css', 'xml', 'html', 'django', 'javascript', 'java', 'cpp', 'sql', 'smalltalk']; var ALL_LANGUAGES = (DEFAULT_LANGUAGES.join(',') + ',' + ['1c', 'ada', 'elisp', 'axapta', 'delphi', 'rib', 'rsl', 'vbscript'].join(',')).split(','); var LANGUAGE_GROUPS = { 'xml': 'www', 'html': 'www', 'css': 'www', 'django': 'www', 'python': 'dynamic', 'perl': 'dynamic', 'php': 'dynamic', 'ruby': 'dynamic', 'cpp': 'static', 'java': 'static', 'delphi': 'static' } var IDENT_RE = '[a-zA-Z][a-zA-Z0-9_]*'; var UNDERSCORE_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_]*'; var NUMBER_RE = '\\b\\d+(\\.\\d+)?'; var C_NUMBER_RE = '\\b(0x[A-Za-z0-9]+|\\d+(\\.\\d+)?)'; // Common modes var APOS_STRING_MODE = { className: 'string', begin: '\'', end: '\'', illegal: '\\n', contains: ['escape'], relevance: 0 } var QUOTE_STRING_MODE = { className: 'string', begin: '"', end: '"', illegal: '\\n', contains: ['escape'], relevance: 0 } var BACKSLASH_ESCAPE = { className: 'escape', begin: '\\\\.', end: '^', relevance: 0 } var C_LINE_COMMENT_MODE = { className: 'comment', begin: '//', end: '$', relevance: 0 } var C_BLOCK_COMMENT_MODE = { className: 'comment', begin: '/\\*', end: '\\*/' } var HASH_COMMENT_MODE = { className: 'comment', begin: '#', end: '$' } var C_NUMBER_MODE = { className: 'number', begin: C_NUMBER_RE, end: '^', relevance: 0 } var LANGUAGES = {} var selected_languages = {}; function Highlighter(language_name, value) { function subMode(lexem) { if (!modes[modes.length - 1].contains) return null; for (var i in modes[modes.length - 1].contains) { var className = modes[modes.length - 1].contains[i]; for (var key in language.modes) if (language.modes[key].className == className && language.modes[key].beginRe.test(lexem)) return language.modes[key]; }//for return null; }//subMode function endOfMode(mode_index, lexem) { if (modes[mode_index].end && modes[mode_index].endRe.test(lexem)) return 1; if (modes[mode_index].endsWithParent) { var level = endOfMode(mode_index - 1, lexem); return level ? level + 1 : 0; }//if return 0; }//endOfMode function isIllegal(lexem) { if (!modes[modes.length - 1].illegalRe) return false; return modes[modes.length - 1].illegalRe.test(lexem); }//isIllegal function eatModeChunk(value, index) { if (!modes[modes.length - 1].terminators) { var terminators = []; if (modes[modes.length - 1].contains) for (var key in language.modes) { if (contains(modes[modes.length - 1].contains, language.modes[key].className) && !contains(terminators, language.modes[key].begin)) terminators[terminators.length] = language.modes[key].begin; }//for var mode_index = modes.length - 1; do { if (modes[mode_index].end && !contains(terminators, modes[mode_index].end)) terminators[terminators.length] = modes[mode_index].end; mode_index--; } while (modes[mode_index + 1].endsWithParent); if (modes[modes.length - 1].illegal) if (!contains(terminators, modes[modes.length - 1].illegal)) terminators[terminators.length] = modes[modes.length - 1].illegal; var terminator_re = '(' + terminators[0]; for (var i = 0; i < terminators.length; i++) terminator_re += '|' + terminators[i]; terminator_re += ')'; modes[modes.length - 1].terminators = langRe(language, terminator_re); }//if value = value.substr(index); var match = modes[modes.length - 1].terminators.exec(value); if (!match) return [value, '', true]; if (match.index == 0) return ['', match[0], false]; else return [value.substr(0, match.index), match[0], false]; }//eatModeChunk function escape(value) { return value.replace(/&/gm, '&amp;').replace(/</gm, '&lt;').replace(/>/gm, '&gt;'); }//escape function keywordMatch(mode, match) { var match_str = language.case_insensitive ? match[0].toLowerCase() : match[0] for (var className in mode.keywordGroups) { var value = mode.keywordGroups[className].hasOwnProperty(match_str); if (value) return [className, value]; }//for return false; }//keywordMatch function processKeywords(buffer) { var mode = modes[modes.length - 1]; if (!mode.keywords || !mode.lexems) return escape(buffer); if (!mode.lexemsRe) { var lexems = []; for (var key in mode.lexems) if (!contains(lexems, mode.lexems[key])) lexems[lexems.length] = mode.lexems[key]; var lexems_re = '(' + lexems[0]; for (var i = 1; i < lexems.length; i++) lexems_re += '|' + lexems[i]; lexems_re += ')'; mode.lexemsRe = langRe(language, lexems_re, true); }//if var result = ''; var last_index = 0; mode.lexemsRe.lastIndex = 0; var match = mode.lexemsRe.exec(buffer); while (match) { result += escape(buffer.substr(last_index, match.index - last_index)); keyword_match = keywordMatch(mode, match); if (keyword_match) { keyword_count += keyword_match[1]; result += '<span class="'+ keyword_match[0] +'">' + escape(match[0]) + '</span>'; } else { result += escape(match[0]); }//if last_index = mode.lexemsRe.lastIndex; match = mode.lexemsRe.exec(buffer); }//while result += escape(buffer.substr(last_index, buffer.length - last_index)); return result; }//processKeywords function processModeInfo(buffer, lexem, end) { if (end) { result += processKeywords(modes[modes.length - 1].buffer + buffer); return; }//if if (isIllegal(lexem)) throw 'Illegal'; var new_mode = subMode(lexem); if (new_mode) { modes[modes.length - 1].buffer += buffer; result += processKeywords(modes[modes.length - 1].buffer); if (new_mode.excludeBegin) { result += lexem + '<span class="' + new_mode.className + '">'; new_mode.buffer = ''; } else { result += '<span class="' + new_mode.className + '">'; new_mode.buffer = lexem; }//if modes[modes.length] = new_mode; relevance += modes[modes.length - 1].relevance != undefined ? modes[modes.length - 1].relevance : 1; return; }//if var end_level = endOfMode(modes.length - 1, lexem); if (end_level) { modes[modes.length - 1].buffer += buffer; if (modes[modes.length - 1].excludeEnd) { result += processKeywords(modes[modes.length - 1].buffer) + '</span>' + lexem; } else { result += processKeywords(modes[modes.length - 1].buffer + lexem) + '</span>'; } while (end_level > 1) { result += '</span>'; end_level--; modes.length--; }//while modes.length--; modes[modes.length - 1].buffer = ''; return; }//if }//processModeInfo function highlight(value) { var index = 0; language.defaultMode.buffer = ''; do { var mode_info = eatModeChunk(value, index); processModeInfo(mode_info[0], mode_info[1], mode_info[2]); index += mode_info[0].length + mode_info[1].length; } while (!mode_info[2]); if(modes.length > 1) throw 'Illegal'; }//highlight this.language_name = language_name; var language = LANGUAGES[language_name]; var modes = [language.defaultMode]; var relevance = 0; var keyword_count = 0; var result = ''; try { highlight(value); this.relevance = relevance; this.keyword_count = keyword_count; this.result = result; } catch (e) { if (e == 'Illegal') { this.relevance = 0; this.keyword_count = 0; this.result = escape(value); } else { throw e; }//if }//try }//Highlighter function contains(array, item) { if (!array) return false; for (var key in array) if (array[key] == item) return true; return false; }//contains function blockText(block) { var result = ''; for (var i = 0; i < block.childNodes.length; i++) if (block.childNodes[i].nodeType == 3) result += block.childNodes[i].nodeValue; else if (block.childNodes[i].nodeName == 'BR') result += '\n'; else throw 'Complex markup'; return result; }//blockText function initHighlight(block) { if (block.className.search(/\bno\-highlight\b/) != -1) return; try { blockText(block); } catch (e) { if (e == 'Complex markup') return; }//try var classes = block.className.split(/\s+/); for (var i = 0; i < classes.length; i++) { if (LANGUAGES[classes[i]]) { highlightLanguage(block, classes[i]); return; }//if }//for highlightAuto(block); }//initHighlight function highlightLanguage(block, language) { var highlight = new Highlighter(language, blockText(block)); // See these 4 lines? This is IE's notion of "block.innerHTML = result". Love this browser :-/ var container = document.createElement('div'); container.innerHTML = '<pre><code class="' + block.className + '">' + highlight.result + '</code></pre>'; var environment = block.parentNode.parentNode; environment.replaceChild(container.firstChild, block.parentNode); }//highlightLanguage function highlightAuto(block) { var result = null; var language = ''; var max_relevance = 2; var relevance = 0; var block_text = blockText(block); for (var key in selected_languages) { var highlight = new Highlighter(key, block_text); relevance = highlight.keyword_count + highlight.relevance; if (relevance > max_relevance) { max_relevance = relevance; result = highlight; }//if }//for if(result) { // See these 4 lines? This is IE's notion of "block.innerHTML = result". Love this browser :-/ var container = document.createElement('div'); container.innerHTML = '<pre><code class="' + result.language_name + '">' + result.result + '</code></pre>'; var environment = block.parentNode.parentNode; environment.replaceChild(container.firstChild, block.parentNode); }//if }//highlightAuto function langRe(language, value, global) { var mode = 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : ''); return new RegExp(value, mode); }//re function compileRes() { for (var i in LANGUAGES) { var language = LANGUAGES[i]; for (var key in language.modes) { if (language.modes[key].begin) language.modes[key].beginRe = langRe(language, '^' + language.modes[key].begin); if (language.modes[key].end) language.modes[key].endRe = langRe(language, '^' + language.modes[key].end); if (language.modes[key].illegal) language.modes[key].illegalRe = langRe(language, '^(?:' + language.modes[key].illegal + ')'); language.defaultMode.illegalRe = langRe(language, '^(?:' + language.defaultMode.illegal + ')'); }//for }//for }//compileRes function compileKeywords() { function compileModeKeywords(mode) { if (!mode.keywordGroups) { for (var key in mode.keywords) { if (mode.keywords[key] instanceof Object) mode.keywordGroups = mode.keywords; else mode.keywordGroups = {'keyword': mode.keywords}; break; }//for }//if }//compileModeKeywords for (var i in LANGUAGES) { var language = LANGUAGES[i]; compileModeKeywords(language.defaultMode); for (var key in language.modes) { compileModeKeywords(language.modes[key]); }//for }//for }//compileKeywords function initHighlighting() { if (initHighlighting.called) return; initHighlighting.called = true; compileRes(); compileKeywords(); if (arguments.length) { for (var i = 0; i < arguments.length; i++) { if (LANGUAGES[arguments[i]]) { selected_languages[arguments[i]] = LANGUAGES[arguments[i]]; }//if }//for } else selected_languages = LANGUAGES; var pres = document.getElementsByTagName('pre'); for (var i = 0; i < pres.length; i++) { if (pres[i].firstChild && pres[i].firstChild.nodeName == 'CODE') initHighlight(pres[i].firstChild); }//for }//initHighlighting function injectScripts(languages) { var scripts = document.getElementsByTagName('SCRIPT'); for (var i=0; i < scripts.length; i++) { if (scripts[i].src.match(/highlight\.js(\?.+)?$/)) { var path = scripts[i].src.replace(/highlight\.js(\?.+)?$/, ''); break; }//if }//for if (languages.length == 0) { languages = DEFAULT_LANGUAGES; }//if var injected = {} for (var i=0; i < languages.length; i++) { var filename = LANGUAGE_GROUPS[languages[i]] ? LANGUAGE_GROUPS[languages[i]] : languages[i]; if (!injected[filename]) { document.write('<script type="text/javascript" src="' + path + 'languages/' + filename + '.js"></script>'); injected[filename] = true; }//if }//for }//injectScripts function initHighlightingOnLoad() { var original_arguments = arguments; injectScripts(arguments); var handler = function(){initHighlighting.apply(null, original_arguments)}; if (window.addEventListener) { window.addEventListener('DOMContentLoaded', handler, false); window.addEventListener('load', handler, false); } else if (window.attachEvent) window.attachEvent('onload', handler); else window.onload = handler; }//initHighlightingOnLoad
enzbang/diouzhtu
external_libraries/highlight/highlight.js
JavaScript
gpl-2.0
13,554
<?php /** Romanian (română) * * See MessagesQqq.php for message documentation incl. usage of parameters * To improve a translation please visit http://translatewiki.net * * @ingroup Language * @file * * @author AdiJapan * @author Cin * @author Danutz * @author Emily * @author Firilacroco * @author Geitost * @author Gutza * @author KlaudiuMihaila * @author Laurap * @author Malafaya * @author Memo18 * @author Mihai * @author Minisarm * @author Misterr * @author SCriBu * @author Silviubogan * @author Stelistcristi * @author Strainu * @author TTO * @author Urhixidur * @author לערי ריינהארט */ $separatorTransformTable = array( ',' => ".", '.' => ',' ); $magicWords = array( 'redirect' => array( '0', '#REDIRECTEAZA', '#REDIRECT' ), 'notoc' => array( '0', '__FARACUPRINS__', '__NOTOC__' ), 'nogallery' => array( '0', '__FARAGALERIE__', '__NOGALLERY__' ), 'forcetoc' => array( '0', '__FORTEAZACUPRINS__', '__FORCETOC__' ), 'toc' => array( '0', '__CUPRINS__', '__TOC__' ), 'noeditsection' => array( '0', '__FARAEDITSECTIUNE__', '__NOEDITSECTION__' ), 'currentmonth' => array( '1', 'NUMARLUNACURENTA', 'CURRENTMONTH', 'CURRENTMONTH2' ), 'currentmonth1' => array( '1', 'LUNACURENTA1', 'CURRENTMONTH1' ), 'currentmonthname' => array( '1', 'NUMELUNACURENTA', 'CURRENTMONTHNAME' ), 'currentmonthnamegen' => array( '1', 'NUMELUNACURENTAGEN', 'CURRENTMONTHNAMEGEN' ), 'currentmonthabbrev' => array( '1', 'LUNACURENTAABREV', 'CURRENTMONTHABBREV' ), 'currentday' => array( '1', 'NUMARZIUACURENTA', 'CURRENTDAY' ), 'currentday2' => array( '1', 'NUMARZIUACURENTA2', 'CURRENTDAY2' ), 'currentdayname' => array( '1', 'NUMEZIUACURENTA', 'CURRENTDAYNAME' ), 'currentyear' => array( '1', 'ANULCURENT', 'CURRENTYEAR' ), 'currenttime' => array( '1', 'TIMPULCURENT', 'CURRENTTIME' ), 'currenthour' => array( '1', 'ORACURENTA', 'CURRENTHOUR' ), 'localmonth' => array( '1', 'LUNALOCALA', 'LUNALOCALA2', 'LOCALMONTH', 'LOCALMONTH2' ), 'localmonth1' => array( '1', 'LUNALOCALA1', 'LOCALMONTH1' ), 'localmonthname' => array( '1', 'NUMELUNALOCALA', 'LOCALMONTHNAME' ), 'localmonthnamegen' => array( '1', 'NUMELUNALOCALAGEN', 'LOCALMONTHNAMEGEN' ), 'localmonthabbrev' => array( '1', 'LUNALOCALAABREV', 'LOCALMONTHABBREV' ), 'localday' => array( '1', 'ZIUALOCALA', 'LOCALDAY' ), 'localday2' => array( '1', 'ZIUALOCALA2', 'LOCALDAY2' ), 'localdayname' => array( '1', 'NUMEZIUALOCALA', 'LOCALDAYNAME' ), 'localyear' => array( '1', 'ANULLOCAL', 'LOCALYEAR' ), 'localtime' => array( '1', 'TIMPULLOCAL', 'LOCALTIME' ), 'localhour' => array( '1', 'ORALOCALA', 'LOCALHOUR' ), 'numberofpages' => array( '1', 'NUMARDEPAGINI', 'NUMBEROFPAGES' ), 'numberofarticles' => array( '1', 'NUMARDEARTICOLE', 'NUMBEROFARTICLES' ), 'numberoffiles' => array( '1', 'NUMARDEFISIERE', 'NUMBEROFFILES' ), 'numberofusers' => array( '1', 'NUMARDEUTILIZATORI', 'NUMBEROFUSERS' ), 'numberofactiveusers' => array( '1', 'NUMARDEUTILIZATORIACTIVI', 'NUMBEROFACTIVEUSERS' ), 'numberofedits' => array( '1', 'NUMARDEMODIFICARI', 'NUMBEROFEDITS' ), 'numberofviews' => array( '1', 'NUMARDEVIZUALIZARI', 'NUMBEROFVIEWS' ), 'pagename' => array( '1', 'NUMEPAGINA', 'PAGENAME' ), 'pagenamee' => array( '1', 'NUMEEPAGINA', 'PAGENAMEE' ), 'namespace' => array( '1', 'SPATIUDENUME', 'NAMESPACE' ), 'namespacee' => array( '1', 'SPATIUUDENUME', 'NAMESPACEE' ), 'talkspace' => array( '1', 'SPATIUDEDISCUTIE', 'TALKSPACE' ), 'talkspacee' => array( '1', 'SPATIUUDEDISCUTIE', 'TALKSPACEE' ), 'subjectspace' => array( '1', 'SPATIUSUBIECT', 'SPATIUARTICOL', 'SUBJECTSPACE', 'ARTICLESPACE' ), 'subjectspacee' => array( '1', 'SPATIUUSUBIECT', 'SPATIUUARTICOL', 'SUBJECTSPACEE', 'ARTICLESPACEE' ), 'fullpagename' => array( '1', 'NUMEPAGINACOMPLET', 'FULLPAGENAME' ), 'fullpagenamee' => array( '1', 'NUMEEPAGINACOMPLET', 'FULLPAGENAMEE' ), 'subpagename' => array( '1', 'NUMESUBPAGINA', 'SUBPAGENAME' ), 'subpagenamee' => array( '1', 'NUMEESUBPAGINA', 'SUBPAGENAMEE' ), 'basepagename' => array( '1', 'NUMEDEBAZAPAGINA', 'BASEPAGENAME' ), 'basepagenamee' => array( '1', 'NUMEEDEBAZAPAGINA', 'BASEPAGENAMEE' ), 'talkpagename' => array( '1', 'NUMEPAGINADEDISCUTIE', 'TALKPAGENAME' ), 'talkpagenamee' => array( '1', 'NUMEEPAGINADEDISCUTIE', 'TALKPAGENAMEE' ), 'subjectpagename' => array( '1', 'NUMEPAGINASUBIECT', 'NUMEPAGINAARTICOL', 'SUBJECTPAGENAME', 'ARTICLEPAGENAME' ), 'subjectpagenamee' => array( '1', 'NUMEEPAGINASUBIECT', 'NUMEEPAGINAARTICOL', 'SUBJECTPAGENAMEE', 'ARTICLEPAGENAMEE' ), 'msg' => array( '0', 'MSJ:', 'MSG:' ), 'msgnw' => array( '0', 'MSJNOU:', 'MSGNW:' ), 'img_thumbnail' => array( '1', 'miniatura', 'mini', 'thumbnail', 'thumb' ), 'img_manualthumb' => array( '1', 'miniatura=$1', 'mini=$1', 'thumbnail=$1', 'thumb=$1' ), 'img_right' => array( '1', 'dreapta', 'right' ), 'img_left' => array( '1', 'stanga', 'left' ), 'img_none' => array( '1', 'nu', 'none' ), 'img_center' => array( '1', 'centru', 'center', 'centre' ), 'img_framed' => array( '1', 'cadru', 'framed', 'enframed', 'frame' ), 'img_frameless' => array( '1', 'faracadru', 'frameless' ), 'img_page' => array( '1', 'pagina=$1', 'pagina $1', 'page=$1', 'page $1' ), 'img_upright' => array( '1', 'dreaptasus', 'dreaptasus=$1', 'dreaptasus $1', 'upright', 'upright=$1', 'upright $1' ), 'img_border' => array( '1', 'chenar', 'border' ), 'img_baseline' => array( '1', 'linia_de_bază', 'baseline' ), 'img_sub' => array( '1', 'indice', 'sub' ), 'img_super' => array( '1', 'exponent', 'super', 'sup' ), 'img_top' => array( '1', 'sus', 'top' ), 'img_text_top' => array( '1', 'text-sus', 'text-top' ), 'img_middle' => array( '1', 'mijloc', 'middle' ), 'img_bottom' => array( '1', 'jos', 'bottom' ), 'img_text_bottom' => array( '1', 'text-jos', 'text-bottom' ), 'img_link' => array( '1', 'legătură=$1', 'link=$1' ), 'sitename' => array( '1', 'NUMESITE', 'SITENAME' ), 'ns' => array( '0', 'SN:', 'NS:' ), 'localurl' => array( '0', 'URLLOCAL:', 'LOCALURL:' ), 'localurle' => array( '0', 'URLLOCALE:', 'LOCALURLE:' ), 'servername' => array( '0', 'NUMESERVER', 'SERVERNAME' ), 'scriptpath' => array( '0', 'CALESCRIPT', 'SCRIPTPATH' ), 'grammar' => array( '0', 'GRAMATICA:', 'GRAMMAR:' ), 'gender' => array( '0', 'GEN:', 'GENDER:' ), 'notitleconvert' => array( '0', '__FARACONVERTIRETITLU__', '__FCT__', '__NOTITLECONVERT__', '__NOTC__' ), 'nocontentconvert' => array( '0', '__FARACONVERTIRECONTINUT__', '__FCC__', '__NOCONTENTCONVERT__', '__NOCC__' ), 'currentweek' => array( '1', 'SAPTAMANACURENTA', 'CURRENTWEEK' ), 'localweek' => array( '1', 'SAPTAMANALOCALA', 'LOCALWEEK' ), 'revisionid' => array( '1', 'IDREVIZIE', 'REVISIONID' ), 'revisionday' => array( '1', 'ZIREVIZIE', 'REVISIONDAY' ), 'revisionday2' => array( '1', 'ZIREVIZIE2', 'REVISIONDAY2' ), 'revisionmonth' => array( '1', 'LUNAREVIZIE', 'REVISIONMONTH' ), 'revisionyear' => array( '1', 'ANREVIZIE', 'REVISIONYEAR' ), 'revisiontimestamp' => array( '1', 'STAMPILATIMPREVIZIE', 'REVISIONTIMESTAMP' ), 'revisionuser' => array( '1', 'UTILIZATORREVIZIE', 'REVISIONUSER' ), 'fullurl' => array( '0', 'URLCOMPLET:', 'FULLURL:' ), 'fullurle' => array( '0', 'URLCOMPLETE:', 'FULLURLE:' ), 'lcfirst' => array( '0', 'MINUSCULAPRIMA:', 'LCFIRST:' ), 'ucfirst' => array( '0', 'MAJUSCULAPRIMA:', 'UCFIRST:' ), 'lc' => array( '0', 'MINUSCULA:', 'LC:' ), 'uc' => array( '0', 'MAJUSCULA:', 'UC:' ), 'raw' => array( '0', 'BRUT:', 'RAW:' ), 'displaytitle' => array( '1', 'ARATATITLU', 'DISPLAYTITLE' ), 'newsectionlink' => array( '1', '__LEGATURASECTIUNENOUA__', '__NEWSECTIONLINK__' ), 'nonewsectionlink' => array( '1', '__FARALEGATURASECTIUNENOUA__', '__NONEWSECTIONLINK__' ), 'currentversion' => array( '1', 'VERSIUNECURENTA', 'CURRENTVERSION' ), 'urlencode' => array( '0', 'CODIFICAREURL:', 'URLENCODE:' ), 'anchorencode' => array( '0', 'CODIFICAREANCORA', 'ANCHORENCODE' ), 'currenttimestamp' => array( '1', 'STAMPILATIMPCURENT', 'CURRENTTIMESTAMP' ), 'localtimestamp' => array( '1', 'STAMPILATIMPLOCAL', 'LOCALTIMESTAMP' ), 'directionmark' => array( '1', 'SEMNDIRECTIE', 'DIRECTIONMARK', 'DIRMARK' ), 'language' => array( '0', '#LIMBA:', '#LANGUAGE:' ), 'contentlanguage' => array( '1', 'LIMBACONTINUT', 'CONTENTLANGUAGE', 'CONTENTLANG' ), 'pagesinnamespace' => array( '1', 'PANIGIINSPATIULDENUME:', 'PAGINIINSN:', 'PAGESINNAMESPACE:', 'PAGESINNS:' ), 'numberofadmins' => array( '1', 'NUMARADMINI', 'NUMBEROFADMINS' ), 'formatnum' => array( '0', 'FORMATNR', 'FORMATNUM' ), 'defaultsort' => array( '1', 'SORTAREIMPLICITA:', 'CHEIESORTAREIMPLICITA:', 'CATEGORIESORTAREIMPLICITA:', 'DEFAULTSORT:', 'DEFAULTSORTKEY:', 'DEFAULTCATEGORYSORT:' ), 'filepath' => array( '0', 'CALEAFISIERULUI:', 'FILEPATH:' ), 'tag' => array( '0', 'eticheta', 'tag' ), 'hiddencat' => array( '1', '__ASCUNDECAT__', '__HIDDENCAT__' ), 'pagesincategory' => array( '1', 'PAGINIINCATEGORIE', 'PAGINIINCAT', 'PAGESINCATEGORY', 'PAGESINCAT' ), 'pagesize' => array( '1', 'MARIMEPAGINA', 'PAGESIZE' ), 'noindex' => array( '1', '__FARAINDEX__', '__NOINDEX__' ), 'numberingroup' => array( '1', 'NUMARINGRUP', 'NUMINGRUP', 'NUMBERINGROUP', 'NUMINGROUP' ), 'staticredirect' => array( '1', '__REDIRECTIONARESTATICA__', '__STATICREDIRECT__' ), 'protectionlevel' => array( '1', 'NIVELPROTECTIE', 'PROTECTIONLEVEL' ), 'formatdate' => array( '0', 'formatdata', 'dataformat', 'formatdate', 'dateformat' ), ); $namespaceNames = array( NS_MEDIA => 'Media', NS_SPECIAL => 'Special', NS_TALK => 'Discuție', NS_USER => 'Utilizator', NS_USER_TALK => 'Discuție_Utilizator', NS_PROJECT_TALK => 'Discuție_$1', NS_FILE => 'Fișier', NS_FILE_TALK => 'Discuție_Fișier', NS_MEDIAWIKI => 'MediaWiki', NS_MEDIAWIKI_TALK => 'Discuție_MediaWiki', NS_TEMPLATE => 'Format', NS_TEMPLATE_TALK => 'Discuție_Format', NS_HELP => 'Ajutor', NS_HELP_TALK => 'Discuție_Ajutor', NS_CATEGORY => 'Categorie', NS_CATEGORY_TALK => 'Discuție_Categorie', ); $namespaceAliases = array( 'Discuţie' => NS_TALK, 'Discuţie_Utilizator' => NS_USER_TALK, 'Discuţie_$1' => NS_PROJECT_TALK, 'Imagine' => NS_FILE, 'Discuţie_Imagine' => NS_FILE_TALK, 'Fişier' => NS_FILE, 'Discuţie_Fişier' => NS_FILE_TALK, 'Discuţie_MediaWiki' => NS_MEDIAWIKI_TALK, 'Discuţie_Format' => NS_TEMPLATE_TALK, 'Discuţie_Ajutor' => NS_HELP_TALK, 'Discuţie_Categorie' => NS_CATEGORY_TALK, ); $specialPageAliases = array( 'Activeusers' => array( 'Utilizatori_activi' ), 'Allmessages' => array( 'Toate_mesajele' ), 'Allpages' => array( 'Toate_paginile' ), 'Ancientpages' => array( 'Pagini_vechi' ), 'Blankpage' => array( 'Pagină_goală' ), 'Block' => array( 'Blochează_IP' ), 'Booksources' => array( 'Referințe_în_cărți' ), 'BrokenRedirects' => array( 'Redirectări_invalide' ), 'Categories' => array( 'Categorii' ), 'ChangePassword' => array( 'Resetează_parola' ), 'Confirmemail' => array( 'Confirmă_email' ), 'Contributions' => array( 'Contribuții' ), 'CreateAccount' => array( 'Înregistrare' ), 'Deadendpages' => array( 'Pagini_fără_legături' ), 'DeletedContributions' => array( 'Contribuții_șterse' ), 'DoubleRedirects' => array( 'Redirectări_duble' ), 'Emailuser' => array( 'Email_utilizator' ), 'Export' => array( 'Exportă' ), 'Fewestrevisions' => array( 'Revizii_puține' ), 'FileDuplicateSearch' => array( 'Căutare_fișier_duplicat' ), 'Filepath' => array( 'Cale_fișier' ), 'Import' => array( 'Importă' ), 'Invalidateemail' => array( 'Invalidează_email' ), 'BlockList' => array( 'Listă_IP_blocat' ), 'LinkSearch' => array( 'Căutare_legături' ), 'Listadmins' => array( 'Listă_administratori' ), 'Listbots' => array( 'Listă_roboți' ), 'Listfiles' => array( 'Listă_fișiere' ), 'Listgrouprights' => array( 'Listă_drepturi_grup' ), 'Listredirects' => array( 'Listă_redirectări' ), 'Listusers' => array( 'Listă_utilizatori' ), 'Lockdb' => array( 'Blochează_BD' ), 'Log' => array( 'Jurnal', 'Jurnale' ), 'Lonelypages' => array( 'Pagini_orfane' ), 'Longpages' => array( 'Pagini_lungi' ), 'MergeHistory' => array( 'Istoria_combinărilor' ), 'MIMEsearch' => array( 'Căutare_MIME' ), 'Mostcategories' => array( 'Categorii_multe' ), 'Mostimages' => array( 'Imagini_multe' ), 'Mostlinked' => array( 'Legături_multe' ), 'Mostlinkedcategories' => array( 'Categorii_des_folosite' ), 'Mostlinkedtemplates' => array( 'Formate_des_folosite' ), 'Mostrevisions' => array( 'Revizii_multe' ), 'Movepage' => array( 'Mută_pagina' ), 'Mycontributions' => array( 'Contribuțiile_mele' ), 'Mypage' => array( 'Pagina_mea' ), 'Mytalk' => array( 'Discuțiile_mele' ), 'Newimages' => array( 'Imagini_noi' ), 'Newpages' => array( 'Pagini_noi' ), 'PasswordReset' => array( 'Resetare_parolă' ), 'Popularpages' => array( 'Pagini_populare' ), 'Preferences' => array( 'Preferințe' ), 'Prefixindex' => array( 'Index' ), 'Protectedpages' => array( 'Pagini_protejate' ), 'Protectedtitles' => array( 'Titluri_protejate' ), 'Randompage' => array( 'Aleatoriu', 'Pagină_aleatorie' ), 'Randomredirect' => array( 'Redirectare_aleatorie' ), 'Recentchanges' => array( 'Schimbări_recente' ), 'Recentchangeslinked' => array( 'Modificări_corelate' ), 'Revisiondelete' => array( 'Şterge_revizie' ), 'Search' => array( 'Căutare' ), 'Shortpages' => array( 'Pagini_scurte' ), 'Specialpages' => array( 'Pagini_speciale' ), 'Statistics' => array( 'Statistici' ), 'Tags' => array( 'Etichete' ), 'Uncategorizedcategories' => array( 'Categorii_necategorizate' ), 'Uncategorizedimages' => array( 'Imagini_necategorizate' ), 'Uncategorizedpages' => array( 'Pagini_necategorizate' ), 'Uncategorizedtemplates' => array( 'Formate_necategorizate' ), 'Undelete' => array( 'Restaurează' ), 'Unlockdb' => array( 'Deblochează_BD' ), 'Unusedcategories' => array( 'Categorii_nefolosite' ), 'Unusedimages' => array( 'Imagini_nefolosite' ), 'Unusedtemplates' => array( 'Formate_nefolosite' ), 'Unwatchedpages' => array( 'Pagini_neurmărite' ), 'Upload' => array( 'Încărcare' ), 'Userlogin' => array( 'Autentificare' ), 'Userlogout' => array( 'Ieșire' ), 'Userrights' => array( 'Drepturi_utilizator' ), 'Version' => array( 'Versiune' ), 'Wantedcategories' => array( 'Categorii_dorite' ), 'Wantedfiles' => array( 'Fișiere_dorite' ), 'Wantedpages' => array( 'Pagini_dorite', 'Legături_invalide' ), 'Wantedtemplates' => array( 'Formate_dorite' ), 'Watchlist' => array( 'Pagini_urmărite' ), 'Whatlinkshere' => array( 'Ce_se_leagă_aici' ), 'Withoutinterwiki' => array( 'Fără_legături_interwiki' ), ); $datePreferences = false; $defaultDateFormat = 'dmy'; $dateFormats = array( 'dmy time' => 'H:i', 'dmy date' => 'j F Y', 'dmy both' => 'j F Y H:i', ); $fallback8bitEncoding = 'iso8859-2'; $linkTrail = '/^([a-zăâîşţșțĂÂÎŞŢȘȚ]+)(.*)$/sDu'; $messages = array( # User preference toggles 'tog-underline' => 'Sublinierea legăturilor:', 'tog-justify' => 'Aranjează justificat paragrafele', 'tog-hideminor' => 'Ascunde modificările minore în schimbări recente', 'tog-hidepatrolled' => 'Ascunde modificările patrulate în schimbări recente', 'tog-newpageshidepatrolled' => 'Ascunde paginile patrulate din lista de pagini noi', 'tog-extendwatchlist' => 'Extinde lista de articole urmărite pentru a arăta toate schimbările efectuate, nu doar pe cele mai recente', 'tog-usenewrc' => 'Grupează modificările după pagină în cadrul schimbărilor recente și listei paginilor urmărite', 'tog-numberheadings' => 'Numerotează automat secțiunile', 'tog-showtoolbar' => 'Afișează bara de unelte pentru modificare', 'tog-editondblclick' => 'Modifică paginile prin dublu clic', 'tog-editsection' => 'Activează modificarea secțiunilor prin legăturile [modifică]', 'tog-editsectiononrightclick' => 'Activează modificarea secţiunilor prin clic dreapta pe titlul secțiunii', 'tog-showtoc' => 'Arată cuprinsul (pentru paginile cu mai mult de 3 paragrafe cu titlu)', 'tog-rememberpassword' => 'Autentificare automată de la acest navigator (expiră după $1 {{PLURAL:$1|zi|zile|de zile}})', 'tog-watchcreations' => 'Adaugă paginile pe care le creez și fișierele pe care le încarc la lista mea de pagini urmărite', 'tog-watchdefault' => 'Adaugă paginile și fișierele pe care le modific la lista mea de urmărire', 'tog-watchmoves' => 'Adaugă paginile și fișierele pe care le redenumesc la lista mea de urmărire', 'tog-watchdeletion' => 'Adaugă paginile și fișierele pe care le șterg la lista mea de urmărire', 'tog-minordefault' => 'Marchează din oficiu toate modificările ca fiind minore', 'tog-previewontop' => 'Arată previzualizarea deasupra căsuței de modificare', 'tog-previewonfirst' => 'Arată previzualizarea la prima modificare', 'tog-enotifwatchlistpages' => 'Trimite-mi un e-mail atunci când o pagină sau un fișier din lista mea de pagini urmărite suferă modificări', 'tog-enotifusertalkpages' => 'Trimite-mi un email când pagina mea de discuții este modificată', 'tog-enotifminoredits' => 'Trimite-mi, de asemenea, un e-mail în caz de modificări minore asupra paginilor și fișierelor', 'tog-enotifrevealaddr' => 'Descoperă-mi adresa email în mesajele de notificare', 'tog-shownumberswatching' => 'Arată numărul utilizatorilor care urmăresc', 'tog-oldsig' => 'Semnătură actuală:', 'tog-fancysig' => 'Tratează semnătura ca wikitext (fără o legătură automată)', 'tog-uselivepreview' => 'Folosește previzualizarea în timp real (experimental)', 'tog-forceeditsummary' => 'Avertizează-mă când uit să descriu modificările', 'tog-watchlisthideown' => 'Ascunde modificările mele la lista mea de urmărire', 'tog-watchlisthidebots' => 'Ascunde modificările boților la lista mea de urmărire', 'tog-watchlisthideminor' => 'Ascunde modificările minore din lista de pagini urmărite', 'tog-watchlisthideliu' => 'Ascunde modificările făcute de utilizatori anonimi din lista de pagini urmărite', 'tog-watchlisthideanons' => 'Ascunde modificările făcute de utilizatori anonimi din lista de pagini urmărite', 'tog-watchlisthidepatrolled' => 'Ascunde paginile patrulate din lista de pagini urmărite', 'tog-ccmeonemails' => 'Doresc să primesc o copie a mesajelor e-mail pe care le trimit', 'tog-diffonly' => 'Nu arăta conținutul paginii sub dif', 'tog-showhiddencats' => 'Arată categoriile ascunse', 'tog-noconvertlink' => 'Dezactivează conversia titlurilor', 'tog-norollbackdiff' => 'Nu arăta diferența după efectuarea unei reveniri', 'tog-useeditwarning' => 'Avertizează-mă când părăsesc o pagină fără a salva modificările', 'tog-prefershttps' => 'Utilizează întotdeauna o conexiune securizată când sunt autentificat(ă)', 'underline-always' => 'Întotdeauna', 'underline-never' => 'Niciodată', 'underline-default' => 'Standardul temei sau al navigatorului', # Font style option in Special:Preferences 'editfont-style' => 'Stilul fontului din zona de modificare:', 'editfont-default' => 'Standardul navigatorului', 'editfont-monospace' => 'Font monospațiat', 'editfont-sansserif' => 'Font fără serife', 'editfont-serif' => 'Font cu serife', # Dates 'sunday' => 'duminică', 'monday' => 'luni', 'tuesday' => 'marți', 'wednesday' => 'miercuri', 'thursday' => 'joi', 'friday' => 'vineri', 'saturday' => 'sâmbătă', 'sun' => 'dum', 'mon' => 'lun', 'tue' => 'mar', 'wed' => 'mie', 'thu' => 'joi', 'fri' => 'vin', 'sat' => 'sâm', 'january' => 'ianuarie', 'february' => 'februarie', 'march' => 'martie', 'april' => 'aprilie', 'may_long' => 'mai', 'june' => 'iunie', 'july' => 'iulie', 'august' => 'august', 'september' => 'septembrie', 'october' => 'octombrie', 'november' => 'noiembrie', 'december' => 'decembrie', 'january-gen' => 'ianuarie', 'february-gen' => 'februarie', 'march-gen' => 'martie', 'april-gen' => 'aprilie', 'may-gen' => 'mai', 'june-gen' => 'iunie', 'july-gen' => 'iulie', 'august-gen' => 'august', 'september-gen' => 'septembrie', 'october-gen' => 'octombrie', 'november-gen' => 'noiembrie', 'december-gen' => 'decembrie', 'jan' => 'ian', 'feb' => 'feb', 'mar' => 'mar', 'apr' => 'apr', 'may' => 'mai', 'jun' => 'iun', 'jul' => 'iul', 'aug' => 'aug', 'sep' => 'sept', 'oct' => 'oct', 'nov' => 'nov', 'dec' => 'dec', 'january-date' => '$1 ianuarie', 'february-date' => '$1 februarie', 'march-date' => '$1 martie', 'april-date' => '$1 aprilie', 'may-date' => '$1 mai', 'june-date' => '$1 iunie', 'july-date' => '$1 iulie', 'august-date' => '$1 august', 'september-date' => '$1 septembrie', 'october-date' => '$1 octombrie', 'november-date' => '$1 noiembrie', 'december-date' => '$1 decembrie', # Categories related messages 'pagecategories' => '{{PLURAL:$1|Categorie|Categorii}}', 'category_header' => 'Pagini din categoria „$1”', 'subcategories' => 'Subcategorii', 'category-media-header' => 'Fișiere media din categoria „$1”', 'category-empty' => "''Această categorie nu conține articole sau fișiere media.''", 'hidden-categories' => '{{PLURAL:$1|Categorie ascunsă|Categorii ascunse}}', 'hidden-category-category' => 'Categorii ascunse', 'category-subcat-count' => '{{PLURAL:$2|Această categorie conține doar următoarea subcategorie.|Această categorie conține {{PLURAL:$1|următoarea subcategorie|următoarele $1 subcategorii|următoarele $1 de subcategorii}}, dintr-un total de $2.}}', 'category-subcat-count-limited' => 'Această categorie conține {{PLURAL:$1|următoarea subcategorie|următoarele $1 subcategorii}}.', 'category-article-count' => '{{PLURAL:$2|Această categorie conține doar următoarea pagină.|{{PLURAL:$1|Următoarea pagină|Următoarele $1 pagini}} se află în această categorie, dintr-un total de $2.}}', 'category-article-count-limited' => '{{PLURAL:$1|Următoarea pagină|Următoarele $1 pagini}} se află în categoria curentă.', 'category-file-count' => '{{PLURAL:$2|Această categorie conține doar următorul fișier.|{{PLURAL:$1|Următorul fișier|Următoarele $1 fișiere}} se află în această categorie, dintr-un total de $2.}}', 'category-file-count-limited' => '{{PLURAL:$1|Următorul fișier|Următoarele $1 fișiere}} se află în categoria curentă.', 'listingcontinuesabbrev' => 'cont.', 'index-category' => 'Pagini indexate', 'noindex-category' => 'Pagini neindexate', 'broken-file-category' => 'Pagini cu legături invalide către fișiere', 'about' => 'Despre', 'article' => 'Articol', 'newwindow' => '(se deschide într-o fereastră nouă)', 'cancel' => 'Revocare', 'moredotdotdot' => 'Mai mult…', 'morenotlisted' => 'Această listă nu este completă.', 'mypage' => 'Pagină', 'mytalk' => 'Discuții', 'anontalk' => 'Discuția pentru această adresă IP', 'navigation' => 'Navigare', 'and' => '&#32;și', # Cologne Blue skin 'qbfind' => 'Găsește', 'qbbrowse' => 'Răsfoiește', 'qbedit' => 'Modificare', 'qbpageoptions' => 'Opțiuni ale paginii', 'qbmyoptions' => 'Paginile mele', 'faq' => 'Întrebări frecvente', 'faqpage' => 'Project:Întrebări frecvente', # Vector skin 'vector-action-addsection' => 'Mesaj nou', 'vector-action-delete' => 'Ștergere', 'vector-action-move' => 'Redenumire', 'vector-action-protect' => 'Protejare', 'vector-action-undelete' => 'Recuperare', 'vector-action-unprotect' => 'Modificare protecție', 'vector-simplesearch-preference' => 'Activează bara de căutare simplificată (exclusiv pentru interfața Vector)', 'vector-view-create' => 'Creare', 'vector-view-edit' => 'Modificare', 'vector-view-history' => 'Istoric', 'vector-view-view' => 'Lectură', 'vector-view-viewsource' => 'Sursă pagină', 'actions' => 'Acțiuni', 'namespaces' => 'Spații de nume', 'variants' => 'Variante', 'navigation-heading' => 'Meniu de navigare', 'errorpagetitle' => 'Eroare', 'returnto' => 'Înapoi la $1.', 'tagline' => 'De la {{SITENAME}}', 'help' => 'Ajutor', 'search' => 'Căutare', 'searchbutton' => 'Căutare', 'go' => 'Salt', 'searcharticle' => 'Salt', 'history' => 'Istoricul paginii', 'history_short' => 'Istoric', 'updatedmarker' => 'încărcat de la ultima mea vizită', 'printableversion' => 'Versiune de tipărit', 'permalink' => 'Legătură permanentă', 'print' => 'Tipărire', 'view' => 'Lectură', 'edit' => 'Modificare', 'create' => 'Creare', 'editthispage' => 'Modificați pagina', 'create-this-page' => 'Creați această pagină', 'delete' => 'Ștergere', 'deletethispage' => 'Șterge pagina', 'undeletethispage' => 'Recuperează această pagină', 'undelete_short' => 'Recuperarea {{PLURAL:$1|unei modificări|a $1 modificări|a $1 de modificări}}', 'viewdeleted_short' => 'Vedeți {{PLURAL:$1|o modificare ștearsă|$1 (de) modificări șterse}}', 'protect' => 'Protejare', 'protect_change' => 'schimbă protecția', 'protectthispage' => 'Protejați această pagină', 'unprotect' => 'Modificare protecție', 'unprotectthispage' => 'Schimbă nivelul de protejare al acestei pagini', 'newpage' => 'Pagină nouă', 'talkpage' => 'Discutați această pagină', 'talkpagelinktext' => 'Discuție', 'specialpage' => 'Pagină specială', 'personaltools' => 'Unelte personale', 'postcomment' => 'Secțiune nouă', 'articlepage' => 'Vedeți articolul', 'talk' => 'Discuție', 'views' => 'Vizualizări', 'toolbox' => 'Unelte', 'userpage' => 'Vizualizați pagina utilizatorului', 'projectpage' => 'Vizualizați pagina proiectului', 'imagepage' => 'Vizualizați pagina fișierului', 'mediawikipage' => 'Vizualizați pagina mesajului', 'templatepage' => 'Vizualizați pagina formatului', 'viewhelppage' => 'Vizualizați pagina de ajutor', 'categorypage' => 'Vizualizați pagina categoriei', 'viewtalkpage' => 'Vizualizați discuția', 'otherlanguages' => 'În alte limbi', 'redirectedfrom' => '(Redirecționat de la $1)', 'redirectpagesub' => 'Pagină de redirecționare', 'lastmodifiedat' => 'Ultima modificare efectuată la $2, $1.', 'viewcount' => 'Pagina a fost vizitată {{PLURAL:$1|o dată|de $1 ori|de $1 de ori}}.', 'protectedpage' => 'Pagină protejată', 'jumpto' => 'Salt la:', 'jumptonavigation' => 'navigare', 'jumptosearch' => 'căutare', 'view-pool-error' => 'Ne pare rău, dar serverele sunt supraîncărcare în acest moment. Prea mulți utilizatori încearcă să vizualizeze această pagină. Vă rugăm să așteptați un moment înainte de a reîncerca accesarea paginii. $1', 'pool-timeout' => 'Timpul alocat așteptării pentru blocare a expirat', 'pool-queuefull' => 'Coada de așteptare este plină', 'pool-errorunknown' => 'Eroare necunoscută', # All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage). 'aboutsite' => 'Despre {{SITENAME}}', 'aboutpage' => 'Project:Despre', 'copyright' => 'Conținutul este disponibil sub $1, exceptând cazurile în care se specifică altfel.', 'copyrightpage' => '{{ns:project}}:Drepturi de autor', 'currentevents' => 'Discută la cafenea', 'currentevents-url' => 'Project:Cafenea', 'disclaimers' => 'Termeni', 'disclaimerpage' => 'Project:Termeni', 'edithelp' => 'Ajutor pentru modificare', 'helppage' => 'Help:Ajutor', 'mainpage' => 'Pagina principală', 'mainpage-description' => 'Pagina principală', 'policy-url' => 'Project:Politică', 'portal' => 'Portalul comunității', 'portal-url' => 'Project:Portal Comunitate', 'privacy' => 'Politica de confidențialitate', 'privacypage' => 'Project:Politica de confidențialitate', 'badaccess' => 'Eroare permisiune', 'badaccess-group0' => 'Execuția acțiunii cerute nu este permisă.', 'badaccess-groups' => 'Acțiunea cerută este rezervată utilizatorilor din {{PLURAL:$2|grupul|unul din grupurile}}: $1.', 'versionrequired' => 'Este necesară versiunea $1 MediaWiki', 'versionrequiredtext' => 'Versiunea $1 MediaWiki este necesară pentru a folosi această pagină. Vezi [[Special:Version|versiunea actuală]].', 'ok' => 'OK', 'retrievedfrom' => 'Adus de la „$1”', 'youhavenewmessages' => 'Aveți $1 ($2).', 'youhavenewmessagesfromusers' => 'Aveți $1 de la {{PLURAL:$3|un alt utilizator|$3 utilizatori}} ($2).', 'youhavenewmessagesmanyusers' => 'Aveți $1 de la mai mulți utilizatori ($2).', 'newmessageslinkplural' => '{{PLURAL:$1|un mesaj nou|999=mesaje noi}}', 'newmessagesdifflinkplural' => '{{PLURAL:$1|ultima modificare|999=ultimele modificări}}', 'youhavenewmessagesmulti' => 'Aveți mesaje noi la $1', 'editsection' => 'modificare', 'editold' => 'modificare', 'viewsourceold' => 'vizualizați sursa', 'editlink' => 'modificare', 'viewsourcelink' => 'sursă pagină', 'editsectionhint' => 'Modifică secțiunea: $1', 'toc' => 'Cuprins', 'showtoc' => 'arată', 'hidetoc' => 'ascunde', 'collapsible-collapse' => 'Restrânge', 'collapsible-expand' => 'Extinde', 'thisisdeleted' => 'Vizualizare sau recuperare $1?', 'viewdeleted' => 'Vizualizați $1?', 'restorelink' => '{{PLURAL:$1|o modificare ștearsă|$1 modificări șterse|$1 de modificări șterse}}', 'feedlinks' => 'Întreținere:', 'feed-invalid' => 'Tip de abonament invalid', 'feed-unavailable' => 'Nu sunt disponibile fluxuri web.', 'site-rss-feed' => '$1 Abonare RSS', 'site-atom-feed' => '$1 Abonare Atom', 'page-rss-feed' => '„$1” Abonare RSS', 'page-atom-feed' => '„$1” Abonare Atom', 'red-link-title' => '$1 (pagină inexistentă)', 'sort-descending' => 'Sortare descendentă', 'sort-ascending' => 'Sortare ascendentă', # Short words for each namespace, by default used in the namespace tab in monobook 'nstab-main' => 'Pagină', 'nstab-user' => 'Pagină de utilizator', 'nstab-media' => 'Pagină Media', 'nstab-special' => 'Pagină specială', 'nstab-project' => 'Proiect', 'nstab-image' => 'Fișier', 'nstab-mediawiki' => 'Mesaj', 'nstab-template' => 'Format', 'nstab-help' => 'Ajutor', 'nstab-category' => 'Categorie', # Main script and global functions 'nosuchaction' => 'Această acțiune nu există', 'nosuchactiontext' => 'Acțiunea specificată în URL este invalidă. S-ar putea să fi introdus greșit URL-ul, sau să fi urmat o legătură incorectă. Aceasta s-ar putea să indice și un bug în programul folosit de {{SITENAME}}.', 'nosuchspecialpage' => 'Această pagină specială nu există', 'nospecialpagetext' => '<strong>Ați cerut o [[Special:SpecialPages|pagină specială]] invalidă.</strong> O listă cu paginile speciale valide se poate găsi la [[Special:SpecialPages|{{int:specialpages}}]].', # General errors 'error' => 'Eroare', 'databaseerror' => 'Eroare la baza de date', 'databaseerror-text' => 'A apărut o eroare la interogarea bazei de date. Acest lucru poate însemna o problemă de software.', 'databaseerror-textcl' => 'A apărut o eroare la interogarea bazei de date.', 'databaseerror-query' => 'Interogare: $1', 'databaseerror-function' => 'Funcție: $1', 'databaseerror-error' => 'Eroare: $1', 'laggedslavemode' => 'Atenție: S-ar putea ca pagina să nu conțină ultimele actualizări.', 'readonly' => 'Baza de date este blocată la scriere', 'enterlockreason' => 'Precizează motivul pentru blocare, incluzând o estimare a termenului de deblocare a bazei de date', 'readonlytext' => 'Baza de date {{SITENAME}} este momentan blocată la scriere, probabil pentru o operațiune de rutină, după care va fi deblocată și se va reveni la starea normală. Administratorul care a blocat-o a oferit această explicație: $1', 'missing-article' => 'Baza de date nu găsește textul unei pagini care ar fi trebuit găsită, numită „$1” $2. În mod normal faptul este cauzat de accesarea unei dif neactualizată sau a unei legături din istoric spre o pagină care a fost ștearsă. Dacă nu acesta e motivul, s-ar putea să fi găsit un bug în program. Vă rugăm să-i semnalați acest aspect unui [[Special:ListUsers/sysop|administrator]], indicându-i adresa URL.', 'missingarticle-rev' => '(versiunea#: $1)', 'missingarticle-diff' => '(Dif: $1, $2)', 'readonly_lag' => 'Baza de date a fost închisă automatic în timp ce serverele secundare ale bazei de date îl urmează pe cel principal.', 'internalerror' => 'Eroare internă', 'internalerror_info' => 'Eroare internă: $1', 'fileappenderrorread' => 'Citirea fișierului „$1” nu a putut fi executată în timpul adăugării.', 'fileappenderror' => 'Nu se poate adăuga "$1" în "$2".', 'filecopyerror' => 'Fișierul "$1" nu a putut fi copiat la "$2".', 'filerenameerror' => 'Fișierul "$1" nu a putut fi mutat la "$2".', 'filedeleteerror' => 'Fișierul "$1" nu a putut fi șters.', 'directorycreateerror' => 'Nu se poate crea directorul "$1".', 'filenotfound' => 'Fișierul „$1” nu a putut fi găsit.', 'fileexistserror' => 'Imposibil de scris fișierul „$1”: fișierul există deja.', 'unexpected' => 'Valoare neașteptată: „$1”=„$2”.', 'formerror' => 'Eroare: datele nu au putut fi trimise', 'badarticleerror' => 'Această acțiune nu poate fi efectuată pe această pagină.', 'cannotdelete' => 'Pagina sau fișierul „$1” nu a putut fi șters. S-ar putea ca acesta să fi fost deja șters de altcineva.', 'cannotdelete-title' => 'Imposibil de șters pagina „$1”', 'delete-hook-aborted' => 'Ștergerea a fost abandonată din cauza unui hook. Nicio explicație furnizată.', 'no-null-revision' => 'Nu s-a putut crea o nouă versiune nulă pentru pagina „$1”', 'badtitle' => 'Titlu incorect', 'badtitletext' => 'Titlul paginii căutate este incorect, gol sau este o legătură interlinguală sau interwiki incorectă. Poate conține unul sau mai multe caractere ce nu pot fi folosite în titluri.', 'perfcached' => 'Datele următoare au fost păstrate în cache și s-ar putea să nu fie actualizate. Un maxim de {{PLURAL:$1|un rezultat este disponibil|$1 rezultate sunt disponibile}} în cache.', 'perfcachedts' => 'Informațiile de mai jos provin din cache, ultima actualizare efectuându-se la $1. Un maxim de {{PLURAL:$4|un rezultat este disponibil|$4 rezultate sunt disponibile}} în cache.', 'querypage-no-updates' => 'Actualizările acestei pagini sunt momentan dezactivate. Informațiile de aici nu sunt împrospătate.', 'viewsource' => 'Sursă pagină', 'viewsource-title' => 'Vizualizare sursă pentru $1', 'actionthrottled' => 'Acțiune limitată', 'actionthrottledtext' => 'Ca o măsură anti-spam, aveți permisiuni limitate în a efectua această acțiune de prea multe ori într-o perioadă scurtă de timp, iar dv. tocmai ați depășit această limită. Vă rugăm să încercați din nou în câteva minute.', 'protectedpagetext' => 'Această pagină este protejată împotriva modificărilor sau a altor acțiuni.', 'viewsourcetext' => 'Se poate vizualiza și copia conținutul acestei pagini:', 'viewyourtext' => "Se poate vizualiza și copia conținutul '''modificărilor dumneavoastră''' efectuate asupra acestei pagini:", 'protectedinterface' => 'Această pagină asigură textul interfeței pentru software și este protejată pentru a preveni abuzurile. Pentru a adăuga sau modifica traduceri corespunzătoare tuturor wikiurilor, utilizați [//translatewiki.net/ translatewiki.net], proiectul MediaWiki de localizare.', 'editinginterface' => "'''Avertizare''': Modificați o pagină care este folosită pentru a furniza textul interfeței software. Modificările aduse acestei pagini vor afecta aspectul interfeței pentru alți utilizatori ai acestui wiki. Pentru a adăuga sau modifica traduceri corespunzătoare tuturor wikiurilor, utilizați [//translatewiki.net/ translatewiki.net], proiectul MediaWiki de localizare.", 'cascadeprotected' => 'Această pagină a fost protejată la scriere deoarece este inclusă în {{PLURAL:$1|următoarea pagină|următoarele pagini}}, care {{PLURAL:$1|este protejată|sunt protejate}} în cascadă: $2', 'namespaceprotected' => "Nu aveți permisiunea de a modifica pagini din spațiul de nume '''$1'''.", 'customcssprotected' => 'Nu aveți permisiunea de a modifica această pagină CSS, deoarece conține setările personale ale altui utilizator.', 'customjsprotected' => 'Nu aveți permisiunea de a modifica această pagină JavaScript, deoarece conține setările personale ale altui utilizator.', 'mycustomcssprotected' => 'Nu aveți permisiunea să modificați această pagină CSS.', 'mycustomjsprotected' => 'Nu aveți permisiunea să modificați această pagină JavaScript.', 'myprivateinfoprotected' => 'Nu aveți permisiunea să vă modificați informațiile personale.', 'mypreferencesprotected' => 'Nu aveți permisiunea să vă modificați preferințele.', 'ns-specialprotected' => 'Paginile din spațiul de nume {{ns:special}} nu pot fi editate.', 'titleprotected' => "Acest titlu a fos protejat la creare de [[User:$1|$1]]. Motivul invocat este ''$2''.", 'filereadonlyerror' => 'Imposibil de modificat fișierul „$1”, deoarece depozitul de fișiere „$2” este în modul „doar citire”. Administratorul care a efectuat blocarea a furnizat explicația: „$3”.', 'invalidtitle-knownnamespace' => 'Titlu invalid cu spațiul de nume „$2” și textul „$3”', 'invalidtitle-unknownnamespace' => 'Titlu invalid cu numărul spațiului de nume $1 necunoscut și textul „$2”', 'exception-nologin' => 'Neautentificat{{GENDER:||ă}}', 'exception-nologin-text' => 'Vă rugăm să vă [[Special:Userlogin|autentificați]] pentru a accesa această pagină sau acțiune.', 'exception-nologin-text-manual' => 'Vă rugăm să vă $1 pentru a accesa această pagină sau acțiune.', # Virus scanner 'virus-badscanner' => "Configurație greșită: scaner de virus necunoscut: ''$1''", 'virus-scanfailed' => 'scanare eșuată (cod $1)', 'virus-unknownscanner' => 'antivirus necunoscut:', # Login and logout pages 'logouttext' => "'''Acum sunteți deconectat.''' Țineți minte că anumite pagini pot fi în continuare afișate ca și când ați fi autentificat până când curățați memoria cache a navigatorului.", 'welcomeuser' => 'Bun venit, $1!', 'welcomecreation-msg' => 'Contul dumneavoastră a fost creat. Nu uitați să vă modificați [[Special:Preferences|preferințele]] pentru {{SITENAME}}.', 'yourname' => 'Nume de utilizator:', 'userlogin-yourname' => 'Nume de utilizator', 'userlogin-yourname-ph' => 'Introduceți numele de utilizator', 'createacct-another-username-ph' => 'Introduceți numele de utilizator', 'yourpassword' => 'Parolă:', 'userlogin-yourpassword' => 'Parolă', 'userlogin-yourpassword-ph' => 'Introduceți parola', 'createacct-yourpassword-ph' => 'Introduceți o parolă', 'yourpasswordagain' => 'Repetați parola:', 'createacct-yourpasswordagain' => 'Confirmare parolă', 'createacct-yourpasswordagain-ph' => 'Introduceți parola din nou', 'remembermypassword' => 'Autentificare automată de la acest calculator (expiră după {{PLURAL:$1|24 de ore|$1 zile|$1 de zile}})', 'userlogin-remembermypassword' => 'Păstrează-mă autentificat', 'userlogin-signwithsecure' => 'Utilizează conexiunea securizată', 'yourdomainname' => 'Domeniul dumneavoastră:', 'password-change-forbidden' => 'Nu puteți schimba parole pe acest wiki.', 'externaldberror' => 'A fost fie o eroare de bază de date pentru o autentificare extenă sau nu aveți permisiunea să actualizați contul extern.', 'login' => 'Autentificare', 'nav-login-createaccount' => 'Creare cont / Autentificare', 'loginprompt' => 'Trebuie să ai modulele cookie activate pentru a te autentifica la {{SITENAME}}.', 'userlogin' => 'Creare cont / Autentificare', 'userloginnocreate' => 'Autentificare', 'logout' => 'Închidere sesiune', 'userlogout' => 'Închide sesiunea', 'notloggedin' => 'Nu sunteți autentificat', 'userlogin-noaccount' => 'Nu aveți cont încă?', 'userlogin-joinproject' => 'Înscrieți-vă la {{SITENAME}}', 'nologin' => 'Nu aveți cont încă? $1.', 'nologinlink' => 'Creați-vă un cont de utilizator acum', 'createaccount' => 'Creare cont', 'gotaccount' => "Aveți deja un cont de utilizator? '''$1'''.", 'gotaccountlink' => 'Autentificați-vă', 'userlogin-resetlink' => 'Ați uitat datele de autentificare?', 'userlogin-resetpassword-link' => 'V-ați uitat parola?', 'helplogin-url' => 'Help:Autentificare', 'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Ajutor la autentificare]]', 'userlogin-loggedin' => 'Sunteți deja {{GENDER:$1|autentificat|autentificată}} ca {{GENDER:$1|$1}}. Utilizați formularul de mai jos pentru a vă autentifica cu alt nume de utilizator.', 'userlogin-createanother' => 'Creează un alt cont', 'createacct-join' => 'Introduceți-vă informațiile mai jos.', 'createacct-another-join' => 'Introduceți, mai jos, informațiile noului cont.', 'createacct-emailrequired' => 'Adresă de e-mail', 'createacct-emailoptional' => 'Adresă de e-mail (opțională)', 'createacct-email-ph' => 'Introduceți adresa dumnevoastră de e-mail', 'createacct-another-email-ph' => 'Introduceți adresa de e-mail', 'createaccountmail' => 'Utilizează o parolă temporară aleasă la întâmplare și o trimite la adresa de e-mail indicată', 'createacct-realname' => 'Nume real (opțional)', 'createaccountreason' => 'Motiv:', 'createacct-reason' => 'Motiv', 'createacct-reason-ph' => 'De ce creați un alt cont', 'createacct-captcha' => 'Verificare de securitate', 'createacct-imgcaptcha-ph' => 'Introduceți textul pe care îl vedeți deasupra', 'createacct-submit' => 'Creați-vă contul', 'createacct-another-submit' => 'Creează un alt cont', 'createacct-benefit-heading' => '{{SITENAME}} este un proiect clădit de oameni ca dumneavoastră.', 'createacct-benefit-body1' => '{{PLURAL:$1|modificare|modificări|de modificări}}', 'createacct-benefit-body2' => '{{PLURAL:$1|pagină|pagini|de pagini}}', 'createacct-benefit-body3' => '{{PLURAL:$1|contribuitor recent|contribuitori recenți|de contribuitori recenți}}', 'badretype' => 'Parolele pe care le-ați introdus diferă.', 'userexists' => 'Numele de utilizator pe care l-ați introdus este deja folosit. Vă rugăm să alegeți un alt nume.', 'loginerror' => 'Eroare de autentificare', 'createacct-error' => 'Eroare la crearea contului', 'createaccounterror' => 'Nu pot crea contul: $1', 'nocookiesnew' => 'Contul a fost creat, dar nu sunteți autentificat{{GENDER:||ă|}}. {{SITENAME}} folosește module cookie pentru a reține utilizatorii autentificați. Navigatorul dumneavoastră are aceste module cookie dezactivate. Vă rugăm să le activați și să vă reautentificați folosind noul nume de utilizator și noua parolă.', 'nocookieslogin' => '{{SITENAME}} folosește module cookie pentru a autentifica utilizatorii. Browser-ul dvs. are cookie-urile dezactivate. Vă rugăm să le activați și să incercați din nou.', 'nocookiesfornew' => 'Contul de utilizator nu a fost creat, deoarece nu am putut confirma sursa. Asigurați-vă că aveți cookie-urile activate, reîncărcați pagina și încercați din nou.', 'noname' => 'Numele de utilizator pe care l-ați introdus nu este valid.', 'loginsuccesstitle' => 'Autentificare reușită', 'loginsuccess' => "'''Ați fost autentificat la {{SITENAME}} ca „$1”.'''", 'nosuchuser' => 'Nu există nici un utilizator cu numele „$1”. Numele de utilizatori sunt sensibile la majuscule. Verifică dacă ai scris corect sau [[Special:UserLogin/signup|creează un nou cont de utilizator]].', 'nosuchusershort' => 'Nu există niciun utilizator cu numele „$1”. Verificați ortografierea.', 'nouserspecified' => 'Trebuie să specificați un nume de utilizator.', 'login-userblocked' => 'Acest utilizator este blocat. Autentificarea nu este permisă.', 'wrongpassword' => 'Parola pe care ați introdus-o este incorectă. Vă rugăm să încercați din nou.', 'wrongpasswordempty' => 'Spațiul pentru introducerea parolei nu a fost completat. Vă rugăm să încercați din nou.', 'passwordtooshort' => 'Parola trebuie să aibă cel puțin {{PLURAL:$1|1 caracter|$1 caractere|$1 de caractere}}.', 'password-name-match' => 'Parola dumneavoastră trebuie să fie diferită de numele de utilizator.', 'password-login-forbidden' => 'Utilizarea acestui nume de utilizator și a acestei parole este interzisă.', 'mailmypassword' => 'Resetează parola', 'passwordremindertitle' => 'Noua parolă temporară la {{SITENAME}}', 'passwordremindertext' => 'Cineva (probabil dumneavoastră, de la adresa $1) a cerut să vi se trimită o nouă parolă pentru {{SITENAME}} ($4). O parolă temporară pentru utilizatorul „$2” a fost generată și este acum „$3”. Parola temporară va expira {{PLURAL:$5|într-o zi|în $5 zile|în $5 de zile}}. Dacă această cerere a fost efectuată de altcineva sau dacă v-ați amintit parola și nu doriți să o schimbați, ignorați acest mesaj și continuați să folosiți vechea parolă.', 'noemail' => 'Nu este nici o adresă de e-mail înregistrată pentru utilizatorul „$1”.', 'noemailcreate' => 'Trebuie oferită o adresă e e-mail validă.', 'passwordsent' => 'O nouă parolă a fost trimisă la adresa de e-mail a utilizatorului "$1". Te rugăm să te autentifici pe {{SITENAME}} după ce o primești.', 'blocked-mailpassword' => 'Această adresă IP este blocată la editare, și deci nu este permisă utilizarea funcției de recuperare a parolei pentru a preveni abuzul.', 'eauthentsent' => 'Un e-mail de confirmare a fost trimis către adresa specificată. Înainte ca orice alt e-mail să mai fie trimis către acel cont, trebuie să urmați instrucțiunile prezente în e-mail pentru a confirma că acest cont este într-adevăr al dumneavoastră.', 'throttled-mailpassword' => 'Un e-mail pentru resetarea parolei a fost deja trimis în {{PLURAL:$1|ultima oră|ultimele $1 ore|ultimele $1 de ore}}. Pentru a preveni abuzul, se va trimite doar un e-mail de resetare a parolei la un interval de o {{PLURAL:$1|o oră|$1 ore|$1 de ore}}.', 'mailerror' => 'Eroare la trimitere e-mail: $1', 'acct_creation_throttle_hit' => 'De la această adresă IP, vizitatorii sitului au creat {{PLURAL:$1|1 cont|$1 conturi|$1 de conturi}} de utilizator în ultimele zile, acest număr de noi conturi fiind maximul admis în această perioadă de timp. Prin urmare, vizitatorii care folosesc același IP nu mai pot crea alte conturi pentru moment.', 'emailauthenticated' => 'Adresa de e-mail a fost autentificată pe $2, la $3.', 'emailnotauthenticated' => 'Adresa dumneavoastră de e-mail nu este autentificată încă. Nici un e-mail nu va fi trimis pentru nici una din întrebuințările următoare.', 'noemailprefs' => 'Nu a fost specificată o adresă email, următoarele nu vor funcționa.', 'emailconfirmlink' => 'Confirmați adresa dvs. de email', 'invalidemailaddress' => 'Adresa de email nu a putut fi acceptată pentru că pare a avea un format invalid. Vă rugăm să reintroduceți o adresă bine formatată sau să goliți acel câmp.', 'cannotchangeemail' => 'Adresele de e-mail asociate conturilor nu pot fi schimbate pe acest wiki.', 'emaildisabled' => 'Acest site nu poate trimite e-mailuri.', 'accountcreated' => 'Contul a fost creat.', 'accountcreatedtext' => 'Contul utilizatorului pentru [[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|discuție]]) a fost creat.', 'createaccount-title' => 'Creare de cont la {{SITENAME}}', 'createaccount-text' => 'Cineva a creat un cont asociat adresei dumneavoastră de e-mail pe {{SITENAME}} ($4) numit „$2” și având parola „$3”. Este de dorit să vă autentificați și să schimbați parola cât mai repede. Ignorați acest mesaj dacă crearea contului s-a produs în urma unei greșeli.', 'usernamehasherror' => 'Numele de utilizator nu poate conține caractere diez (#)', 'login-throttled' => 'Ați avut prea multe încercări recente de a vă autentifica. Vă rugăm să așteptați $1 până să reîncercați.', 'login-abort-generic' => 'Procesul de autentificare a eșuat și a fost abandonat', 'loginlanguagelabel' => 'Limba: $1', 'suspicious-userlogout' => 'Cererea dumneavoastră de a închide sesiunea a fost refuzată întrucât pare că a fost trimisă printr-o eroare a navigatorului sau de un proxy memorat în cache.', 'createacct-another-realname-tip' => 'Numele real este opțional. Dacă decideți furnizarea sa, acesta va fi folosit pentru a atribui utilizatorului munca sa.', # Email sending 'php-mail-error-unknown' => 'Eroare necunoscută în funcția PHP mail()', 'user-mail-no-addy' => 'S-a încercat trimiterea e-mailului fără o adresă de e-mail.', 'user-mail-no-body' => 'S-a încercat trimiterea unui e-mail fără conținut sau nejustificat de scurt.', # Change password dialog 'changepassword' => 'Schimbare parolă', 'resetpass_announce' => 'Sunteți autentificat cu un cod temporar trimis pe e-mail. Pentru a termina acțiunea de autentificare, trebuie să setați o parolă nouă aici:', 'resetpass_text' => '<!-- Adăugați text aici -->', 'resetpass_header' => 'Modificare parolă', 'oldpassword' => 'Parola veche:', 'newpassword' => 'Parola nouă:', 'retypenew' => 'Reintroduceți noua parolă:', 'resetpass_submit' => 'Setează parola și autentifică', 'changepassword-success' => 'Parola dumneavoastră a fost schimbată cu succes!', 'resetpass_forbidden' => 'Parolele nu pot fi schimbate.', 'resetpass-no-info' => 'Trebuie să fiți autentificat pentru a accesa această pagină direct.', 'resetpass-submit-loggedin' => 'Modifică parola', 'resetpass-submit-cancel' => 'Revocare', 'resetpass-wrong-oldpass' => 'Parolă curentă sau temporară incorectă. Este posibil să fi reușit deja schimbarea parolei sau să fi cerut o parolă temporară nouă.', 'resetpass-temp-password' => 'Parolă temporară:', 'resetpass-abort-generic' => 'Schimbarea parolei a fost anulată de către o extensie.', # Special:PasswordReset 'passwordreset' => 'Resetare parolă', 'passwordreset-text-one' => 'Completați acest formular pentru a vă reseta parola.', 'passwordreset-text-many' => '{{PLURAL:$1|Completați unul din câmpuri pentru a primi o parolă temporară prin e-mail.}}', 'passwordreset-legend' => 'Resetare parolă', 'passwordreset-disabled' => 'Resetarea parolei a fost dezactivată pe acest wiki.', 'passwordreset-emaildisabled' => 'Funcțiile de e-mail au fost dezactivate de pe acest wiki.', 'passwordreset-username' => 'Nume de utilizator:', 'passwordreset-domain' => 'Domeniu:', 'passwordreset-capture' => 'Vizualizați e-mailul rezultat?', 'passwordreset-capture-help' => 'Dacă bifați această căsuță, e-mailul (conținând parola temperară) vă va fi afișat, dar va fi trimis și utilizatorului.', 'passwordreset-email' => 'Adresă de e-mail:', 'passwordreset-emailtitle' => 'Detalii despre cont pe {{SITENAME}}', 'passwordreset-emailtext-ip' => 'Cineva (probabil dumneavoastră, de la adresa IP $1) a solicitat resetarea parolei pentru {{SITENAME}} ($4). {{PLURAL:$3|Următorul cont este asociat|Următoarele conturi sunt asociate}} cu această adresă de e-mail: $2 {{PLURAL:$3|Această parolă temporară va|Aceste parole temporare vor}} expira {{PLURAL:$5|într-o zi|în $5 zile}}. Ar trebui să vă autentificați și să schimbați parola acum. Dacă altcineva a făcut această cerere sau dacă v-ați reamintit parola inițială și nu mai doriți să o schimbați, puteți ignora acest mesaj, continuând să utilizați vechea parolă.', 'passwordreset-emailtext-user' => 'Utilizatorul $1 de pe {{SITENAME}} a solicitat o resetare a parolei dumneavoastră pentru {{SITENAME}} ($4). Următorul utilizator are {{PLURAL:$3|contul asociat|conturile asociate}} cu această adresă de e-mail: $2 {{PLURAL:$3|Această parolă temporară va|Aceste parole temporare vor}} expira {{PLURAL:$5|într-o zi|în $5 zile}}. Ar trebui să vă autentificați și să alegeți acum o nouă parolă. Dacă altcineva a făcut această solicitare, ori dacă v-ați reamintit parola originală și nu mai doriți modificarea ei, puteți ignora acest mesaj, continuând cu vechea parolă.', 'passwordreset-emailelement' => 'Nume de utilizator: $1 Parolă temporară: $2', 'passwordreset-emailsent' => 'A fost trimis un e-mail de resetare a parolei.', 'passwordreset-emailsent-capture' => 'Un mesaj de resetare a parolei a fost trimis, fiind afișat mai jos.', 'passwordreset-emailerror-capture' => 'Un mesaj de resetare a parolei a fost generat (fiind afișat mai jos), dar trimiterea sa către {{GENDER:$2|utilizator}} a eșuat: $1', # Special:ChangeEmail 'changeemail' => 'Modificare adresă de e-mail', 'changeemail-header' => 'Modificare adresă de e-mail asociată contului', 'changeemail-text' => 'Completați acest formular pentru a vă modifica adresa de e-mail. Va trebui să introduceți și parola pentru a confirma această modificare.', 'changeemail-no-info' => 'Trebuie să fiți autentificat pentru a accesa această pagină direct.', 'changeemail-oldemail' => 'Adresa de e-mail actuală:', 'changeemail-newemail' => 'Noua adresă de e-mail:', 'changeemail-none' => '(niciuna)', 'changeemail-password' => 'Parola dumneavoastră la {{SITENAME}}:', 'changeemail-submit' => 'Modifică adresa de e-mail', 'changeemail-cancel' => 'Revocare', # Special:ResetTokens 'resettokens' => 'Resetare jetoane', 'resettokens-text' => 'Puteți reseta, aici, jetoanele care permit accesul la anumite date asociate contului dumneavoastră. Ar trebui să faceți acest lucru numai dacă le-ați partajat accidental cu altcineva ori contul dumneavoastră a fost compromis.', 'resettokens-no-tokens' => 'Nu există jetoane de resetat.', 'resettokens-legend' => 'Resetare jetoane', 'resettokens-tokens' => 'Jetoane:', 'resettokens-token-label' => '$1 (valoare actuală: $2)', 'resettokens-watchlist-token' => 'Jeton pentru fluxul web (Atom/RSS) al [[Special:Watchlist|modificărilor aduse paginilor pe care le urmăriți]]', 'resettokens-done' => 'Jetoane resetate.', 'resettokens-resetbutton' => 'Resetează jetoanele selectate', # Edit page toolbar 'bold_sample' => 'Text aldin', 'bold_tip' => 'Text aldin', 'italic_sample' => 'Text cursiv', 'italic_tip' => 'Text cursiv', 'link_sample' => 'Titlul legăturii', 'link_tip' => 'Legătură internă', 'extlink_sample' => 'http://www.example.com titlul legăturii', 'extlink_tip' => 'Legătură externă (nu uitați prefixul http://)', 'headline_sample' => 'Text de titlu', 'headline_tip' => 'Titlu de nivel 2', 'nowiki_sample' => 'Introduceți text neformatat aici', 'nowiki_tip' => 'Ignoră formatarea wiki', 'image_sample' => 'Exemplu.jpg', 'image_tip' => 'Fișier inserat', 'media_sample' => 'Exemplu.ogg', 'media_tip' => 'Legătură la fișier', 'sig_tip' => 'Semnătura dvs. datată', 'hr_tip' => 'Linie orizontală (folosiți-o cumpătat)', # Edit pages 'summary' => 'Rezumat:', 'subject' => 'Subiect / titlu:', 'minoredit' => 'Aceasta este o modificare minoră', 'watchthis' => 'Monitorizează această pagină', 'savearticle' => 'Salvare pagină', 'preview' => 'Previzualizare', 'showpreview' => 'Previzualizare', 'showlivepreview' => 'Previzualizare live', 'showdiff' => 'Afișare diferențe', 'anoneditwarning' => "'''Atenție:''' Nu v-ați autentificat. Adresa IP vă va fi înregistrată în istoricul acestei pagini.", 'anonpreviewwarning' => "''Nu v-ați autentificat. Dacă salvați pagina adresa dumneavoastră IP va fi înregistrată în istoric.''", 'missingsummary' => "'''Atenție:''' Nu ați completat caseta „descriere modificări”. Dacă apăsați din nou butonul „salvează pagina” modificările vor fi salvate fără descriere.", 'missingcommenttext' => 'Vă rugăm să introduceți un comentariu.', 'missingcommentheader' => "'''Atenție,''' nu ați pus titlu sau subiect la acest comentariu. Dacă dați din nou clic pe „{{int:savearticle}}” modificarea va fi salvată fără titlu.", 'summary-preview' => 'Previzualizare descriere:', 'subject-preview' => 'Previzualizare subiect/titlu:', 'blockedtitle' => 'Utilizatorul este blocat', 'blockedtext' => "'''Adresa IP sau contul dumneavoastră de utilizator a fost blocat.''' Blocarea a fost făcută de $1. Motivul blocării este ''$2''. * Începutul blocării: $8 * Sfârșitul blocării: $6 * Utilizatorul vizat: $7 Îl puteți contacta pe $1 sau pe alt [[{{MediaWiki:Grouppage-sysop}}|administrator]] pentru a discuta blocarea. Nu puteți folosi opțiunea 'trimite un e-mai utilizatorului' decât dacă o adresă de e-mail validă este specificată în [[Special:Preferences|preferințele contului]] și nu sunteți blocat la folosirea ei. Adresa dumneavoastră IP curentă este $3, iar ID-ul blocării este $5. Vă rugăm să includeți oricare sau ambele informații în orice interogări.", 'autoblockedtext' => 'Această adresă IP a fost blocată automat deoarece a fost folosită de către un alt utilizator, care a fost blocat de $1. Motivul blocării este: :\'\'$2\'\' * Începutul blocării: $8 * Sfârșitul blocării: $6 * Intervalul blocării: $7 Puteți contacta pe $1 sau pe unul dintre ceilalți [[{{MediaWiki:Grouppage-sysop}}|administratori]] pentru a discuta blocarea. Nu veți putea folosi opțiunea de "trimite e-mail" decât dacă aveți înregistrată o adresă de e-mail validă la [[Special:Preferences|preferințe]] și nu sunteți blocat la folosirea ei. Aveți adresa IP $3, iar identificatorul dumneavoastră de blocare este $5. Vă rugăm să includeți detaliile de mai sus în orice interogări pe care le faceți.', 'blockednoreason' => 'nici un motiv oferit', 'whitelistedittext' => 'Trebuie să vă $1 pentru a putea modifica pagini.', 'confirmedittext' => 'Trebuie să vă confirmați adresa de e-mail înainte de a edita pagini. Vă rugăm să vă setați și să vă validați adresa de e-mail cu ajutorul [[Special:Preferences|preferințelor utilizatorului]].', 'nosuchsectiontitle' => 'Secțiunea nu poate fi găsită', 'nosuchsectiontext' => 'Ați încercat să modificați o secțiune care nu există. Aceasta fie a fost mutată, fie a fost ștearsă în timp ce vizualizați pagina.', 'loginreqtitle' => 'Necesită autentificare', 'loginreqlink' => 'autentificați', 'loginreqpagetext' => 'Trebuie să vă $1 pentru a vizualiza alte pagini.', 'accmailtitle' => 'Parola a fost trimisă.', 'accmailtext' => "O parolă generată aleator pentru [[User talk:$1|$1]] a fost trimisă la $2. Parola poate fi schimbată după autentificare din pagina ''[[Special:ChangePassword|schimbare parolă]]''.", 'newarticle' => '(Nou)', 'newarticletext' => 'Ați încercat să ajungeți la o pagină care nu există. Pentru a o crea, începeți să scrieți în caseta de mai jos (vedeți [[{{MediaWiki:Helppage}}|pagina de ajutor]] pentru mai multe informații). Dacă ați ajuns aici din greșeală, întoarceți-vă folosind controalele navigatorului dumneavoastră.', 'anontalkpagetext' => "---- ''Aceasta este pagina de discuții pentru un utilizator care nu și-a creat un cont încă, sau care nu s-a autentificat. De aceea trebuie să folosim adresă IP pentru a identifica această persoană. O adresă IP poate fi folosită în comun de mai mulți utilizatori. Dacă sunteți un astfel de utilizator și credeți că vă sunt adresate mesaje irelevante, vă rugăm să [[Special:UserLogin/signup|vă creați un cont]] sau să [[Special:UserLogin|vă autentificați]] pentru a evita confuzii cu alți utilizatori anonimi în viitor.''", 'noarticletext' => 'Actualmente, această pagină este lipsită de conținut. Puteți [[Special:Search/{{PAGENAME}}|căuta acest titlu]] în alte pagini, puteți <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} căuta înregistrări în jurnale] sau puteți [{{fullurl:{{FULLPAGENAME}}|action=edit}} crea această pagină]</span>.', 'noarticletext-nopermission' => 'Actualmente, această pagină este lipsită de conținut. Puteți [[Special:Search/{{PAGENAME}}|căuta acest titlu]] în alte pagini sau puteți <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} căuta înregistrări în jurnale]</span>; nu aveți însă permisiunea de a crea această pagină.', 'missing-revision' => 'Versiunea nr. $1 a paginii „{{PAGENAME}}” nu există. Acest lucru se întâmplă de obicei atunci când se accesează o legătură expirată către istoricul unei pagini șterse. Detalii se pot găsi în [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jurnalul ștergerilor].', 'userpage-userdoesnotexist' => 'Contul de utilizator „<nowiki>$1</nowiki>” nu este înregistrat. Asigurați-vă că doriți să creați/modificați această pagină.', 'userpage-userdoesnotexist-view' => 'Contul de utilizator „$1” nu este înregistrat.', 'blocked-notice-logextract' => 'Acest utilizator este momentan blocat. Ultima intrare în jurnalul blocărilor este afișată mai jos pentru referință:', 'clearyourcache' => "'''Notă:''' După salvare, trebuie să treceți peste memoria cache a navigatorului pentru a putea vedea modificările: * '''Firefox / Safari:''' țineți apăsat pe ''Shift'' în timp ce faceți clic pe ''Reîncărcare'', ori apăsați ''Ctrl-F5'' sau ''Ctrl-R'' (''⌘-R'' pe un sistem Mac); * '''Google Chrome:''' apăsați ''Ctrl-Shift-R'' (''⌘-Shift-R'' pe un sistem Mac); * '''Internet Explorer:''' țineți apăsat pe ''Ctrl'' în timp ce faceți clic pe ''Reîmprospătare'' sau apăsați ''Ctrl-F5''; * '''Opera:''' curățați memoria cache din ''Unelte → Preferințe''.", 'usercssyoucanpreview' => "'''Sfat:''' Folosiți butonul „{{int:showpreview}}” pentru a testa noul CSS înainte de a-l salva.", 'userjsyoucanpreview' => "'''Sfat:''' Folosiți butonul „{{int:showpreview}}” pentru a testa noul JavaScript înainte de a-l salva.", 'usercsspreview' => "'''Rețineți că vizualizați doar o previzualizare a CSS-ului dumneavoastră de utilizator.''' '''Acesta nu a fost încă salvat!'''", 'userjspreview' => "'''Rețineți că vizualizați doar o previzualizare/versiune de testare a JavaScript-ului dumneavoastră de utilizator.''' '''Acesta nu a fost încă salvat!'''", 'sitecsspreview' => "'''Rețineți că doar previzualizați această foaie de stil.''' '''Ea nu a fost salvată încă!'''", 'sitejspreview' => "'''Rețineți că doar previzualizați acest cod JavaScript.''' '''El nu a fost salvat încă!'''", 'userinvalidcssjstitle' => "'''Avertizare:''' Nu există aspectul „$1”. Paginile .css și .js specifice utilizatorilor au titluri care încep cu literă mică; de exemplu {{ns:user}}:Foo/vector.css în comparație cu {{ns:user}}:Foo/Vector.css.", 'updated' => '(Actualizat)', 'note' => "'''Notă:'''", 'previewnote' => "'''Țineți cont că aceasta este doar o previzualizare.''' Modificările dumneavoastră nu au fost încă salvate!", 'continue-editing' => 'Mergi la zona de editare', 'previewconflict' => 'Această pre-vizualizare reflectă textul din caseta de sus, respectiv felul în care va arăta articolul dacă alegeți să-l salvați acum.', 'session_fail_preview' => "'''Ne pare rău! Nu am putut procesa modificarea dumneavoastră din cauza pierderii datelor sesiunii. Vă rugăm să încercați din nou. Dacă tot nu funcționează, încercați să [[Special:UserLogout|închideți sesiunea]] și să vă autentificați din nou.'''", 'session_fail_preview_html' => "'''Ne pare rău! Modificările dvs. nu au putut fi procesate din cauza pierderii datelor sesiunii.''' ''Deoarece {{SITENAME}} are activat HTML brut, previzualizarea este ascunsă ca măsură de precauție împotriva atacurilor JavaScript.'' '''Dacă această încercare de modificare este legitimă, vă rugăm să încercați din nou. Dacă nu funcționează nici în acest fel, [[Special:UserLogout|închideți sesiunea]] și încearcați să vă autentificați din nou.'''", 'token_suffix_mismatch' => "'''Modificarea ta a fost refuzată pentru că clientul tău a deformat caracterele de punctuatie în modificarea semnului. Modificarea a fost respinsă pentru a preveni deformarea textului paginii. Acest fapt se poate întâmpla atunci când folosești un serviciu proxy anonim.'''", 'edit_form_incomplete' => "'''Unele părți ale formularului de modificare nu au ajuns la server; verificați dacă modificările dumneavoastră sunt intacte și reîncercați.'''", 'editing' => 'modificare $1', 'creating' => 'Crearea paginii $1', 'editingsection' => 'modificare $1 (secțiune)', 'editingcomment' => 'Modificare $1 (secțiune nouă)', 'editconflict' => 'Conflict de modificare: $1', 'explainconflict' => "Altcineva a modificat această pagină de când ați început editarea. Caseta de text de sus conține pagina așa cum este ea acum (după editarea celeilalte persoane). Pagina cu modificările dumneavoastră (așa cum ați încercat să o salvați) se află în caseta de jos. Va trebui să editați manual caseta de sus pentru a reflecta modificările pe care tocmai le-ați făcut în cea de jos. '''Numai''' textul din caseta de sus va fi salvat atunci când veți apăsa pe „{{int:savearticle}}”.", 'yourtext' => 'Textul dumneavoastră', 'storedversion' => 'Versiunea curentă', 'nonunicodebrowser' => "'''Atenție: Navigatorul dumneavoastră nu este compatibil cu Unicode.''' În schimb, există o soluție care vă permite să modificați paginile în siguranță: caracterele non-ASCII vor fi afișate în caseta de editare drept coduri hexazecimale.", 'editingold' => "'''Atenție: Modificați o versiune veche a acestei pagini.''' Dacă salvați pagina, toate modificările intermediare se vor pierde.", 'yourdiff' => 'Diferențe', 'copyrightwarning' => "Reține că toate contribuțiile la {{SITENAME}} sunt distribuite sub licența $2 (vezi $1 pentru detalii). Dacă nu doriți ca ceea ce scrieți să fie modificat fără milă și redistribuit în voie, atunci nu trimiteți materialele respective aici.<br /> De asemenea, ne asigurați că ceea ce ați scris a fost compoziție proprie sau copie dintr-o resursă publică sau liberă. '''Nu introduceți materiale aflate sub incidența drepturilor de autor fără a avea permisiune!'''", 'copyrightwarning2' => "Rețineți că toate contribuțiile la {{SITENAME}} pot fi modificate, alterate sau șterse de alți contribuitori. Dacă nu doriți ca ceea ce scrieți să fie modificat fără milă și redistribuit în voie, atunci nu trimiteți materialele respective aici.<br /> De asemenea, ne asigurați că ceea ce ați scris a fost compoziție proprie sau copie dintr-o resursă publică sau liberă (vedeți $1 pentru detalii). '''Nu introduceți materiale aflate sub incidența drepturilor de autor fără a avea permisiune!'''", 'longpageerror' => "'''Eroare: Textul pe care l-ați trimis are o lungime de {{PLURAL:$1|un kilooctet|$1 kiloocteți|$1 de kiloocteți}}, ceea ce înseamnă mai mult decât maximul de {{PLURAL:$2|un kilooctet|$2 kiloocteți|$2 de kiloocteți}}.''' Salvarea nu este posibilă.", 'readonlywarning' => "'''Atenție: Baza de date a fost blocată pentru întreținere, deci nu veți putea salva modificările în acest moment.''' Puteți copia textul într-un fișier text, păstrându-l pentru mai târziu. Administratorul care a efectuat blocarea a oferit următoarea explicație: $1", 'protectedpagewarning' => "'''Atenție: această pagină a fost protejată astfel încât poate fi modificată doar de către administratori.''' Ultima intrare în jurnal este afișată mai jos pentru referință:", 'semiprotectedpagewarning' => "'''Observație: această pagină a fost protejată și poate fi modificată doar de către utilizatorii înregistrați.''' Ultima intrare în jurnal este afișată mai jos pentru referință:", 'cascadeprotectedwarning' => "'''Atenție:''' Această pagină a fost blocată astfel încât numai administratorii o pot modifica, deoarece este inclusă în {{PLURAL:$1|următoarea pagină protejată|următoarele pagini protejate}} în cascadă:", 'titleprotectedwarning' => "'''Atenție: această pagină a fost protejată astfel încât doar anumiți [[Special:ListGroupRights|utilizatori]] o pot crea.''' Ultima intrare în jurnal este afișată mai jos pentru referință:", 'templatesused' => '{{PLURAL:$1|Format folosit|Formate folosite}} în această pagină:', 'templatesusedpreview' => '{{PLURAL:$1|Format folosit|Formate folosite}} în această previzualizare:', 'templatesusedsection' => '{{PLURAL:$1|Format utilizat|Formate utilizate}} în această secțiune:', 'template-protected' => '(protejat)', 'template-semiprotected' => '(semiprotejat)', 'hiddencategories' => 'Această pagină este membrul {{PLURAL:$1|unei categorii ascunse|a $1 categorii ascunse}}:', 'edittools' => '<!-- Acest text va apărea după caseta de editare și formularele de trimitere fișier. -->', 'nocreatetext' => '{{SITENAME}} a restricționat abilitatea de a crea pagini noi. Puteți edita o pagină deja existentă sau puteți să vă [[Special:UserLogin|autentificați/creați]] un cont de utilizator.', 'nocreate-loggedin' => 'Nu ai permisiunea să creezi pagini noi.', 'sectioneditnotsupported-title' => 'Modificarea secțiunilor nu este suportată', 'sectioneditnotsupported-text' => 'Modificarea secțiunilor nu este suportată în această pagină.', 'permissionserrors' => 'Eroare de permisiune', 'permissionserrorstext' => 'Nu aveți permisiune pentru a face acest lucru, din următoarele {{PLURAL:$1|motiv|motive}}:', 'permissionserrorstext-withaction' => 'Nu aveți permisiunea să $2, din {{PLURAL:$1|următorul motivul|următoarele motive}}:', 'recreate-moveddeleted-warn' => "'''Atenție: Recreați o pagină care a fost ștearsă anterior.''' Asigurați-vă că este oportună recrearea acestei pagini. Jurnalul ștergerilor și al mutărilor pentru această pagină este disponibil:", 'moveddeleted-notice' => 'Această pagină a fost ștearsă. Jurnalul ștergerilor și al redenumirilor este disponibil mai jos.', 'log-fulllog' => 'Vezi tot jurnalul', 'edit-hook-aborted' => 'Modificarea a fost abandonată din cauza unui hook. Nicio explicație furnizată.', 'edit-gone-missing' => 'Pagina nu s-a putut actualiza. Se pare că a fost ștearsă.', 'edit-conflict' => 'Conflict de modificare.', 'edit-no-change' => 'Modificarea dvs. a fost ignorată deoarece nu s-a efectuat nicio schimbare.', 'postedit-confirmation' => 'Modificarea dumneavoastră a fost salvată.', 'edit-already-exists' => 'Pagina nouă nu a putut fi creată. Ea există deja.', 'defaultmessagetext' => 'Textul implicit', 'content-failed-to-parse' => 'Nu s-a putut analiza conținutul de tip $2 pentru modelul $1: $3', 'invalid-content-data' => 'Date de conținut invalide', 'content-not-allowed-here' => 'Conținutul de tip „$1” nu este permis pe pagina [[$2]]', 'editwarning-warning' => 'Părăsind această pagină, există riscul pierderii modificărilor efectuate. Dacă sunteți autentificat, puteți dezactiva această avertizare în secțiunea „Modificare” a preferințelor dumneavoastră.', 'editpage-notsupportedcontentformat-title' => 'Formatul conținutului nu este acceptat', 'editpage-notsupportedcontentformat-text' => 'Formatul de conținut $1 nu este acceptat de modelul de conținut $2.', # Content models 'content-model-wikitext' => 'wikitext', 'content-model-text' => 'text simplu', 'content-model-javascript' => 'JavaScript', 'content-model-css' => 'CSS', # Parser/template warnings 'expensive-parserfunction-warning' => 'Atenție: Această pagină conține prea multe apelări costisitoare ale funcțiilor parser. Ar trebui să existe mai puțin de $2 {{PLURAL:$2|apelare|apelări}}, acolo există {{PLURAL:$1|$1 apelare|$1 apelări}}.', 'expensive-parserfunction-category' => 'Pagini cu prea multe apelări costisitoare de funcții parser', 'post-expand-template-inclusion-warning' => 'Atenție: Formatele incluse sunt prea mari. Unele formate nu vor fi incluse.', 'post-expand-template-inclusion-category' => 'Paginile în care este inclus formatul are o dimensiune prea mare', 'post-expand-template-argument-warning' => 'Atenție: Această pagină conține cel puțin un argument al unui format care are o mărime prea mare atunci când este expandat. Acsete argumente au fost omise.', 'post-expand-template-argument-category' => 'Pagini care conțin formate cu argumente omise', 'parser-template-loop-warning' => 'Buclă de formate detectată: [[$1]]', 'parser-template-recursion-depth-warning' => 'Limită de adâncime a recursiei depășită ($1)', 'language-converter-depth-warning' => 'Limita adâncimii convertorului de limbă a fost depășită ($1)', 'node-count-exceeded-category' => 'Pagini unde numărul de noduri este depășit', 'node-count-exceeded-warning' => 'Pagina a depășit numărul de noduri', 'expansion-depth-exceeded-category' => 'Pagini unde profunzimea de expansiune este depășită', 'expansion-depth-exceeded-warning' => 'Pagina depășește profunzimea de expansiune', 'parser-unstrip-loop-warning' => 'Buclă nedetașabilă detectată', 'parser-unstrip-recursion-limit' => 'Limita de recursivitate nedetașabilă depășită ($1)', 'converter-manual-rule-error' => 'Eroare detectată în regula manuală de conversie a limbii', # "Undo" feature 'undo-success' => 'Modificarea poate fi anulată. Verificați diferența de dedesupt și apoi salvați pentru a termina anularea modificării.', 'undo-failure' => 'Modificarea nu poate fi reversibilă datorită conflictului de modificări intermediare.', 'undo-norev' => 'Modificarea nu poate fi reversibilă pentru că nu există sau pentru că a fost ștearsă.', 'undo-summary' => 'Anularea modificării $1 făcute de [[Special:Contributions/$2|$2]] ([[User talk:$2|Discuție]])', 'undo-summary-username-hidden' => 'Anularea versiunii $1 a unui utilizator ascuns', # Account creation failure 'cantcreateaccounttitle' => 'Crearea contului nu poate fi realizată', 'cantcreateaccount-text' => "Crearea de conturi de la această adresă IP ('''$1''') a fost blocată de [[User:$3|$3]]. Motivul invocat de $3 este ''$2''", 'cantcreateaccount-range-text' => "Crearea de conturi de la adresele IP din gama '''$1''', care o include și pe a dumneavoastră ('''$4'''), a fost blocată de [[User:$3|$3]]. Motivul invocat de $3 este ''$2''", # History pages 'viewpagelogs' => 'Afișează jurnalele paginii', 'nohistory' => 'Nu există istoric pentru această pagină.', 'currentrev' => 'Versiunea curentă', 'currentrev-asof' => 'Versiunea curentă din $1', 'revisionasof' => 'Versiunea de la data $1', 'revision-info' => 'Versiunea din $1; autor: $2', 'previousrevision' => '←Versiunea anterioară', 'nextrevision' => 'Versiunea următoare →', 'currentrevisionlink' => 'Versiunea curentă', 'cur' => 'actuală', 'next' => 'următoarea', 'last' => 'prec', 'page_first' => 'prima', 'page_last' => 'ultima', 'histlegend' => 'Legendă: (actuală) = diferențe față de versiunea curentă, (prec) = diferențe față de versiunea precedentă, M = modificare minoră', 'history-fieldset-title' => 'Răsfoire istoric', 'history-show-deleted' => 'Doar șterse', 'histfirst' => 'cele mai vechi', 'histlast' => 'cele mai noi', 'historysize' => '({{PLURAL:$1|1 octet|$1 octeți|$1 de octeți}})', 'historyempty' => '(gol)', # Revision feed 'history-feed-title' => 'Revizia istoricului', 'history-feed-description' => 'Istoricul versiunilor pentru această pagină din wiki', 'history-feed-item-nocomment' => '$1 la $2', 'history-feed-empty' => 'Pagina solicitată nu există. E posibil să fi fost ștearsă sau redenumită. Încearcă să [[Special:Search|cauți]] pe wiki pentru pagini noi semnificative.', # Revision deletion 'rev-deleted-comment' => '(descrierea modificării ștearsă)', 'rev-deleted-user' => '(nume de utilizator șters)', 'rev-deleted-event' => '(intrare ștearsă)', 'rev-deleted-user-contribs' => '[nume de utilizator sau adresă IP ștearsă - modificare ascunsă din contribuții]', 'rev-deleted-text-permission' => "Această versiune a paginii a fost '''ștearsă'''. Mai multe detalii în [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} jurnalul ștergerilor].", 'rev-deleted-text-unhide' => "Această versiune a paginii a fost '''ștearsă'''. Detalii se pot găsi în [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jurnalul ștergerilor]. Ca administrator puteți [$1 vedea această versiune] în continuare, dacă doriți acest lucru.", 'rev-suppressed-text-unhide' => "Această versiune a paginii a fost '''suprimată'''. Detalii se pot găsi în [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} jurnalul suprimărilor]. Ca administrator puteți [$1 vedea această versiune] în continuare, dacă doriți acest lucru.", 'rev-deleted-text-view' => "Această versiune a paginii a fost '''ștearsă'''. Ca administrator puteți să o vedeți; detalii puteți găsi în [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jurnalul ștergerilor].", 'rev-suppressed-text-view' => "Această versiune a paginii a fost '''suprimată'''. Ca administrator puteți să o vedeți; detalii puteți găsi în [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} jurnalul suprimărilor].", 'rev-deleted-no-diff' => "Nu puteți vedea acestă diferență deoarece una dintre versiuni a fost '''ștearsă'''. Detalii în [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jurnalul ștergerilor].", 'rev-suppressed-no-diff' => "Nu puteți vizualiza această diferență între versiuni deoarece una dintre versiuni a fost '''ștearsă'''.", 'rev-deleted-unhide-diff' => "Una din versiunile acestui istoric a fost '''ștearsă'''. Detalii se pot găsi în [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jurnalul ștergerilor]. Ca administrator puteți [$1 vedea diferența] în continuare, dacă doriți acest lucru.", 'rev-suppressed-unhide-diff' => "Una dintre versiunile acestui istoric a fost '''suprimată'''. Detalii se pot găsi în [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} jurnalul suprimărilor]. Ca administrator puteți [$1 vedea diferența] în continuare, dacă doriți acest lucru.", 'rev-deleted-diff-view' => "Una dintre versiunile acestui istoric a fost '''ștearsă'''. Ca administrator puteți vedea în continuare această diferență dinte versiuni; detalii puteți găsi în [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jurnalul ștergerilor].", 'rev-suppressed-diff-view' => "Una dintre reviziile acestui istoric a fost '''suprimată'''. Ca administrator puteți vedea în continuare această diferență dinte versiuni; detalii puteți găsi în [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} jurnalul suprimărilor].", 'rev-delundel' => 'șterge/recuperează', 'rev-showdeleted' => 'arată', 'revisiondelete' => 'Ștergere/recuperare versiuni', 'revdelete-nooldid-title' => 'Versiune invalidă', 'revdelete-nooldid-text' => 'Fie nu ați specificat versiunea pentru a efectua această funcție, fie versiunea specificată nu există, ori sunteți pe cale să ascundeți versiunea curentă.', 'revdelete-no-file' => 'Fișierul specificat nu există.', 'revdelete-show-file-confirm' => 'Sigur doriți să vedeți versiunea ștearsă a fișierului „<nowiki>$1</nowiki>” din $2 ora $3?', 'revdelete-show-file-submit' => 'Da', 'revdelete-selected' => "'''{{PLURAL:$2|Versiunea aleasă|Versiunile alese}} pentru [[:$1]]:'''", 'logdelete-selected' => "'''{{PLURAL:$1|Revizia aleasă|Reviziile alese}}:'''", 'revdelete-text' => "'''Versiunile șterse vor apărea în istoricul paginii, dar conținutul lor nu va fi accesibil publicului.''' Administratorii {{SITENAME}} pot accesa conținutul șters și îl pot recupera prin aceeași interfață, dacă nu este impusă altă restricție de către operatorii sitului.", 'revdelete-confirm' => 'Vă rugăm să confirmați că intenționați să faceți acest lucru, că înțelegeți consecințele și că faceți asta în conformitate cu [[{{MediaWiki:Policy-url}}|politica]].', 'revdelete-suppress-text' => "Suprimarea trebuie folosită '''doar''' în următoarele cazuri: * Informații potențial calomnioase * Informații personale inadecvate *: ''adrese și numere de telefon personale, CNP, numere de securitate socială etc.''", 'revdelete-legend' => 'Restricții de afișare', 'revdelete-hide-text' => 'Textul versiunii', 'revdelete-hide-image' => 'Șterge conținutul fișierului', 'revdelete-hide-name' => 'Șterge operația și obiectul', 'revdelete-hide-comment' => 'Descrierea modificării', 'revdelete-hide-user' => 'Numele de utilizator sau adresa IP', 'revdelete-hide-restricted' => 'Ascunde informațiile față de administratori și față de alți utilizatori', 'revdelete-radio-same' => '(nu schimba)', 'revdelete-radio-set' => 'Ascuns', 'revdelete-radio-unset' => 'Vizibil', 'revdelete-suppress' => 'Ascunde versiunile și față de administratori', 'revdelete-unsuppress' => 'Anulează restricțiile la versiunile restaurate', 'revdelete-log' => 'Motivul ștergerii:', 'revdelete-submit' => 'Aplică {{PLURAL:$1|versiunii selectate|versiunilor selectate}}', 'revdelete-success' => "'''Vizibilitatea versiunilor a fost schimbată cu succes.'''", 'revdelete-failure' => "'''Nu s-a putut modifica vizibilitatea versiunii:''' $1", 'logdelete-success' => "'''Jurnalul vizibilității a fost configurat cu succes.'''", 'logdelete-failure' => "'''Vizibilitatea jurnalului nu poate fi definită:''' $1", 'revdel-restore' => 'Schimbă vizibilitatea', 'pagehist' => 'Istoricul paginii', 'deletedhist' => 'Istoric șters', 'revdelete-hide-current' => 'Eroare la ștergerea elementului datat $2, $1: reprezintă versiunea curentă și nu poate fi ștearsă.', 'revdelete-show-no-access' => 'Eroare la afișarea elementului datat $2, $1: elementul a fost marcat ca "restricționat". Nu ai acces la acest element.', 'revdelete-modify-no-access' => 'Eroare la modificarea elementului datat $2, $1: acest element a fost marcat "restricționat". Nu ai acces asupra lui.', 'revdelete-modify-missing' => 'Eroare la modificarea elementului ID $1: lipsește din baza de date!', 'revdelete-no-change' => "'''Atenție:''' elementul datat $2, $1 are deja aplicată vizibilitatea cerută.", 'revdelete-concurrent-change' => 'Eroare la modificarea elementului datat $2, $1: statutul său a fost modificat de altcineva în timpul acestei modificări.', 'revdelete-only-restricted' => 'Eroare în timpul suprimării elementului datat $1, $2: nu puteți suprima elemente la vizualizarea de către administratori fără a marca una din celelalte opțiuni de suprimare.', 'revdelete-reason-dropdown' => '*Motive generale de ștergere ** Violarea drepturilor de autor ** Comentarii inadecvate sau informații personale ** Nume de utilizator inadecvat ** Atacuri la persoană', 'revdelete-otherreason' => 'Motiv suplimentar, detalii', 'revdelete-reasonotherlist' => 'Alt motiv', 'revdelete-edit-reasonlist' => 'Modifică lista de motive', 'revdelete-offender' => 'Autorul reviziei:', # Suppression log 'suppressionlog' => 'Înlătură jurnalul', 'suppressionlogtext' => 'Mai jos este afișată o listă a ștergerilor și a blocărilor care implică conținutul ascuns de administratori. Vedeți [[Special:BlockList|lista blocărilor]] pentru o listă a interzicerilor operaționale sau a blocărilor.', # History merging 'mergehistory' => 'Unește istoricul paginilor', 'mergehistory-header' => 'Această pagină permite să combini reviziile din istoric dintr-o pagină sursă într-o pagină nouă. Asigură-te că această schimbare va menține continuitatea istoricului paginii.', 'mergehistory-box' => 'Combină reviziile a două pagini:', 'mergehistory-from' => 'Pagina sursă:', 'mergehistory-into' => 'Pagina destinație:', 'mergehistory-list' => 'Istoricul la care se aplică combinarea', 'mergehistory-merge' => 'Următoarele versiuni ale [[:$1]] pot fi combinate în [[:$2]]. Folosiți coloana butonului radio pentru a combina doar versiunile create la și înainte de momentul specificat. Folosirea linkurilor de navigare va reseta această coloană.', 'mergehistory-go' => 'Vezi modificările care pot fi combinate', 'mergehistory-submit' => 'Unește reviziile', 'mergehistory-empty' => 'Reviziile nu pot fi combinate.', 'mergehistory-success' => '$3 {{PLURAL:$3|versiune|versiuni|de versiuni}} ale [[:$1]] {{PLURAL:$3|a fost unită|au fost unite|au fost unite}} cu succes în [[:$2]].', 'mergehistory-fail' => 'Nu se poate executa combinarea istoricului, te rog verifică parametrii pagină și timp.', 'mergehistory-no-source' => 'Pagina sursă $1 nu există.', 'mergehistory-no-destination' => 'Pagina de destinație $1 nu există.', 'mergehistory-invalid-source' => 'Pagina sursă trebuie să aibă un titlu valid.', 'mergehistory-invalid-destination' => 'Pagina de destinație trebuie să aibă un titlu valid.', 'mergehistory-autocomment' => 'Combinat [[:$1]] în [[:$2]]', 'mergehistory-comment' => 'Combinat [[:$1]] în [[:$2]]: $3', 'mergehistory-same-destination' => 'Paginile sursă și destinație nu pot fi identice', 'mergehistory-reason' => 'Motiv:', # Merge log 'mergelog' => 'Jurnal unificări', 'pagemerge-logentry' => 'combină [[$1]] cu [[$2]] (versiuni până la $3)', 'revertmerge' => 'Anulează îmbinarea', 'mergelogpagetext' => 'Mai jos este o listă a celor mai recente combinări ale istoricului unei pagini cu al alteia.', # Diffs 'history-title' => 'Istoricul versiunilor pentru „$1”', 'difference-title' => '$1: Diferență între versiuni', 'difference-title-multipage' => '$1 și $2: Diferență între pagini', 'difference-multipage' => '(Diferență între pagini)', 'lineno' => 'Linia $1:', 'compareselectedversions' => 'Compară versiunile marcate', 'showhideselectedversions' => 'Șterge/recuperează versiunile marcate', 'editundo' => 'anulare', 'diff-empty' => '(Nicio diferență)', 'diff-multi' => '(Nu {{PLURAL:$1|s-a afișat o versiune intermediară efectuată|s-au afișat $1 versiuni intermediare efectuate|s-au afișat $1 de versiuni intermediare efectuate}} de {{PLURAL:$2|un utilizator|$2 utilizatori|$2 de utilizatori}})', 'diff-multi-manyusers' => '({{PLURAL:$1|O versiune intermediară efectuată de|$1 (de) versiuni intermediare efectuate de peste}} $2 {{PLURAL:$2|utilizator|utilizatori}} {{PLURAL:$1|neafișată|neafișate}})', 'difference-missing-revision' => '{{PLURAL:$2|O versiune a|$2 versiuni ale|$2 de versiuni ale}} acestei diferențe ($1) nu {{PLURAL:$2|a fost găsită|au fost găsite}}. Acest lucru se întâmplă de obicei atunci când se accesează o legătură expirată către istoricul unei pagini șterse. Detalii se pot găsi în [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} jurnalul ștergerilor].', # Search results 'searchresults' => 'Rezultatele căutării', 'searchresults-title' => 'Rezultatele căutării pentru „$1”', 'toomanymatches' => 'Prea multe rezultate au fost întoarse, încercă o căutare diferită', 'titlematches' => 'Rezultate din titlurile paginilor', 'textmatches' => 'Rezultate din conținutul paginilor', 'notextmatches' => 'Nici un rezultat în textele articolelor', 'prevn' => 'anterioarele {{PLURAL:$1|$1}}', 'nextn' => 'următoarele {{PLURAL:$1|$1}}', 'prevn-title' => '{{PLURAL:$1|anteriorul|anterioarele}} $1 {{PLURAL:$1|rezultat|rezultate}}', 'nextn-title' => '{{PLURAL:$1|următorul|următoarele}} $1 {{PLURAL:$1|rezultat|rezultate}}', 'shown-title' => 'Arată $1 {{PLURAL:$1|rezultat|rezultate}} pe pagină', 'viewprevnext' => 'Vezi ($1 {{int:pipe-separator}} $2) ($3).', 'searchmenu-exists' => "'''Există o pagină cu titlul „[[:$1]]'” pe acest site.'''", 'searchmenu-new' => "'''Creați pagina „[[:$1]]” pe acest wiki!'''", 'searchprofile-articles' => 'Pagini cu conținut', 'searchprofile-project' => 'Pagini din spațiile Proiect și Ajutor', 'searchprofile-images' => 'Multimedia', 'searchprofile-everything' => 'Totul', 'searchprofile-advanced' => 'Avansat', 'searchprofile-articles-tooltip' => 'Caută în $1', 'searchprofile-project-tooltip' => 'Caută în $1', 'searchprofile-images-tooltip' => 'Caută fișiere', 'searchprofile-everything-tooltip' => 'Caută în tot conținutul (incluzând paginile de discuție)', 'searchprofile-advanced-tooltip' => 'Caută în spații de nume personalizate', 'search-result-size' => '$1 ({{PLURAL:$2|1 cuvânt|$2 cuvinte}})', 'search-result-category-size' => '$1 {{PLURAL:$1|element|elemente}} ($2 {{PLURAL:$2|categorie|categorii}}, $3 {{PLURAL:$3|fișier|fișiere}})', 'search-result-score' => 'Relevanță: $1%', 'search-redirect' => '(redirecționare către $1)', 'search-section' => '(secțiunea $1)', 'search-file-match' => '(se regăsește în conținutul fișierului)', 'search-suggest' => 'V-ați referit la: $1', 'search-interwiki-caption' => 'Proiecte înrudite', 'search-interwiki-default' => '$1 rezultate:', 'search-interwiki-more' => '(mai mult)', 'search-relatedarticle' => 'Relaționat', 'searcheverything-enable' => 'Caută în toate spațiile de nume', 'searchrelated' => 'relaționat', 'searchall' => 'toate', 'showingresults' => "Mai jos {{PLURAL:$1|apare '''1''' rezultat|apar '''$1''' rezultate|apar '''$1''' de rezultate}} începând cu nr. <b>$2</b>.", 'showingresultsnum' => "Mai jos {{PLURAL:$3|apare '''1''' rezultat|apar '''$3''' rezultate|apar '''$3''' de rezultate}} cu nr. <b>$2</b>.", 'showingresultsheader' => "{{PLURAL:$5|Rezultatul '''$1''' din '''$3'''|Rezultatele '''$1 - $2''' din '''$3'''}} pentru '''$4'''", 'search-nonefound' => 'Nu sunt rezultate conforme interogării.', 'powersearch-legend' => 'Căutare avansată', 'powersearch-ns' => 'Căutare în spațiile de nume:', 'powersearch-redir' => 'Afișează redirecționările', 'powersearch-togglelabel' => 'Selectare:', 'powersearch-toggleall' => 'Tot', 'powersearch-togglenone' => 'Nimic', 'search-external' => 'Căutare externă', 'searchdisabled' => '<p>Ne pare rău! Căutarea după text a fost dezactivată temporar, din motive de performanță. Între timp puteți folosi căutarea prin Google mai jos, însă aceasta poate să dea rezultate învechite.</p>', 'search-error' => 'A apărut o eroare în timpul căutării: $1', # Preferences page 'preferences' => 'Preferințe', 'mypreferences' => 'Preferințe', 'prefs-edits' => 'Număr de modificări:', 'prefsnologintext2' => 'Vă rugăm să vă $1 pentru a vă seta preferințele de utilizator.', 'prefs-skin' => 'Aspect', 'skin-preview' => 'Previzualizare', 'datedefault' => 'Nici o preferință', 'prefs-beta' => 'Opțiuni beta', 'prefs-datetime' => 'Data și ora', 'prefs-labs' => 'Opțiuni „labs”', 'prefs-user-pages' => 'Pagini de utilizator', 'prefs-personal' => 'Informații personale', 'prefs-rc' => 'Schimbări recente', 'prefs-watchlist' => 'Listă de urmărire', 'prefs-watchlist-days' => 'Numărul de zile care apar în lista paginilor urmărite:', 'prefs-watchlist-days-max' => 'Maxim $1 {{PLURAL:$1|zi|zile}}', 'prefs-watchlist-edits' => 'Numărul de editări care apar în lista extinsă a paginilor urmărite:', 'prefs-watchlist-edits-max' => 'Număr maxim: 1000', 'prefs-watchlist-token' => 'Jeton pentru lista de pagini urmărite:', 'prefs-misc' => 'Parametri diverși', 'prefs-resetpass' => 'Modifică parola', 'prefs-changeemail' => 'Modifică adresa de e-mail', 'prefs-setemail' => 'Setează o adresă de e-mail', 'prefs-email' => 'Opțiuni e-mail', 'prefs-rendering' => 'Aspect', 'saveprefs' => 'Salvează preferințele', 'restoreprefs' => 'Restaurează toate valorile implicite (în toate secțiunile)', 'prefs-editing' => 'Modificare', 'rows' => 'Rânduri:', 'columns' => 'Coloane:', 'searchresultshead' => 'Parametri căutare', 'stub-threshold' => 'Valoarea minimă pentru un <a href="#" class="stub">ciot</a> (octeți):', 'stub-threshold-disabled' => 'Dezactivat', 'recentchangesdays' => 'Numărul de zile afișate în schimbări recente:', 'recentchangesdays-max' => '(maxim {{PLURAL:$1|o zi|$1 zile}})', 'recentchangescount' => 'Numărul modificărilor afișate implicit:', 'prefs-help-recentchangescount' => 'Sunt incluse schimbările recente, istoricul paginilor și jurnalele.', 'prefs-help-watchlist-token2' => 'Aceasta este cheia secretă pentru fluxul web al listei dumneavoastră de pagini urmărite. Oricine o cunoaște vă va putea citi lista de pagini urmărite, așa că n-o partajați cu nimeni. [[Special:ResetTokens|Faceți clic aici dacă doriți să o resetați]].', 'savedprefs' => 'Preferințele dumneavoastră au fost salvate.', 'timezonelegend' => 'Fus orar:', 'localtime' => 'Ora locală:', 'timezoneuseserverdefault' => 'Folosește ora implicită a wikiului ($1)', 'timezoneuseoffset' => 'Altul (specifică diferența)', 'servertime' => 'Ora serverului:', 'guesstimezone' => 'Încearcă determinarea automată a diferenței', 'timezoneregion-africa' => 'Africa', 'timezoneregion-america' => 'America', 'timezoneregion-antarctica' => 'Antarctica', 'timezoneregion-arctic' => 'Oceanul Arctic', 'timezoneregion-asia' => 'Asia', 'timezoneregion-atlantic' => 'Oceanul Atlantic', 'timezoneregion-australia' => 'Australia', 'timezoneregion-europe' => 'Europa', 'timezoneregion-indian' => 'Oceanul Indian', 'timezoneregion-pacific' => 'Oceanul Pacific', 'allowemail' => 'Acceptă e-mail de la alți utilizatori', 'prefs-searchoptions' => 'Căutare', 'prefs-namespaces' => 'Spații de nume', 'defaultns' => 'Altfel, caută în aceste spații de nume:', 'default' => 'standard', 'prefs-files' => 'Fișiere', 'prefs-custom-css' => 'CSS personalizat', 'prefs-custom-js' => 'JS personalizat', 'prefs-common-css-js' => 'Pagini CSS și JavaScript comune pentru toate interfețele:', 'prefs-reset-intro' => 'Poți folosi această pagină pentru a reseta preferințele la valorile implicite. Acțiunea nu este reversibilă.', 'prefs-emailconfirm-label' => 'Confirmare e-mail:', 'youremail' => 'Adresă de e-mail:', 'username' => '{{GENDER:$1|Nume de utilizator}}:', 'uid' => 'ID {{GENDER:$1|utilizator|utilizatoare}}:', 'prefs-memberingroups' => '{{GENDER:$2|Membru|Membră}} în {{PLURAL:$1|grupul|grupurile}}:', 'prefs-registration' => 'Data înregistrării:', 'yourrealname' => 'Nume real:', 'yourlanguage' => 'Interfață în limba:', 'yourvariant' => 'Varianta limbii conținutului:', 'prefs-help-variant' => 'Varianta dumneavoastră preferată sau ortografia de afișare a conținutului paginilor pe acest wiki.', 'yournick' => 'Semnătură:', 'prefs-help-signature' => 'Comentariile de pe paginile de discuții vor trebuie semnate cu „<nowiki>~~~~</nowiki>”, tildele transformându-se în semnătura dumneavoastră urmată de ora la care ați introdus comentariul.', 'badsig' => 'Semnătură brută incorectă; verificați tagurile HTML.', 'badsiglength' => 'Semnătura este prea lungă. Lungimea trebuie să fie mai mică de $1 {{PLURAL:$1|caracter|caractere}}.', 'yourgender' => 'Cum preferați să se facă referire la dumneavoastră?', 'gender-unknown' => 'Prefer să nu menționez', 'gender-male' => 'El modifică pagini wiki', 'gender-female' => 'Ea modifică pagini wiki', 'prefs-help-gender' => 'Stabilirea acestei preferințe este opțională. Acest software folosește datele pentru a vi se adresa și pentru a face referire la dumneavoastră utilizând genul gramatical corespunzător. Această informație va fi publică.', 'email' => 'E-mail', 'prefs-help-realname' => 'Numele real este opțional. Dacă decideți furnizarea sa, acesta va fi folosit pentru a vă atribui munca.', 'prefs-help-email' => 'Adresa de e-mail este opțională, dar este necesară pentru recuperarea parolei în cazul în care o uitați.', 'prefs-help-email-others' => 'Puteți de asemenea permite altora să vă contacteze prin intermediul paginii dumneavoastră de utilizator fără a vă divulga identitatea.', 'prefs-help-email-required' => 'Adresa de e-mail este necesară.', 'prefs-info' => 'Informații de bază', 'prefs-i18n' => 'Internaționalizare', 'prefs-signature' => 'Semnătură', 'prefs-dateformat' => 'Format dată', 'prefs-timeoffset' => 'Decalaj orar', 'prefs-advancedediting' => 'Opțiuni generale', 'prefs-editor' => 'Editor', 'prefs-preview' => 'Previzualizare', 'prefs-advancedrc' => 'Opțiuni avansate', 'prefs-advancedrendering' => 'Opțiuni avansate', 'prefs-advancedsearchoptions' => 'Opțiuni avansate', 'prefs-advancedwatchlist' => 'Opțiuni avansate', 'prefs-displayrc' => 'Opțiuni de afișare', 'prefs-displaysearchoptions' => 'Opțiuni de afișare', 'prefs-displaywatchlist' => 'Opțiuni de afișare', 'prefs-tokenwatchlist' => 'Jeton', 'prefs-diffs' => 'Diferențe', 'prefs-help-prefershttps' => 'Această preferință va avea efect la următoarea autentificare.', 'prefs-tabs-navigation-hint' => 'Sfat: Puteți folosi tastele săgeată stânga și dreapta pentru a naviga între filele din cadrul listei de file.', # User preference: email validation using jQuery 'email-address-validity-valid' => 'Adresa de e-mail pare validă', 'email-address-validity-invalid' => 'Introduceți o adresă de e-mail validă', # User rights 'userrights' => 'Administrare permisiuni de utilizator', 'userrights-lookup-user' => 'Administrare grupuri de utilizatori', 'userrights-user-editname' => 'Introduceți un nume de utilizator:', 'editusergroup' => 'Modificare grup de utilizatori', 'editinguser' => "Modificarea permisiunilor de utilizator pentru '''[[User:$1|$1]]''' $2", 'userrights-editusergroup' => 'Modificare grup de utilizatori', 'saveusergroups' => 'Salvează grupul de utilizatori', 'userrights-groupsmember' => 'Membru al:', 'userrights-groupsmember-auto' => 'Membru, implicit, al:', 'userrights-groups-help' => 'Puteți schimba grupul căruia îi aparține utilizatorul: *Căsuța bifată înseamnă că utilizatorul aparține grupului respectiv. *Căsuța nebifată înseamnă că utilizatorul nu aparține grupului respectiv. *Steluța (*) indică faptul că utilizatorul nu poate fi eliminat din grup odată adăugat, sau invers.', 'userrights-reason' => 'Motiv:', 'userrights-no-interwiki' => 'Nu aveți permisiunea de a modifica permisiunile utilizatorilor pe alte wiki.', 'userrights-nodatabase' => 'Baza de date $1 nu există sau nu este locală.', 'userrights-nologin' => 'Trebuie să te [[Special:UserLogin|autentifici]] cu un cont de administrator pentru a atribui permisiuni utilizatorilor.', 'userrights-notallowed' => 'Nu aveți permisiunea de a acorda sau elimina drepturi utilizatorilor.', 'userrights-changeable-col' => 'Grupuri pe care le puteți schimba', 'userrights-unchangeable-col' => 'Grupuri pe care nu le puteți schimba', 'userrights-conflict' => 'Conflict al schimbării drepturilor de utilizator! Reverificați și confirmați-vă modificările.', 'userrights-removed-self' => 'V-ați eliminat cu succes propriile drepturi. Ca urmare, nu mai puteți accesa această pagină.', # Groups 'group' => 'Grup:', 'group-user' => 'Utilizatori', 'group-autoconfirmed' => 'Utilizatori autoconfirmați', 'group-bot' => 'Roboți', 'group-sysop' => 'Administratori', 'group-bureaucrat' => 'Birocrați', 'group-suppress' => 'Supervizori', 'group-all' => '(toți)', 'group-user-member' => '{{GENDER:$1|utilizator|utilizatoare|utilizator}}', 'group-autoconfirmed-member' => '{{GENDER:$1|utilizator autoconfirmat|utilizatoare autoconfirmată|utilizator autoconfirmat}}', 'group-bot-member' => '{{GENDER:$1|robot}}', 'group-sysop-member' => '{{GENDER:$1|administrator}}', 'group-bureaucrat-member' => '{{GENDER:$1|birocrat}}', 'group-suppress-member' => '{{GENDER:$1|supervizor}}', 'grouppage-user' => '{{ns:project}}:Utilizatori', 'grouppage-autoconfirmed' => '{{ns:project}}:Utilizator autoconfirmați', 'grouppage-bot' => '{{ns:project}}:Boți', 'grouppage-sysop' => '{{ns:project}}:Administratori', 'grouppage-bureaucrat' => '{{ns:project}}:Birocrați', 'grouppage-suppress' => '{{ns:project}}:Supervizori', # Rights 'right-read' => 'Citește pagini', 'right-edit' => 'Modifică paginile', 'right-createpage' => 'Creează pagini (altele decât pagini de discuție)', 'right-createtalk' => 'Creează pagini de discuție', 'right-createaccount' => 'Creează conturi noi', 'right-minoredit' => 'Marchează modificările minore', 'right-move' => 'Redenumește paginile', 'right-move-subpages' => 'Redenumește paginile cu tot cu subpagini', 'right-move-rootuserpages' => 'Redenumește pagina principală a unui utilizator', 'right-movefile' => 'Redenumește fișiere', 'right-suppressredirect' => 'Nu creează o redirecționare de la vechiul nume atunci când redenumește o pagină', 'right-upload' => 'Încarcă fișiere', 'right-reupload' => 'Suprascrie un fișier existent', 'right-reupload-own' => 'Suprascrie un fișier existent propriu', 'right-reupload-shared' => 'Rescrie fișierele disponibile în depozitul partajat', 'right-upload_by_url' => 'Încarcă un fișier de la o adresă URL', 'right-purge' => 'Curăță memoria cache pentru o pagină fără confirmare', 'right-autoconfirmed' => 'Neafectat de limitele pe bază de IP ale raportului', 'right-bot' => 'Tratare ca proces automat', 'right-nominornewtalk' => 'Nu declanșează mesajul „Aveți un mesaj nou” atunci când efectuează o modificare minoră pe pagina de discuții a utilizatorului', 'right-apihighlimits' => 'Folosește o limită mai mare pentru rezultatele cererilor API', 'right-writeapi' => 'Utilizează API la scriere', 'right-delete' => 'Șterge pagini', 'right-bigdelete' => 'Șterge pagini cu istoric lung', 'right-deletelogentry' => 'Șterge și recuperează intrări specifice din jurnale', 'right-deleterevision' => 'Șterge și recuperează versiuni specifice ale paginilor', 'right-deletedhistory' => 'Vizualizează intrările șterse din istoric, fără textul asociat', 'right-deletedtext' => 'Vizualizează textul șters și modificările dintre versiunile șterse', 'right-browsearchive' => 'Caută pagini șterse', 'right-undelete' => 'Recuperează pagini', 'right-suppressrevision' => 'Examinează și restaurează reviziile ascunse față de administratori', 'right-suppressionlog' => 'Vizualizează jurnale private', 'right-block' => 'Blochează alți utilizatori la modificare', 'right-blockemail' => 'Blochează alți utilizatori la trimiterea e-mailurilor', 'right-hideuser' => 'Blochează un nume de utilizator, ascunzându-l de public', 'right-ipblock-exempt' => 'Ocolește blocarea adresei IP, autoblocările și blocarea intervalelor IP', 'right-proxyunbannable' => 'Trece peste blocarea automată a proxy-urilor', 'right-unblockself' => 'Se deblochează singur', 'right-protect' => 'Schimbă nivelurile de protejare și modifică pagini protejate în cascadă', 'right-editprotected' => 'Modifică pagini protejate ca „{{int:protect-level-sysop}}”', 'right-editsemiprotected' => 'Modifică pagini protejate ca „{{int:protect-level-autoconfirmed}}”', 'right-editinterface' => 'Modificare interfața cu utilizatorul', 'right-editusercssjs' => 'Modifică fișierele CSS și JS ale altor utilizatori', 'right-editusercss' => 'Modifică fișierele CSS ale altor utilizatori', 'right-edituserjs' => 'Modifică fișierele JS ale altor utilizatori', 'right-editmyusercss' => 'Modificați-vă propriile fișiere CSS', 'right-editmyuserjs' => 'Modificați-vă propriile fișiere JavaScript', 'right-viewmywatchlist' => 'Vizualizați propria listă de pagini urmărite', 'right-editmywatchlist' => 'Modificați propria listă de pagini urmărite. Rețineți că anumite acțiuni vor adăuga pagini chiar și fără acest drept.', 'right-viewmyprivateinfo' => 'Vizualizați-vă datele private (de ex. adresa de e-mail, numele real)', 'right-editmyprivateinfo' => 'Modificați-vă datele private (de ex. adresa de e-mail, numele real)', 'right-editmyoptions' => 'Modificați-vă preferințele', 'right-rollback' => 'Revocă rapid modificările ultimului utilizator care a modificat o pagină particulară', 'right-markbotedits' => 'Marchează revenirea ca modificare efectuată de robot', 'right-noratelimit' => 'Neafectat de limitele raportului', 'right-import' => 'Importă pagini de la alte wikiuri', 'right-importupload' => 'Importă pagini dintr-o încărcare de fișier', 'right-patrol' => 'Marchează modificările altora ca patrulate', 'right-autopatrol' => 'Modificările proprii marcate ca patrulate', 'right-patrolmarks' => 'Vizualizează pagini recent patrulate', 'right-unwatchedpages' => 'Vizualizează o listă de pagini neurmărite', 'right-mergehistory' => 'Unește istoricele paginilor', 'right-userrights' => 'Modifică toate permisiunile de utilizator', 'right-userrights-interwiki' => 'Modifică permisiunile de utilizator pentru utilizatorii de pe alte wiki', 'right-siteadmin' => 'Blochează și deblochează baza de date', 'right-override-export-depth' => 'Exportă inclusiv paginile legate până la o adâncime de 5', 'right-sendemail' => 'Trimite e-mail altor utilizatori', 'right-passwordreset' => 'Vizualizează e-mailurile de reinițializare a parolelor', # Special:Log/newusers 'newuserlogpage' => 'Jurnal utilizatori noi', 'newuserlogpagetext' => 'Acesta este jurnalul creărilor conturilor de utilizator.', # User rights log 'rightslog' => 'Jurnal permisiuni de utilizator', 'rightslogtext' => 'Acest jurnal cuprinde modificările permisiunilor utilizatorilor.', # Associated actions - in the sentence "You do not have permission to X" 'action-read' => 'citiți această pagină', 'action-edit' => 'modificați această pagină', 'action-createpage' => 'creați pagini', 'action-createtalk' => 'creați pagini de discuție', 'action-createaccount' => 'creați acest cont de utilizator', 'action-minoredit' => 'marcați această modificare ca minoră', 'action-move' => 'redenumiți această pagină', 'action-move-subpages' => 'redenumiți această pagină și subpaginile sale', 'action-move-rootuserpages' => 'redenumiți pagina principală a unui utilizator', 'action-movefile' => 'redenumiți acest fișier', 'action-upload' => 'încărcați acest fișier', 'action-reupload' => 'suprascrieți fișierul existent', 'action-reupload-shared' => 'rescrieți acest fișier în depozitul partajat', 'action-upload_by_url' => 'încărcați acest fișier de la o adresă URL', 'action-writeapi' => 'utilizați scrierea prin API', 'action-delete' => 'ștergeți această pagină', 'action-deleterevision' => 'ștergeți această versiune', 'action-deletedhistory' => 'vizualizați istoricul șters al acestei pagini', 'action-browsearchive' => 'căutați pagini șterse', 'action-undelete' => 'recuperați această pagină', 'action-suppressrevision' => 'revizuiți și să restaurați această versiune ascunsă', 'action-suppressionlog' => 'vizualizați acest jurnal privat', 'action-block' => 'blocați permisiunea de modificare a acestui utilizator', 'action-protect' => 'modificați nivelurile de protecție pentru această pagină', 'action-rollback' => 'faceți revocarea rapidă a modificărilor ultimului utilizator care a modificat o pagină particulară', 'action-import' => 'importați pagini din alt wiki', 'action-importupload' => 'importați pagini prin încărcarea unui fișier', 'action-patrol' => 'marcați modificările celorlalți ca patrulate', 'action-autopatrol' => 'marcați modificarea drept patrulată', 'action-unwatchedpages' => 'vizualizați lista de pagini neurmărite', 'action-mergehistory' => 'uniți istoricul acestei pagini', 'action-userrights' => 'modificați toate permisiunile utilizatorilor', 'action-userrights-interwiki' => 'modificați permisiunile utilizatorilor de pe alte wiki', 'action-siteadmin' => 'blocați sau deblocați baza de date', 'action-sendemail' => 'trimite e-mailuri', 'action-editmywatchlist' => 'vă modificați lista de pagini urmărite', 'action-viewmywatchlist' => 'vă vizualizați lista de pagini urmărite', 'action-viewmyprivateinfo' => 'vă vizualizați informațiile personale', 'action-editmyprivateinfo' => 'să vă modificați informațiile personale', # Recent changes 'nchanges' => '$1 {{PLURAL:$1|modificare|modificări|de modificări}}', 'enhancedrc-since-last-visit' => '$1 {{PLURAL:$1|de la ultima vizită}}', 'enhancedrc-history' => 'istoric', 'recentchanges' => 'Schimbări recente', 'recentchanges-legend' => 'Opțiuni schimbări recente', 'recentchanges-summary' => 'Urmăriți cele mai recente modificări din wiki pe această pagină.', 'recentchanges-noresult' => 'Nicio modificare din intervalul specificat nu corespunde acestor criterii.', 'recentchanges-feed-description' => 'Urmărește cele mai recente schimbări folosind acest flux.', 'recentchanges-label-newpage' => 'Această modificare a creat o pagină nouă', 'recentchanges-label-minor' => 'Aceasta este o modificare minoră', 'recentchanges-label-bot' => 'Această modificare a fost efectuată de un robot', 'recentchanges-label-unpatrolled' => 'Această modificare nu a fost încă verificată', 'recentchanges-label-plusminus' => 'Dimensiunea paginii s-a modificat corespunzător acestui număr de octeți', 'recentchanges-legend-heading' => "'''Legendă:'''", 'recentchanges-legend-newpage' => '(vedeți și [[Special:NewPages|lista cu pagini noi]])', 'recentchanges-legend-plusminus' => "(''±123'')", 'rcnotefrom' => 'Dedesubt sunt modificările de la <b>$2</b> (maxim <b>$1</b> de modificări sunt afișate - schimbă numărul maxim de linii alegând altă valoare mai jos).', 'rclistfrom' => 'Se arată modificările începând cu $1', 'rcshowhideminor' => '$1 modificările minore', 'rcshowhidebots' => '$1 roboții', 'rcshowhideliu' => '$1 utilizatorii înregistrați', 'rcshowhideanons' => '$1 utilizatorii anonimi', 'rcshowhidepatr' => '$1 modificările patrulate', 'rcshowhidemine' => '$1 contribuțiile mele', 'rclinks' => 'Se arată ultimele $1 modificări din ultimele $2 zile.<br /> $3', 'diff' => 'dif', 'hist' => 'ist', 'hide' => 'Ascunde', 'show' => 'Arată', 'minoreditletter' => 'm', 'newpageletter' => 'N', 'boteditletter' => 'b', 'unpatrolledletter' => '!', 'number_of_watching_users_pageview' => '[$1 {{PLURAL:$1|utilizator|utilizatori|de utilizatori}} care urmăresc]', 'rc_categories' => 'Limitează la categoriile (separate prin "|")', 'rc_categories_any' => 'Oricare', 'rc-change-size' => '$1', 'rc-change-size-new' => '$1 {{PLURAL:$1|octet|octeți|de octeți}} după modificare', 'newsectionsummary' => '/* $1 */ secțiune nouă', 'rc-enhanced-expand' => 'Arată detalii', 'rc-enhanced-hide' => 'Ascunde detaliile', 'rc-old-title' => 'inițial creată cu titlul „$1”', # Recent changes linked 'recentchangeslinked' => 'Modificări corelate', 'recentchangeslinked-feed' => 'Modificări corelate', 'recentchangeslinked-toolbox' => 'Modificări corelate', 'recentchangeslinked-title' => 'Modificări legate de „$1”', 'recentchangeslinked-summary' => "Aceasta este o listă a schimbărilor efectuate recent asupra paginilor cu legături de la o anumită pagină (sau asupra membrilor unei anumite categorii). Paginile pe care le [[Special:Watchlist|urmăriți]] apar în '''aldine'''.", 'recentchangeslinked-page' => 'Numele paginii:', 'recentchangeslinked-to' => 'Afișează schimbările în paginile care se leagă de pagina dată', # Upload 'upload' => 'Încărcare fișier', 'uploadbtn' => 'Încarcă fișier', 'reuploaddesc' => 'Revocare încărcare și întoarcere la formularul de trimitere.', 'upload-tryagain' => 'Trimiteți descrierea fișierului modificată', 'uploadnologin' => 'Nu sunteți autentificat', 'uploadnologintext' => 'Trebuie să vă $1 pentru a încărca fișiere.', 'upload_directory_missing' => 'Directorul în care sunt încărcate fișierele ($1) lipsește și nu poate fi creat de serverul web.', 'upload_directory_read_only' => 'Directorul de încărcare ($1) nu poate fi scris de server.', 'uploaderror' => 'Eroare la trimitere fișier', 'upload-recreate-warning' => "'''Atenție, un fișier cu același nume a fost șters sau redenumit.''' Iată aici înregistrările relevante din jurnalul de ștergeri și redenumiri:", 'uploadtext' => "Utilizați formularul de mai jos pentru a trimite fișiere. Pentru a vizualiza sau căuta imagini deja trimise, mergeți la [[Special:FileList|lista cu imagini]]; (re)încărcările și ștergerile sunt de asemenea înregistrate în [[Special:Log/upload|jurnalul fișierelor trimise]], respectiv [[Special:Log/delete|jurnalul fișierelor șterse]]. Pentru a insera un fișier într-o pagină, folosiți o legătură de forma: * '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:Fișier.jpg]]</nowiki></code>''' pentru a include versiunea integrală a unui fișier * '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:Fișier.png|200px|thumb|left|informații]]</nowiki></code>''' pentru a introduce o imagine cu o lățime de 200 de pixeli într-un chenar plasat în partea stângă, având ca descriere textul „informații” * '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:Fișier.ogg]]</nowiki></code>''' pentru o legătură directă către fișier, fără a-l afișa", 'upload-permitted' => 'Tipuri de fișiere permise: $1.', 'upload-preferred' => 'Tipuri de fișiere preferate: $1.', 'upload-prohibited' => 'Tipuri de fișiere interzise: $1.', 'uploadlog' => 'jurnal fișiere trimise', 'uploadlogpage' => 'Jurnal fișiere trimise', 'uploadlogpagetext' => 'Mai jos este afișată lista ultimelor fișiere trimise. Vezi [[Special:NewFiles|galeria fișierelor noi]] pentru o mai bună vizualizare.', 'filename' => 'Nume fișier', 'filedesc' => 'Descriere fișier', 'fileuploadsummary' => 'Rezumat:', 'filereuploadsummary' => 'Modificări ale fișierului:', 'filestatus' => 'Statutul drepturilor de autor:', 'filesource' => 'Sursă:', 'uploadedfiles' => 'Fișiere trimise', 'ignorewarning' => 'Ignoră avertismentul și salvează fișierul', 'ignorewarnings' => 'Ignoră orice avertismente', 'minlength1' => 'Numele fișierelor trebuie să fie cel puțin o literă.', 'illegalfilename' => 'Numele fișierului "$1" conține caractere care nu sunt permise în titlurile paginilor. Vă rugăm redenumiți fișierul și încercați să îl încărcați din nou.', 'filename-toolong' => 'Numele fișierelor nu trebuie să fie mai lungi de 240 de octeți.', 'badfilename' => 'Numele fișierului a fost schimbat în „$1”.', 'filetype-mime-mismatch' => 'Extensia „.$1” nu se potrivește cu tipul MIME al fișierului ($2).', 'filetype-badmime' => 'Nu este permisă încărcarea de fișiere de tipul MIME "$1".', 'filetype-bad-ie-mime' => 'Nu puteți încărca acest fișier deoarece Internet Explorer îl va detecta ca și "$1", care este nepermis și poate fi un format periculos.', 'filetype-unwanted-type' => "'''\".\$1\"''' este un tip de fișier nedorit. {{PLURAL:\$3|Tipul de fișier preferat este|Tipurile de fișiere preferate sunt}} \$2.", 'filetype-banned-type' => "'''„.$1”''' {{PLURAL:$4|este un tip de fișier nepermis|sunt tipuri de fișier nepermise}}. {{PLURAL:$3|Tip de fișier permis:|Tipuri de fișier permise:}} $2.", 'filetype-missing' => 'Fișierul nu are extensie (precum ".jpg").', 'empty-file' => 'Fișierul pe care l-ați trimis este gol.', 'file-too-large' => 'Fișierul pe care l-ați trimis este prea mare.', 'filename-tooshort' => 'Numele fișierului este prea scurt.', 'filetype-banned' => 'Acest tip de fișier este interzis.', 'verification-error' => 'Fișierul nu a trecut testele.', 'hookaborted' => 'Modificarea pe care ați încercat s-o faceți a fost oprită de apelul unei extensii.', 'illegal-filename' => 'Numele de fișier nu este permis.', 'overwrite' => 'Nu este permisă suprascrierea unui fișier existent.', 'unknown-error' => 'S-a produs o eroare necunoscută.', 'tmp-create-error' => 'Nu s-a putut crea un fișier temporar.', 'tmp-write-error' => 'Eroare de scriere la un fișier temporar.', 'large-file' => 'Este recomandat ca fișierele să nu fie mai mari de $1; acest fișier are $2.', 'largefileserver' => 'Fișierul este mai mare decât este configurat serverul să permită.', 'emptyfile' => 'Fișierul pe care l-ați încărcat pare a fi gol. Aceasta poate fi datorită unei greșeli în numele fișierului. Verificați dacă într-adevăr doriți să încărcați acest fișier.', 'windows-nonascii-filename' => 'Acest wiki nu acceptă nume de fișiere care conțin caractere speciale.', 'fileexists' => 'Un fișier cu același nume există deja, vă rugăm verificați <strong>[[:$1]]</strong> dacă nu sunteți sigur dacă doriți să îl modificați. [[$1|thumb]]', 'filepageexists' => 'Pagina cu descrierea fișierului a fost deja creată la <strong>[[:$1]]</strong>, dar niciun fișier cu acest nume nu există în acest moment. Sumarul pe care l-ai introdus nu va apărea în pagina cu descriere. Pentru ca sumarul tău să apară, va trebui să îl adaugi manual. [[$1|miniatură]]', 'fileexists-extension' => 'Un fișier cu un nume similar există: [[$2|thumb]] * Numele fișierului de încărcat: <strong>[[:$1]]</strong> * Numele fișierului existent: <strong>[[:$2]]</strong> Te rog alege alt nume.', 'fileexists-thumbnail-yes' => "Fișierul pare a fi o imagine cu o rezoluție scăzută ''(thumbnail)''. [[$1|thumb]] Verifică fișierul<strong>[[:$1]]</strong>. Dacă fișierul verificat este identic cu imaginea originală nu este necesară încărcarea altui thumbnail.", 'file-thumbnail-no' => "Numele fișierului începe cu <strong>$1</strong>. Se pare că este o imagine cu dimensiune redusă''(thumbnail)''. Dacă ai această imagine la rezoluție mare încarc-o pe aceasta, altfel schimbă numele fișierului.", 'fileexists-forbidden' => 'Un fișier cu acest nume există deja și nu poate fi rescris. Mergeți înapoi și încărcați acest fișier sub un nume nou. [[File:$1|thumb|center|$1]]', 'fileexists-shared-forbidden' => 'Un fișier cu acest nume există deja în magazia de imagini comune; mergeți înapoi și încărcați fișierul sub un nou nume. [[File:$1|thumb|center|$1]]', 'file-exists-duplicate' => 'Acest fișier este dublura {{PLURAL:$1|fișierului|fișierelor}}:', 'file-deleted-duplicate' => 'Un fișier identic cu acesta ([[:$1]]) a fost șters anterior. Verificați istoricul ștergerilor fișierului înainte de a-l reîncărca.', 'file-deleted-duplicate-notitle' => 'Un fișier identic cu acesta a fost șters anterior, iar titlul a fost suprimat. Ar trebui să contactați pe cineva care poate vizualiza datele suprimate ale fișierului pentru a evalua situația înainte de a începe să-l reîncărcați.', 'uploadwarning' => 'Avertizare la trimiterea fișierului', 'uploadwarning-text' => 'Vă rugăm să modificați descrierea fișierului mai jos și să încercați din nou.', 'savefile' => 'Salvează fișierul', 'uploadedimage' => 'a trimis [[$1]]', 'overwroteimage' => 'încărcat o versiune nouă a fișierului "[[$1]]"', 'uploaddisabled' => 'Ne pare rău, trimiterea de imagini este dezactivată.', 'copyuploaddisabled' => 'Trimiterea prin URL este dezactivată.', 'uploadfromurl-queued' => 'Fișierul a fost pus în șirul de așteptare.', 'uploaddisabledtext' => 'Încărcările de fișiere sunt dezactivate.', 'php-uploaddisabledtext' => 'Încărcarea de fișiere este dezactivată în PHP. Vă rugăm să verificați setările din file_uploads.', 'uploadscripted' => 'Fișierul conține HTML sau cod script care poate fi interpretat în mod eronat de un browser.', 'uploadvirus' => 'Fișierul conține un virus! Detalii: $1', 'uploadjava' => 'Fișierul de față este o arhivă ZIP care conține un fișier de clasă Java. Încărcarea fișierelor Java nu este permisă, întrucât pot evita restricțiile de securitate.', 'upload-source' => 'Fișier sursă', 'sourcefilename' => 'Numele fișierului sursă:', 'sourceurl' => 'URL sursă:', 'destfilename' => 'Numele fișierului de destinație:', 'upload-maxfilesize' => 'Mărimea maximă a unui fișier: $1', 'upload-description' => 'Descriere fișier', 'upload-options' => 'Opțiuni de încărcare', 'watchthisupload' => 'Urmărește acest fișier', 'filewasdeleted' => 'Un fișier cu acest nume a fost anterior încărcat și apoi șters. Ar trebui să verificați $1 înainte să îl încărcați din nou.', 'filename-bad-prefix' => "Numele fișierului pe care îl încărcați începe cu '''\"\$1\"''', care este un nume non-descriptiv alocat automat în general de camerele digitale. Vă rugăm, alegeți un nume mai descriptiv pentru fișerul dumneavoastră.", 'upload-success-subj' => 'Fișierul a fost trimis', 'upload-success-msg' => 'Încărcarea de la [$2] s-a încheiat cu succes. Rezultatul este disponibil aici: [[:{{ns:file}}:$1]]', 'upload-failure-subj' => 'Problemă la trimitere', 'upload-failure-msg' => 'A apărut o problemă cu încărcarea de la [$2]: $1', 'upload-warning-subj' => 'Avertizare la încărcare', 'upload-warning-msg' => 'A apărut o problemă în timpul încărcării de la [$2]. Vă puteți întoarce la [[Special:Upload/stash/$1|formularul de trimitere]]pentru a corecta această problemă.', 'upload-proto-error' => 'Protocol incorect', 'upload-proto-error-text' => 'Importul de la distanță necesită adrese URL care încep cu <code>http://</code> sau <code>ftp://</code>.', 'upload-file-error' => 'Eroare internă', 'upload-file-error-text' => 'A apărut o eroare internă la crearea unui fișier temporar pe server. Vă rugăm să contactați un [[Special:ListUsers/sysop|administrator]].', 'upload-misc-error' => 'Eroare de încărcare necunoscută', 'upload-misc-error-text' => 'A apărut o eroare necunoscută în timpul încărcării. Vă rugăm să verificați dacă adresa URL este validă și accesibilă și încercați din nou. Dacă problema persistă, contactați un [[Special:ListUsers/sysop|administrator]].', 'upload-too-many-redirects' => 'URL-ul conținea prea multe redirecționări', 'upload-unknown-size' => 'Mărime necunoscută', 'upload-http-error' => 'A avut loc o eroare HTTP: $1', 'upload-copy-upload-invalid-domain' => 'Încărcarea copiilor nu este disponibilă pentru acest domeniu.', # File backend 'backend-fail-stream' => 'Imposibil de citit fișierul $1.', 'backend-fail-backup' => 'Imposibil de efectuat o copie de rezervă a fișierului $1.', 'backend-fail-notexists' => 'Fișierul $1 nu există.', 'backend-fail-hashes' => 'Imposibil de obținut valoarea de dispersie a fișierului pentru comparare.', 'backend-fail-notsame' => 'Un fișier diferit există deja pentru $1.', 'backend-fail-invalidpath' => '$1 nu este o cale validă de stocare.', 'backend-fail-delete' => 'Imposibil de șters fișierul $1.', 'backend-fail-describe' => 'Imposibil de modificat metadatele pentru fișierul „$1”.', 'backend-fail-alreadyexists' => 'Fișierul $1 există deja.', 'backend-fail-store' => 'Imposibil de stocat fișierul $1 în $2.', 'backend-fail-copy' => 'Imposibil de copiat fișierul $1 în $2.', 'backend-fail-move' => 'Imposibil de mutat fișierul $1 în $2.', 'backend-fail-opentemp' => 'Imposibil de deschis fișierul temporar.', 'backend-fail-writetemp' => 'Imposibil de scris în fișierul temporar.', 'backend-fail-closetemp' => 'Imposibil de închis fișierul temporar.', 'backend-fail-read' => 'Imposibil de citit fișierul $1.', 'backend-fail-create' => 'Imposibil de scris fișierul $1.', 'backend-fail-maxsize' => 'Nu s-a putut scrie fișierul $1 pentru că acesta este mai mare de {{PLURAL:$2|un octet|$2 octeți|$2 de octeți}}.', 'backend-fail-readonly' => "Suportul de stocare „$1” este în prezent doar în citire. Motivul dat este: „''$2''”", 'backend-fail-synced' => 'Fișierul „$1” este într-o stare de inconsistență în suporturile de stocare internă', 'backend-fail-connect' => 'Imposibil de conectat la suportul de stocare „$1”.', 'backend-fail-internal' => 'O eroare necunoscută s-a produs în suportul de stocare „$1”.', 'backend-fail-contenttype' => 'Nu s-a putut determina tipul de conținut al fișierului de stocat la „$1”.', 'backend-fail-batchsize' => 'Suportul de stocare a furnizat un lot de $1 {{PLURAL:$1|operațiune|operațiuni|de operațiuni}} de fișier; limita este $2 {{PLURAL:$2|operațiune|operațiuni|de operațiuni}}.', 'backend-fail-usable' => 'Imposibil de citit sau scris fișierul „$1” din cauza permisiunilor insuficiente sau din cauza directoarelor/containerelor lipsă.', # File journal errors 'filejournal-fail-dbconnect' => 'Imposibil de conectat la baza de date a jurnalului pentru terminatul de stocare „$1”.', 'filejournal-fail-dbquery' => 'Imposibil de actualizat baza de date a jurnalului pentru terminalul de stocare „$1”.', # Lock manager 'lockmanager-notlocked' => 'Imposibil de deblocat „$1”; nu este blocată.', 'lockmanager-fail-closelock' => 'Imposibil de închis fișierul de blocare pentru „$1”.', 'lockmanager-fail-deletelock' => 'Imposibil de șters fișierul de blocare pentru „$1”.', 'lockmanager-fail-acquirelock' => 'Imposibil de obținut blocarea pentru „$1”.', 'lockmanager-fail-openlock' => 'Imposibil de deschis fișierul de blocare pentru „$1”.', 'lockmanager-fail-releaselock' => 'Imposibil de eliberat blocarea pentru „$1”.', 'lockmanager-fail-db-bucket' => 'Imposibil de contactat suficient baza de date cu blocări în găleata $1.', 'lockmanager-fail-db-release' => 'Imposibil de eliberat blocările din baza de date $1.', 'lockmanager-fail-svr-acquire' => 'Imposibil de obținut blocări pe serverul $1.', 'lockmanager-fail-svr-release' => 'Imposibil de eliberat blocările de pe serverul $1.', # ZipDirectoryReader 'zip-file-open-error' => 'A intervenit o eroare în momentul deschiderii fișierului ZIP pentru verificări.', 'zip-wrong-format' => 'Fișierul specificat nu era un fișier de tip ZIP.', 'zip-bad' => 'Fișierul este un fișier corupt de tip ZIP, fiind imposibil de citit. Nu poate fi verificat în mod corespunzător în vederea securității.', 'zip-unsupported' => 'Fișierul este unul de tip ZIP cu caracteristici neacceptate de MediaWiki. Nu poate fi verificat în mod corespunzător în vederea securității.', # Special:UploadStash 'uploadstash' => 'Fișiere trimise în așteptare', 'uploadstash-summary' => 'Această pagină oferă acces la fișierele care sunt încărcate (sau în curs de încărcare) dar nu sunt încă publicate pe wiki. Aceste fișiere nu sunt vizibile nimănui cu excepția celui care le-a încărcat.', 'uploadstash-clear' => 'Șterge fișierele în așteptare', 'uploadstash-nofiles' => 'Nu aveți fișiere în lista de așteptare.', 'uploadstash-badtoken' => 'Execuția acestei acțiuni nu a reușit, probabil deoarece informațiile dumneavoastră de identificare au expirat. Încercați din nou.', 'uploadstash-errclear' => 'Golirea fișierelor nu a reușit.', 'uploadstash-refresh' => 'Reîmprospătează lista de fișiere', 'invalid-chunk-offset' => 'Decalaj de segment nevalid', # img_auth script messages 'img-auth-accessdenied' => 'Acces interzis', 'img-auth-nopathinfo' => 'PATH_INFO lipsește. Serverul dumneavoastră nu a fost setat pentru a trece aceste informații. S-ar putea să fie bazat pe CGI și să nu suporte img_auth. Vedeți https://www.mediawiki.org/wiki/Manual:Image_Authorization.', 'img-auth-notindir' => 'Adresa cerută nu este în directorul pentru încărcări configurat.', 'img-auth-badtitle' => 'Nu s-a putut construi un titlu valid din "$1".', 'img-auth-nologinnWL' => 'Nu sunteți autentificat și "$1" nu este pe lista albă.', 'img-auth-nofile' => 'Fișierul "$1" nu există.', 'img-auth-isdir' => 'Încercați să accesați directorul "$1". Numai accesul la fișiere este permis.', 'img-auth-streaming' => 'Derularea continuă a "$1".', 'img-auth-public' => 'Funcția img_auth.php este pentru a exporta fișiere de pe un wiki privat. Acest wiki este configurat ca unul public. Pentru securitate optimă, img_auth.php este dezactivat.', 'img-auth-noread' => 'Acest utilizator nu are acces să citească "$1".', 'img-auth-bad-query-string' => 'Adresa URL are un șir de interogare invalid.', # HTTP errors 'http-invalid-url' => 'URL invalid: $1', 'http-invalid-scheme' => 'Adresele URL cu schema „$1” nu sunt acceptate.', 'http-request-error' => 'Cererea HTTP a eșuat din cauza unei erori necunoscute.', 'http-read-error' => 'S-a produs o eroare în timpul citirii HTTP.', 'http-timed-out' => 'Cererea HTTP a expirat.', 'http-curl-error' => 'Eroare la preluarea adresei URL: $1', 'http-bad-status' => 'A apărut o problemă în timpul solicitării HTTP: $1 $2', # Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html> 'upload-curl-error6' => 'Nu pot găsi adresa URL', 'upload-curl-error6-text' => 'Adresa URL introdusă nu a putut fi atinsă. Vă rugăm, verificați că adresa URL este corectă și că situl este funcțional.', 'upload-curl-error28' => 'Încărcarea a expirat', 'upload-curl-error28-text' => 'Site-ului îi ia prea mult timp pentru a răspunde. Vă rugăm să verificați dacă site-ul este activ, așteptați puțin și apoi reîncercați. Poate doriți să încercați la o oră mai puțin ocupată.', 'license' => 'Licențiere:', 'license-header' => 'Licențiere', 'nolicense' => 'Nici una selectată', 'license-nopreview' => '(Previzualizare indisponibilă)', 'upload_source_url' => ' (un URL valid, accesibil public)', 'upload_source_file' => ' (un fișier de pe computerul dv.)', # Special:ListFiles 'listfiles-summary' => 'Această pagină specială listează toate fișierele încărcate.', 'listfiles_search_for' => 'Căutare fișiere după nume:', 'imgfile' => 'fișier', 'listfiles' => 'Listă fișiere', 'listfiles_thumb' => 'Miniatură', 'listfiles_date' => 'Dată', 'listfiles_name' => 'Nume', 'listfiles_user' => 'Utilizator', 'listfiles_size' => 'Mărime (octeți)', 'listfiles_description' => 'Descriere', 'listfiles_count' => 'Versiuni', 'listfiles-show-all' => 'Include versiunile vechi ale imaginilor', 'listfiles-latestversion' => 'Versiunea curentă', 'listfiles-latestversion-yes' => 'Da', 'listfiles-latestversion-no' => 'Nu', # File description page 'file-anchor-link' => 'Fișier', 'filehist' => 'Istoricul fișierului', 'filehist-help' => "Apăsați pe '''Data și ora''' pentru a vedea versiunea fișierului trimisă la momentul respectiv.", 'filehist-deleteall' => 'șterge tot', 'filehist-deleteone' => 'ștergere', 'filehist-revert' => 'revenire', 'filehist-current' => 'actuală', 'filehist-datetime' => 'Data și ora', 'filehist-thumb' => 'Miniatură', 'filehist-thumbtext' => 'Miniatură pentru versiunea din $1', 'filehist-nothumb' => 'Nicio miniatură', 'filehist-user' => 'Utilizator', 'filehist-dimensions' => 'Dimensiuni', 'filehist-filesize' => 'Mărimea fișierului', 'filehist-comment' => 'Comentariu', 'filehist-missing' => 'Fișier lipsă', 'imagelinks' => 'Utilizarea fișierului', 'linkstoimage' => '{{PLURAL:$1|Următoarea pagină trimite spre|Următoarele $1 pagini trimit spre|Următoarele $1 de pagini trimit spre}} această imagine:', 'linkstoimage-more' => 'Mai mult de $1 {{PLURAL:$1|pagină este legată|pagini sunt legate}} de acest fișier. Următoarea listă arată {{PLURAL:$1|prima legătură|primele $1 legături}} către acest fișier. O [[Special:WhatLinksHere/$2|listă completă]] este disponibilă.', 'nolinkstoimage' => 'Nici o pagină nu utilizează această imagine.', 'morelinkstoimage' => 'Vedeți [[Special:WhatLinksHere/$1|mai multe legături]] către acest fișier.', 'linkstoimage-redirect' => '$1 (redirecționare de fișier) $2', 'duplicatesoffile' => '{{PLURAL:$1|Fișierul următor este duplicat|Următoarele $1 fișiere sunt duplicate}} ale acestui fișier ([[Special:FileDuplicateSearch/$2|mai multe detalii]]):', 'sharedupload' => 'Acest fișier provine de la $1, putând fi folosit și de alte proiecte.', 'sharedupload-desc-there' => 'Acest fișier provine de la $1 și poate fi folosit și în cadrul altor proiecte. Vizitați [$2 pagina de descriere a fișierului] pentru mai multe detalii.', 'sharedupload-desc-here' => 'Acest fișier provine de la $1 și poate fi folosit și în cadrul altor proiecte. Descrierea de mai jos poate fi consultată la [$2 pagina de descriere a fișierului].', 'sharedupload-desc-edit' => 'Acest fișier provine de la $1, putând fi folosit și de alte proiecte. Poate doriți să-i modificați descrierea pe [$2 pagina sa descriptivă] de acolo.', 'sharedupload-desc-create' => 'Acest fișier provine de la $1, putând fi folosit și de alte proiecte. Poate doriți să-i modificați descrierea pe [$2 pagina sa descriptivă] de acolo.', 'filepage-nofile' => 'Nu există niciun fișier cu acest nume.', 'filepage-nofile-link' => 'Nu există niciun fișier cu acest nume, dar îl puteți [$1 încărca].', 'uploadnewversion-linktext' => 'Încarcă o versiune nouă a acestui fișier', 'shared-repo-from' => 'de la $1', 'shared-repo' => 'un depozit partajat', 'upload-disallowed-here' => 'Nu puteți suprascrie acest fișier.', # File reversion 'filerevert' => 'Revenire $1', 'filerevert-legend' => 'Revenirea la o versiune anterioară', 'filerevert-intro' => "Pentru a readuce fișierul '''[[Media:$1|$1]]''' la versiunea din [$4 $2 $3] apasă butonul de mai jos.", 'filerevert-comment' => 'Motiv:', 'filerevert-defaultcomment' => 'Revenire la versiunea din $2, $1', 'filerevert-submit' => 'Revenire', 'filerevert-success' => "'''[[Media:$1|$1]]''' a fost readus [la versiunea $4 din $3, $2].", 'filerevert-badversion' => 'Nu există o versiune mai veche a fișierului care să corespundă cu data introdusă.', # File deletion 'filedelete' => 'Șterge $1', 'filedelete-legend' => 'Șterge fișierul', 'filedelete-intro' => "Sunteți pe cale să ștergeți fișierul '''[[Media:$1|$1]]''' cu tot istoricul acestuia.", 'filedelete-intro-old' => "Ştergi versiunea fișierului '''[[Media:$1|$1]]''' din [$4 $3, $2].", 'filedelete-comment' => 'Motiv:', 'filedelete-submit' => 'Șterge', 'filedelete-success' => "'''$1''' a fost șters.", 'filedelete-success-old' => "Versiunea fișierului '''[[Media:$1|$1]]''' din $2 $3 a fost ștearsă.", 'filedelete-nofile' => "'''$1''' nu există.", 'filedelete-nofile-old' => "Nu există nicio versiune arhivată a '''$1''' cu atributele specificate.", 'filedelete-otherreason' => 'Motiv diferit/adițional:', 'filedelete-reason-otherlist' => 'Alt motiv', 'filedelete-reason-dropdown' => '*Motive uzuale ** Încălcare drepturi de autor ** Fișier duplicat', 'filedelete-edit-reasonlist' => 'Modifică motivele ștergerii', 'filedelete-maintenance' => 'Ştergerea sau restaurarea fișierelor este temporar dezactivată pe timpul lucrărilor de mentenanță.', 'filedelete-maintenance-title' => 'Fișierul nu a putut fi șters', # MIME search 'mimesearch' => 'Căutare MIME', 'mimesearch-summary' => 'This page enables the filtering of files for its MIME-type. Input: contenttype/subtype, e.g. <code>image/jpeg</code>. Această pagină specială permite căutarea fișierelor în funcție de tipul MIME (Multipurpose Internet Mail Extensions). Cele mai des întâlnite sunt: * Imagini : <code>image/jpeg</code> * Diagrame : <code>image/png</code>, <code>image/svg+xml</code> * Imagini animate : <code>image/gif</code> * Fișiere sunet : <code>audio/ogg</code>, <code>audio/x-ogg</code> * Fișiere video : <code>video/ogg</code>, <code>video/x-ogg</code> * Fișiere PDF : <code>application/pdf</code>', 'mimetype' => 'Tip MIME:', 'download' => 'descarcă', # Unwatched pages 'unwatchedpages' => 'Pagini neurmărite', # List redirects 'listredirects' => 'Lista de redirecționări', # Unused templates 'unusedtemplates' => 'Formate neutilizate', 'unusedtemplatestext' => 'Lista de mai jos cuprinde toate formatele care nu sînt incluse în nici o altă pagină. Înainte de a le șterge asigurați-vă că într-adevăr nu există legături dinspre alte pagini.', 'unusedtemplateswlh' => 'alte legături', # Random page 'randompage' => 'Pagină aleatorie', 'randompage-nopages' => 'Nu există pagini în {{PLURAL:$2|spațiul|spațiile}} de nume: $1.', # Random page in category 'randomincategory' => 'Pagină aleatorie din categorie', 'randomincategory-invalidcategory' => '„$1” nu este un nume de categorie valid.', 'randomincategory-nopages' => 'Nu există pagini în [[:Category:$1]].', 'randomincategory-selectcategory' => 'Obțineți, aleatoriu, o pagină din categoria: $1 $2.', 'randomincategory-selectcategory-submit' => 'Du-te', # Random redirect 'randomredirect' => 'Redirecționare aleatorie', 'randomredirect-nopages' => 'Nu există redirecționări în spațiul de nume "$1".', # Statistics 'statistics' => 'Statistici', 'statistics-header-pages' => 'Statistici pagini', 'statistics-header-edits' => 'Statistici modificări', 'statistics-header-views' => 'Vizualizează statisticile', 'statistics-header-users' => 'Statistici utilizatori', 'statistics-header-hooks' => 'Alte statistici', 'statistics-articles' => 'Articole', 'statistics-pages' => 'Pagini', 'statistics-pages-desc' => 'Toate paginile din wiki, inclusiv pagini de discuție, redirectări etc.', 'statistics-files' => 'Fișiere încărcate', 'statistics-edits' => 'Modificări de la instalarea proiectului {{SITENAME}}', 'statistics-edits-average' => 'Media editărilor pe pagină', 'statistics-views-total' => 'Număr de vizualizări', 'statistics-views-total-desc' => 'Vizualizările paginilor inexistente și a paginilor speciale nu sunt incluse', 'statistics-views-peredit' => 'Vizualizări pe editare', 'statistics-users' => '[[Special:ListUsers|Utilizatori]] înregistrați', 'statistics-users-active' => 'Utilizatori activi', 'statistics-users-active-desc' => 'Utilizatori care au efectuat o acțiune în {{PLURAL:$1|ultima zi|ultimele $1 zile}}', 'statistics-mostpopular' => 'Paginile cele mai vizualizate', 'pageswithprop' => 'Pagini cu o proprietate de pagină', 'pageswithprop-legend' => 'Pagini cu o proprietate de pagină', 'pageswithprop-text' => 'Această pagină listează paginile care utilizează o anumită proprietate de pagină.', 'pageswithprop-prop' => 'Numele proprietății:', 'pageswithprop-submit' => 'Du-te', 'pageswithprop-prophidden-long' => 'valoarea proprietății de text lung ascunsă ($1)', 'pageswithprop-prophidden-binary' => 'valoarea proprietății binare ascunsă ($1)', 'doubleredirects' => 'Redirecționări duble', 'doubleredirectstext' => 'Această listă conține pagini care redirecționează la alte pagini de redirecționare. Fiecare rând conține legături la primele două redirecționări, precum și ținta celei de-a doua redirecționări, care este de obicei pagina țintă "reală", către care ar trebui să redirecționeze prima pagină. Intrările <del>tăiate</del> au fost rezolvate.', 'double-redirect-fixed-move' => '[[$1]] a fost mutat, acum este un redirect către [[$2]]', 'double-redirect-fixed-maintenance' => 'Reparat dubla redirecționare de la [[$1]] înspre [[$2]].', 'double-redirect-fixer' => 'Corector de redirecționări', 'brokenredirects' => 'Redirecționări greșite', 'brokenredirectstext' => 'Următoarele redirecționări conduc spre articole inexistente:', 'brokenredirects-edit' => 'modificare', 'brokenredirects-delete' => 'ștergere', 'withoutinterwiki' => 'Pagini fără legături interwiki', 'withoutinterwiki-summary' => 'Următoarele pagini nu se leagă la versiuni ale lor în alte limbi:', 'withoutinterwiki-legend' => 'Prefix', 'withoutinterwiki-submit' => 'Arată', 'fewestrevisions' => 'Articole cu cele mai puține versiuni', # Miscellaneous special pages 'nbytes' => '{{PLURAL:$1|un octet|$1 octeți|$1 de octeți}}', 'ncategories' => '{{PLURAL:$1|o categorie|$1 categorii|$1 de categorii}}', 'ninterwikis' => '$1 {{PLURAL:$1|interwiki|legături interwiki|de legături interwiki}}', 'nlinks' => '{{PLURAL:$1|o legătură|$1 legături|$1 de legături}}', 'nmembers' => '$1 {{PLURAL:$1|membru|membri|de membri}}', 'nmemberschanged' => '$1 → $2 {{PLURAL:$2|membru|membri|de membri}}', 'nrevisions' => '{{PLURAL:$1|o versiune|$1 versiuni|$1 de versiuni}}', 'nviews' => '{{PLURAL:$1|o accesare|$1 accesări|$1 de accesări}}', 'nimagelinks' => 'Utilizat pe $1 {{PLURAL:$1|pagină|pagini}}', 'ntransclusions' => 'utilizat pe $1 {{PLURAL:$1|pagină|pagini}}', 'specialpage-empty' => 'Această pagină este goală.', 'lonelypages' => 'Pagini orfane', 'lonelypagestext' => 'La următoarele pagini nu se leagă nici o altă pagină din {{SITENAME}}.', 'uncategorizedpages' => 'Pagini necategorizate', 'uncategorizedcategories' => 'Categorii necategorizate', 'uncategorizedimages' => 'Fișiere necategorizate', 'uncategorizedtemplates' => 'Formate necategorizate', 'unusedcategories' => 'Categorii neutilizate', 'unusedimages' => 'Pagini neutilizate', 'popularpages' => 'Pagini populare', 'wantedcategories' => 'Categorii dorite', 'wantedpages' => 'Pagini dorite', 'wantedpages-badtitle' => 'Titlu invalid în rezultatele : $1', 'wantedfiles' => 'Fișiere dorite', 'wantedfiletext-cat' => 'Următoarele fișiere sunt utilizate, dar nu există. Fișierele provenind din depozite externe pot apărea listate, în ciuda faptului că ele nu există. Orice astfel de pozitive false vor fi <del>tăiate</del>. În plus, paginile care încorporează astfel de fișiere inexistente sunt listate la [[:$1]].', 'wantedfiletext-nocat' => 'Următoarele fișiere sunt utilizate, dar nu există. Fișierele provenind din depozite externe pot apărea listate, în ciuda faptului că ele nu există. Orice astfel de pozitive false vor fi <del>tăiate</del>.', 'wantedtemplates' => 'Formate dorite', 'mostlinked' => 'Cele mai căutate articole', 'mostlinkedcategories' => 'Cele mai căutate categorii', 'mostlinkedtemplates' => 'Cele mai folosite formate', 'mostcategories' => 'Articole cu cele mai multe categorii', 'mostimages' => 'Cele mai căutate imagini', 'mostinterwikis' => 'Pagini cu cele mai multe legături interwiki', 'mostrevisions' => 'Articole cu cele mai multe revizuiri', 'prefixindex' => 'Toate paginile cu prefix', 'prefixindex-namespace' => 'Toate paginile cu prefix (spațiul de nume $1)', 'prefixindex-strip' => 'Înlătură prefixul din cadrul listei', 'shortpages' => 'Pagini scurte', 'longpages' => 'Pagini lungi', 'deadendpages' => 'Pagini fără legături', 'deadendpagestext' => 'Următoarele pagini nu se leagă de alte pagini din acestă wiki.', 'protectedpages' => 'Pagini protejate', 'protectedpages-indef' => 'Doar protejări pe termen nelimitat', 'protectedpages-cascade' => 'Doar protejări în cascadă', 'protectedpages-noredirect' => 'Ascunde redirecționările', 'protectedpagesempty' => 'Nu există pagini protejate', 'protectedtitles' => 'Titluri protejate', 'protectedtitlesempty' => 'Nu există titluri protejate cu acești parametri.', 'listusers' => 'Listă utilizatori', 'listusers-editsonly' => 'Arată doar utilizatorii cu modificări', 'listusers-creationsort' => 'Sortează după data creării', 'listusers-desc' => 'Sortează descrescător', 'usereditcount' => '$1 {{PLURAL:$1|editare|editări}}', 'usercreated' => '{{GENDER:$3|Creat}} în $1 la $2', 'newpages' => 'Pagini noi', 'newpages-username' => 'Nume de utilizator:', 'ancientpages' => 'Cele mai vechi articole', 'move' => 'Redenumire', 'movethispage' => 'Redenumește această pagină', 'unusedimagestext' => 'Următoarele fișiere există dar nu sunt incluse în nicio altă pagină. Vă rugăm să aveți în vedere faptul că alte saituri web pot avea o legătură directă către acest URL și s-ar putea afla aici chiar dacă nu sunt în utlizare activă.', 'unusedcategoriestext' => 'Următoarele categorii de pagini există și totuși nici un articol sau categorie nu le folosește.', 'notargettitle' => 'Lipsă țintă', 'notargettext' => 'Nu ați specificat nici o pagină sau un utilizator țintă pentru care să se efectueze această operațiune.', 'nopagetitle' => 'Nu există pagina destinație', 'nopagetext' => 'Pagina destinație specificată nu există.', 'pager-newer-n' => '{{PLURAL:$1|1 mai nou|$1 mai noi}}', 'pager-older-n' => '{{PLURAL:$1|1|$1}} mai vechi', 'suppress' => 'Oversight', 'querypage-disabled' => 'Această pagină specială este dezactivată din motive de performanță.', # Book sources 'booksources' => 'Surse de cărți', 'booksources-search-legend' => 'Căutare surse pentru cărți', 'booksources-go' => 'Salt', 'booksources-text' => 'Mai jos se află o listă de legături înspre alte situri care vând cărți noi sau vechi și care pot oferi informații suplimentare despre cărțile pe care le căutați:', 'booksources-invalid-isbn' => 'Codul ISBN oferit nu este valid; verificați dacă a fost copiat corect de la sursa originală.', # Special:Log 'specialloguserlabel' => 'Executant:', 'speciallogtitlelabel' => 'Destinație (titlu sau utilizator):', 'log' => 'Jurnale', 'all-logs-page' => 'Toate jurnalele publice', 'alllogstext' => 'Afișare combinată a tuturor jurnalelor {{SITENAME}}. Puteți limita vizualizarea selectând tipul jurnalului, numele de utilizator sau pagina afectată.', 'logempty' => 'Nici o înregistrare în jurnal.', 'log-title-wildcard' => 'Caută titluri care încep cu acest text', 'showhideselectedlogentries' => 'Arată/ascunde intrările selectate din jurnal', # Special:AllPages 'allpages' => 'Toate paginile', 'alphaindexline' => '$1 către $2', 'nextpage' => 'Pagina următoare ($1)', 'prevpage' => 'Pagina anterioară ($1)', 'allpagesfrom' => 'Afișează paginile pornind de la:', 'allpagesto' => 'Afișează paginile terminând cu:', 'allarticles' => 'Toate articolele', 'allinnamespace' => 'Toate paginile (spațiu de nume $1)', 'allpagessubmit' => 'Trimite', 'allpagesprefix' => 'Se afișează paginile cu prefixul:', 'allpagesbadtitle' => 'Titlul paginii este nevalid sau conține un prefix inter-wiki. Este posibil să conțină unul sau mai multe caractere care nu pot fi folosite în titluri.', 'allpages-bad-ns' => '{{SITENAME}} nu are spațiul de nume „$1”.', 'allpages-hide-redirects' => 'Ascunde redirecționările', # SpecialCachedPage 'cachedspecial-viewing-cached-ttl' => 'În acest moment vizualizați o versiune din cache a acestei pagini, versiune care poate avea o vechime de $1.', 'cachedspecial-viewing-cached-ts' => 'În acest moment vizualizați o versiune din cache a acestei pagini, versiune care poate fi incomplet actualizată.', 'cachedspecial-refresh-now' => 'Ultima versiune.', # Special:Categories 'categories' => 'Categorii', 'categoriespagetext' => '{{PLURAL:$1|Următoarea categorie conține|Următoarele categorii conțin}} pagini sau fișiere. [[Special:UnusedCategories|Categoriile neutilizate]] nu apar aici. Vedeți și [[Special:WantedCategories|categoriile dorite]].', 'categoriesfrom' => 'Arată categoriile pornind de la:', 'special-categories-sort-count' => 'ordonează după număr', 'special-categories-sort-abc' => 'sortează alfabetic', # Special:DeletedContributions 'deletedcontributions' => 'Contribuții șterse', 'deletedcontributions-title' => 'Contribuții șterse', 'sp-deletedcontributions-contribs' => 'contribuții', # Special:LinkSearch 'linksearch' => 'Căutare legături externe', 'linksearch-pat' => 'De căutat:', 'linksearch-ns' => 'Spațiu de nume:', 'linksearch-ok' => 'Caută', 'linksearch-text' => 'Pot fi folosite metacaractere precum „*.wikipedia.org”. Necesită cel puțin un domeniu de nivel superior, cum ar fi „*.org”.<br /> {{PLURAL:$2|Protocol suportat|Protocoale suportate}}: <code>$1</code> (se trece implicit la http:// dacă nu este specificat niciun protocol).', 'linksearch-line' => '$1 este legat de $2', 'linksearch-error' => 'Metacaracterele pot să apară doar la începutul hostname-ului.', # Special:ListUsers 'listusersfrom' => 'Afișează utilizatori începând cu:', 'listusers-submit' => 'Arată', 'listusers-noresult' => 'Nici un utilizator găsit.', 'listusers-blocked' => '(blocat{{GENDER:$1||ă|}})', # Special:ActiveUsers 'activeusers' => 'Listă utilizatori activi', 'activeusers-intro' => 'Aceasta este o listă cu utilizatorii care au avut orice fel de activitate în {{PLURAL:$1|ultima zi|ultimele $1 zile}}.', 'activeusers-count' => '{{PLURAL:$1|o acțiune|$1 acțiuni|$1 de acțiuni}} în {{PLURAL:$3|ultima zi|ultimele $3 zile|ultimele $3 de zile}}', 'activeusers-from' => 'Afișează utilizatori începând cu:', 'activeusers-hidebots' => 'Ascunde roboții', 'activeusers-hidesysops' => 'Ascunde administratorii', 'activeusers-noresult' => 'Niciun utilizator găsit.', # Special:ListGroupRights 'listgrouprights' => 'Permisiuni grupuri de utilizatori', 'listgrouprights-summary' => 'Mai jos se află o listă a grupurilor de utilizatori definite în acest wiki, împreună cu permisiunile de acces asociate. Pot exista [[{{MediaWiki:Listgrouprights-helppage}}|informații suplimentare]] despre permisiuni individuale.', 'listgrouprights-key' => 'Legendă: * <span class="listgrouprights-granted">Drept acordat</span> * <span class="listgrouprights-revoked">Drept revocat</span>', 'listgrouprights-group' => 'Grup', 'listgrouprights-rights' => 'Permisiuni', 'listgrouprights-helppage' => 'Help:Group rights', 'listgrouprights-members' => '(listă de membri)', 'listgrouprights-addgroup' => 'Poți adăuga {{PLURAL:$2|grupul|grupurile}}: $1', 'listgrouprights-removegroup' => 'Poți elimina {{PLURAL:$2|grupul|grupurile}}: $1', 'listgrouprights-addgroup-all' => 'Pot fi adăugate toate grupurile', 'listgrouprights-removegroup-all' => 'Pot fi eliminate toate grupurile', 'listgrouprights-addgroup-self' => '{{PLURAL:$2|Poate fi adăugat grupul|Pot fi adăugate grupurile}} pentru contul propriu: $1', 'listgrouprights-removegroup-self' => '{{PLURAL:$2|Poate fi șters grupul|Pot fi șterse grupurile}} pentru contul propriu: $1', 'listgrouprights-addgroup-self-all' => 'Pot fi adăugate toate grupurile contului propriu', 'listgrouprights-removegroup-self-all' => 'Pot fi șterse toate grupurile din contul propriu', # Email user 'mailnologin' => 'Nu există adresă de trimitere', 'mailnologintext' => 'Trebuie să fii [[Special:UserLogin|autentificat]] și să ai o adresă validă de e-mail în [[Special:Preferences|preferințe]] pentru a trimite e-mail altor utilizatori.', 'emailuser' => 'Trimiteți un e-mail', 'emailuser-title-target' => 'E-mail către {{GENDER:$1|acest utilizator|această utilizatoare}}', 'emailuser-title-notarget' => 'E-mail către utilizator', 'emailpage' => 'E-mail către utilizator', 'emailpagetext' => 'Puteți folosi formularul de mai jos pentru a trimite un e-mail {{GENDER:$1|acestui utilizator|acestei utilizatoare}}. Adresa de e-mail specificată de dumneavoastră în [[Special:Preferences|preferințele de utilizator]] va apărea ca adresa expeditorului e-mailului; astfel, destinatarul va putea să vă răspundă direct.', 'usermailererror' => 'Obiectul de mail a dat eroare:', 'defemailsubject' => 'E-mail {{SITENAME}} de la utilizatorul „$1”', 'usermaildisabled' => 'E-mail dezactivat', 'usermaildisabledtext' => 'Nu puteți trimite e-mail altor utilizatori ai acestui wiki.', 'noemailtitle' => 'Fără adresă de e-mail', 'noemailtext' => 'Utilizatorul nu a specificat o adresă validă de e-mail.', 'nowikiemailtitle' => 'Nu este permis e-mail-ul', 'nowikiemailtext' => 'Acest utilizator a ales să nu primească e-mail-uri de la alți utilizatori.', 'emailnotarget' => 'Destinatarul este un nume de utilizator inexistent sau invalid.', 'emailtarget' => 'Introduceți numele de utilizator al destinatarului', 'emailusername' => 'Nume de utilizator:', 'emailusernamesubmit' => 'Trimite', 'email-legend' => 'Trimitere e-mail către alt utilizator de la {{SITENAME}}', 'emailfrom' => 'De la:', 'emailto' => 'Către:', 'emailsubject' => 'Subiect:', 'emailmessage' => 'Mesaj:', 'emailsend' => 'Trimite', 'emailccme' => 'Trimite-mi pe e-mail o copie a mesajului meu.', 'emailccsubject' => 'O copie a mesajului la $1: $2', 'emailsent' => 'E-mail trimis', 'emailsenttext' => 'E-mailul dumneavoastră a fost trimis.', 'emailuserfooter' => 'Acest mesaj a fost trimis de $1 către $2 prin intermediul funcției „Trimite e-mail” de la {{SITENAME}}.', # User Messenger 'usermessage-summary' => 'a lăsat un mesaj de sistem', 'usermessage-editor' => 'Mesager de sistem', # Watchlist 'watchlist' => 'Pagini urmărite', 'mywatchlist' => 'Pagini urmărite', 'watchlistfor2' => 'Pentru $1 $2', 'nowatchlist' => 'Lista dumneavoastră de pagini urmărite nu conține nici o pagină.', 'watchlistanontext' => 'Vă rugăm să vă $1 pentru a vizualiza sau edita elementele din lista dumneavoastră de pagini urmărite.', 'watchnologin' => 'Nu sunteți autentificat', 'watchnologintext' => 'Trebuie să fiți [[Special:UserLogin|autentificat]] pentru a vă modifica lista de pagini urmărite.', 'addwatch' => 'Adăugă la lista de pagini urmărite', 'addedwatchtext' => 'Pagina „[[:$1]]” a fost adăugată la lista dumneavoastră de [[Special:Watchlist|pagini urmărite]]. Modificările viitoare efectuate asupra acestei pagini dar și asupra paginii de discuție asociată vor fi listate acolo.', 'removewatch' => 'Elimină din lista de pagini urmărite', 'removedwatchtext' => 'Pagina „[[:$1]]” a fost eliminată din [[Special:Watchlist|lista de pagini urmărite]].', 'watch' => 'Urmărire', 'watchthispage' => 'Urmărește pagina', 'unwatch' => 'Nu mai urmări', 'unwatchthispage' => 'Nu mai urmări', 'notanarticle' => 'Nu este un articol', 'notvisiblerev' => 'Versiunea a fost ștearsă', 'watchlist-details' => '{{PLURAL:$1|O pagină|$1 pagini urmărite|$1 de pagini urmărite}}, excluzând paginile de discuție.', 'wlheader-enotif' => 'Notificarea prin e-mail este activată.', 'wlheader-showupdated' => "Paginile care au fost modificate după ultima dumneavoastră vizită sunt afișate '''îngroșat'''.", 'watchmethod-recent' => 'căutarea schimbărilor recente pentru paginile urmărite', 'watchmethod-list' => 'căutarea paginilor urmărite pentru schimbări recente', 'watchlistcontains' => 'Lista de pagini urmărite conține $1 {{PLURAL:$1|element|elemente|de elemente}}.', 'iteminvalidname' => "E o problemă cu elementul '$1', numele este invalid...", 'wlnote' => "Mai jos se află {{PLURAL:$1|ultima schimbare|ultimele $1 schimbări|ultimele $1 de schimbări}} din {{PLURAL:$2|ultima oră|ultimele '''$2''' ore|ultimele '''$2''' de ore}}, așa cum era situația la $3, $4.", 'wlshowlast' => 'Arată ultimele $1 ore $2 zile $3', 'watchlist-options' => 'Opțiuni listă de pagini urmărite', # Displayed when you click the "watch" button and it is in the process of watching 'watching' => 'Se urmărește...', 'unwatching' => 'Așteptați...', 'watcherrortext' => 'A apărut o eroare în timp ce se modificau setările listei de pagini urmărite pentru „$1”.', 'enotif_mailer' => 'Sistemul de notificare {{SITENAME}}', 'enotif_reset' => 'Marchează toate paginile vizitate', 'enotif_impersonal_salutation' => 'Utilizator {{SITENAME}}', 'enotif_subject_deleted' => 'Pagina $1 de la {{SITENAME}} a fost ștearsă de către {{gender:$2|$2}}', 'enotif_subject_created' => 'Pagina $1 de la {{SITENAME}} a fost creată de către {{gender:$2|$2}}', 'enotif_subject_moved' => 'Pagina $1 de la {{SITENAME}} a fost redenumită de către {{gender:$2|$2}}', 'enotif_subject_restored' => 'Pagina $1 de la {{SITENAME}} a fost restaurată de către {{gender:$2|$2}}', 'enotif_subject_changed' => 'Pagina $1 de la {{SITENAME}} a fost modificată de către {{gender:$2|$2}}', 'enotif_body_intro_deleted' => 'Pagina $1 de la {{SITENAME}} a fost ștearsă la $PAGEEDITDATE de către {{gender:$2|$2}}; vedeți $3.', 'enotif_body_intro_created' => 'Pagina $1 de la {{SITENAME}} a fost creată la $PAGEEDITDATE de către {{gender:$2|$2}}; vedeți $3 pentru versiunea actuală.', 'enotif_body_intro_moved' => 'Pagina $1 de la {{SITENAME}} a fost redenumită la $PAGEEDITDATE de către {{gender:$2|$2}}; vedeți $3 pentru versiunea actuală.', 'enotif_body_intro_restored' => 'Pagina $1 de la {{SITENAME}} a fost restaurată la $PAGEEDITDATE de către {{gender:$2|$2}}; vedeți $3 pentru versiunea actuală.', 'enotif_body_intro_changed' => 'Pagina $1 de la {{SITENAME}} a fost modificată la $PAGEEDITDATE de către {{gender:$2|$2}}; vedeți $3 pentru versiunea actuală.', 'enotif_lastvisited' => 'Vedeți $1 pentru toate modificările de la ultima dvs. vizită.', 'enotif_lastdiff' => 'Apasă $1 pentru a vedea această schimbare.', 'enotif_anon_editor' => 'utilizator anonim $1', 'enotif_body' => 'Domnule/Doamnă $WATCHINGUSERNAME, $PAGEINTRO $NEWPAGE Descrierea lăsată de utilizator: $PAGESUMMARY $PAGEMINOREDIT Puteți contacta utilizatorul: e-mail: $PAGEEDITOR_EMAIL wiki: $PAGEEDITOR_WIKI Nu veți mai primi notificări în cazul unei viitoare activități până când nu veți vizitați pagina ca utilizator autentificat. Puteți de asemenea reseta notificările pentru toate pagini pe care le urmăriți. Al dumneavoastră amic, sistemul de notificare de la {{SITENAME}} -- Pentru a modifica setările notificării prin e-mail, vizitați {{canonicalurl:{{#special:Preferences}}}} Pentru a modifica setările listei de pagini urmărite, vizitați {{canonicalurl:{{#special:EditWatchlist}}}} Pentru a nu mai urmări pagina, vizitați $UNWATCHURL Asistență și suport: {{canonicalurl:{{MediaWiki:Helppage}}}}', 'created' => 'creată', 'changed' => 'modificată', # Delete 'deletepage' => 'Șterge pagina', 'confirm' => 'Confirmă', 'excontent' => "conținutul era: '$1'", 'excontentauthor' => 'conținutul era: „$1” (unicul contribuitor: [[Special:Contributions/$2|$2]])', 'exbeforeblank' => "conținutul înainte de golire era: '$1'", 'exblank' => 'pagina era goală', 'delete-confirm' => 'Şterge "$1"', 'delete-legend' => 'Şterge', 'historywarning' => "'''Atenție:''' istoricul paginii pe care o ștergeți conține aproximativ $1 {{PLURAL:$1|versiune|versiuni|de versiuni}}:", 'confirmdeletetext' => 'Sunteți pe cale să ștergeți permanent o pagină sau imagine din baza de date, împreună cu istoria asociată acesteia. Vă rugăm să confirmați alegerea făcută de dvs., faptul că înțelegeți consecințele acestei acțiuni și faptul că o faceți în conformitate cu [[{{MediaWiki:Policy-url}}|Politica oficială]].', 'actioncomplete' => 'Acțiune completă', 'actionfailed' => 'Acțiunea a eșuat', 'deletedtext' => 'Pagina „$1” a fost ștearsă. Accesați $2 pentru o listă cu elementele recent șterse.', 'dellogpage' => 'Jurnal ștergeri', 'dellogpagetext' => 'Mai jos se află lista celor mai recente elemente șterse.', 'deletionlog' => 'jurnal pagini șterse', 'reverted' => 'Revenire la o versiune mai veche', 'deletecomment' => 'Motiv:', 'deleteotherreason' => 'Motiv diferit/suplimentar:', 'deletereasonotherlist' => 'Alt motiv', 'deletereason-dropdown' => '*Motive uzuale de ștergere ** Spam ** Vandalism ** Violarea drepturilor de autor ** La cererea autorului ** Redirecționare nefuncțională', 'delete-edit-reasonlist' => 'Modifică motivele ștergerii', 'delete-toobig' => 'Această pagină are un istoric al modificărilor important, cu mai mult de $1 {{PLURAL:$1|versiune|versiuni|de versiuni}}. Ștergerea unei astfel de pagini a fost restricționată pentru a preveni apariția unor erori în {{SITENAME}}.', 'delete-warning-toobig' => 'Această pagină are un istoric al modificărilor mult prea mare, cu mai mult de $1 {{PLURAL:$1|versiune|versiuni|de versiuni}}. Ștergerea sa poate afecta baza de date a sitului {{SITENAME}}; acționați cu precauție.', 'deleting-backlinks-warning' => "'''Atenție:''' Alte pagini se leagă sau sunt transcluse din pagina pe care doriți să o ștergeți.", # Rollback 'rollback' => 'Editări de revenire', 'rollback_short' => 'Revenire', 'rollbacklink' => 'revenire', 'rollbacklinkcount' => 'revenire asupra {{PLURAL:$1|unei modificări|a $1 modificări|a $1 de modificări}}', 'rollbacklinkcount-morethan' => 'revenire asupra a mai mult de {{PLURAL:$1|o modificare|$1 modificări|$1 de modificări}}', 'rollbackfailed' => 'Revenirea nu s-a putut face', 'cantrollback' => 'Nu se poate reveni; ultimul contribuitor este autorul acestui articol.', 'alreadyrolled' => 'Nu se poate reveni peste ultima modificare a articolului [[:$1]] făcută de către [[User:$2|$2]] ([[User talk:$2|discuție]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]); altcineva a modificat articolul sau a revenit deja. Ultima editare a fost făcută de către [[User:$3|$3]] ([[User talk:$3|discuție]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).', 'editcomment' => "Descrierea modificărilor a fost: „''$1''”.", 'revertpage' => 'Anularea modificărilor efectuate de către [[Special:Contributions/$2|$2]] ([[User talk:$2|discuție]]) și revenire la ultima versiune de către [[User:$1|$1]]', 'revertpage-nouser' => 'Anularea modificărilor efectuate de un utilizator ascuns și revenirea la ultima modificare de către {{GENDER:$1|[[User:$1|$1]]}}', 'rollback-success' => 'Anularea modificărilor făcute de $1; revenire la ultima versiune de $2.', # Edit tokens 'sessionfailure-title' => 'Eroare de sesiune', 'sessionfailure' => 'Se pare că este o problemă cu sesiunea de autentificare; această acțiune a fost oprită ca o precauție împotriva hijack. Apăsați "back" și reîncărcați pagina de unde ați venit, apoi reîncercați.', # Protect 'protectlogpage' => 'Jurnal protecții', 'protectlogtext' => 'Mai jos se află o listă cu schimbări în ceea ce privește protejarea paginilor. Consultați [[Special:ProtectedPages|indexul paginilor protejate]] pentru o listă cu protecțiile în vigoare.', 'protectedarticle' => 'a protejat "[[$1]]"', 'modifiedarticleprotection' => 'schimbat nivelul de protecție pentru "[[$1]]"', 'unprotectedarticle' => 'a eliminat protecția pentru „[[$1]]”', 'movedarticleprotection' => 'setările de protecție au fost mutate de la „[[$2]]” la „[[$1]]”', 'protect-title' => 'Protejare „$1”', 'protect-title-notallowed' => 'Vizualizare nivel de protecție pentru „$1”', 'prot_1movedto2' => 'a mutat [[$1]] la [[$2]]', 'protect-badnamespace-title' => 'Spațiu de nume neprotejabil', 'protect-badnamespace-text' => 'Paginile din acest spațiu de nume nu pot fi protejate.', 'protect-norestrictiontypes-text' => 'Această pagină nu poate fi protejată întrucât nu există niciun tip de restricție disponibil.', 'protect-norestrictiontypes-title' => 'Pagină neprotejabilă', 'protect-legend' => 'Confirmă protejare', 'protectcomment' => 'Motiv:', 'protectexpiry' => 'Expiră:', 'protect_expiry_invalid' => 'Timpul de expirare nu este valid.', 'protect_expiry_old' => 'Timpul de expirare este în trecut.', 'protect-unchain-permissions' => 'Deblochează mai multe opțiuni de protejare', 'protect-text' => "Puteți vizualiza sau modifica nivelul de protecție al paginii '''$1'''.", 'protect-locked-blocked' => "Nu poți schimba nivelurile de protecție fiind blocat. Iată configurația curentă a paginii '''$1''':", 'protect-locked-dblock' => "Nivelurile de protecție nu pot fi aplicate deoarece baza de date este închisă. Iată configurația curentă a paginii '''$1''':", 'protect-locked-access' => "Contul dumneavoastră nu are permisiunea de a schimba nivelurile de protejare a paginii. Aici sunt setările curente pentru pagina '''$1''':", 'protect-cascadeon' => 'Această pagină este protejată deoarece este inclusă în {{PLURAL:$1|următoarea pagină, ce are|următoarele pagini ce au}} activată protejarea la modificare în cascadă. Puteți schimba nivelul de protejare al acestei pagini, dar asta nu va afecta protecția în cascadă.', 'protect-default' => 'Permis pentru toți utilizatorii', 'protect-fallback' => 'Autorizat doar pentru utilizatorii cu permisiunea „$1”', 'protect-level-autoconfirmed' => 'Autorizat doar pentru utilizatorii autoconfirmați', 'protect-level-sysop' => 'Autorizat doar pentru administratori', 'protect-summary-cascade' => 'în cascadă', 'protect-expiring' => 'expiră $1 (UTC)', 'protect-expiring-local' => 'expiră la $1', 'protect-expiry-indefinite' => 'indefinit', 'protect-cascade' => 'Protejare în cascadă - toate paginile incluse în această pagină vor fi protejate.', 'protect-cantedit' => 'Nu puteți schimba nivelul de protecție a acestei pagini, deoarece nu aveți permisiunea de a o modifica.', 'protect-othertime' => 'Alt termen:', 'protect-othertime-op' => 'alt termen', 'protect-existing-expiry' => 'Data expirării: $3, $2', 'protect-otherreason' => 'Motiv diferit/adițional:', 'protect-otherreason-op' => 'Alt motiv', 'protect-dropdown' => '*Motive uzuale de protejare ** Vandalism excesiv ** SPAM excesiv ** Modificări neproductive ** Pagină cu trafic mare', 'protect-edit-reasonlist' => 'Modifică motivele protejării', 'protect-expiry-options' => '1 oră:1 hour,1 zi:1 day,1 săptămână:1 week,2 săptămâni:2 weeks,1 lună:1 month,3 luni:3 months,6 luni:6 months,1 an:1 year,infinit:infinite', 'restriction-type' => 'Permisiune:', 'restriction-level' => 'Nivel de restricție:', 'minimum-size' => 'Mărime minimă', 'maximum-size' => 'Mărime maximă:', 'pagesize' => '(octeți)', # Restrictions (nouns) 'restriction-edit' => 'Modificare', 'restriction-move' => 'Redenumire', 'restriction-create' => 'Creare', 'restriction-upload' => 'Încărcare', # Restriction levels 'restriction-level-sysop' => 'protejat complet', 'restriction-level-autoconfirmed' => 'semi-protejat', 'restriction-level-all' => 'orice nivel', # Undelete 'undelete' => 'Recuperare pagină ștearsă', 'undeletepage' => 'Vizualizare și recuperare pagini șterse', 'undeletepagetitle' => "'''Această listă cuprinde versiuni șterse ale paginii [[:$1|$1]].'''", 'viewdeletedpage' => 'Vizualizare pagini șterse', 'undeletepagetext' => '{{PLURAL:$1|Următoarea pagină a fost ștearsă, dar încă se află în arhivă și poate fi recuperată|Următoarele $1 pagini au fost șterse, dar încă se află în arhivă și pot fi recuperate|Următoarele $1 de pagini au fost șterse, dar încă se află în arhivă și pot fi recuperate}}. Arhiva ar putea fi ștearsă periodic.', 'undelete-fieldset-title' => 'Recuperare versiuni', 'undeleteextrahelp' => "Pentru a restaura întregul istoric al paginii lăsați toate căsuțele nebifate și apăsați butonul '''''{{int:undeletebtn}}'''''. Pentru a realiza o recuperare selectivă bifați versiunile pe care doriți să le recuperați și apăsați butonul '''''{{int:undeletebtn}}'''''.", 'undeleterevisions' => '$1 {{PLURAL:$1|versiune arhivată|versiuni arhivate|de versiuni arhivate}}', 'undeletehistory' => 'Dacă recuperați pagina, toate versiunile asociate vor fi adăugate retroactiv în istorie. Dacă o pagină nouă cu același nume a fost creată de la momentul ștergerii acesteia, versiunile recuperate vor apărea în istoria paginii, iar versiunea curentă a paginii nu va fi înlocuită automat de către versiunea recuperată.', 'undeleterevdel' => "Restaurarea unui versiuni nu va fi efectuată dacă ea va apărea în capul listei de versiuni parțial șterse. În acest caz, trebuie să debifați sau să reafișați (''unhide'') cea mai recentă versiune ștearsă.", 'undeletehistorynoadmin' => 'Acest articol a fost șters. Motivul ștergerii apare mai jos, alături de detaliile utilzatorilor care au editat această pagină înainte de ștergere. Textul prorpiu-zis al reviziilor șterse este disponibil doar administratorilor.', 'undelete-revision' => 'Ștergere versiunea $1 (din $4 $5) de către $3:', 'undeleterevision-missing' => 'Versiune lipsă sau invalidă. S-ar putea ca legătura să fie greșită, ori versiunea să fi fost restaurată sau ștearsă din arhivă.', 'undelete-nodiff' => 'Nu s-a găsit vreo versiune anterioară.', 'undeletebtn' => 'Recuperează', 'undeletelink' => 'vizualizare/recuperare', 'undeleteviewlink' => 'vezi', 'undeleteinvert' => 'Exclude spațiul', 'undeletecomment' => 'Motiv:', 'undeletedrevisions' => '{{PLURAL:$1|o versiune restaurată|$1 versiuni restaurate|$1 de versiuni restaurate}}', 'undeletedrevisions-files' => '{{PLURAL:$1|O versiune|$1 versiuni|$1 de versiuni}} și {{PLURAL:$2|un fișier|$2 fișiere|$2 de fișiere}} recuperate', 'undeletedfiles' => '{{PLURAL:$1|O versiune recuperată|$1 versiuni recuperate|$1 de versiuni recuperate}}', 'cannotundelete' => 'Recuperarea a eșuat: $1', 'undeletedpage' => "'''$1 a fost recuperat''' Consultați [[Special:Log/delete|jurnalul ștergerilor]] pentru a vedea toate ștergerile și recuperările recente.", 'undelete-header' => 'Consultați [[Special:Log/delete|jurnalul de ștergeri]] pentru paginile șterse recent.', 'undelete-search-title' => 'Căutare pagini șterse', 'undelete-search-box' => 'Caută pagini șterse', 'undelete-search-prefix' => 'Arată paginile care încep cu:', 'undelete-search-submit' => 'Caută', 'undelete-no-results' => 'Nicio pagină potrivită nu a fost găsită în arhiva paginilor șterse.', 'undelete-filename-mismatch' => 'Nu poate fi restaurată revizia fișierului din data $1: nume nepotrivit', 'undelete-bad-store-key' => 'Nu poate fi restaurată revizia fișierului din data $1: fișierul lipsea înainte de ștergere.', 'undelete-cleanup-error' => 'Eroare la ștergerea arhivei nefolosite „$1”.', 'undelete-missing-filearchive' => 'Nu poate fi restaurată arhiva fișierul cu ID-ul $1 pentru că nu există în baza de date. S-ar putea ca ea să fi fost deja restaurată.', 'undelete-error' => 'Eroare la recuperarea paginii', 'undelete-error-short' => 'Eroare la restaurarea fișierului: $1', 'undelete-error-long' => 'S-au găsit erori la ștergerea fișierului: $1', 'undelete-show-file-confirm' => 'Sunteți sigur că doriți să vizualizați o versiune ștearsă a fișierului „<nowiki>$1</nowiki>” din $2, ora $3?', 'undelete-show-file-submit' => 'Da', # Namespace form on various pages 'namespace' => 'Spațiu de nume:', 'invert' => 'Inversează selecția', 'tooltip-invert' => 'Bifați această căsuță pentru a ascunde modificările efectuate asupra paginilor din spațiul de nume selectat (și din spațiile de nume asociate, dacă s-a bifat și această opțiune)', 'namespace_association' => 'Spații de nume asociate', 'tooltip-namespace_association' => 'Bifați această căsuță pentru a include și spațiul de nume destinat discuțiilor care este asociat cu spațiul de nume deja selectat', 'blanknamespace' => 'Articole', # Contributions 'contributions' => 'Contribuții {{GENDER:$1|utilizator}}', 'contributions-title' => 'Contribuțiile utilizatorului $1', 'mycontris' => 'Contribuții', 'contribsub2' => 'Pentru {{GENDER:$3|$1}} ($2)', 'nocontribs' => 'Nu a fost găsită nici o modificare care să satisfacă acest criteriu.', 'uctop' => '(actuală)', 'month' => 'Din luna (și dinainte):', 'year' => 'Până în anul:', 'sp-contributions-newbies' => 'Arată doar contribuțiile conturilor noi', 'sp-contributions-newbies-sub' => 'Pentru începători', 'sp-contributions-newbies-title' => 'Contribuțiile utilizatorului pentru conturile noi', 'sp-contributions-blocklog' => 'jurnal blocări', 'sp-contributions-deleted' => 'contribuțiile șterse ale utilizatorului', 'sp-contributions-uploads' => 'încărcări', 'sp-contributions-logs' => 'jurnale', 'sp-contributions-talk' => 'discuție', 'sp-contributions-userrights' => 'administrarea permisiunilor de utilizator', 'sp-contributions-blocked-notice' => 'Acest utilizator este momentan blocat. Ultima blocare este indicată mai jos pentru informare:', 'sp-contributions-blocked-notice-anon' => 'Această adresă IP este blocată acum. Iată aici ultima înregistrare relevantă din jurnalul blocărilor:', 'sp-contributions-search' => 'Căutare contribuții', 'sp-contributions-username' => 'Adresă IP sau nume de utilizator:', 'sp-contributions-toponly' => 'Afișează numai versiunile recente', 'sp-contributions-submit' => 'Căutare', # What links here 'whatlinkshere' => 'Ce trimite aici', 'whatlinkshere-title' => 'Pagini care conțin legături spre „$1”', 'whatlinkshere-page' => 'Pagină:', 'linkshere' => "Următoarele pagini conțin legături către '''[[:$1]]''':", 'nolinkshere' => "Nici o pagină nu trimite la '''[[:$1]]'''.", 'nolinkshere-ns' => "Nici o pagină din spațiul de nume ales nu trimite la '''[[:$1]]'''.", 'isredirect' => 'pagină de redirecționare', 'istemplate' => 'prin includerea formatului', 'isimage' => 'legătură către fișier', 'whatlinkshere-prev' => '{{PLURAL:$1|anterioara|anterioarele $1}}', 'whatlinkshere-next' => '{{PLURAL:$1|următoarea|urmatoarele $1}}', 'whatlinkshere-links' => '← legături', 'whatlinkshere-hideredirs' => '$1 redirecționările', 'whatlinkshere-hidetrans' => '$1 transcluderile', 'whatlinkshere-hidelinks' => '$1 legăturile', 'whatlinkshere-hideimages' => '$1 legăturile către fișier', 'whatlinkshere-filters' => 'Filtre', # Block/unblock 'autoblockid' => 'Autoblocare #$1', 'block' => 'Blocare utilizator', 'unblock' => 'Deblocare utilizator', 'blockip' => 'Blocare utilizator', 'blockip-legend' => 'Blocare utilizator/adresă IP', 'blockiptext' => "Pentru a bloca un utilizator completați rubricile de mai jos.<br /> '''Respectați [[{{MediaWiki:Policy-url}}|politica de blocare]].'''<br /> Precizați motivul blocării; de exemplu indicați paginile vandalizate de acest utilizator.", 'ipadressorusername' => 'Adresă IP sau nume de utilizator', 'ipbexpiry' => 'Expiră', 'ipbreason' => 'Motiv:', 'ipbreason-dropdown' => '*Motivele cele mai frecvente ** Introducere de informații false ** Ștergere conținut fără explicații ** Introducere de legături externe de publicitate (spam) ** Creare pagini fără sens ** Tentative de intimidare ** Abuz utilizare conturi multiple ** Nume de utilizator inacceptabil', 'ipb-hardblock' => 'Se interzice utilizatorilor autentificați să contribuie folosind această adresă IP', 'ipbcreateaccount' => 'Nu permite crearea de conturi', 'ipbemailban' => 'Nu permite utilizatorului să trimită e-mail', 'ipbenableautoblock' => 'Blochează automat ultima adresă IP folosită de acest utilizator și toate adresele de la care încearcă să editeze în viitor', 'ipbsubmit' => 'Blochează acest utilizator', 'ipbother' => 'Alt termen:', 'ipboptions' => '2 ore:2 hours,1 zi:1 day,3 zile:3 days,1 săptămână:1 week,2 săptămâni:2 weeks,1 lună:1 month,3 luni:3 months,6 luni:6 months,1 an:1 year,infinit:infinite', 'ipbhidename' => 'Ascunde numele de utilizator la editare și afișare', 'ipbwatchuser' => 'Urmărește pagina sa de utilizator și de discuții', 'ipb-disableusertalk' => 'Se interzice acestui utilizator modificarea propriei pagini de discuții în timpul blocării', 'ipb-change-block' => 'Reblochează utilizatorul cu acești parametri', 'ipb-confirm' => 'Confirmare blocare', 'badipaddress' => 'Adresa IP este invalidă.', 'blockipsuccesssub' => 'Utilizatorul a fost blocat', 'blockipsuccesstext' => '[[Special:Contributions/$1|$1]] a fost blocat{{GENDER:$1||ă|}}.<br /> Vedeți [[Special:BlockList|lista blocărilor]] pentru a revizui adresele blocate.', 'ipb-blockingself' => 'Sunteți pe cale să vă autoblocați! Sunteți sigur că doriți să continuați?', 'ipb-confirmhideuser' => 'Sunteți pe cale să blocați un utilizator cu funcția „ascunde utilizator” activată. Acest lucru va înlătura numele său de utilizator din toate listele și jurnalele. Sunteți sigur că vreți să continuați?', 'ipb-confirmaction' => 'Dacă sunteți într-adevăr sigur(ă) că doriți să acționați, bifați câmpul „{{int:ipb-confirm}}” din partea de jos.', 'ipb-edit-dropdown' => 'Modifică motivele blocării', 'ipb-unblock-addr' => 'Deblochează utilizatorul $1', 'ipb-unblock' => 'Deblocați un nume de utilizator sau o adresă IP', 'ipb-blocklist' => 'Vezi blocările existente', 'ipb-blocklist-contribs' => 'Contribuțiile utilizatorului $1', 'unblockip' => 'Deblochează adresă IP', 'unblockiptext' => 'Folosiți formularul de mai jos pentru a restaura permisiunea de scriere pentru adrese IP sau nume de utilizator blocate anterior.', 'ipusubmit' => 'Elimină blocarea', 'unblocked' => '[[User:$1|$1]] a fost deblocat', 'unblocked-range' => '$1 a fost deblocat', 'unblocked-id' => 'Blocarea $1 a fost eliminată', 'blocklist' => 'Utilizatori blocați', 'ipblocklist' => 'Utilizatori blocați', 'ipblocklist-legend' => 'Găsire utilizator blocat', 'blocklist-userblocks' => 'Ascunde conturile blocate', 'blocklist-tempblocks' => 'Ascunde blocările temporare', 'blocklist-addressblocks' => 'Ascunde adresele IP blocate', 'blocklist-rangeblocks' => 'Ascunde blocările de gamă', 'blocklist-timestamp' => 'Data și ora', 'blocklist-target' => 'Utilizator/adresă IP', 'blocklist-expiry' => 'Expiră la', 'blocklist-by' => 'Administratorul care a efectuat blocarea', 'blocklist-params' => 'Parametrii blocării', 'blocklist-reason' => 'Motiv', 'ipblocklist-submit' => 'Caută', 'ipblocklist-localblock' => 'Blocare locală', 'ipblocklist-otherblocks' => '{{PLURAL:$1|Altă blocare|Alte $1 blocări}}', 'infiniteblock' => 'termen nelimitat', 'expiringblock' => 'expiră în $1 la $2', 'anononlyblock' => 'doar anonimi', 'noautoblockblock' => 'autoblocare dezactivată', 'createaccountblock' => 'crearea de conturi blocată', 'emailblock' => 'e-mail blocat', 'blocklist-nousertalk' => 'nu poate modifica propria pagină de discuție', 'ipblocklist-empty' => 'Lista blocărilor este goală.', 'ipblocklist-no-results' => 'Nu există blocare pentru adresa IP sau numele de utilizator.', 'blocklink' => 'blochează', 'unblocklink' => 'deblochează', 'change-blocklink' => 'modifică blocarea', 'contribslink' => 'contribuții', 'emaillink' => 'trimite e-mail', 'autoblocker' => 'Autoblocat fiindcă folosiți aceeași adresă IP ca și „[[User:$1|$1]]”. Motivul blocării utilizatorului $1 este: „$2”', 'blocklogpage' => 'Jurnal blocări', 'blocklog-showlog' => 'Acest utilizator a fost blocat în trecut. Jurnalul blocărilor este indicat mai jos:', 'blocklog-showsuppresslog' => 'Acest utilizator a fost blocat și suprimat în trecut. Jurnalul suprimărilor este indicat mai jos:', 'blocklogentry' => 'a blocat utilizatorul „[[$1]]” pe o perioadă de $2 $3', 'reblock-logentry' => 'a fost schimbată blocarea pentru [[$1]] cu data expirării la $2 $3', 'blocklogtext' => 'Acest jurnal cuprinde acțiunile de blocare și deblocare. Adresele IP blocate automat nu sunt afișate. Vizitați [[Special:BlockList|lista blocărilor]] pentru o listă explicită a adreselor blocate în acest moment.', 'unblocklogentry' => 'a deblocat utilizatorul $1', 'block-log-flags-anononly' => 'doar utilizatorii anonimi', 'block-log-flags-nocreate' => 'crearea de conturi dezactivată', 'block-log-flags-noautoblock' => 'autoblocarea dezactivată', 'block-log-flags-noemail' => 'e-mail blocat', 'block-log-flags-nousertalk' => 'nu poate edita propria pagină de discuție', 'block-log-flags-angry-autoblock' => 'autoblocarea avansată activată', 'block-log-flags-hiddenname' => 'nume de utilizator ascuns', 'range_block_disabled' => 'Abilitatea dezvoltatorilor de a bloca serii de adrese este dezactivată.', 'ipb_expiry_invalid' => 'Dată de expirare invalidă.', 'ipb_expiry_temp' => 'Blocarea numelor de utilizator ascunse trebuie să fie permanentă.', 'ipb_hide_invalid' => 'Imposibil de suprimat acest cont; acesta are mai mult de {{PLURAL:$1|o modificare|$1 modificări|$1 de modificări}}.', 'ipb_already_blocked' => '„$1” este deja blocat', 'ipb-needreblock' => '$1 este deja blocat. Doriți să modificați parametrii?', 'ipb-otherblocks-header' => '{{PLURAL:$1|Altă blocare|Alte blocări}}', 'unblock-hideuser' => 'Nu puteți debloca acest utilizator, întrucât numele său de utilizator a fost ascuns.', 'ipb_cant_unblock' => 'Eroare: nu găsesc identificatorul $1. Probabil a fost deja deblocat.', 'ipb_blocked_as_range' => 'Eroare: Adresa IP $1 nu este blocată direct deci nu poate fi deblocată. Face parte din area de blocare $2, care nu poate fi deblocată.', 'ip_range_invalid' => 'Serie IP invalidă.', 'ip_range_toolarge' => 'Blocările mai mari de /$1 nu sunt permise.', 'proxyblocker' => 'Blocaj de proxy', 'proxyblockreason' => 'Adresa dumneavoastră IP a fost blocată pentru că este un proxy deschis. Vă rugăm să vă contactați furnizorul de servicii Internet sau tehnicienii IT și să-i informați asupra acestei probleme serioase de securitate.', 'sorbsreason' => 'Adresa dumneavoastră IP este listată ca un proxy deschis în DNSBL.', 'sorbs_create_account_reason' => 'Adresa dumneavoastră IP este listată ca un proxy deschis în lista neagră DNS. Nu vă puteți crea un cont', 'xffblockreason' => 'O adresă IP prezentă în antetul X-Forwarded-For — fie a dumneavoastră, fie a serverului proxy pe care îl folosiți — a fost blocată. Motivul original al blocării a fost: $1', 'cant-see-hidden-user' => 'Utilizatorul pe care încercați să îl blocați este deja blocat și ascuns. Atata timp cât nu aveți drept de hideuser, nu puteți vedea sau modifica blocarea acestuia.', 'ipbblocked' => 'Nu puteți bloca sau debloca alți utilizatori în timp ce sunteți dumneavoastră înșivă blocat.', 'ipbnounblockself' => 'Nu aveți permisiunea de a vă debloca singur', # Developer tools 'lockdb' => 'Blochează baza de date', 'unlockdb' => 'Deblochează baza de date', 'lockdbtext' => 'Blocarea bazei de date va împiedica pe toți utilizatorii să modifice pagini, să-și schimbe preferințele, să-și modifice listele de pagini urmărite și orice alte operațiuni care ar necesita schimări în baza de date. Te rugăm să confirmi că intenționezi acest lucru și faptul că vei debloca baza de date atunci când vei încheia operațiunile de întreținere.', 'unlockdbtext' => 'Deblocarea bazei de date va permite tuturor utilizatorilor să editeze pagini, să-și schimbe preferințele, să-și editeze listele de pagini urmărite și orice alte operațiuni care ar necesita schimări în baza de date. Te rugăm să-ți confirmi intenția de a face acest lucru.', 'lockconfirm' => 'Da, chiar vreau să blochez baza de date.', 'unlockconfirm' => 'Da, chiar vreau să deblochez baza de date.', 'lockbtn' => 'Blochează baza de date', 'unlockbtn' => 'Deblochează baza de date', 'locknoconfirm' => 'Nu ați bifat căsuța de confirmare.', 'lockdbsuccesssub' => 'Baza de date a fost blocată', 'unlockdbsuccesssub' => 'Baza de date a fost deblocată', 'lockdbsuccesstext' => 'Baza de date a fost blocată.<br /> Nu uitați să o [[Special:UnlockDB|deblocați]] la terminarea operațiilor administrative.', 'unlockdbsuccesstext' => 'Baza de date a fost deblocată.', 'lockfilenotwritable' => 'Fișierul bazei de date închise nu poate fi scris. Pentru a închide sau deschide baza de date, acesta trebuie să poată fi scris de serverul web.', 'databasenotlocked' => 'Baza de date nu este blocată.', 'lockedbyandtime' => '(de $1, pe $2, la $3 )', # Move page 'move-page' => 'Redenumire $1', 'move-page-legend' => 'Redenumire pagină', 'movepagetext' => "Puteți folosi formularul de mai jos pentru a redenumi o pagină, mutându-i tot istoricul sub noul nume. Pagina veche va deveni o pagină de redirecționare către pagina nouă. Legăturile către pagina veche nu vor fi redirecționate către cea nouă; nu uitați să verificați dacă nu există redirecționări [[Special:DoubleRedirects|duble]] sau [[Special:BrokenRedirects|invalide]]. Vă rugăm să rețineți că sunteți responsabil(ă) pentru a face legăturile vechi să rămână valide. Rețineți că pagina '''nu va fi redenumită''' dacă există deja o pagină cu noul titlu, în afara cazului în care cea din urmă este deja o redirecționare; în plus, aceasta nu trebuie să aibă un istoric de modificări. Cu alte cuvinte, veți putea redenumi înapoi o pagină pe care ați redenumit-o greșit, dar nu veți putea suprascrie o pagină validă existentă prin redenumirea alteia. '''ATENȚIE!''' Aceasta poate fi o schimbare drastică și neașteptată pentru o pagină populară; vă rugăm să vă asigurați că înțelegeți toate consecințele înainte de a continua.", 'movepagetext-noredirectfixer' => "Completând formularul de mai jos veți redenumi o pagină, mutând tot istoricul la noul nume. Vechiul titlu va deveni o pagină de redirecționare către noul titlu. Fiți sigur că ați verificat lista redirecționărilor [[Special:DoubleRedirects|duble]] sau [[Special:BrokenRedirects|nefuncționale]]. Vă rugăm să rețineți că aveți responsabilitatea de a verifica dacă nu cumva destinația inițială a vechilor legături s-a modificat. Nu uitați că pagina '''nu va fi redenumită''' dacă o pagină cu noul titlul există deja, cu excepția cazurilor în care aceasta este complet goală și nu are istoric de modificări sau este o pagină de redirecționare. Acest lucru înseamnă că veți putea redenumi la titlul inițial o pagină greșit redenumită, dar nu veți putea suprascrie o pagină existentă. '''Atenție!''' Această acțiune poate determina o schimbare dramatică, neașteptată pentru o pagină cu trafic crescut; asigurați-vă că înțelegeți toate consecințele înainte de a continua.", 'movepagetalktext' => "Pagina de discuții asociată, dacă există, va fi redenumită automat odată cu aceasta în '''afara următoarelor cazuri''': * există deja o pagină de discuții cu conținut (care nu este goală) sub noul nume, sau * nu bifați căsuța de mai jos. În oricare din cazurile de mai sus va trebui să redenumiți sau să unificați manual paginile de discuții, dacă doriți acest lucru.", 'movearticle' => 'Pagina de redenumit:', 'moveuserpage-warning' => "'''Atenție''': sunteți pe cale să redenumiți o pagină de utilizator. Vă rugăm să rețineți că singura redenumită va fi pagina, nu și utilizatorul.", 'movenologintext' => 'Trebuie să fiți un utilizator înregistrat și [[Special:UserLogin|autentificat]] pentru a redenumi o pagină.', 'movenotallowed' => 'Nu aveți permisiunea de a redenumi pagini.', 'movenotallowedfile' => 'Nu aveți permisiunea de a redenumi fișiere.', 'cant-move-user-page' => 'Nu aveți permisiunea de a redenumi pagini de utilizator (cu excepția subpaginilor).', 'cant-move-to-user-page' => 'Nu aveți permisiunea de a redenumi o pagină într-o pagină de utilizator (cu excepția subpaginii utilizatorului).', 'newtitle' => 'Titlul nou', 'move-watch' => 'Urmărește această pagină', 'movepagebtn' => 'Redenumește pagina', 'pagemovedsub' => 'Pagina a fost redenumită', 'movepage-moved' => "'''Pagina „$1” a fost redenumită în „$2”'''", 'movepage-moved-redirect' => 'O redirecționare a fost creată.', 'movepage-moved-noredirect' => 'Crearea redirecționărilor a fost suprimată.', 'articleexists' => 'O pagină cu același nume există deja, sau numele pe care l-ați ales este invalid. Sunteți rugat să alegeți un alt nume.', 'cantmove-titleprotected' => 'Nu puteți redenumi o pagină cu acest nume, pentru că noul titlu a fost protejat la creare.', 'movetalk' => 'Redenumește pagina de discuții asociată', 'move-subpages' => 'Redenumește subpaginile (până la $1)', 'move-talk-subpages' => 'Redenumește subpaginile paginii de discuții (până la $1)', 'movepage-page-exists' => 'Pagina $1 există deja și nu poate fi rescrisă automat.', 'movepage-page-moved' => 'Pagina $1 a fost redenumită în $2.', 'movepage-page-unmoved' => 'Pagina $1 nu a putut fi redenumită în $2.', 'movepage-max-pages' => 'Maximul de $1 {{PLURAL:$1|pagină redenumită|pagini redenumite|de pagini redenumite}} a fost atins și nici o altă pagină nu va mai fi redenumită automat.', 'movelogpage' => 'Jurnal redenumiri', 'movelogpagetext' => 'Mai jos se află o listă cu paginile redenumite.', 'movesubpage' => '{{PLURAL:$1|Subpagină|Subpagini}}', 'movesubpagetext' => 'Această pagină are $1 {{PLURAL:$1|subpagină afișată|subpagini afișate}} mai jos.', 'movenosubpage' => 'Această pagină nu are subpagini.', 'movereason' => 'Motiv:', 'revertmove' => 'revenire', 'delete_and_move' => 'Șterge și redenumește', 'delete_and_move_text' => '==Ștergere necesară== Pagina destinație „[[:$1]]” există deja. Doriți să o ștergeți pentru a face loc redenumirii?', 'delete_and_move_confirm' => 'Da, șterge pagina.', 'delete_and_move_reason' => 'Șters pentru a face loc redenumirii paginii „[[$1]]”', 'selfmove' => 'Titlul sursei și al destinației este aceleași; nu puteți redenumi o pagină peste ea însăși.', 'immobile-source-namespace' => 'Nu se pot redenumi paginile din spațiul de nume „$1”', 'immobile-target-namespace' => 'Nu se pot redenumi paginile în spațiul de nume „$1”', 'immobile-target-namespace-iw' => 'Legătura interwiki nu este o țintă validă pentru redenumire.', 'immobile-source-page' => 'Această pagină nu poate fi redenumită.', 'immobile-target-page' => 'Imposibil de redenumit pagina la acel titlu.', 'bad-target-model' => 'Destinația dorită folosește un alt model de conținut. Nu se poate converti $1 în $2.', 'imagenocrossnamespace' => 'Fișierul nu poate fi mutat la un spațiu de nume care nu este destinat fișierelor', 'nonfile-cannot-move-to-file' => 'Entitatea (care nu este un fișier) nu poate fi mutată în spațiul de nume destinat fișierelor', 'imagetypemismatch' => 'Extensia nouă a fișierului nu se potrivește cu tipul acestuia', 'imageinvalidfilename' => 'Numele fișierului destinație este invalid', 'fix-double-redirects' => 'Actualizează toate redirecționările care trimit la titlul original', 'move-leave-redirect' => 'Lasă în urmă o redirecționare', 'protectedpagemovewarning' => "'''Atenție:''' această pagină a fost protejată astfel încât poate fi redenumită doar de către administratori. Ultima intrare în jurnal este afișată mai jos pentru referință:", 'semiprotectedpagemovewarning' => "'''Observație: această pagină a fost protejată, putând fi redenumiră doar de către utilizatorii înregistrați.''' Ultima intrare în jurnal este afișată mai jos pentru referință:", 'move-over-sharedrepo' => '== Fișierul există == [[:$1]] există deja într-un depozit partajat. Redenumirea fișierului la acest titlu va suprascrie fișierul partajat și îl va face inaccesibil.', 'file-exists-sharedrepo' => 'Numele ales al fișierului este deja în utilizare într-un depozit împărțit. Alegeți un alt nume.', # Export 'export' => 'Exportare pagini', 'exporttext' => 'Puteți exporta textul și istoricul unei pagini anume sau ale unui grup de pagini în XML. Acesta poate fi apoi importate în alt wiki care rulează software MediaWiki prin [[Special:Import|pagina de importare]]. Pentru a exporta, introduceți titlurile în căsuța de mai jos, unul pe linie, și alegeți dacă doriți să exportați doar această versiune sau și cele mai vechi, cu istoricul lor, sau versiunea curentă cu informații despre ultima modificare. În al doilea caz puteți folosi o legătură, de exemplu [[{{#Special:Export}}/{{MediaWiki:Mainpage}}]] pentru pagina „[[{{MediaWiki:Mainpage}}]]”.', 'exportall' => 'Exportă toate paginile', 'exportcuronly' => 'Include numai versiunea curentă, nu și toată istoria', 'exportnohistory' => "---- '''Notă:''' exportarea versiunii complete a paginilor prin acest formular a fost scoasă din uz din motive de performanță.", 'exportlistauthors' => 'Include o listă completă a contribuitorilor pentru fiecare pagină', 'export-submit' => 'Exportă', 'export-addcattext' => 'Adaugă pagini din categoria:', 'export-addcat' => 'Adaugă', 'export-addnstext' => 'Adaugă pagini din spațiul de nume:', 'export-addns' => 'Adaugă', 'export-download' => 'Salvează ca fișier', 'export-templates' => 'Include formate', 'export-pagelinks' => 'Includere pagini legate de la o adâncime de:', # Namespace 8 related 'allmessages' => 'Toate mesajele', 'allmessagesname' => 'Nume', 'allmessagesdefault' => 'Textul standard', 'allmessagescurrent' => 'Textul curent', 'allmessagestext' => 'Aceasta este lista completă a mesajelor disponibile în domeniul MediaWiki. Vă rugăm să vizitați [https://www.mediawiki.org/wiki/Localisation MediaWiki Localisation] și [//translatewiki.net translatewiki.net] dacă vreți să contribuiți la localizarea programului MediaWiki generic.', 'allmessagesnotsupportedDB' => "'''{{ns:special}}:Allmessages''' nu poate fi folosit deoarece '''\$wgUseDatabaseMessages''' este închisă.", 'allmessages-filter-legend' => 'Filtru', 'allmessages-filter' => 'Filtru după statutul de modificare:', 'allmessages-filter-unmodified' => 'Nemodificat', 'allmessages-filter-all' => 'Toți', 'allmessages-filter-modified' => 'Modificat', 'allmessages-prefix' => 'Filtru după prefix:', 'allmessages-language' => 'Limbă:', 'allmessages-filter-submit' => 'Du-te', # Thumbnails 'thumbnail-more' => 'Extindere', 'filemissing' => 'Fișier lipsă', 'thumbnail_error' => 'Eroare la generarea previzualizării: $1', 'thumbnail_error_remote' => 'Mesaj de eroare de la $1: $2', 'djvu_page_error' => 'Numărul paginii DjVu eronat', 'djvu_no_xml' => 'Imposibil de obținut XML-ul pentru fișierul DjVu', 'thumbnail-temp-create' => 'Imposibil de creat miniatura temporară', 'thumbnail-dest-create' => 'Imposibil de salvat miniatura la destinație', 'thumbnail_invalid_params' => 'Parametrii invalizi ai imaginii miniatură', 'thumbnail_dest_directory' => 'Nu poate fi creat directorul destinație', 'thumbnail_image-type' => 'Acest tip de imagine nu este suportat', 'thumbnail_gd-library' => 'Configurație incompletă a bibliotecii GD: lipsește funcția $1', 'thumbnail_image-missing' => 'Fișierul următor nu poate fi găsit: $1', # Special:Import 'import' => 'Importare pagini', 'importinterwiki' => 'Import transwiki', 'import-interwiki-text' => 'Selectează un wiki și titlul paginii care trebuie importate. Datele reviziilor și numele editorilor vor fi salvate. Toate acțiunile de import transwiki pot fi găsite la [[Special:Log/import|log import]]', 'import-interwiki-source' => 'Wiki/pagină sursă:', 'import-interwiki-history' => 'Copiază toate versiunile istoricului acestei pagini', 'import-interwiki-templates' => 'Includeți toate formatele', 'import-interwiki-submit' => 'Importă', 'import-interwiki-namespace' => 'Transferă către spațiul de nume:', 'import-interwiki-rootpage' => 'Pagina rădăcină de destinație (opțional):', 'import-upload-filename' => 'Nume fișier:', 'import-comment' => 'Comentariu:', 'importtext' => 'Vă rugăm să exportați fișierul din wikiul sursă folosind [[Special:Export|utilitarul de exportare]]. Salvați-l pe calculatorul dumneavoastră și încărcați-l aici.', 'importstart' => 'Se importă paginile...', 'import-revision-count' => '$1 {{PLURAL:$1|versiune|versiuni|de versiuni}}', 'importnopages' => 'Nu există pagini de importat.', 'imported-log-entries' => '{{PLURAL:$1|A fost importată $1 înregistrare de jurnal|Au fost importate $1 înregistrări de jurnal}}.', 'importfailed' => 'Import eșuat: $1', 'importunknownsource' => 'Tipul sursei de import este necunoscut', 'importcantopen' => 'Fișierul importat nu a putut fi deschis', 'importbadinterwiki' => 'Legătură interwiki greșită', 'importnotext' => 'Gol sau fără text', 'importsuccess' => 'Import reușit!', 'importhistoryconflict' => 'Există istorii contradictorii (se poate să fi importat această pagină înainte)', 'importnosources' => 'Nici o sursă de import transwiki a fost definită și încărcările directe ale istoricului sunt oprite.', 'importnofile' => 'Nici un fișier pentru import nu a fost încărcat.', 'importuploaderrorsize' => 'Încărcarea fișierului a eșuat. Fișierul are o mărime mai mare decât limita de încărcare permisă.', 'importuploaderrorpartial' => 'Încărcarea fișierului a eșuat. Fișierul a fost incărcat parțial.', 'importuploaderrortemp' => 'Încărcarea fișierului a eșuat. Un dosar temporar lipsește.', 'import-parse-failure' => 'Eroare la analiza importului XML', 'import-noarticle' => 'Nicio pagină de importat!', 'import-nonewrevisions' => 'Toate versiunile au fost importate anterior.', 'xml-error-string' => '$1 la linia $2, col $3 (octet $4): $5', 'import-upload' => 'Încărcare date XML', 'import-token-mismatch' => 'S-au pierdut datele sesiunii. Vă rugăm să încercați din nou.', 'import-invalid-interwiki' => 'Nu se poate importa din wiki-ul specificat.', 'import-error-edit' => 'Pagina „$1” nu este importată deoarece nu vă este permis s-o modificați.', 'import-error-create' => 'Pagina „$1” nu este importată deoarece nu vă este permis s-o creați.', 'import-error-interwiki' => 'Pagina „$1” nu poate fi importată deoarece numele acesteia este rezervat pentru legături externe (interwiki).', 'import-error-special' => 'Pagina „$1” nu poate fi importată deoarece aparține unui spațiu de nume special care nu admite pagini.', 'import-error-invalid' => 'Pagina „$1” nu poate fi importată deoarece numele acesteia este invalid.', 'import-error-unserialize' => 'Versiunea $2 a paginii „$1” nu poate fi deserializată. Versiunea a fost raportată ca utilizând modelul de conținut $3 serializat ca $4.', 'import-options-wrong' => '{{PLURAL:$2|Opțiune eronată|Opțiuni eronate}}: <nowiki>$1</nowiki>', 'import-rootpage-invalid' => 'Pagina rădăcină furnizată este un titlu nevalid.', 'import-rootpage-nosubpage' => 'Spațiul de nume „$1” al paginii rădăcină nu permite subpagini.', # Import log 'importlogpage' => 'Log import', 'importlogpagetext' => 'Imoprturi administrative de pagini de la alte wiki, cu istoricul editărilor.', 'import-logentry-upload' => 'a importat [[$1]] prin încărcare de fișier', 'import-logentry-upload-detail' => '$1 {{PLURAL:$1|versiune|versiuni|de versiuni}}', 'import-logentry-interwiki' => 'transwikificat $1', 'import-logentry-interwiki-detail' => '$1 {{PLURAL:$1|versiune|versiuni|de versiuni}} de la $2', # JavaScriptTest 'javascripttest' => 'Testare JavaScript', 'javascripttest-title' => 'Rulare teste pentru $1', 'javascripttest-pagetext-noframework' => 'Această pagină este rezervată rulării testelor JavaScript.', 'javascripttest-pagetext-unknownframework' => 'Cadru de testare „$1” necunoscut.', 'javascripttest-pagetext-frameworks' => 'Alegeți unul din următoarele cadre de testare: $1', 'javascripttest-pagetext-skins' => 'Alegeți un aspect pentru care să rulați teste:', 'javascripttest-qunit-intro' => 'A se vedea [$1 documentația de testare] pe mediawiki.org.', 'javascripttest-qunit-heading' => 'Suita de test MediaWiki JavaScript QUnit', # Tooltip help for the actions 'tooltip-pt-userpage' => 'Pagina dumneavoastră de utilizator', 'tooltip-pt-anonuserpage' => 'Pagina de utilizator pentru adresa IP curentă', 'tooltip-pt-mytalk' => 'Pagina dumneavoastră de discuții', 'tooltip-pt-anontalk' => 'Discuții despre editări pentru adresa IP curentă', 'tooltip-pt-preferences' => 'Preferințele dumneavoastră', 'tooltip-pt-watchlist' => 'Lista paginilor pe care le monitorizați', 'tooltip-pt-mycontris' => 'Listă de contribuții', 'tooltip-pt-login' => 'Sunteți încurajat să vă autentificați, deși acest lucru nu este obligatoriu.', 'tooltip-pt-anonlogin' => 'Sunteți încurajat să vă autentificați, deși acest lucru nu este obligatoriu.', 'tooltip-pt-logout' => 'Închideți sesiunea de lucru', 'tooltip-ca-talk' => 'Discuții despre această pagină', 'tooltip-ca-edit' => 'Puteți modifica această pagină. Înainte de a o salva vă rugăm s-o previzualizați.', 'tooltip-ca-addsection' => 'Adaugă o nouă secțiune.', 'tooltip-ca-viewsource' => 'Această pagină este protejată. Puteți vizualiza doar codul sursă', 'tooltip-ca-history' => 'Versiunile anterioare ale paginii și autorii lor.', 'tooltip-ca-protect' => 'Protejați această pagină.', 'tooltip-ca-unprotect' => 'Modificați nivelul de protejare al acestei pagini', 'tooltip-ca-delete' => 'Ștergeți această pagină.', 'tooltip-ca-undelete' => 'Restaurează modificările efectuate asupra acestui document înainte de a fi fost șters', 'tooltip-ca-move' => 'Redenumiți această pagină.', 'tooltip-ca-watch' => 'Adăugați la lista de pagini urmărite', 'tooltip-ca-unwatch' => 'Eliminați această pagină din lista dumneavoastră de monitorizare', 'tooltip-search' => 'Căutare în {{SITENAME}}', 'tooltip-search-go' => 'Deschide pagina cu acest nume, dacă există', 'tooltip-search-fulltext' => 'Caută în pagini pentru acest text', 'tooltip-p-logo' => 'Pagina principală', 'tooltip-n-mainpage' => 'Vedeți pagina principală', 'tooltip-n-mainpage-description' => 'Vizitați pagina principală', 'tooltip-n-portal' => 'Despre proiect, ce puteți face, unde găsiți soluții.', 'tooltip-n-currentevents' => 'Informații despre evenimentele curente', 'tooltip-n-recentchanges' => 'Lista ultimelor schimbări realizate în acest wiki.', 'tooltip-n-randompage' => 'Afișează o pagină aleatoare', 'tooltip-n-help' => 'Locul în care găsiți ajutor', 'tooltip-t-whatlinkshere' => 'Lista tuturor paginilor wiki care conduc spre această pagină', 'tooltip-t-recentchangeslinked' => 'Schimbări recente în legătură cu această pagină', 'tooltip-feed-rss' => 'Alimentează fluxul RSS pentru această pagină', 'tooltip-feed-atom' => 'Alimentează fluxul Atom pentru această pagină', 'tooltip-t-contributions' => 'Vezi lista de contribuții ale acestui utilizator', 'tooltip-t-emailuser' => 'Trimite un e-mail acestui utilizator', 'tooltip-t-upload' => 'Încărcare de fișiere', 'tooltip-t-specialpages' => 'Lista tuturor paginilor speciale', 'tooltip-t-print' => 'Versiunea de tipărit a acestei pagini', 'tooltip-t-permalink' => 'Legătura permanentă către această versiune a paginii', 'tooltip-ca-nstab-main' => 'Vedeți conținutul paginii', 'tooltip-ca-nstab-user' => 'Vezi pagina de utilizator', 'tooltip-ca-nstab-media' => 'Vezi pagina media', 'tooltip-ca-nstab-special' => 'Aceasta este o pagină specială, nu o puteți modifica direct.', 'tooltip-ca-nstab-project' => 'Vezi pagina proiectului', 'tooltip-ca-nstab-image' => 'Vezi pagina fişierului', 'tooltip-ca-nstab-mediawiki' => 'Vedeți mesajul de sistem', 'tooltip-ca-nstab-template' => 'Vezi formatul', 'tooltip-ca-nstab-help' => 'Vezi pagina de ajutor', 'tooltip-ca-nstab-category' => 'Vezi categoria', 'tooltip-minoredit' => 'Marchează această modificare ca fiind minoră', 'tooltip-save' => 'Salvați modificările dumneavoastră', 'tooltip-preview' => 'Vă rugăm să vă previzualizați modificările înainte de a le salva!', 'tooltip-diff' => 'Arată-mi modificările efectuate asupra textului', 'tooltip-compareselectedversions' => 'Vezi diferențele între cele două versiuni selectate de pe această pagină.', 'tooltip-watch' => 'Adaugă această pagină la lista mea de pagini urmărite', 'tooltip-watchlistedit-normal-submit' => 'Șterge titluri', 'tooltip-watchlistedit-raw-submit' => 'Actualizează lista paginilor urmărite', 'tooltip-recreate' => 'Recreează', 'tooltip-upload' => 'Pornește încărcarea', 'tooltip-rollback' => '„Revenire” anulează modificarea(ările) de pe această pagină a ultimului contribuitor printr-o singură apăsare', 'tooltip-undo' => '"Anulează" șterge această modificare și deschide formularul de modificare în modulul de previzualizare. Permite adăugarea unui motiv în descrierea modificărilor', 'tooltip-preferences-save' => 'Salvează preferințele', 'tooltip-summary' => 'Descrieți pe scurt modificarea', 'interlanguage-link-title' => '$1 – $2', # Stylesheets 'common.css' => '/** CSS plasate aici vor fi aplicate tuturor aparițiilor */', 'cologneblue.css' => '/* CSS plasate aici vor afecta utilizatorii stilului Cologne Blue */', 'monobook.css' => '/* modificați acest fișier pentru a adapta înfățișarea monobook-ului pentru tot situl*/', 'modern.css' => '/* CSS plasate aici vor afecta utilizatorii stilului Modern */', 'vector.css' => '/* CSS plasate aici vor afecta utilizatorii stilului Vector */', 'print.css' => '/* CSS plasate aici vor afecta modul în care paginile vor fi imprimate */', # Metadata 'notacceptable' => 'Serverul wiki nu poate oferi date într-un format pe care clientul tău să-l poată citi.', # Attribution 'anonymous' => '{{PLURAL:$1|Utilizator anonim|Utilizatori anonimi}} ai {{SITENAME}}', 'siteuser' => 'Utilizator {{SITENAME}} $1', 'anonuser' => 'utlizator anonim $1 al {{SITENAME}}', 'lastmodifiedatby' => 'Pagina a fost modificată în $1, la $2 de către $3.', 'othercontribs' => 'Bazat pe munca lui $1.', 'others' => 'alții', 'siteusers' => '{{PLURAL:$2|Utilizator|Utilizatori}} {{SITENAME}} $1', 'anonusers' => '{{PLURAL:$2|utilizator anonim|utilizatori anonimi}} $1 {{PLURAL:$2|al|ai}} {{SITENAME}}', 'creditspage' => 'Credențiale', 'nocredits' => 'Nu există credențiale disponibile pentru această pagină.', # Spam protection 'spamprotectiontitle' => 'Filtru de protecție spam', 'spamprotectiontext' => 'Pagina pe care doriți să o salvați a fost blocată de filtrul spam. Aceasta se datorează probabil unei legături spre un site extern. Ați putea verifica următoarea expresie regulată:', 'spamprotectionmatch' => 'Următorul text a fost oferit de filtrul de spam: $1', 'spambot_username' => 'Curățarea de spam a MediaWiki', 'spam_reverting' => 'Revenire la ultima versiune care nu conține legături către $1', 'spam_blanking' => 'Toate versiunile conținând legături către $1 au fost golite', 'spam_deleting' => 'Toate versiunile conținând legături către $1 au fost șterse', 'simpleantispam-label' => "Verificare antispam. '''NU''' completați!", # Info page 'pageinfo-title' => 'Informații pentru „$1”', 'pageinfo-not-current' => 'Ne cerem scuze, dar este imposibilă furnizarea acestor informații pentru versiunile mai vechi ale paginii.', 'pageinfo-header-basic' => 'Informații de bază', 'pageinfo-header-edits' => 'Istoric modificări', 'pageinfo-header-restrictions' => 'Protecție pagină', 'pageinfo-header-properties' => 'Proprietăți pagină', 'pageinfo-display-title' => 'Titlu afișat', 'pageinfo-default-sort' => 'Cheie de sortare implicită', 'pageinfo-length' => 'Lungimea paginii (în octeți)', 'pageinfo-article-id' => 'ID pagină', 'pageinfo-language' => 'Limba conținutului paginii', 'pageinfo-content-model' => 'Modelul conținutului paginii', 'pageinfo-robot-policy' => 'Indexare de către roboți', 'pageinfo-robot-index' => 'Permisă', 'pageinfo-robot-noindex' => 'Nepermisă', 'pageinfo-views' => 'Număr de vizualizări', 'pageinfo-watchers' => 'Număr de utilizatori care urmăresc pagina', 'pageinfo-few-watchers' => 'Mai puțin de {{PLURAL:$1|un urmăritor|$1 urmăritori|$1 de urmăritori}}', 'pageinfo-redirects-name' => 'Număr de redirecționări către această pagină', 'pageinfo-subpages-name' => 'Subpagini ale acestei pagini', 'pageinfo-subpages-value' => '$1 ($2 {{PLURAL:$2|redirecționare|redirecționări|de redirecționări}}; $3 {{PLURAL:$3|non-redirecționare|non-redirecționări|de non-redirecționări}})', 'pageinfo-firstuser' => 'Creatorul paginii', 'pageinfo-firsttime' => 'Data creării paginii', 'pageinfo-lastuser' => 'Cel mai recent editor', 'pageinfo-lasttime' => 'Data ultimei modificări', 'pageinfo-edits' => 'Număr total de modificări', 'pageinfo-authors' => 'Număr total de autori distincți', 'pageinfo-recent-edits' => 'Număr de modificări recente (în ultima perioadă de $1)', 'pageinfo-recent-authors' => 'Număr de autori distincți recenți', 'pageinfo-magic-words' => '{{PLURAL:$1|Cuvânt magic|Cuvinte magice}} ($1)', 'pageinfo-hidden-categories' => '{{PLURAL:$1|Categorie ascunsă|Categorii ascunse}} ($1)', 'pageinfo-templates' => '{{PLURAL:$1|Format inclus|Formate incluse}} ($1)', 'pageinfo-transclusions' => '{{PLURAL:$1|Pagină transclusă|Pagini transcluse}} din ($1)', 'pageinfo-toolboxlink' => 'Informații despre pagină', 'pageinfo-redirectsto' => 'Redirecționează către', 'pageinfo-redirectsto-info' => 'info', 'pageinfo-contentpage' => 'Numărată ca pagină cu conținut', 'pageinfo-contentpage-yes' => 'Da', 'pageinfo-protect-cascading' => 'Protecțiile provin în cascadă de aici', 'pageinfo-protect-cascading-yes' => 'Da', 'pageinfo-protect-cascading-from' => 'Protecțiile provin în cascadă de la', 'pageinfo-category-info' => 'Informații despre categorie', 'pageinfo-category-pages' => 'Număr de pagini', 'pageinfo-category-subcats' => 'Număr de subcategorii', 'pageinfo-category-files' => 'Număr de fișiere', # Skin names 'skinname-cologneblue' => 'Albastru de Cologne', 'skinname-monobook' => 'Monobook', 'skinname-modern' => 'Modern', 'skinname-vector' => 'Vector', # Patrolling 'markaspatrolleddiff' => 'Marchează pagina ca verificată', 'markaspatrolledtext' => 'Marchează această pagină ca verificată', 'markedaspatrolled' => 'Pagină nouă verificată', 'markedaspatrolledtext' => 'Versiunea selectată a paginii [[:$1]] a fost marcată ca verificată.', 'rcpatroldisabled' => 'Opțiunea de verificare a modificărilor recente este dezactivată', 'rcpatroldisabledtext' => 'Opțiunea de verificare a modificărilor recente este în prezent dezactivată.', 'markedaspatrollederror' => 'Nu se poate marca ca verificat', 'markedaspatrollederrortext' => 'Trebuie să specificați o versiune care să fie marcată ca verificată.', 'markedaspatrollederror-noautopatrol' => 'Nu puteți marca propriile modificări ca verificate.', 'markedaspatrollednotify' => 'Această modificare la $1 a fost marcată ca patrulată.', 'markedaspatrollederrornotify' => 'Marcarea ca patrulată a eșuat.', # Patrol log 'patrol-log-page' => 'Jurnal verificări', 'patrol-log-header' => 'Aceasta este o listă a tuturor versiunilor marcate ca verificate.', 'log-show-hide-patrol' => '$1 jurnalul versiunilor verificate', # Image deletion 'deletedrevision' => 'A fost ștearsă vechea versiune $1.', 'filedeleteerror-short' => 'Eroare la ștergerea fișierului: $1', 'filedeleteerror-long' => 'Au apărut erori când se încerca ștergerea fișierului: $1', 'filedelete-missing' => 'Fișierul „$1” nu poate fi șters, deoarece nu există.', 'filedelete-old-unregistered' => 'Revizia specificată a fișierului "$1" nu este în baza de date.', 'filedelete-current-unregistered' => 'Fișierul specificat „$1” nu este în baza de date.', 'filedelete-archive-read-only' => 'Directorul arhivei "$1" nu poate fi scris de serverul web.', # Browsing diffs 'previousdiff' => '← Diferența anterioară', 'nextdiff' => 'Diferența următoare →', # Media information 'mediawarning' => "'''Atenție''': Acest tip de fișier poate conține cod periculos. Executându-l, sistemul dvs. poate fi compromis.", 'imagemaxsize' => "Limita mărimii imaginilor:<br />''(pentru paginile de descriere)''", 'thumbsize' => 'Dimensiunea miniaturii:', 'widthheight' => '$1x$2', 'widthheightpage' => '$1 × $2, $3 {{PLURAL:$3|pagină|pagini|de pagini}}', 'file-info' => 'mărime fișier: $1, tip MIME: $2', 'file-info-size' => '$1 × $2 pixeli, mărime fișier: $3, tip MIME: $4', 'file-info-size-pages' => '$1 × $2 pixeli, mărime fișier: $3, tip MIME: $4, $5 {{PLURAL:$5|pagină|pagini}}', 'file-nohires' => 'Rezoluții mai mari nu sunt disponibile.', 'svg-long-desc' => 'Fișier SVG, cu dimensiunea nominală de $1 × $2 pixeli, mărime fișier: $3', 'svg-long-desc-animated' => 'Fișier SVG animat, cu dimensiunea nominală de $1 × $2 pixeli, mărime fișier: $3', 'svg-long-error' => 'Fișier SVG invalid: $1', 'show-big-image' => 'Fișier original', 'show-big-image-preview' => 'Mărimea acestei previzualizări: $1.', 'show-big-image-other' => '{{PLURAL:$2|Altă rezoluție|Alte rezoluții}}: $1.', 'show-big-image-size' => '$1 × $2 pixeli', 'file-info-gif-looped' => 'în buclă', 'file-info-gif-frames' => '$1 {{PLURAL:$1|imagine|imagini}}', 'file-info-png-looped' => 'în buclă', 'file-info-png-repeat' => 'redat {{PLURAL:$1|o dată|de $1 ori}}', 'file-info-png-frames' => '$1 {{PLURAL:$1|cadru|cadre}}', 'file-no-thumb-animation' => "'''Notă: Din cauza unor limitări de ordin tehnic, miniaturile acestui fișier nu vor fi animate.'''", 'file-no-thumb-animation-gif' => "'''Notă: Din cauza unor limitări de ordin tehnic, miniaturile fișierelor GIF de înaltă rezoluție, precum acesta, nu vor fi animate.'''", # Special:NewFiles 'newimages' => 'Galeria de imagini noi', 'imagelisttext' => "Mai jos se află lista a '''$1''' {{PLURAL:$1|fișier ordonat|fișiere ordonate|de fișiere ordonate}} $2.", 'newimages-summary' => 'Această pagină specială arată ultimele fișiere încărcate.', 'newimages-legend' => 'Filtru', 'newimages-label' => 'Numele fișierului (sau parte din el):', 'showhidebots' => '($1 roboți)', 'noimages' => 'Nimic de văzut.', 'ilsubmit' => 'Caută', 'bydate' => 'după dată', 'sp-newimages-showfrom' => 'Arată imaginile noi începând cu $1, ora $2', # Video information, used by Language::formatTimePeriod() to format lengths in the above messages 'seconds' => '{{PLURAL:$1|o secundă|$1 secunde|$1 de secunde}}', 'minutes' => '{{PLURAL:$1|un minut|$1 minute|$1 de minute}}', 'hours' => '{{PLURAL:$1|o oră|$1 ore|$1 de ore}}', 'days' => '{{PLURAL:$1|o zi|$1 zile|$1 de zile}}', 'weeks' => '{{PLURAL:$1|$1 săptămână|$1 săptămâni|$1 de săptămâni}}', 'months' => '{{PLURAL:$1|$1 lună|$1 luni|$1 de luni}}', 'years' => '{{PLURAL:$1|$1 an|$1 ani|$1 de ani}}', 'ago' => '$1 în urmă', 'just-now' => 'Chiar acum', # Human-readable timestamps 'hours-ago' => 'acum $1 {{PLURAL:$1|oră|ore|de ore}}', 'minutes-ago' => 'acum $1 {{PLURAL:$1|minut|minute|de minute}}', 'seconds-ago' => 'acum {{PLURAL:$1|o secundă|$1 secunde|$1 de secunde}}', 'monday-at' => 'Luni, la $1', 'tuesday-at' => 'Marți, la $1', 'wednesday-at' => 'Miercuri, la $1', 'thursday-at' => 'Joi,la $1', 'friday-at' => 'Vineri, la $1', 'saturday-at' => 'Sâmbătă, la $1', 'sunday-at' => 'Duminică, la $1', 'yesterday-at' => 'Ieri, la $1', # Bad image list 'bad_image_list' => 'Formatul este următorul: Numai elementele unei liste sunt luate în considerare. (Acestea sunt linii ce încep cu *) Prima legătură de pe linie trebuie să fie spre un fișier defectuos. Orice legături ce urmează pe aceeași linie sunt considerate excepții, adică pagini unde fișierul poate apărea inclus direct.', # Metadata 'metadata' => 'Informații', 'metadata-help' => 'Acest fișier conține informații suplimentare, introduse probabil de aparatul fotografic digital sau scanerul care l-a generat. Dacă fișierul a fost modificat între timp, este posibil ca unele detalii să nu mai fie valabile.', 'metadata-expand' => 'Afișează detalii suplimentare', 'metadata-collapse' => 'Ascunde detalii suplimentare', 'metadata-fields' => 'Câmpurile cu metadatele imaginii listate mai jos vor fi incluse în pagina de afișare a imaginii atunci când tabelul cu metadate este restrâns. Altele vor fi ascunse implicit. * make * model * datetimeoriginal * exposuretime * fnumber * isospeedratings * focallength * artist * copyright * imagedescription * gpslatitude * gpslongitude * gpsaltitude', # Exif tags 'exif-imagewidth' => 'Lățime', 'exif-imagelength' => 'Înălțime', 'exif-bitspersample' => 'Biți pe componentă', 'exif-compression' => 'Metodă de comprimare', 'exif-photometricinterpretation' => 'Compoziția pixelilor', 'exif-orientation' => 'Orientare', 'exif-samplesperpixel' => 'Numărul de componente', 'exif-planarconfiguration' => 'Aranjarea datelor', 'exif-ycbcrsubsampling' => 'Mostră din fracția Y/C', 'exif-ycbcrpositioning' => 'Poziționarea Y și C', 'exif-xresolution' => 'Rezoluție orizontală', 'exif-yresolution' => 'Rezoluție verticală', 'exif-stripoffsets' => 'Locația datelor imaginii', 'exif-rowsperstrip' => 'Numărul de linii per bandă', 'exif-stripbytecounts' => 'Biți corespunzători benzii comprimate', 'exif-jpeginterchangeformat' => 'Offset pentru JPEG SOI', 'exif-jpeginterchangeformatlength' => 'Biți de date JPEG', 'exif-whitepoint' => 'Cromaticitatea punctului alb', 'exif-primarychromaticities' => 'Coordonatele cromatice ale culorilor primare', 'exif-ycbcrcoefficients' => 'Tăria culorii coeficienților matricei de transformare', 'exif-referenceblackwhite' => 'Perechile de valori de referință albe și negre', 'exif-datetime' => 'Data și ora modificării fișierului', 'exif-imagedescription' => 'Titlul imaginii', 'exif-make' => 'Producătorul aparatului foto', 'exif-model' => 'Modelul aparatului foto', 'exif-software' => 'Software folosit', 'exif-artist' => 'Autor', 'exif-copyright' => 'Titularul drepturilor de autor', 'exif-exifversion' => 'Versiune exif', 'exif-flashpixversion' => 'Versiune susținută de Flashpix', 'exif-colorspace' => 'Spațiu de culoare', 'exif-componentsconfiguration' => 'Semnificația componentelor', 'exif-compressedbitsperpixel' => 'Mod de comprimare a imaginii', 'exif-pixelydimension' => 'Lățimea imaginii', 'exif-pixelxdimension' => 'Înălțimea imaginii', 'exif-usercomment' => 'Comentariile utilizatorilor', 'exif-relatedsoundfile' => 'Fișierul audio asemănător', 'exif-datetimeoriginal' => 'Data și ora producerii imaginii', 'exif-datetimedigitized' => 'Data și ora digitizării', 'exif-subsectime' => 'Data/Ora milisecunde', 'exif-subsectimeoriginal' => 'Data/Ora/Original milisecunde', 'exif-subsectimedigitized' => 'Milisecunde DateTimeDigitized', 'exif-exposuretime' => 'Timp de expunere', 'exif-exposuretime-format' => '$1 sec ($2)', 'exif-fnumber' => 'Diafragmă', 'exif-exposureprogram' => 'Program de expunere', 'exif-spectralsensitivity' => 'Sensibilitate spectrală', 'exif-isospeedratings' => 'Evaluarea vitezei ISO', 'exif-shutterspeedvalue' => 'Viteza obturatorului în APEX', 'exif-aperturevalue' => 'Diafragmă în APEX', 'exif-brightnessvalue' => 'Luminozitate în APEX', 'exif-exposurebiasvalue' => 'Compensarea expunerii', 'exif-maxaperturevalue' => 'Apertura maximă', 'exif-subjectdistance' => 'Distanța față de subiect', 'exif-meteringmode' => 'Forma de măsurare', 'exif-lightsource' => 'Sursă de lumină', 'exif-flash' => 'Bliț', 'exif-focallength' => 'Distanța focală a obiectivului', 'exif-subjectarea' => 'Suprafața subiectului', 'exif-flashenergy' => 'Energie bliț', 'exif-focalplanexresolution' => 'Rezoluția focală plană X', 'exif-focalplaneyresolution' => 'Rezoluția focală plană Y', 'exif-focalplaneresolutionunit' => 'Unitatea de măsură pentru rezoluția focală plană', 'exif-subjectlocation' => 'Locația subiectului', 'exif-exposureindex' => 'Indexul expunerii', 'exif-sensingmethod' => 'Metoda sensibilă', 'exif-filesource' => 'Fișier sursă', 'exif-scenetype' => 'Tipul scenei', 'exif-customrendered' => 'Prelucrarea imaginii', 'exif-exposuremode' => 'Mod de expunere', 'exif-whitebalance' => 'Balanța albă', 'exif-digitalzoomratio' => 'Raportul transfocării digitale', 'exif-focallengthin35mmfilm' => 'Distanță focală pentru film de 35 mm', 'exif-scenecapturetype' => 'Tipul de surprindere a scenei', 'exif-gaincontrol' => 'Controlul scenei', 'exif-contrast' => 'Contrast', 'exif-saturation' => 'Saturație', 'exif-sharpness' => 'Ascuțime', 'exif-devicesettingdescription' => 'Descrierea reglajelor aparatului', 'exif-subjectdistancerange' => 'Distanța față de subiect', 'exif-imageuniqueid' => 'Identificarea imaginii unice', 'exif-gpsversionid' => 'Versiunea de conversie GPS', 'exif-gpslatituderef' => 'Latitudine nordică sau sudică', 'exif-gpslatitude' => 'Latitudine', 'exif-gpslongituderef' => 'Longitudine estică sau vestică', 'exif-gpslongitude' => 'Longitudine', 'exif-gpsaltituderef' => 'Indicarea altitudinii', 'exif-gpsaltitude' => 'Altitudine', 'exif-gpstimestamp' => 'ora GPS (ceasul atomic)', 'exif-gpssatellites' => 'Sateliți utilizați pentru măsurare', 'exif-gpsstatus' => 'Starea receptorului', 'exif-gpsmeasuremode' => 'Mod de măsurare', 'exif-gpsdop' => 'Precizie de măsurare', 'exif-gpsspeedref' => 'Unitatea de măsură pentru viteză', 'exif-gpsspeed' => 'Viteza receptorului GPS', 'exif-gpstrackref' => 'Referință pentru direcția de mișcare', 'exif-gpstrack' => 'Direcție de mișcare', 'exif-gpsimgdirectionref' => 'Referință pentru direcția imaginii', 'exif-gpsimgdirection' => 'Direcția imaginii', 'exif-gpsmapdatum' => 'Expertiza geodezică a datelor utilizate', 'exif-gpsdestlatituderef' => 'Referință pentru latitudinea destinației', 'exif-gpsdestlatitude' => 'Destinația latitudinală', 'exif-gpsdestlongituderef' => 'Referință pentru longitudinea destinației', 'exif-gpsdestlongitude' => 'Longitudinea destinației', 'exif-gpsdestbearingref' => 'Referință pentru raportarea destinației', 'exif-gpsdestbearing' => 'Raportarea destinației', 'exif-gpsdestdistanceref' => 'Referință pentru distanța până la destinație', 'exif-gpsdestdistance' => 'Distanța până la destinație', 'exif-gpsprocessingmethod' => 'Numele metodei de procesare GPS', 'exif-gpsareainformation' => 'Numele domeniului GPS', 'exif-gpsdatestamp' => 'Data GPS', 'exif-gpsdifferential' => 'Corecția diferențială GPS', 'exif-jpegfilecomment' => 'Comentarii la fișierul JPEG', 'exif-keywords' => 'Cuvinte cheie', 'exif-worldregioncreated' => 'Regiunea lumii în care a fost făcută fotografia', 'exif-countrycreated' => 'Țara în care a fost făcută fotografia', 'exif-countrycodecreated' => 'Codul țării în care a fost făcută fotografia', 'exif-provinceorstatecreated' => 'Provincia sau statul în care a fost făcută fotografia', 'exif-citycreated' => 'Orașul în care a fost făcută fotografia', 'exif-sublocationcreated' => 'Partea orașului în care a fost făcută fotografia', 'exif-worldregiondest' => 'Regiunea lumii ilustrată', 'exif-countrydest' => 'Țara ilustrată', 'exif-countrycodedest' => 'Codul țării ilustrate', 'exif-provinceorstatedest' => 'Provincia sau statul ilustrat', 'exif-citydest' => 'Orașul ilustrat', 'exif-sublocationdest' => 'Partea orașului ilustrată', 'exif-objectname' => 'Titlu scurt', 'exif-specialinstructions' => 'Instrucțiuni speciale', 'exif-headline' => 'Titlu detaliat', 'exif-credit' => 'Credit/Furnizor', 'exif-source' => 'Sursă', 'exif-editstatus' => 'Statutul editorial al imaginii', 'exif-urgency' => 'Urgență', 'exif-fixtureidentifier' => 'Articol', 'exif-locationdest' => 'Locația ilustrată', 'exif-locationdestcode' => 'Codul locației ilustrate', 'exif-objectcycle' => 'Momentul zilei pentru care acest element media este destinat', 'exif-contact' => 'Informații de contact', 'exif-writer' => 'Autor', 'exif-languagecode' => 'Limbă', 'exif-iimversion' => 'Versiune IIM', 'exif-iimcategory' => 'Categorie', 'exif-iimsupplementalcategory' => 'Categorii suplimentare', 'exif-datetimeexpires' => 'Nu utilizați după data de', 'exif-datetimereleased' => 'Lansat pe', 'exif-originaltransmissionref' => 'Codul locului transmisiei originale', 'exif-identifier' => 'Identificator', 'exif-lens' => 'Obiectiv utilizat', 'exif-serialnumber' => 'Numărul de serie al aparatului fotografic', 'exif-cameraownername' => 'Proprietarul aparatului fotografic', 'exif-label' => 'Etichetă', 'exif-datetimemetadata' => 'Data ultimei modificări a metadatelor', 'exif-nickname' => 'Titlul neoficial al imaginii', 'exif-rating' => 'Evaluare (până la 5)', 'exif-rightscertificate' => 'Certificat de gestionare a drepturilor', 'exif-copyrighted' => 'Statutul drepturilor de autor', 'exif-copyrightowner' => 'Titularul drepturilor de autor', 'exif-usageterms' => 'Termeni de utilizare', 'exif-webstatement' => 'Declarația on-line privind drepturilor de autor', 'exif-originaldocumentid' => 'ID-ul unic al documentului original', 'exif-licenseurl' => 'Adresa URL pentru licența drepturilor de autor', 'exif-morepermissionsurl' => 'Informații alternative despre licențiere', 'exif-attributionurl' => 'Când reutilizați această operă, vă rugăm să adăugați o legătură către', 'exif-preferredattributionname' => 'Când reutilizați această operă, vă rugăm ca acest nume să fie creditat', 'exif-pngfilecomment' => 'Comentarii la fișierul PNG', 'exif-disclaimer' => 'Termeni', 'exif-contentwarning' => 'Avertisment asupra conținutului', 'exif-giffilecomment' => 'Comentarii la fișierul GIF', 'exif-intellectualgenre' => 'Tipul elementului', 'exif-subjectnewscode' => 'Codul subiectului', 'exif-scenecode' => 'Codul IPTC al scenei', 'exif-event' => 'Evenimentul înfățișat', 'exif-organisationinimage' => 'Organizația înfățișată', 'exif-personinimage' => 'Persoana înfățișată', 'exif-originalimageheight' => 'Înălțimea imaginii înainte de trunchiere', 'exif-originalimagewidth' => 'Lățimea imaginii înainte de trunchiere', # Exif attributes 'exif-compression-1' => 'Necomprimată', 'exif-compression-2' => 'CCITT Grupa 3 Lungimea codificării Huffman modificată de dimensiune 1', 'exif-compression-3' => 'CCITT Grupa 3 codificare fax', 'exif-compression-4' => 'CCITT Grupa 4 codificare fax', 'exif-compression-6' => 'JPEG (vechi)', 'exif-copyrighted-true' => 'Sub incidența drepturilor de autor', 'exif-copyrighted-false' => 'Statutul drepturilor de autor nu este definit', 'exif-unknowndate' => 'Dată necunoscută', 'exif-orientation-1' => 'Normală', 'exif-orientation-2' => 'Oglindită orizontal', 'exif-orientation-3' => 'Rotită cu 180°', 'exif-orientation-4' => 'Oglindită vertical', 'exif-orientation-5' => 'Rotită 90° în sens opus acelor de ceasornic și oglindită vertical', 'exif-orientation-6' => 'Rotită 90° în sens opus acelor de ceasornic', 'exif-orientation-7' => 'Rotită 90° în sensul acelor de ceasornic și oglindită vertical', 'exif-orientation-8' => 'Rotită 90° în sensul acelor de ceasornic', 'exif-planarconfiguration-1' => 'format compact', 'exif-planarconfiguration-2' => 'format plat', 'exif-colorspace-65535' => 'Necalibrată', 'exif-componentsconfiguration-0' => 'neprecizat', 'exif-exposureprogram-0' => 'Neprecizat', 'exif-exposureprogram-1' => 'Manual', 'exif-exposureprogram-2' => 'Program normal', 'exif-exposureprogram-3' => 'Prioritate diafragmă', 'exif-exposureprogram-4' => 'Prioritate timp', 'exif-exposureprogram-5' => 'Program creativ (prioritate dată profunzimii)', 'exif-exposureprogram-6' => 'Program acțiune (prioritate dată timpului de expunere scurt)', 'exif-exposureprogram-7' => 'Mod portret (focalizare pe subiect și fundal neclar)', 'exif-exposureprogram-8' => 'Mod peisaj (focalizare pe fundal)', 'exif-subjectdistance-value' => '$1 metri', 'exif-meteringmode-0' => 'Necunoscut', 'exif-meteringmode-1' => 'Medie', 'exif-meteringmode-2' => 'Media ponderată la centru', 'exif-meteringmode-3' => 'Punct', 'exif-meteringmode-4' => 'MultiPunct', 'exif-meteringmode-5' => 'Model', 'exif-meteringmode-6' => 'Parțial', 'exif-meteringmode-255' => 'Alta', 'exif-lightsource-0' => 'Necunoscută', 'exif-lightsource-1' => 'Lumină solară', 'exif-lightsource-2' => 'Fluorescent', 'exif-lightsource-3' => 'Tungsten (lumină incandescentă)', 'exif-lightsource-4' => 'Bliț', 'exif-lightsource-9' => 'Vreme frumoasă', 'exif-lightsource-10' => 'Cer noros', 'exif-lightsource-11' => 'Umbră', 'exif-lightsource-12' => 'Fluorescent luminos (D 5700 – 7100K)', 'exif-lightsource-13' => 'Fluorescent luminos alb (N 4600 – 5400K)', 'exif-lightsource-14' => 'Fluorescent alb rece (W 3900 – 4500K)', 'exif-lightsource-15' => 'Fluorescent alb (WW 3200 – 3700K)', 'exif-lightsource-17' => 'Lumină standard A', 'exif-lightsource-18' => 'Lumină standard B', 'exif-lightsource-19' => 'Lumină standard C', 'exif-lightsource-24' => 'Lumină artificială normată ISO în studio', 'exif-lightsource-255' => 'Altă sursă de lumină', # Flash modes 'exif-flash-fired-0' => 'Blițul nu a declanșat', 'exif-flash-fired-1' => 'Bliț declanșat', 'exif-flash-return-0' => 'niciun stroboscop nu întoarce funcție de detecție', 'exif-flash-return-2' => 'stroboscopul întoarce o lumină nedetectată', 'exif-flash-return-3' => 'stroboscopul întoarce o lumină detectată', 'exif-flash-mode-1' => 'declanșarea obligatorie a blițului', 'exif-flash-mode-2' => 'suprimarea obligatorie a blițului', 'exif-flash-mode-3' => 'modul automat', 'exif-flash-function-1' => 'Fără funcție pentru bliț', 'exif-flash-redeye-1' => 'mod de îndepărtare a ochilor roșii', 'exif-focalplaneresolutionunit-2' => 'țoli', 'exif-sensingmethod-1' => 'Nedefinit', 'exif-sensingmethod-2' => 'Senzorul suprafeței color one-chip', 'exif-sensingmethod-3' => 'Senzorul suprafeței color two-chip', 'exif-sensingmethod-4' => 'Senzorul suprafeței color three-chip', 'exif-sensingmethod-5' => 'Senzorul suprafeței color secvențiale', 'exif-sensingmethod-7' => 'Senzor triliniar', 'exif-sensingmethod-8' => 'Senzorul linear al culorii secvențiale', 'exif-filesource-3' => 'Aparat de fotografiat digital', 'exif-scenetype-1' => 'O imagine fotografiată direct', 'exif-customrendered-0' => 'Prelucrare normală', 'exif-customrendered-1' => 'Prelucrare nestandard', 'exif-exposuremode-0' => 'Expunere automată', 'exif-exposuremode-1' => 'Expunere manuală', 'exif-exposuremode-2' => 'Serie automată de expuneri', 'exif-whitebalance-0' => 'Balanță alb automată', 'exif-whitebalance-1' => 'Balanță alb manuală', 'exif-scenecapturetype-0' => 'Standard', 'exif-scenecapturetype-1' => 'Portret', 'exif-scenecapturetype-2' => 'Portret', 'exif-scenecapturetype-3' => 'Scenă nocturnă', 'exif-gaincontrol-0' => 'Niciuna', 'exif-gaincontrol-1' => 'Avantajul scăzut de sus', 'exif-gaincontrol-2' => 'Avantajul mărit de sus', 'exif-gaincontrol-3' => 'Avantajul scăzut de jos', 'exif-gaincontrol-4' => 'Avantajul mărit de jos', 'exif-contrast-0' => 'Normal', 'exif-contrast-1' => 'Redus', 'exif-contrast-2' => 'Mărit', 'exif-saturation-0' => 'Normal', 'exif-saturation-1' => 'Saturație redusă', 'exif-saturation-2' => 'Saturație ridicată', 'exif-sharpness-0' => 'Normal', 'exif-sharpness-1' => 'Ușor', 'exif-sharpness-2' => 'Tare', 'exif-subjectdistancerange-0' => 'Necunoscut', 'exif-subjectdistancerange-1' => 'Macro', 'exif-subjectdistancerange-2' => 'Apropiat', 'exif-subjectdistancerange-3' => 'Îndepărtat', # Pseudotags used for GPSLatitudeRef and GPSDestLatitudeRef 'exif-gpslatitude-n' => 'latitudine nordică', 'exif-gpslatitude-s' => 'latitudine sudică', # Pseudotags used for GPSLongitudeRef and GPSDestLongitudeRef 'exif-gpslongitude-e' => 'longitudine estică', 'exif-gpslongitude-w' => 'longitudine vestică', # Pseudotags used for GPSAltitudeRef 'exif-gpsaltitude-above-sealevel' => '$1 {{PLURAL:$1|metru|metri}} deasupra nivelului mării', 'exif-gpsaltitude-below-sealevel' => '$1 {{PLURAL:$1|metru|metri}} sub nivelului mării', 'exif-gpsstatus-a' => 'Măsurare în curs', 'exif-gpsstatus-v' => 'Măsurarea interoperabilității', 'exif-gpsmeasuremode-2' => 'măsurătoare bidimensională', 'exif-gpsmeasuremode-3' => 'măsurătoare tridimensională', # Pseudotags used for GPSSpeedRef 'exif-gpsspeed-k' => 'Kilometri pe oră', 'exif-gpsspeed-m' => 'Mile pe oră', 'exif-gpsspeed-n' => 'Noduri', # Pseudotags used for GPSDestDistanceRef 'exif-gpsdestdistance-k' => 'Kilometri', 'exif-gpsdestdistance-m' => 'Mile', 'exif-gpsdestdistance-n' => 'Mile marine', 'exif-gpsdop-excellent' => 'Excelent ($1)', 'exif-gpsdop-good' => 'Bun ($1)', 'exif-gpsdop-moderate' => 'Moderat ($1)', 'exif-gpsdop-fair' => 'Acceptabil ($1)', 'exif-gpsdop-poor' => 'Slab ($1)', 'exif-objectcycle-a' => 'Doar dimineața', 'exif-objectcycle-p' => 'Doar seara', 'exif-objectcycle-b' => 'Și dimineața și seara', # Pseudotags used for GPSTrackRef, GPSImgDirectionRef and GPSDestBearingRef 'exif-gpsdirection-t' => 'Direcția reală', 'exif-gpsdirection-m' => 'Direcție magnetică', 'exif-ycbcrpositioning-1' => 'Centrat', 'exif-ycbcrpositioning-2' => 'Co-amplasat', 'exif-dc-contributor' => 'Contribuitori', 'exif-dc-coverage' => 'Întinderea spațială sau temporală a elementului media', 'exif-dc-date' => 'Data (datele)', 'exif-dc-publisher' => 'Editor', 'exif-dc-relation' => 'Conținut multimedia asociat', 'exif-dc-rights' => 'Permisiuni', 'exif-dc-source' => 'Conținutul multimedia sursă', 'exif-dc-type' => 'Tipul conținutului media', 'exif-rating-rejected' => 'Respins', 'exif-isospeedratings-overflow' => 'Mai mare de 65535', 'exif-iimcategory-ace' => 'Artă, cultură și divertisment', 'exif-iimcategory-clj' => 'Criminalitate și lege', 'exif-iimcategory-dis' => 'Dezastre și accidente', 'exif-iimcategory-fin' => 'Economie și afaceri', 'exif-iimcategory-edu' => 'Educație', 'exif-iimcategory-evn' => 'Mediu înconjurător', 'exif-iimcategory-hth' => 'Sănătate', 'exif-iimcategory-hum' => 'Interes uman', 'exif-iimcategory-lab' => 'Muncă', 'exif-iimcategory-lif' => 'Stil de viață și timp liber', 'exif-iimcategory-pol' => 'Politică', 'exif-iimcategory-rel' => 'Religie și credință', 'exif-iimcategory-sci' => 'Știință și tehnologie', 'exif-iimcategory-soi' => 'Aspecte sociale', 'exif-iimcategory-spo' => 'Sport', 'exif-iimcategory-war' => 'Războaie, conflicte și tulburări', 'exif-iimcategory-wea' => 'Vreme', 'exif-urgency-normal' => 'Normal ($1)', 'exif-urgency-low' => 'Scăzut ($1)', 'exif-urgency-high' => 'Ridicat ($1)', 'exif-urgency-other' => 'Prioritate definită de utilizator ($1)', # 'all' in various places, this might be different for inflected languages 'watchlistall2' => 'toate', 'namespacesall' => 'toate', 'monthsall' => 'toate', # Email address confirmation 'confirmemail' => 'Confirmare adresă e-mail', 'confirmemail_noemail' => 'Nu aveți o adresă de e-mail validă setată la [[Special:Preferences|preferințe]].', 'confirmemail_text' => '{{SITENAME}} solicită validarea adresei de e-mail înaintea utilizării funcțiilor specifice poștei electronice. Apăsați butonul de mai jos pentru ca un e-mail de confirmare să fie trimis către adresa dumneavoastră. Acesta va include o legătură conținând un cod; încărcați legătura în navigator pentru a valida adresa de e-mail.', 'confirmemail_pending' => 'Un cod de confirmare a fost trimis deja la adresa de e-mail indicată; dacă ați creat recent contul, ar fi bine să așteptați câteva minute e-mailul de confirmare înainte de a cere un nou cod.', 'confirmemail_send' => 'Trimite un cod de confirmare', 'confirmemail_sent' => 'E-mailul de confirmare a fost trimis.', 'confirmemail_oncreate' => 'Un cod de confirmare a fost trimis la adresa dumnevoastră de e-mail. Acest cod nu este necesar pentru autentificare, dar trebuie transmis înainte de activarea oricăror funcții din wiki specifice e-mailului.', 'confirmemail_sendfailed' => 'Nu am putut trimite e-mailul de confirmare. Verificați adresa după caractere invalide. Serverul de mail a returnat: $1', 'confirmemail_invalid' => 'Cod de confirmare invalid. Acest cod poate fi expirat.', 'confirmemail_needlogin' => 'Trebuie să vă $1 pentru a vă confirma adresa de e-mail.', 'confirmemail_success' => 'Adresa de e-mail a fost confirmată. Acum vă puteți [[Special:UserLogin|autentifica]] și bucura de wiki.', 'confirmemail_loggedin' => 'Adresa de e-mail a fost confirmată.', 'confirmemail_subject' => 'Confirmarea adresei de e-mail la {{SITENAME}}', 'confirmemail_body' => 'Cineva, probabil dumneavoastră de la adresa IP $1, și-a înregistrat la {{SITENAME}} contul „$2” cu această adresă de e-mail. Pentru a confirma că acest cont vă aparține într-adevăr și pentru a vă activa funcțiile de e-mail de la {{SITENAME}}, accesați pagina: $3 Dacă însă NU este contul dumneavoastră, accesați pagina: $5 Acest cod de confirmare va expira la $4.', 'confirmemail_body_changed' => 'Cineva, probabil dumneavoastră de la adresa IP $1, a schimbat adresa de e-mail asociată contului „$2” de la {{SITENAME}} cu adresa la care ați primit acest mesaj. Pentru a confirma că acest cont vă aparține într-adevăr și pentru a vă activa funcțiile de e-mail de la {{SITENAME}}, accesați pagina: $3 Dacă însă NU este contul dumneavoastră, accesați pagina de mai jos pentru a anula modificarea: $5 Acest cod de confirmare va expira la $4.', 'confirmemail_body_set' => 'Cineva, probabil dumneavoastră de la adresa IP $1, a asociat prezenta adresă de e-mail contului „$2” de la la {{SITENAME}}. Pentru a confirma că acest cont vă aparține într-adevăr și pentru a vă activa funcțiile de e-mail de la {{SITENAME}}, accesați pagina: $3 Dacă însă NU este contul dumneavoastră, accesați pagina de mai jos pentru a anula confirmarea adresei de e-mail: $5 Acest cod de confirmare va expira la $4.', 'confirmemail_invalidated' => 'Confirmarea adresei de e-mail a fost anulată', 'invalidateemail' => 'Anulează confirmarea adresei de e-mail', # Scary transclusion 'scarytranscludedisabled' => '[Transcluderea interwiki este dezactivată]', 'scarytranscludefailed' => '[Șiretlicul formatului a dat greș pentru $1]', 'scarytranscludefailed-httpstatus' => '[Șiretlicul formatului a dat greș pentru $1: HTTP $2]', 'scarytranscludetoolong' => '[URL-ul este prea lung]', # Delete conflict 'deletedwhileediting' => "'''Atenție''': Această pagină a fost ștearsă după ce ați început s-o modificați!", 'confirmrecreate' => "Utilizatorul [[User:$1|$1]] ([[User talk:$1|discuție]]) a șters acest articol după ce ați început să contribuiți la el din motivul: : ''$2'' Vă rugăm să confirmați faptul că într-adevăr doriți să recreați acest articol.", 'confirmrecreate-noreason' => 'Utilizatorul [[User:$1|$1]] ([[User talk:$1|discuție]]) a șters această pagină după ce dumneavoastră ați început să o modificați. Vă rugăm să confirmați faptul că într-adevăr doriți să recreați această pagină.', 'recreate' => 'Recreează', # action=purge 'confirm_purge_button' => 'OK', 'confirm-purge-top' => 'Doriți să reîncărcați pagina?', 'confirm-purge-bottom' => 'Actualizaea unei pagini șterge cache-ul și forțează cea mai recentă variantă să apară.', # action=watch/unwatch 'confirm-watch-button' => 'OK', 'confirm-watch-top' => 'Adăugați această pagină la lista de pagini urmărite?', 'confirm-unwatch-button' => 'OK', 'confirm-unwatch-top' => 'Eliminați această pagină din lista de pagini urmărite?', # Separators for various lists, etc. 'quotation-marks' => '„$1”', # Multipage image navigation 'imgmultipageprev' => '← pagina anterioară', 'imgmultipagenext' => 'pagina următoare →', 'imgmultigo' => 'Du-te!', 'imgmultigoto' => 'Du-te la pagina $1', # Language selector for translatable SVGs 'img-lang-opt' => '$2 ($1)', 'img-lang-default' => '(limba implicită)', 'img-lang-info' => 'Randează această imagine în $1. $2', 'img-lang-go' => 'Du-te', # Table pager 'ascending_abbrev' => 'cresc', 'descending_abbrev' => 'desc', 'table_pager_next' => 'Pagina următoare', 'table_pager_prev' => 'Pagina anterioară', 'table_pager_first' => 'Prima pagină', 'table_pager_last' => 'Ultima pagină', 'table_pager_limit' => 'Arată $1 elemente pe pagină', 'table_pager_limit_label' => 'Elemente pe pagină:', 'table_pager_limit_submit' => 'Du-te', 'table_pager_empty' => 'Niciun rezultat', # Auto-summaries 'autosumm-blank' => 'Ștergerea conținutului paginii', 'autosumm-replace' => 'Pagină înlocuită cu „$1”', 'autoredircomment' => 'Redirecționat înspre [[$1]]', 'autosumm-new' => 'Pagină nouă: $1', # Live preview 'livepreview-loading' => 'Încărcare…', 'livepreview-ready' => 'Încărcare… Gata!', 'livepreview-failed' => 'Previzualizarea directă a eșuat! Încearcă previzualizarea normală.', 'livepreview-error' => 'Conectarea a eșuat: $1 „$2”. Încearcă previzualizarea normală.', # Friendlier slave lag warnings 'lag-warn-normal' => 'Modificările mai noi de $1 {{PLURAL:$1|secondă|seconde}} pot să nu apară în listă.', 'lag-warn-high' => 'Serverul bazei de date este suprasolicitat, astfel încît modificările făcute în ultimele $1 {{PLURAL:$1|secundă|secunde}} pot să nu apară în listă.', # Watchlist editor 'watchlistedit-numitems' => 'Lista ta de pagini urmărite conține {{PLURAL:$1|1 titlu|$1 titluri}}, excluzând paginile de discuții.', 'watchlistedit-noitems' => 'Lista de pagini urmărite este goală.', 'watchlistedit-normal-title' => 'Modificare listă pagini urmărite', 'watchlistedit-normal-legend' => 'Ștergere titluri din lista de urmărire', 'watchlistedit-normal-explain' => 'Lista de mai jos cuprinde paginile pe care le urmăriți. Pentru a elimina un titlu, bifați-l și apăsați „{{int:Watchlistedit-normal-submit}}”. Puteți modifica și direct [[Special:EditWatchlist/raw|lista brută]].', 'watchlistedit-normal-submit' => 'Șterge titluri', 'watchlistedit-normal-done' => '{{PLURAL:$1|1 titlu a fost șters|$1 titluri au fost șterse}} din lista de urmărire:', 'watchlistedit-raw-title' => 'Modificarea listă brută de pagini urmărite', 'watchlistedit-raw-legend' => 'Modificare listă brută de pagini urmărite', 'watchlistedit-raw-explain' => 'Lista de mai jos cuprinde paginile pe care le urmăriți. O puteți modifica adăugînd sau ștergînd titluri (cîte un titlu pe rînd). După ce terminați apăsați „{{int:Watchlistedit-raw-submit}}”. Puteți folosi în schimb [[Special:EditWatchlist|editorul standard]].', 'watchlistedit-raw-titles' => 'Titluri:', 'watchlistedit-raw-submit' => 'Actualizează lista paginilor urmărite', 'watchlistedit-raw-done' => 'Lista paginilor urmărite a fost actualizată.', 'watchlistedit-raw-added' => '{{PLURAL:$1|1 titlu a fost adăugat|$1 titluri au fost adăugate}}:', 'watchlistedit-raw-removed' => '{{PLURAL:$1|1 titlu a fost șters|$1 titluri au fost șterse}}:', # Watchlist editing tools 'watchlisttools-view' => 'Vizualizează schimbările relevante', 'watchlisttools-edit' => 'Vezi și modifică lista paginilor urmărite', 'watchlisttools-raw' => 'Modifică lista brută a paginilor urmărite', # Signatures 'signature' => '[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|discuție]])', # Core parser functions 'unknown_extension_tag' => 'Extensie etichetă necunoscută „$1”', 'duplicate-defaultsort' => "'''Atenție:''' Cheia de sortare implicită („$2”) o înlocuiește pe precedenta („$1”).", # Special:Version 'version' => 'Versiune', 'version-extensions' => 'Extensii instalate', 'version-specialpages' => 'Pagini speciale', 'version-parserhooks' => 'Hook-uri parser', 'version-variables' => 'Variabile', 'version-antispam' => 'Prevenirea spamului', 'version-skins' => 'Aspect', 'version-other' => 'Altele', 'version-mediahandlers' => 'Suport media', 'version-hooks' => 'Hook-uri', 'version-parser-extensiontags' => 'Taguri extensie parser', 'version-parser-function-hooks' => 'Hook-uri funcții parser', 'version-hook-name' => 'Nume hook', 'version-hook-subscribedby' => 'Subscris de', 'version-version' => '($1)', 'version-license' => 'Licență MediaWiki', 'version-ext-license' => 'Licență', 'version-ext-colheader-name' => 'Extensie', 'version-ext-colheader-version' => 'Versiune', 'version-ext-colheader-license' => 'Licență', 'version-ext-colheader-description' => 'Descriere', 'version-ext-colheader-credits' => 'Autori', 'version-license-title' => 'Licență pentru $1', 'version-license-not-found' => 'Nu s-au găsit informații detaliate despre licența acestei extensii.', 'version-credits-title' => 'Credite pentru $1', 'version-credits-not-found' => 'Nu s-au găsit informații detaliate despre creditele acestei extensii.', 'version-poweredby-credits' => "Acest wiki este motorizat de '''[https://www.mediawiki.org/ MediaWiki]''', drepturi de autor © 2001-$1 $2.", 'version-poweredby-others' => 'alții', 'version-poweredby-translators' => 'traducătorii de la translatewiki.net', 'version-credits-summary' => 'Am dori să amintim următoarele persoane pentru contribuțiile aduse proiectului [[Special:Version|MediaWiki]].', 'version-license-info' => 'MediaWiki este un software liber pe care îl puteți redistribui și/sau modifica sub termenii Licenței Publice Generale GNU publicată de Free Software Foundation – fie a doua versiune a acesteia, fie, la alegerea dumneavoastră, orice altă versiune ulterioară. MediaWiki este distribuit în speranța că va fi folositor, dar FĂRĂ VREO GARANȚIE, nici măcar cea implicită de COMERCIALIZARE sau de ADAPTARE PENTRU UN SCOP ANUME. Vedeți Licența Publică Generală GNU pentru mai multe detalii. În cazul în care nu ați primit [{{SERVER}}{{SCRIPTPATH}}/COPYING o copie a Licenței Publice Generale GNU] împreună cu acest program, scrieți la Free Software Foundation, Inc, 51, Strada Franklin, etajul cinci, Boston, MA 02110-1301, Statele Unite ale Americii sau [//www.gnu.org/licenses/old-licenses/gpl-2.0.html citiți-o online].', 'version-software' => 'Software instalat', 'version-software-product' => 'Produs', 'version-software-version' => 'Versiune', 'version-entrypoints' => 'URL-uri pentru puncte de intrare', 'version-entrypoints-header-entrypoint' => 'Punct de intrare', 'version-entrypoints-header-url' => 'URL', # Special:Redirect 'redirect' => 'Redirecționare după fișier, utilizator, ID-ul paginii sau al versiunii', 'redirect-legend' => 'Redirecționare către un fișier sau o pagină', 'redirect-summary' => 'Această pagină specială vă redirecționează către un fișier (dat fiind un nume de fișier), o pagină (dat fiind ID-ul unei versiuni sau ID-ul unei pagini) sau o pagină de utilizator (dat fiind un ID numeric al utilizatorului). Utilizare: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]] sau [[{{#Special:Redirect}}/user/101]].', 'redirect-submit' => 'Du-te', 'redirect-lookup' => 'Căutare:', 'redirect-value' => 'Valoare:', 'redirect-user' => 'ID utilizator', 'redirect-page' => 'ID pagină', 'redirect-revision' => 'Versiune de pagină', 'redirect-file' => 'Nume de fișier', 'redirect-not-exists' => 'Valoarea nu a fot găsită', # Special:FileDuplicateSearch 'fileduplicatesearch' => 'Căutare fișiere duplicate', 'fileduplicatesearch-summary' => 'Căutarea fișierelor duplicate bazată pe valorile hash.', 'fileduplicatesearch-legend' => 'Căutare duplicat', 'fileduplicatesearch-filename' => 'Nume fișier:', 'fileduplicatesearch-submit' => 'Caută', 'fileduplicatesearch-info' => '$1 × $2 pixeli<br />Mărime fișier: $3<br />Tip MIME: $4', 'fileduplicatesearch-result-1' => 'Fișierul „$1” nu are un duplicat identic.', 'fileduplicatesearch-result-n' => 'Fișierul „$1” are {{PLURAL:$2|1 duplicat identic|$2 duplicate identice}}.', 'fileduplicatesearch-noresults' => 'Nu s-a găsit niciun fișier cu numele „$1”.', # Special:SpecialPages 'specialpages' => 'Pagini speciale', 'specialpages-note-top' => 'Legendă', 'specialpages-note' => '* Pagini speciale normale. * <span class="mw-specialpagerestricted">Pagini speciale restricționate.</span>', 'specialpages-group-maintenance' => 'Întreținere', 'specialpages-group-other' => 'Alte pagini speciale', 'specialpages-group-login' => 'Autentificare / creare cont', 'specialpages-group-changes' => 'Schimbări recente și jurnale', 'specialpages-group-media' => 'Fișiere', 'specialpages-group-users' => 'Utilizatori și permisiuni', 'specialpages-group-highuse' => 'Pagini utilizate intens', 'specialpages-group-pages' => 'Liste de pagini', 'specialpages-group-pagetools' => 'Unelte pentru pagini', 'specialpages-group-wiki' => 'Date și instrumente', 'specialpages-group-redirects' => 'Pagini speciale de redirecționare', 'specialpages-group-spam' => 'Unelte spam', # Special:BlankPage 'blankpage' => 'Pagină goală', 'intentionallyblankpage' => 'Această pagină este goală în mod intenționat', # External image whitelist 'external_image_whitelist' => ' #Lasă această linie exact așa cum este <pre> #Pune fragmentele expresiei regulate (doar partea care merge între //) mai jos #Acestea vor fi potrivite cu URL-uri de exterior (hotlinked) #Acelea care se potrivesc vor fi afișate ca imagini, altfel va fi afișat doar un link la imagine #Liniile care încep cu # sunt tratate ca comentarii #Acesta este insensibil la majuscule sau minuscule #Pune toate fragmentele regex deasupra aceastei linii. Lasă această linie exact așa cum este</pre>', # Special:Tags 'tags' => 'Etichete valabile pentru marcarea modificărilor', 'tag-filter' => 'Filtru pentru [[Special:Tags|etichete]]:', 'tag-filter-submit' => 'Filtru', 'tag-list-wrapper' => '([[Special:Tags|{{PLURAL:$1|Etichetă|Etichete}}]]: $2)', 'tags-title' => 'Etichete', 'tags-intro' => 'Această pagină afișează etichetele, inclusiv semnificația lor, pe care software-ul le poate folosi la marcarea modificărilor.', 'tags-tag' => 'Numele etichetei', 'tags-display-header' => 'Apariția în listele cu schimbări', 'tags-description-header' => 'Descrierea completă a sensului', 'tags-active-header' => 'Activă?', 'tags-hitcount-header' => 'Modificări etichetate', 'tags-active-yes' => 'Da', 'tags-active-no' => 'Nu', 'tags-edit' => 'modificare', 'tags-hitcount' => '$1 {{PLURAL:$1|modificare|modificări}}', # Special:ComparePages 'comparepages' => 'Comparație între pagini', 'compare-page1' => 'Pagina 1', 'compare-page2' => 'Pagina 2', 'compare-rev1' => 'Versiunea 1', 'compare-rev2' => 'Versiunea 2', 'compare-submit' => 'Comparație', 'compare-invalid-title' => 'Titlul specificat nu este corect.', 'compare-title-not-exists' => 'Titlul specificat nu există.', 'compare-revision-not-exists' => 'Versiunea specificată nu există.', # Database error messages 'dberr-header' => 'Acest site are o problemă', 'dberr-problems' => 'Ne cerem scuze! Acest site întâmpină dificultăți tehnice.', 'dberr-again' => 'Așteptați câteva minute și încercați din nou.', 'dberr-info' => '(Nu se poate contacta serverul bazei de date: $1)', 'dberr-info-hidden' => '(Nu se poate contacta serverul bazei de date)', 'dberr-usegoogle' => 'Între timp puteți efectua căutarea folosind Google.', 'dberr-outofdate' => 'De reținut că indexarea conținutului nostru de către ei poate să nu fie actualizată.', 'dberr-cachederror' => 'Următoarea pagină este o copie în cache a paginii cerute, care s-ar putea să nu fie actualizată.', # HTML forms 'htmlform-invalid-input' => 'Există probleme la valorile introduse', 'htmlform-select-badoption' => 'Valoarea specificată nu este o opțiune validă.', 'htmlform-int-invalid' => 'Valoarea specificată nu este un întreg.', 'htmlform-float-invalid' => 'Valoarea specificată nu este un număr.', 'htmlform-int-toolow' => 'Valoarea specificată este sub maximul $1', 'htmlform-int-toohigh' => 'Valoarea specificată este peste maximul $1', 'htmlform-required' => 'Completare obligatorie', 'htmlform-submit' => 'Trimite', 'htmlform-reset' => 'Anulează modificările', 'htmlform-selectorother-other' => 'Altul', 'htmlform-no' => 'Nu', 'htmlform-yes' => 'Da', 'htmlform-chosen-placeholder' => 'Alegeți o opțiune', # SQLite database support 'sqlite-has-fts' => '$1 cu suport de căutare în tot textul', 'sqlite-no-fts' => '$1 fără suport de căutare în tot textul', # New logging system 'logentry-delete-delete' => '$1 {{GENDER:$2|a șters}} pagina $3', 'logentry-delete-restore' => '$1 {{GENDER:$2|a restaurat}} pagina $3', 'logentry-delete-event' => '$1 {{GENDER:$2|a schimbat}} vizibilitatea {{PLURAL:$5|unui eveniment din jurnal|a $5 evenimente din jurnal|a $5 de evenimente din jurnal}} pentru $3: $4', 'logentry-delete-revision' => '$1 {{GENDER:$2|a schimbat}} vizibilitatea {{PLURAL:$5|unei versiuni|a $5 versiuni|a $5 de versiuni}} pentru pagina $3: $4', 'logentry-delete-event-legacy' => '$1 {{GENDER:$2|a modificat}} vizibilitatea evenimentelor din jurnal pentru $3', 'logentry-delete-revision-legacy' => '$1 {{GENDER:$2|a modificat}} vizibilitatea unor versiuni ale paginii $3', 'logentry-suppress-delete' => '$1 {{GENDER:$2|a suprimat}} pagina $3', 'logentry-suppress-event' => '$1 {{GENDER:$2|a modificat}} în mod secret vizibilitatea {{PLURAL:$5|unui eveniment din jurnal|a $5 evenimente din jurnal|a $5 de evenimente din jurnal}} pentru $3: $4', 'logentry-suppress-revision' => '$1 {{GENDER:$2|a schimbat}} în mod secret vizibilitatea {{PLURAL:$5|unei versiuni|a $5 versiuni|a $5 de versiuni}} pentru pagina $3: $4', 'logentry-suppress-event-legacy' => '$1 {{GENDER:$2|a modificat}} în mod secret vizibilitatea evenimentelor din jurnal pentru $3', 'logentry-suppress-revision-legacy' => '$1 {{GENDER:$2|a modificat}} în mod secret vizibilitatea versiunilor pentru pagina $3', 'revdelete-content-hid' => 'conținut ascuns', 'revdelete-summary-hid' => 'descrierea modificării ascunsă', 'revdelete-uname-hid' => 'nume de utilizator ascuns', 'revdelete-content-unhid' => 'conținut afișat', 'revdelete-summary-unhid' => 'descrierea modificării, afișată', 'revdelete-uname-unhid' => 'numele de utilizator afișat', 'revdelete-restricted' => 'restricții aplicate administratorilor', 'revdelete-unrestricted' => 'restricții eliminate pentru administratori', 'logentry-move-move' => '$1 {{GENDER:$2|a redenumit}} pagina $3 în $4', 'logentry-move-move-noredirect' => '$1 {{GENDER:$2|a redenumit}} pagina $3 în $4 fără a lăsa o redirecționare în loc', 'logentry-move-move_redir' => '$1 {{GENDER:$2|a redenumit}} pagina $3 în $4 înlocuind redirecționarea', 'logentry-move-move_redir-noredirect' => '$1 {{GENDER:$2|a redenumit}} pagina $3 în $4 înlocuind redirecționarea și fără a lăsa o redirecționare în loc', 'logentry-patrol-patrol' => '$1 {{GENDER:$2|a marcat}} versiunea $4 a paginii $3 ca patrulată', 'logentry-patrol-patrol-auto' => '$1 {{GENDER:$2|a marcat}} automat versiunea $4 a paginii $3 ca patrulată', 'logentry-newusers-newusers' => 'Contul de utilizator $1 a fost {{GENDER:$2|creat}}', 'logentry-newusers-create' => 'Contul de utilizator $1 a fost {{GENDER:$2|creat}}', 'logentry-newusers-create2' => 'Contul de utilizator $3 a fost {{GENDER:$2|creat}} de către $1', 'logentry-newusers-byemail' => 'Contul de utilizator $3 a fost {{GENDER:$2|creat}} de către $1, iar parola a fost trimisă prin e-mail', 'logentry-newusers-autocreate' => 'Contul de utilizator $1 a fost {{GENDER:$2|creat}} în mod automat', 'logentry-rights-rights' => '$1 {{GENDER:$2|a schimbat}} apartenența la grup pentru $3 de la $4 la $5', 'logentry-rights-rights-legacy' => '$1 {{GENDER:$2|a schimbat}} apartenența la grup pentru $3', 'logentry-rights-autopromote' => '$1 {{GENDER:$2|a fost promovat|a fost promovată}} în mod automat de la $4 la $5', 'rightsnone' => '(niciunul)', # Feedback 'feedback-bugornote' => 'Dacă sunteți pregătit să descrieți o problemă tehnică în detaliu vă rugăm să [$1 raportați un bug]. În caz contrar, puteți utiliza formularul de mai jos. Comentariul dumneavoastră va fi adăugat pe pagina „[$3 $2]”, împreună cu numele de utilizator și numele navigatorului pe care îl folosiți.', 'feedback-subject' => 'Subiect:', 'feedback-message' => 'Mesaj:', 'feedback-cancel' => 'Revocare', 'feedback-submit' => 'Trimite părerea', 'feedback-adding' => 'Se adaugă părerea pe pagină...', 'feedback-error1' => 'Eroare: Rezultat necunoscut de la API', 'feedback-error2' => 'Eroare: editarea nu a reușit', 'feedback-error3' => 'Eroare: Niciun răspuns de la API', 'feedback-thanks' => 'Mulțumim! Comentariile dumneavoastră au fost publicate pe pagina „[ $2 $1 ]”.', 'feedback-close' => 'Gata', 'feedback-bugcheck' => 'Minunat! Trebuie doar să verificați dacă nu cumva problema a fost [$1 deja înregistrată].', 'feedback-bugnew' => 'Am verificat. O raportez drept o problemă nouă', # Search suggestions 'searchsuggest-search' => 'Căutare', 'searchsuggest-containing' => 'conținând...', # API errors 'api-error-badaccess-groups' => 'Nu aveți dreptul să încărcați fișiere pe acest wiki.', 'api-error-badtoken' => 'Eroare internă: jeton greșit.', 'api-error-copyuploaddisabled' => 'Încărcarea prin URL este dezactivată pe acest server.', 'api-error-duplicate' => 'Există {{PLURAL:$1|un [$2 alt fișier]|[$2 alte fișiere]}} deja încărcate cu același conținut.', 'api-error-duplicate-archive' => '{{PLURAL:$1|A existat [$2 un alt fișier]|Au existat [$2 alte fișiere]}} cu același conținut pe site, dar {{PLURAL:$1|a fost|au fost}} șterse.', 'api-error-duplicate-archive-popup-title' => '{{PLURAL:$1|Fișierul|Fișierele}} {{PLURAL:$1|duplicat|duplicate}} care {{PLURAL:$1|a|au}} fost deja {{PLURAL:$1|șters|șterse}}', 'api-error-duplicate-popup-title' => '{{PLURAL:$1|Fișier|Fișiere}} {{PLURAL:$1|duplicat|duplicate}}', 'api-error-empty-file' => 'Fișierul încărcat de dumneavoastră este gol.', 'api-error-emptypage' => 'Crearea paginilor noi, goale nu este permisă.', 'api-error-fetchfileerror' => 'Eroare internă: ceva nu a funcționat corect la prelucrarea fișierului.', 'api-error-fileexists-forbidden' => 'Un fișier cu numele „$1” există deja și nu poate fi suprascris.', 'api-error-fileexists-shared-forbidden' => 'Un fișier cu numele „$1” există deja în depozitul de fișiere partajate, și nu poate fi suprascris.', 'api-error-file-too-large' => 'Fișierul pe care l-ați trimis este prea mare.', 'api-error-filename-tooshort' => 'Numele fișierului este prea scurt.', 'api-error-filetype-banned' => 'Acest tip de fișiere este interzis.', 'api-error-filetype-banned-type' => '$1 {{PLURAL:$4|este un tip de fișier nepermis|sunt tipuri de fișier nepermise}}. {{PLURAL:$3|Tip de fișier permis este|Tipuri de fișier permise sunt}} $2.', 'api-error-filetype-missing' => 'Fișierului îi lipsește extensia.', 'api-error-hookaborted' => 'Modificarea pe care ați încercat să o faceți a fost oprită de sesizarea unei extensii.', 'api-error-http' => 'Eroare internă: nu s-a reușit conectarea la server.', 'api-error-illegal-filename' => 'Numele acordat fișierului nu este permis.', 'api-error-internal-error' => 'Eroare internă: ceva nu a funcționat în timpul procesării încărcării.', 'api-error-invalid-file-key' => 'Eroare internă: fișierul nu a fost găsit în depozitul temporar.', 'api-error-missingparam' => 'Eroare internă: lipsesc parametrii cererii.', 'api-error-missingresult' => 'Eroare internă: nu s-a putut determina dacă copierea a reușit.', 'api-error-mustbeloggedin' => 'Trebuie să fiți autentificat pentru a încărca fișiere.', 'api-error-mustbeposted' => 'Eroare internă: cererea necesită metoda HTTP POST.', 'api-error-noimageinfo' => 'Încărcarea a reușit, dar serverul nu a dat nicio informație despre fișier.', 'api-error-nomodule' => 'Eroare internă: niciun modul de încărcare setat.', 'api-error-ok-but-empty' => 'Eroare internă: niciun răspuns de la server.', 'api-error-overwrite' => 'Nu este permisă suprascrierea unui fișier existent.', 'api-error-stashfailed' => 'Eroare internă: serverul nu a putut stoca fișierul temporar.', 'api-error-publishfailed' => 'Eroare internă: serverul nu a putut publica fișierul temporar.', 'api-error-timeout' => 'Serverul nu a răspuns în timp util.', 'api-error-unclassified' => 'A apărut o eroare necunoscută.', 'api-error-unknown-code' => 'Eroare necunoscută: „$1”', 'api-error-unknown-error' => 'Eroare internă: ceva nu a funcționat atunci când ați încercat să încărcați fișierul.', 'api-error-unknown-warning' => 'Avertisment necunoscut: $1', 'api-error-unknownerror' => 'Eroare necunoscută: „$1”.', 'api-error-uploaddisabled' => 'Încărcarea este dezactivată pe acest wiki.', 'api-error-verification-error' => 'Acest fișier ar putea fi corupt sau poate avea extensia greșită.', # Durations 'duration-seconds' => '$1 {{PLURAL:$1|secundă|secunde|de secunde}}', 'duration-minutes' => '$1 {{PLURAL:$1|minut|minute|de minute}}', 'duration-hours' => '$1 {{PLURAL:$1|oră|ore|de ore}}', 'duration-days' => '$1 {{PLURAL:$1|zi|zile|de zile}}', 'duration-weeks' => '$1 {{PLURAL:$1|săptămână|săptămâni|de săptămâni}}', 'duration-years' => '$1 {{PLURAL:$1|an|ani|de ani}}', 'duration-decades' => '$1 {{PLURAL:$1|deceniu|decenii|de decenii}}', 'duration-centuries' => '$1 {{PLURAL:$1|secol|secole|de secole}}', 'duration-millennia' => '$1 {{PLURAL:$1|mileniu|milenii|de milenii}}', # Image rotation 'rotate-comment' => 'Imagine rotită în sensul acelor de ceasornic cu $1 {{PLURAL:$1|grad|grade|de grade}}', # Limit report 'limitreport-title' => 'Date de optimizare a analizorului:', 'limitreport-cputime' => 'Timp de utilizare CPU', 'limitreport-cputime-value' => '$1 {{PLURAL:$1|secundă|secunde|de secunde}}', 'limitreport-walltime' => 'Timp real de utilizare', 'limitreport-walltime-value' => '$1 {{PLURAL:$1|secundă|secunde|de secunde}}', 'limitreport-ppvisitednodes' => 'Număr de noduri de preprocesor vizitate', 'limitreport-ppgeneratednodes' => 'Număr de noduri de preprocesor generate', 'limitreport-postexpandincludesize' => 'Mărimea includerii post-expansiune', 'limitreport-postexpandincludesize-value' => '$1/$2 {{PLURAL:$2|octet|octeți|de octeți}}', 'limitreport-templateargumentsize' => 'Mărimea argumentului formatului', 'limitreport-templateargumentsize-value' => '$1/$2 {{PLURAL:$2|octet|octeți|de octeți}}', 'limitreport-expansiondepth' => 'Cea mai mare profunzime a expansiunii', 'limitreport-expensivefunctioncount' => 'Număr de funcții de analiză costisitoare', # Special:ExpandTemplates 'expandtemplates' => 'Expandare formate', 'expand_templates_intro' => "Această pagină specială servește la expandarea recursivă a tuturor formatelor dintr-un text. Ea acționează și asupra funcțiilor de analiză (''parser'') de tipul <nowiki>{{</nowiki>#if:...}}, a variabilelor precum <nowiki>{{</nowiki>CURRENTDAY}} și în general asupra oricăror coduri cuprinse între acolade duble.", 'expand_templates_title' => 'Titlul contextului (de exemplu pentru {{PAGENAME}}):', 'expand_templates_input' => 'Introduceți textul aici:', 'expand_templates_output' => 'Rezultat', 'expand_templates_xml_output' => 'Ieșire XML', 'expand_templates_html_output' => 'Ieșire HTML brut', 'expand_templates_ok' => 'OK', 'expand_templates_remove_comments' => 'Elimină comentariile', 'expand_templates_remove_nowiki' => 'Suprimă etichetele <nowiki> în rezultat', 'expand_templates_generate_xml' => 'Arată arborele de analiză XML', 'expand_templates_generate_rawhtml' => 'Arată HTML brut', 'expand_templates_preview' => 'Previzualizare', # Unknown messages 'uploadinvalidxml' => 'Nu s-a putut analiza conținutul XML din fișierul încărcat.', );
ankur24x7/mediawiki-core
languages/messages/MessagesRo.php
PHP
gpl-2.0
264,544
<?php namespace rocket_font; /** * ClassLoader Class * * 아래 폴더에 있는 php 파일을 검색해 자동으로 include * * features/core - 항상 로드할 파일들 * * features/admin - 관리자에서만 사용할 파일들 * * features/client - 프론트엔드(유저화면)에서만 사용할 파일들 */ class ClassLoader { public function load_plugin_classes() { $load_list = array(); $load_list = array_merge( $load_list, self::glob_php( PLUGIN_DIR . 'features/core' ) ); if ( is_admin() ) { $load_list = array_merge( $load_list, self::glob_php( PLUGIN_DIR . 'features/admin' ) ); } else { $load_list = array_merge( $load_list, self::glob_php( PLUGIN_DIR . 'features/client' ) ); } foreach ( $load_list as $file ) { include $file; } } /** * @static * @param string $absolute_path 절대경로를 포함한 검색할 폴더 * @return array 해당 폴더에 있는 모든 php 파일들 */ private static function glob_php( $absolute_path ) { $absolute_path = untrailingslashit( $absolute_path ); $files = array(); if ( !$dir = @opendir( $absolute_path ) ) { return $files; } while ( FALSE !== $file = readdir( $dir ) ) { if ( '.' == substr( $file, 0, 1 ) || '.php' != substr( $file, -4 ) ) { continue; } $file = "$absolute_path/$file"; if ( !is_file( $file ) ) { continue; } $files[ ] = $file; } closedir( $dir ); return $files; } }
wp-plugins/rocket-font
features/class-loader.php
PHP
gpl-2.0
1,465
<?php /*================================================= Disable Wordpress Autoformatting ==================================================*/ function convax_formatter($content) { $new_content = ''; //Matches the contents and the open and closing tags $pattern_full = '{(\[raw\].*?\[/raw\])}is'; //Matches just the contents $pattern_contents = '{\[raw\](.*?)\[/raw\]}is'; //Divide content into pieces $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); //Loop over pieces foreach ($pieces as $piece) { //Look for presence of the shortcode if (preg_match($pattern_contents, $piece, $matches)) { //Append to content (no formatting) $new_content .= $matches[1]; } else { //Format and append to content $new_content .= wptexturize(wpautop($piece)); } } return $new_content; } /*================================================= Setting up the default thumbnail sizes ================================================== */ remove_filter('the_content', 'wpautop'); remove_filter('the_content', 'wptexturize'); // Before displaying for viewing, apply this function add_filter('the_content', 'convax_formatter', 99); add_filter('widget_text', 'convax_formatter', 99); //Setting default thumbnail size add_image_size('large', 500, 500, true); add_image_size('medium', 200, 200, true); add_image_size('thumbnail', 84, 84, true); //Function to crop all thumbnails if(false === get_option("medium_crop")) { add_option("medium_crop", "1"); } else { update_option("medium_crop", "1"); } if(false === get_option("large_crop")) { add_option("large_crop", "1"); } else { update_option("large_crop", "1"); } if(false === get_option("thumbnail_crop")) { add_option("thumbnail_crop", "1"); } else { update_option("thumbnail_crop", "1"); } ?>
pruthu/Horizon-wp-theme
inc/fn-common.php
PHP
gpl-2.0
1,794
/** * FitVids 1.1 * * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ * Released under the WTFPL license - http://sam.zoy.org/wtfpl/ */ !function(t){"use strict" t.fn.fitVids=function(e){var i={customSelector:null,ignore:null} if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0],a=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}",d=document.createElement("div") d.innerHTML='<p>x</p><style id="fit-vids-style">'+a+"</style>",r.appendChild(d.childNodes[1])}return e&&t.extend(i,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"] i.customSelector&&e.push(i.customSelector) var r=".fitvidsignore" i.ignore&&(r=r+", "+i.ignore) var a=t(this).find(e.join(",")) a=a.not("object object"),a=a.not(r),a.each(function(){var e=t(this) if(!(e.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16)) var i="object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height(),a=isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10),d=i/a if(!e.attr("id")){var o="fitvid"+Math.floor(999999*Math.random()) e.attr("id",o)}e.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*d+"%"),e.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto)
sdsweb/note
assets/js/fitvids.js
JavaScript
gpl-2.0
2,034
# # The Python Imaging Library. # $Id$ # # TIFF file handling # # TIFF is a flexible, if somewhat aged, image file format originally # defined by Aldus. Although TIFF supports a wide variety of pixel # layouts and compression methods, the name doesn't really stand for # "thousands of incompatible file formats," it just feels that way. # # To read TIFF data from a stream, the stream must be seekable. For # progressive decoding, make sure to use TIFF files where the tag # directory is placed first in the file. # # History: # 1995-09-01 fl Created # 1996-05-04 fl Handle JPEGTABLES tag # 1996-05-18 fl Fixed COLORMAP support # 1997-01-05 fl Fixed PREDICTOR support # 1997-08-27 fl Added support for rational tags (from Perry Stoll) # 1998-01-10 fl Fixed seek/tell (from Jan Blom) # 1998-07-15 fl Use private names for internal variables # 1999-06-13 fl Rewritten for PIL 1.0 (1.0) # 2000-10-11 fl Additional fixes for Python 2.0 (1.1) # 2001-04-17 fl Fixed rewind support (seek to frame 0) (1.2) # 2001-05-12 fl Added write support for more tags (from Greg Couch) (1.3) # 2001-12-18 fl Added workaround for broken Matrox library # 2002-01-18 fl Don't mess up if photometric tag is missing (D. Alan Stewart) # 2003-05-19 fl Check FILLORDER tag # 2003-09-26 fl Added RGBa support # 2004-02-24 fl Added DPI support; fixed rational write support # 2005-02-07 fl Added workaround for broken Corel Draw 10 files # 2006-01-09 fl Added support for float/double tags (from Russell Nelson) # # Copyright (c) 1997-2006 by Secret Labs AB. All rights reserved. # Copyright (c) 1995-1997 by Fredrik Lundh # # See the README file for information on usage and redistribution. # __version__ = "1.3.5" import Image, ImageFile import array, string, sys import ImagePalette II = "II" # little-endian (intel-style) MM = "MM" # big-endian (motorola-style) try: if sys.byteorder == "little": native_prefix = II else: native_prefix = MM except AttributeError: if ord(array.array("i",[1]).tostring()[0]): native_prefix = II else: native_prefix = MM # # -------------------------------------------------------------------- # Read TIFF files def il16(c,o=0): return ord(c[o]) + (ord(c[o+1])<<8) def il32(c,o=0): return ord(c[o]) + (ord(c[o+1])<<8) + (ord(c[o+2])<<16) + (ord(c[o+3])<<24) def ol16(i): return chr(i&255) + chr(i>>8&255) def ol32(i): return chr(i&255) + chr(i>>8&255) + chr(i>>16&255) + chr(i>>24&255) def ib16(c,o=0): return ord(c[o+1]) + (ord(c[o])<<8) def ib32(c,o=0): return ord(c[o+3]) + (ord(c[o+2])<<8) + (ord(c[o+1])<<16) + (ord(c[o])<<24) def ob16(i): return chr(i>>8&255) + chr(i&255) def ob32(i): return chr(i>>24&255) + chr(i>>16&255) + chr(i>>8&255) + chr(i&255) # a few tag names, just to make the code below a bit more readable IMAGEWIDTH = 256 IMAGELENGTH = 257 BITSPERSAMPLE = 258 COMPRESSION = 259 PHOTOMETRIC_INTERPRETATION = 262 FILLORDER = 266 IMAGEDESCRIPTION = 270 STRIPOFFSETS = 273 SAMPLESPERPIXEL = 277 ROWSPERSTRIP = 278 STRIPBYTECOUNTS = 279 X_RESOLUTION = 282 Y_RESOLUTION = 283 PLANAR_CONFIGURATION = 284 RESOLUTION_UNIT = 296 SOFTWARE = 305 DATE_TIME = 306 ARTIST = 315 PREDICTOR = 317 COLORMAP = 320 TILEOFFSETS = 324 EXTRASAMPLES = 338 SAMPLEFORMAT = 339 JPEGTABLES = 347 COPYRIGHT = 33432 IPTC_NAA_CHUNK = 33723 # newsphoto properties PHOTOSHOP_CHUNK = 34377 # photoshop properties ICCPROFILE = 34675 EXIFIFD = 34665 XMP = 700 COMPRESSION_INFO = { # Compression => pil compression name 1: "raw", 2: "tiff_ccitt", 3: "group3", 4: "group4", 5: "tiff_lzw", 6: "tiff_jpeg", # obsolete 7: "jpeg", 32771: "tiff_raw_16", # 16-bit padding 32773: "packbits" } OPEN_INFO = { # (ByteOrder, PhotoInterpretation, SampleFormat, FillOrder, BitsPerSample, # ExtraSamples) => mode, rawmode (II, 0, 1, 1, (1,), ()): ("1", "1;I"), (II, 0, 1, 2, (1,), ()): ("1", "1;IR"), (II, 0, 1, 1, (8,), ()): ("L", "L;I"), (II, 0, 1, 2, (8,), ()): ("L", "L;IR"), (II, 1, 1, 1, (1,), ()): ("1", "1"), (II, 1, 1, 2, (1,), ()): ("1", "1;R"), (II, 1, 1, 1, (8,), ()): ("L", "L"), (II, 1, 1, 1, (8,8), (2,)): ("LA", "LA"), (II, 1, 1, 2, (8,), ()): ("L", "L;R"), (II, 1, 1, 1, (16,), ()): ("I;16", "I;16"), (II, 1, 2, 1, (16,), ()): ("I;16S", "I;16S"), (II, 1, 2, 1, (32,), ()): ("I", "I;32S"), (II, 1, 3, 1, (32,), ()): ("F", "F;32F"), (II, 2, 1, 1, (8,8,8), ()): ("RGB", "RGB"), (II, 2, 1, 2, (8,8,8), ()): ("RGB", "RGB;R"), (II, 2, 1, 1, (8,8,8,8), (0,)): ("RGBX", "RGBX"), (II, 2, 1, 1, (8,8,8,8), (1,)): ("RGBA", "RGBa"), (II, 2, 1, 1, (8,8,8,8), (2,)): ("RGBA", "RGBA"), (II, 2, 1, 1, (8,8,8,8), (999,)): ("RGBA", "RGBA"), # corel draw 10 (II, 3, 1, 1, (1,), ()): ("P", "P;1"), (II, 3, 1, 2, (1,), ()): ("P", "P;1R"), (II, 3, 1, 1, (2,), ()): ("P", "P;2"), (II, 3, 1, 2, (2,), ()): ("P", "P;2R"), (II, 3, 1, 1, (4,), ()): ("P", "P;4"), (II, 3, 1, 2, (4,), ()): ("P", "P;4R"), (II, 3, 1, 1, (8,), ()): ("P", "P"), (II, 3, 1, 1, (8,8), (2,)): ("PA", "PA"), (II, 3, 1, 2, (8,), ()): ("P", "P;R"), (II, 5, 1, 1, (8,8,8,8), ()): ("CMYK", "CMYK"), (II, 6, 1, 1, (8,8,8), ()): ("YCbCr", "YCbCr"), (II, 8, 1, 1, (8,8,8), ()): ("LAB", "LAB"), (MM, 0, 1, 1, (1,), ()): ("1", "1;I"), (MM, 0, 1, 2, (1,), ()): ("1", "1;IR"), (MM, 0, 1, 1, (8,), ()): ("L", "L;I"), (MM, 0, 1, 2, (8,), ()): ("L", "L;IR"), (MM, 1, 1, 1, (1,), ()): ("1", "1"), (MM, 1, 1, 2, (1,), ()): ("1", "1;R"), (MM, 1, 1, 1, (8,), ()): ("L", "L"), (MM, 1, 1, 1, (8,8), (2,)): ("LA", "LA"), (MM, 1, 1, 2, (8,), ()): ("L", "L;R"), (MM, 1, 1, 1, (16,), ()): ("I;16B", "I;16B"), (MM, 1, 2, 1, (16,), ()): ("I;16BS", "I;16BS"), (MM, 1, 2, 1, (32,), ()): ("I;32BS", "I;32BS"), (MM, 1, 3, 1, (32,), ()): ("F;32BF", "F;32BF"), (MM, 2, 1, 1, (8,8,8), ()): ("RGB", "RGB"), (MM, 2, 1, 2, (8,8,8), ()): ("RGB", "RGB;R"), (MM, 2, 1, 1, (8,8,8,8), (0,)): ("RGBX", "RGBX"), (MM, 2, 1, 1, (8,8,8,8), (1,)): ("RGBA", "RGBa"), (MM, 2, 1, 1, (8,8,8,8), (2,)): ("RGBA", "RGBA"), (MM, 2, 1, 1, (8,8,8,8), (999,)): ("RGBA", "RGBA"), # corel draw 10 (MM, 3, 1, 1, (1,), ()): ("P", "P;1"), (MM, 3, 1, 2, (1,), ()): ("P", "P;1R"), (MM, 3, 1, 1, (2,), ()): ("P", "P;2"), (MM, 3, 1, 2, (2,), ()): ("P", "P;2R"), (MM, 3, 1, 1, (4,), ()): ("P", "P;4"), (MM, 3, 1, 2, (4,), ()): ("P", "P;4R"), (MM, 3, 1, 1, (8,), ()): ("P", "P"), (MM, 3, 1, 1, (8,8), (2,)): ("PA", "PA"), (MM, 3, 1, 2, (8,), ()): ("P", "P;R"), (MM, 5, 1, 1, (8,8,8,8), ()): ("CMYK", "CMYK"), (MM, 6, 1, 1, (8,8,8), ()): ("YCbCr", "YCbCr"), (MM, 8, 1, 1, (8,8,8), ()): ("LAB", "LAB"), } PREFIXES = ["MM\000\052", "II\052\000", "II\xBC\000"] def _accept(prefix): return prefix[:4] in PREFIXES ## # Wrapper for TIFF IFDs. class ImageFileDirectory: # represents a TIFF tag directory. to speed things up, # we don't decode tags unless they're asked for. def __init__(self, prefix): self.prefix = prefix[:2] if self.prefix == MM: self.i16, self.i32 = ib16, ib32 self.o16, self.o32 = ob16, ob32 elif self.prefix == II: self.i16, self.i32 = il16, il32 self.o16, self.o32 = ol16, ol32 else: raise SyntaxError("not a TIFF IFD") self.reset() def reset(self): self.tags = {} self.tagdata = {} self.tagtype = {} # added 2008-06-05 by Florian Hoech self.next = None # dictionary API (sort of) def keys(self): return self.tagdata.keys() + self.tags.keys() def items(self): items = self.tags.items() for tag in self.tagdata.keys(): items.append((tag, self[tag])) return items def __len__(self): return len(self.tagdata) + len(self.tags) def __getitem__(self, tag): try: return self.tags[tag] except KeyError: type, data = self.tagdata[tag] # unpack on the fly size, handler = self.load_dispatch[type] self.tags[tag] = data = handler(self, data) del self.tagdata[tag] return data def get(self, tag, default=None): try: return self[tag] except KeyError: return default def getscalar(self, tag, default=None): try: value = self[tag] if len(value) != 1: if tag == SAMPLEFORMAT: # work around broken (?) matrox library # (from Ted Wright, via Bob Klimek) raise KeyError # use default raise ValueError, "not a scalar" return value[0] except KeyError: if default is None: raise return default def has_key(self, tag): return self.tags.has_key(tag) or self.tagdata.has_key(tag) def __setitem__(self, tag, value): if type(value) is not type(()): value = (value,) self.tags[tag] = value # load primitives load_dispatch = {} def load_byte(self, data): l = [] for i in range(len(data)): l.append(ord(data[i])) return tuple(l) load_dispatch[1] = (1, load_byte) def load_string(self, data): if data[-1:] == '\0': data = data[:-1] return data load_dispatch[2] = (1, load_string) def load_short(self, data): l = [] for i in range(0, len(data), 2): l.append(self.i16(data, i)) return tuple(l) load_dispatch[3] = (2, load_short) def load_long(self, data): l = [] for i in range(0, len(data), 4): l.append(self.i32(data, i)) return tuple(l) load_dispatch[4] = (4, load_long) def load_rational(self, data): l = [] for i in range(0, len(data), 8): l.append((self.i32(data, i), self.i32(data, i+4))) return tuple(l) load_dispatch[5] = (8, load_rational) def load_float(self, data): a = array.array("f", data) if self.prefix != native_prefix: a.byteswap() return tuple(a) load_dispatch[11] = (4, load_float) def load_double(self, data): a = array.array("d", data) if self.prefix != native_prefix: a.byteswap() return tuple(a) load_dispatch[12] = (8, load_double) def load_undefined(self, data): # Untyped data return data load_dispatch[7] = (1, load_undefined) def load(self, fp): # load tag dictionary self.reset() i16 = self.i16 i32 = self.i32 for i in range(i16(fp.read(2))): ifd = fp.read(12) tag, typ = i16(ifd), i16(ifd, 2) if Image.DEBUG: import TiffTags tagname = TiffTags.TAGS.get(tag, "unknown") typname = TiffTags.TYPES.get(typ, "unknown") print "tag: %s (%d)" % (tagname, tag), print "- type: %s (%d)" % (typname, typ), try: dispatch = self.load_dispatch[typ] except KeyError: if Image.DEBUG: print "- unsupported type", typ continue # ignore unsupported type size, handler = dispatch size = size * i32(ifd, 4) # Get and expand tag value if size > 4: here = fp.tell() fp.seek(i32(ifd, 8)) data = ImageFile._safe_read(fp, size) fp.seek(here) else: data = ifd[8:8+size] if len(data) != size: raise IOError, "not enough data" self.tagdata[tag] = typ, data self.tagtype[tag] = typ if Image.DEBUG: if tag in (COLORMAP, IPTC_NAA_CHUNK, PHOTOSHOP_CHUNK, ICCPROFILE, XMP): print "- value: <table: %d bytes>" % size else: print "- value:", self[tag] self.next = i32(fp.read(4)) # save primitives def save(self, fp): o16 = self.o16 o32 = self.o32 fp.write(o16(len(self.tags))) # always write in ascending tag order tags = self.tags.items() tags.sort() directory = [] append = directory.append offset = fp.tell() + len(self.tags) * 12 + 4 stripoffsets = None # pass 1: convert tags to binary format for tag, value in tags: typ = None if self.tagtype.has_key(tag): typ = self.tagtype[tag] if typ == 1: # byte data data = value = string.join(map(chr, value), "") elif typ == 7: # untyped data data = value = string.join(value, "") elif type(value[0]) is type(""): # string data typ = 2 data = value = string.join(value, "\0") + "\0" else: # integer data if tag == STRIPOFFSETS: stripoffsets = len(directory) typ = 4 # to avoid catch-22 elif tag in (X_RESOLUTION, Y_RESOLUTION): # identify rational data fields typ = 5 elif not typ: typ = 3 for v in value: if v >= 65536: typ = 4 if typ == 3: data = string.join(map(o16, value), "") else: data = string.join(map(o32, value), "") if Image.DEBUG: import TiffTags tagname = TiffTags.TAGS.get(tag, "unknown") typname = TiffTags.TYPES.get(typ, "unknown") print "save: %s (%d)" % (tagname, tag), print "- type: %s (%d)" % (typname, typ), if tag in (COLORMAP, IPTC_NAA_CHUNK, PHOTOSHOP_CHUNK, ICCPROFILE, XMP): size = len(data) print "- value: <table: %d bytes>" % size else: print "- value:", value # figure out if data fits into the directory if len(data) == 4: append((tag, typ, len(value), data, "")) elif len(data) < 4: append((tag, typ, len(value), data + (4-len(data))*"\0", "")) else: count = len(value) if typ == 5: count = count / 2 # adjust for rational data field append((tag, typ, count, o32(offset), data)) offset = offset + len(data) if offset & 1: offset = offset + 1 # word padding # update strip offset data to point beyond auxiliary data if stripoffsets is not None: tag, typ, count, value, data = directory[stripoffsets] assert not data, "multistrip support not yet implemented" value = o32(self.i32(value) + offset) directory[stripoffsets] = tag, typ, count, value, data # pass 2: write directory to file for tag, typ, count, value, data in directory: if Image.DEBUG > 1: print tag, typ, count, repr(value), repr(data) fp.write(o16(tag) + o16(typ) + o32(count) + value) # -- overwrite here for multi-page -- fp.write("\0\0\0\0") # end of directory # pass 3: write auxiliary data to file for tag, typ, count, value, data in directory: fp.write(data) if len(data) & 1: fp.write("\0") return offset ## # Image plugin for TIFF files. class TiffImageFile(ImageFile.ImageFile): format = "TIFF" format_description = "Adobe TIFF" def _open(self): "Open the first image in a TIFF file" # Header ifh = self.fp.read(8) if ifh[:4] not in PREFIXES: raise SyntaxError, "not a TIFF file" # image file directory (tag dictionary) self.tag = self.ifd = ImageFileDirectory(ifh[:2]) # setup frame pointers self.__first = self.__next = self.ifd.i32(ifh, 4) self.__frame = -1 self.__fp = self.fp # and load the first frame self._seek(0) def seek(self, frame): "Select a given frame as current image" if frame < 0: frame = 0 self._seek(frame) def tell(self): "Return the current frame number" return self._tell() def _seek(self, frame): self.fp = self.__fp if frame < self.__frame: # rewind file self.__frame = -1 self.__next = self.__first while self.__frame < frame: if not self.__next: raise EOFError, "no more images in TIFF file" self.fp.seek(self.__next) self.tag.load(self.fp) self.__next = self.tag.next self.__frame = self.__frame + 1 self._setup() def _tell(self): return self.__frame def _decoder(self, rawmode, layer): "Setup decoder contexts" args = None if rawmode == "RGB" and self._planar_configuration == 2: rawmode = rawmode[layer] compression = self._compression if compression == "raw": args = (rawmode, 0, 1) elif compression == "jpeg": args = rawmode, "" if self.tag.has_key(JPEGTABLES): # Hack to handle abbreviated JPEG headers self.tile_prefix = self.tag[JPEGTABLES] elif compression == "packbits": args = rawmode elif compression == "tiff_lzw": args = rawmode if self.tag.has_key(317): # Section 14: Differencing Predictor self.decoderconfig = (self.tag[PREDICTOR][0],) if self.tag.has_key(ICCPROFILE): self.info['icc_profile'] = self.tag[ICCPROFILE] return args def _setup(self): "Setup this image object based on current tags" if self.tag.has_key(0xBC01): raise IOError, "Windows Media Photo files not yet supported" getscalar = self.tag.getscalar # extract relevant tags self._compression = COMPRESSION_INFO[getscalar(COMPRESSION, 1)] self._planar_configuration = getscalar(PLANAR_CONFIGURATION, 1) # photometric is a required tag, but not everyone is reading # the specification photo = getscalar(PHOTOMETRIC_INTERPRETATION, 0) fillorder = getscalar(FILLORDER, 1) if Image.DEBUG: print "*** Summary ***" print "- compression:", self._compression print "- photometric_interpretation:", photo print "- planar_configuration:", self._planar_configuration print "- fill_order:", fillorder # size xsize = getscalar(IMAGEWIDTH) ysize = getscalar(IMAGELENGTH) self.size = xsize, ysize if Image.DEBUG: print "- size:", self.size format = getscalar(SAMPLEFORMAT, 1) # mode: check photometric interpretation and bits per pixel key = ( self.tag.prefix, photo, format, fillorder, self.tag.get(BITSPERSAMPLE, (1,)), self.tag.get(EXTRASAMPLES, ()) ) if Image.DEBUG: print "format key:", key try: self.mode, rawmode = OPEN_INFO[key] except KeyError: if Image.DEBUG: print "- unsupported format" raise SyntaxError, "unknown pixel mode" if Image.DEBUG: print "- raw mode:", rawmode print "- pil mode:", self.mode self.info["compression"] = self._compression xres = getscalar(X_RESOLUTION, (1, 1)) yres = getscalar(Y_RESOLUTION, (1, 1)) if xres and yres: xres = xres[0] / (xres[1] or 1) yres = yres[0] / (yres[1] or 1) resunit = getscalar(RESOLUTION_UNIT, 1) if resunit == 2: # dots per inch self.info["dpi"] = xres, yres elif resunit == 3: # dots per centimeter. convert to dpi self.info["dpi"] = xres * 2.54, yres * 2.54 else: # No absolute unit of measurement self.info["resolution"] = xres, yres # build tile descriptors x = y = l = 0 self.tile = [] if self.tag.has_key(STRIPOFFSETS): # striped image h = getscalar(ROWSPERSTRIP, ysize) w = self.size[0] a = None for o in self.tag[STRIPOFFSETS]: if not a: a = self._decoder(rawmode, l) self.tile.append( (self._compression, (0, min(y, ysize), w, min(y+h, ysize)), o, a)) y = y + h if y >= self.size[1]: x = y = 0 l = l + 1 a = None elif self.tag.has_key(TILEOFFSETS): # tiled image w = getscalar(322) h = getscalar(323) a = None for o in self.tag[TILEOFFSETS]: if not a: a = self._decoder(rawmode, l) self.tile.append( (self._compression, (x, y, x+w, y+h), o, a)) x = x + w if x >= self.size[0]: x, y = 0, y + h if y >= self.size[1]: x = y = 0 l = l + 1 a = None else: if Image.DEBUG: print "- unsupported data organization" raise SyntaxError("unknown data organization") # fixup palette descriptor if self.mode == "P": palette = map(lambda a: chr(a / 256), self.tag[COLORMAP]) self.palette = ImagePalette.raw("RGB;L", string.join(palette, "")) # # -------------------------------------------------------------------- # Write TIFF files # little endian is default except for image modes with explict big endian byte-order SAVE_INFO = { # mode => rawmode, byteorder, photometrics, sampleformat, bitspersample, extra "1": ("1", II, 1, 1, (1,), None), "L": ("L", II, 1, 1, (8,), None), "LA": ("LA", II, 1, 1, (8,8), 2), "P": ("P", II, 3, 1, (8,), None), "PA": ("PA", II, 3, 1, (8,8), 2), "I": ("I;32S", II, 1, 2, (32,), None), "I;16": ("I;16", II, 1, 1, (16,), None), "I;16S": ("I;16S", II, 1, 2, (16,), None), "F": ("F;32F", II, 1, 3, (32,), None), "RGB": ("RGB", II, 2, 1, (8,8,8), None), "RGBX": ("RGBX", II, 2, 1, (8,8,8,8), 0), "RGBA": ("RGBA", II, 2, 1, (8,8,8,8), 2), "CMYK": ("CMYK", II, 5, 1, (8,8,8,8), None), "YCbCr": ("YCbCr", II, 6, 1, (8,8,8), None), "LAB": ("LAB", II, 8, 1, (8,8,8), None), "I;32BS": ("I;32BS", MM, 1, 2, (32,), None), "I;16B": ("I;16B", MM, 1, 1, (16,), None), "I;16BS": ("I;16BS", MM, 1, 2, (16,), None), "F;32BF": ("F;32BF", MM, 1, 3, (32,), None), } def _cvt_res(value): # convert value to TIFF rational number -- (numerator, denominator) if type(value) in (type([]), type(())): assert(len(value) % 2 == 0) return value if type(value) == type(1): return (value, 1) value = float(value) return (int(value * 65536), 65536) def _save(im, fp, filename): try: rawmode, prefix, photo, format, bits, extra = SAVE_INFO[im.mode] except KeyError: raise IOError, "cannot write mode %s as TIFF" % im.mode ifd = ImageFileDirectory(prefix) # -- multi-page -- skip TIFF header on subsequent pages if fp.tell() == 0: # tiff header (write via IFD to get everything right) # PIL always starts the first IFD at offset 8 fp.write(ifd.prefix + ifd.o16(42) + ifd.o32(8)) ifd[IMAGEWIDTH] = im.size[0] ifd[IMAGELENGTH] = im.size[1] # additions written by Greg Couch, gregc@cgl.ucsf.edu # inspired by image-sig posting from Kevin Cazabon, kcazabon@home.com if hasattr(im, 'tag'): # preserve tags from original TIFF image file for key in (RESOLUTION_UNIT, X_RESOLUTION, Y_RESOLUTION): if im.tag.tagdata.has_key(key): ifd[key] = im.tag.tagdata.get(key) # preserve some more tags from original TIFF image file # -- 2008-06-06 Florian Hoech ifd.tagtype = im.tag.tagtype for key in (IPTC_NAA_CHUNK, PHOTOSHOP_CHUNK, XMP): if im.tag.has_key(key): ifd[key] = im.tag[key] # preserve ICC profile (should also work when saving other formats # which support profiles as TIFF) -- 2008-06-06 Florian Hoech if im.info.has_key("icc_profile"): ifd[ICCPROFILE] = im.info["icc_profile"] if im.encoderinfo.has_key("description"): ifd[IMAGEDESCRIPTION] = im.encoderinfo["description"] if im.encoderinfo.has_key("resolution"): ifd[X_RESOLUTION] = ifd[Y_RESOLUTION] \ = _cvt_res(im.encoderinfo["resolution"]) if im.encoderinfo.has_key("x resolution"): ifd[X_RESOLUTION] = _cvt_res(im.encoderinfo["x resolution"]) if im.encoderinfo.has_key("y resolution"): ifd[Y_RESOLUTION] = _cvt_res(im.encoderinfo["y resolution"]) if im.encoderinfo.has_key("resolution unit"): unit = im.encoderinfo["resolution unit"] if unit == "inch": ifd[RESOLUTION_UNIT] = 2 elif unit == "cm" or unit == "centimeter": ifd[RESOLUTION_UNIT] = 3 else: ifd[RESOLUTION_UNIT] = 1 if im.encoderinfo.has_key("software"): ifd[SOFTWARE] = im.encoderinfo["software"] if im.encoderinfo.has_key("date time"): ifd[DATE_TIME] = im.encoderinfo["date time"] if im.encoderinfo.has_key("artist"): ifd[ARTIST] = im.encoderinfo["artist"] if im.encoderinfo.has_key("copyright"): ifd[COPYRIGHT] = im.encoderinfo["copyright"] dpi = im.encoderinfo.get("dpi") if dpi: ifd[RESOLUTION_UNIT] = 2 ifd[X_RESOLUTION] = _cvt_res(dpi[0]) ifd[Y_RESOLUTION] = _cvt_res(dpi[1]) if bits != (1,): ifd[BITSPERSAMPLE] = bits if len(bits) != 1: ifd[SAMPLESPERPIXEL] = len(bits) if extra is not None: ifd[EXTRASAMPLES] = extra if format != 1: ifd[SAMPLEFORMAT] = format ifd[PHOTOMETRIC_INTERPRETATION] = photo if im.mode == "P": lut = im.im.getpalette("RGB", "RGB;L") ifd[COLORMAP] = tuple(map(lambda v: ord(v) * 256, lut)) # data orientation stride = len(bits) * ((im.size[0]*bits[0]+7)/8) ifd[ROWSPERSTRIP] = im.size[1] ifd[STRIPBYTECOUNTS] = stride * im.size[1] ifd[STRIPOFFSETS] = 0 # this is adjusted by IFD writer ifd[COMPRESSION] = 1 # no compression offset = ifd.save(fp) ImageFile._save(im, fp, [ ("raw", (0,0)+im.size, offset, (rawmode, stride, 1)) ]) # -- helper for multi-page save -- if im.encoderinfo.has_key("_debug_multipage"): #just to access o32 and o16 (using correct byte order) im._debug_multipage = ifd # # -------------------------------------------------------------------- # Register Image.register_open("TIFF", TiffImageFile, _accept) Image.register_save("TIFF", _save) Image.register_extension("TIFF", ".tif") Image.register_extension("TIFF", ".tiff") Image.register_mime("TIFF", "image/tiff")
ppizarror/Ned-For-Spod
bin/external/pil/TiffImagePlugin.py
Python
gpl-2.0
27,979
// This is generic code that is included in all Android apps that use the // Native framework by Henrik Rydgård (https://github.com/hrydgard/native). // It calls a set of methods defined in NativeApp.h. These should be implemented // by your game or app. #include <jni.h> #include <android/log.h> #include <stdlib.h> #include <stdint.h> #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include "base/basictypes.h" #include "base/display.h" #include "base/NativeApp.h" #include "base/logging.h" #include "base/timeutil.h" #include "file/zip_read.h" #include "input/input_state.h" #include "audio/mixer.h" #include "math/math_util.h" #include "net/resolve.h" #include "android/native_audio.h" // For Xperia Play support enum AndroidKeyCodes { KEYCODE_BUTTON_CROSS = 23, // trackpad or X button(Xperia Play) is pressed KEYCODE_BUTTON_CIRCLE = 1004, // Special custom keycode generated from 'O' button by our java code. Or 'O' button if Alt is pressed (TODO) KEYCODE_BUTTON_SQUARE = 99, // Square button(Xperia Play) is pressed KEYCODE_BUTTON_TRIANGLE = 100, // 'Triangle button(Xperia Play) is pressed KEYCODE_DPAD_LEFT = 21, KEYCODE_DPAD_UP = 19, KEYCODE_DPAD_RIGHT = 22, KEYCODE_DPAD_DOWN = 20, KEYCODE_BUTTON_L1 = 102, KEYCODE_BUTTON_R1 = 103, KEYCODE_BUTTON_START = 108, KEYCODE_BUTTON_SELECT = 109, }; static JNIEnv *jniEnvUI; std::string frameCommand; std::string frameCommandParam; static uint32_t pad_buttons_async_set; static uint32_t pad_buttons_async_clear; // Android implementation of callbacks to the Java part of the app void SystemToast(const char *text) { frameCommand = "toast"; frameCommandParam = text; } // TODO: need a Hide or bool show; void ShowAd(int x, int y, bool center_x) { ELOG("TODO! ShowAd!"); } void ShowKeyboard() { frameCommand = "showKeyboard"; frameCommandParam = ""; } void Vibrate(int length_ms) { frameCommand = "vibrate"; frameCommandParam = "100"; } void LaunchBrowser(const char *url) { frameCommand = "launchBrowser"; frameCommandParam = url; } void LaunchMarket(const char *url) { frameCommand = "launchMarket"; frameCommandParam = url; } void LaunchEmail(const char *email_address) { frameCommand = "launchEmail"; frameCommandParam = email_address; } void System_InputBox(const char *title, const char *defaultValue) { frameCommand = "inputBox"; frameCommandParam = title; } // Remember that all of these need initialization on init! The process // may be reused when restarting the game. Globals are DANGEROUS. float dp_xscale = 1; float dp_yscale = 1; InputState input_state; static bool renderer_inited = false; static bool first_lost = true; static bool use_native_audio = false; std::string GetJavaString(JNIEnv *env, jstring jstr) { const char *str = env->GetStringUTFChars(jstr, 0); std::string cpp_string = std::string(str); env->ReleaseStringUTFChars(jstr, str); return cpp_string; } extern "C" jboolean Java_com_henrikrydgard_libnative_NativeApp_isLandscape(JNIEnv *env, jclass) { std::string app_name, app_nice_name; bool landscape; NativeGetAppInfo(&app_name, &app_nice_name, &landscape); return landscape; } // For the Back button to work right. extern "C" jboolean Java_com_henrikrydgard_libnative_NativeApp_isAtTopLevel(JNIEnv *env, jclass) { return NativeIsAtTopLevel(); } extern "C" void Java_com_henrikrydgard_libnative_NativeApp_init (JNIEnv *env, jclass, jint xxres, jint yyres, jint dpi, jstring japkpath, jstring jdataDir, jstring jexternalDir, jstring jlibraryDir, jstring jinstallID, jboolean juseNativeAudio) { jniEnvUI = env; memset(&input_state, 0, sizeof(input_state)); renderer_inited = false; first_lost = true; pad_buttons_async_set = 0; pad_buttons_async_clear = 0; std::string apkPath = GetJavaString(env, japkpath); ILOG("APK path: %s", apkPath.c_str()); VFSRegister("", new ZipAssetReader(apkPath.c_str(), "assets/")); std::string externalDir = GetJavaString(env, jexternalDir); std::string user_data_path = GetJavaString(env, jdataDir) + "/"; std::string library_path = GetJavaString(env, jlibraryDir) + "/"; std::string installID = GetJavaString(env, jinstallID); ILOG("External storage path: %s", externalDir.c_str()); std::string app_name; std::string app_nice_name; bool landscape; net::Init(); g_dpi = dpi; g_dpi_scale = 240.0f / (float)g_dpi; pixel_xres = xxres; pixel_yres = yyres; pixel_in_dps = (float)pixel_xres / (float)dp_xres; NativeGetAppInfo(&app_name, &app_nice_name, &landscape); const char *argv[2] = {app_name.c_str(), 0}; NativeInit(1, argv, user_data_path.c_str(), externalDir.c_str(), installID.c_str()); use_native_audio = juseNativeAudio; if (use_native_audio) { AndroidAudio_Init(&NativeMix, library_path); } } extern "C" void Java_com_henrikrydgard_libnative_NativeApp_resume(JNIEnv *, jclass) { ILOG("NativeResume"); if (use_native_audio) { AndroidAudio_Resume(); } } extern "C" void Java_com_henrikrydgard_libnative_NativeApp_pause(JNIEnv *, jclass) { ILOG("NativePause"); if (use_native_audio) { AndroidAudio_Pause(); } } extern "C" void Java_com_henrikrydgard_libnative_NativeApp_shutdown(JNIEnv *, jclass) { ILOG("NativeShutdown."); if (use_native_audio) { AndroidAudio_Shutdown(); } if (renderer_inited) { NativeShutdownGraphics(); renderer_inited = false; } NativeShutdown(); ILOG("VFSShutdown."); VFSShutdown(); net::Shutdown(); } static jmethodID postCommand; extern "C" void Java_com_henrikrydgard_libnative_NativeRenderer_displayInit(JNIEnv * env, jobject obj) { ILOG("displayInit()"); if (!renderer_inited) { // We default to 240 dpi and all UI code is written to assume it. (DENSITY_HIGH, like Nexus S). // Note that we don't compute dp_xscale and dp_yscale until later! This is so that NativeGetAppInfo // can change the dp resolution if it feels like it. dp_xres = pixel_xres * g_dpi_scale; dp_yres = pixel_yres * g_dpi_scale; ILOG("Calling NativeInitGraphics(); dpi = %i, dp_xres = %i, dp_yres = %i", g_dpi, dp_xres, dp_yres); NativeInitGraphics(); dp_xscale = (float)dp_xres / pixel_xres; dp_yscale = (float)dp_yres / pixel_yres; renderer_inited = true; } else { ILOG("Calling NativeDeviceLost();"); NativeDeviceLost(); } jclass cls = env->GetObjectClass(obj); postCommand = env->GetMethodID(cls, "postCommand", "(Ljava/lang/String;Ljava/lang/String;)V"); ILOG("MethodID: %i", (int)postCommand); } extern "C" void Java_com_henrikrydgard_libnative_NativeRenderer_displayResize(JNIEnv *, jobject clazz, jint w, jint h) { ILOG("displayResize (%i, %i)!", w, h); } extern "C" void Java_com_henrikrydgard_libnative_NativeRenderer_displayRender(JNIEnv *env, jobject obj) { if (renderer_inited) { { lock_guard guard(input_state.lock); input_state.pad_buttons |= pad_buttons_async_set; input_state.pad_buttons &= ~pad_buttons_async_clear; UpdateInputState(&input_state); } { lock_guard guard(input_state.lock); NativeUpdate(input_state); } { lock_guard guard(input_state.lock); EndInputState(&input_state); } NativeRender(); time_update(); } else { ELOG("Ended up in nativeRender even though app has quit.%s", ""); // Shouldn't really get here. glClearColor(1.0, 0.0, 1.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); } if (!frameCommand.empty()) { ILOG("frameCommand %s %s", frameCommand.c_str(), frameCommandParam.c_str()); jstring cmd = env->NewStringUTF(frameCommand.c_str()); jstring param = env->NewStringUTF(frameCommandParam.c_str()); env->CallVoidMethod(obj, postCommand, cmd, param); frameCommand = ""; frameCommandParam = ""; } } extern "C" void Java_com_henrikrydgard_libnative_NativeApp_audioRender(JNIEnv* env, jclass clazz, jshortArray array) { // The audio thread can pretty safely enable Flush-to-Zero mode on the FPU. EnableFZ(); int buf_size = env->GetArrayLength(array); if (buf_size) { short *data = env->GetShortArrayElements(array, 0); int samples = buf_size / 2; NativeMix(data, samples); env->ReleaseShortArrayElements(array, data, 0); } } extern "C" void JNICALL Java_com_henrikrydgard_libnative_NativeApp_touch (JNIEnv *, jclass, float x, float y, int code, int pointerId) { lock_guard guard(input_state.lock); if (pointerId >= MAX_POINTERS) { ELOG("Too many pointers: %i", pointerId); return; // We ignore 8+ pointers entirely. } float scaledX = (int)(x * dp_xscale); // why the (int) cast? float scaledY = (int)(y * dp_yscale); input_state.pointer_x[pointerId] = scaledX; input_state.pointer_y[pointerId] = scaledY; if (code == 1) { input_state.pointer_down[pointerId] = true; NativeTouch(pointerId, scaledX, scaledY, 0, TOUCH_DOWN); } else if (code == 2) { input_state.pointer_down[pointerId] = false; NativeTouch(pointerId, scaledX, scaledY, 0, TOUCH_UP); } else { NativeTouch(pointerId, scaledX, scaledY, 0, TOUCH_MOVE); } input_state.mouse_valid = true; } static void AsyncDown(int padbutton) { pad_buttons_async_set |= padbutton; pad_buttons_async_clear &= ~padbutton; } static void AsyncUp(int padbutton) { pad_buttons_async_set &= ~padbutton; pad_buttons_async_clear |= padbutton; } extern "C" void Java_com_henrikrydgard_libnative_NativeApp_keyDown(JNIEnv *, jclass, jint key) { switch (key) { case 1: AsyncDown(PAD_BUTTON_BACK); break; // Back case 2: AsyncDown(PAD_BUTTON_MENU); break; // Menu case 3: AsyncDown(PAD_BUTTON_A); break; // Search case KEYCODE_BUTTON_CROSS: AsyncDown(PAD_BUTTON_A); break; case KEYCODE_BUTTON_CIRCLE: AsyncDown(PAD_BUTTON_B); break; case KEYCODE_BUTTON_SQUARE: AsyncDown(PAD_BUTTON_X); break; case KEYCODE_BUTTON_TRIANGLE: AsyncDown(PAD_BUTTON_Y); break; case KEYCODE_DPAD_LEFT: AsyncDown(PAD_BUTTON_LEFT); break; case KEYCODE_DPAD_UP: AsyncDown(PAD_BUTTON_UP); break; case KEYCODE_DPAD_RIGHT: AsyncDown(PAD_BUTTON_RIGHT); break; case KEYCODE_DPAD_DOWN: AsyncDown(PAD_BUTTON_DOWN); break; case KEYCODE_BUTTON_L1: AsyncDown(PAD_BUTTON_LBUMPER); break; case KEYCODE_BUTTON_R1: AsyncDown(PAD_BUTTON_RBUMPER); break; case KEYCODE_BUTTON_START: AsyncDown(PAD_BUTTON_START); break; case KEYCODE_BUTTON_SELECT: AsyncDown(PAD_BUTTON_SELECT); break; default: break; } } extern "C" void Java_com_henrikrydgard_libnative_NativeApp_keyUp(JNIEnv *, jclass, jint key) { switch (key) { case 1: AsyncUp(PAD_BUTTON_BACK); break; // Back case 2: AsyncUp(PAD_BUTTON_MENU); break; // Menu case 3: AsyncUp(PAD_BUTTON_A); break; // Search case KEYCODE_BUTTON_CROSS: AsyncUp(PAD_BUTTON_A); break; case KEYCODE_BUTTON_CIRCLE: AsyncUp(PAD_BUTTON_B); break; case KEYCODE_BUTTON_SQUARE: AsyncUp(PAD_BUTTON_X); break; case KEYCODE_BUTTON_TRIANGLE: AsyncUp(PAD_BUTTON_Y); break; case KEYCODE_DPAD_LEFT: AsyncUp(PAD_BUTTON_LEFT); break; case KEYCODE_DPAD_UP: AsyncUp(PAD_BUTTON_UP); break; case KEYCODE_DPAD_RIGHT: AsyncUp(PAD_BUTTON_RIGHT); break; case KEYCODE_DPAD_DOWN: AsyncUp(PAD_BUTTON_DOWN); break; case KEYCODE_BUTTON_L1: AsyncUp(PAD_BUTTON_LBUMPER); break; case KEYCODE_BUTTON_R1: AsyncUp(PAD_BUTTON_RBUMPER); break; case KEYCODE_BUTTON_START: AsyncUp(PAD_BUTTON_START); break; case KEYCODE_BUTTON_SELECT: AsyncUp(PAD_BUTTON_SELECT); break; default: break; } } extern "C" void JNICALL Java_com_henrikrydgard_libnative_NativeApp_accelerometer (JNIEnv *, jclass, float x, float y, float z) { // Theoretically this needs locking but I doubt it matters. Worst case, the X // from one "sensor frame" will be used together with Y from the next. // Should look into quantization though, for compressed movement storage. input_state.accelerometer_valid = true; input_state.acc.x = x; input_state.acc.y = y; input_state.acc.z = z; } extern "C" void Java_com_henrikrydgard_libnative_NativeApp_sendMessage (JNIEnv *env, jclass, jstring message, jstring param) { jboolean isCopy; std::string msg = GetJavaString(env, message); std::string prm = GetJavaString(env, param); ILOG("Message received: %s %s", msg.c_str(), prm.c_str()); NativeMessageReceived(msg.c_str(), prm.c_str()); }
glaubitz/ppsspp-debian
native/android/app-android.cpp
C++
gpl-2.0
12,069
/* * * Copyright (C) 2011-2013 ArkCORE <http://www.arkania.net/> * * Copyright (C) 2008-2013 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/>. */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "temple_of_ahnqiraj.h" enum Yells { SAY_AGGRO = 0, SAY_SLAY = 1, SAY_SPLIT = 2, SAY_DEATH = 3 }; enum Spells { SPELL_ARCANE_EXPLOSION = 26192, SPELL_EARTH_SHOCK = 26194, SPELL_TRUE_FULFILLMENT = 785, SPELL_INITIALIZE_IMAGE = 3730, SPELL_SUMMON_IMAGES = 747 }; enum Events { EVENT_ARCANE_EXPLOSION = 0, EVENT_FULLFILMENT = 1, EVENT_BLINK = 2, EVENT_EARTH_SHOCK = 3 }; uint32 const BlinkSpells[3] = { 4801, 8195, 20449 }; class boss_skeram : public CreatureScript { public: boss_skeram() : CreatureScript("boss_skeram") { } struct boss_skeramAI : public BossAI { boss_skeramAI(Creature* creature) : BossAI(creature, DATA_SKERAM) { } void Reset() { _flag = 0; _hpct = 75.0f; me->SetVisible(true); } void KilledUnit(Unit* /*victim*/) { Talk(SAY_SLAY); } void EnterEvadeMode() { ScriptedAI::EnterEvadeMode(); if (me->isSummon()) ((TempSummon*)me)->UnSummon(); } void JustSummoned(Creature* creature) { // Shift the boss and images (Get it? *Shift*?) uint8 rand = 0; if (_flag != 0) { while (_flag & (1 << rand)) rand = urand(0, 2); DoCast(me, BlinkSpells[rand]); _flag |= (1 << rand); _flag |= (1 << 7); } while (_flag & (1 << rand)) rand = urand(0, 2); creature->CastSpell(creature, BlinkSpells[rand]); _flag |= (1 << rand); if (_flag & (1 << 7)) _flag = 0; if (Unit* Target = SelectTarget(SELECT_TARGET_RANDOM)) creature->AI()->AttackStart(Target); float ImageHealthPct; if (me->GetHealthPct() < 25.0f) ImageHealthPct = 0.50f; else if (me->GetHealthPct() < 50.0f) ImageHealthPct = 0.20f; else ImageHealthPct = 0.10f; creature->SetMaxHealth(me->GetMaxHealth() * ImageHealthPct); creature->SetHealth(creature->GetMaxHealth() * (me->GetHealthPct() / 100.0f)); } void JustDied(Unit* /*killer*/) { if (!me->isSummon()) Talk(SAY_DEATH); else me->RemoveCorpse(); } void EnterCombat(Unit* /*who*/) { _EnterCombat(); events.Reset(); events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(6000, 12000)); events.ScheduleEvent(EVENT_FULLFILMENT, 15000); events.ScheduleEvent(EVENT_BLINK, urand(30000, 45000)); events.ScheduleEvent(EVENT_EARTH_SHOCK, 2000); Talk(SAY_AGGRO); } void UpdateAI(uint32 diff) { if (!UpdateVictim()) return; events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_ARCANE_EXPLOSION: DoCastAOE(SPELL_ARCANE_EXPLOSION, true); events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(8000, 18000)); break; case EVENT_FULLFILMENT: /// @todo For some weird reason boss does not cast this // Spell actually works, tested in duel DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true), SPELL_TRUE_FULFILLMENT, true); events.ScheduleEvent(EVENT_FULLFILMENT, urand(20000, 30000)); break; case EVENT_BLINK: DoCast(me, BlinkSpells[urand(0, 2)]); DoResetThreat(); me->SetVisible(true); events.ScheduleEvent(EVENT_BLINK, urand(10000, 30000)); break; case EVENT_EARTH_SHOCK: DoCastVictim(SPELL_EARTH_SHOCK); events.ScheduleEvent(EVENT_EARTH_SHOCK, 2000); break; } } if (!me->isSummon() && me->GetHealthPct() < _hpct) { DoCast(me, SPELL_SUMMON_IMAGES); Talk(SAY_SPLIT); _hpct -= 25.0f; me->SetVisible(false); events.RescheduleEvent(EVENT_BLINK, 2000); } if (me->IsWithinMeleeRange(me->getVictim())) { events.RescheduleEvent(EVENT_EARTH_SHOCK, 2000); DoMeleeAttackIfReady(); } } private: float _hpct; uint8 _flag; }; CreatureAI* GetAI(Creature* creature) const { return new boss_skeramAI(creature); } }; class PlayerOrPetCheck { public: bool operator()(WorldObject* object) const { if (object->GetTypeId() != TYPEID_PLAYER) if (!object->ToCreature()->isPet()) return true; return false; } }; class spell_skeram_arcane_explosion : public SpellScriptLoader { public: spell_skeram_arcane_explosion() : SpellScriptLoader("spell_skeram_arcane_explosion") { } class spell_skeram_arcane_explosion_SpellScript : public SpellScript { PrepareSpellScript(spell_skeram_arcane_explosion_SpellScript); void FilterTargets(std::list<WorldObject*>& targets) { targets.remove_if(PlayerOrPetCheck()); } void Register() { OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_skeram_arcane_explosion_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); } }; SpellScript* GetSpellScript() const { return new spell_skeram_arcane_explosion_SpellScript(); } }; void AddSC_boss_skeram() { new boss_skeram(); new spell_skeram_arcane_explosion(); }
planee/SoDCORE
src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
C++
gpl-2.0
7,827
/* * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #include "config.h" #include "HTMLProgressElement.h" #include "ElementIterator.h" #include "EventNames.h" #include "ExceptionCode.h" #include "HTMLNames.h" #include "HTMLParserIdioms.h" #include "ProgressShadowElement.h" #include "RenderProgress.h" #include "ShadowRoot.h" namespace WebCore { using namespace HTMLNames; const double HTMLProgressElement::IndeterminatePosition = -1; const double HTMLProgressElement::InvalidPosition = -2; HTMLProgressElement::HTMLProgressElement(const QualifiedName& tagName, Document& document) : LabelableElement(tagName, document) , m_value(0) { ASSERT(hasTagName(progressTag)); setHasCustomStyleResolveCallbacks(); } HTMLProgressElement::~HTMLProgressElement() { } Ref<HTMLProgressElement> HTMLProgressElement::create(const QualifiedName& tagName, Document& document) { Ref<HTMLProgressElement> progress = adoptRef(*new HTMLProgressElement(tagName, document)); progress->ensureUserAgentShadowRoot(); return progress; } RenderPtr<RenderElement> HTMLProgressElement::createElementRenderer(Ref<RenderStyle>&& style, const RenderTreePosition&) { if (!style.get().hasAppearance()) return RenderElement::createFor(*this, WTFMove(style)); return createRenderer<RenderProgress>(*this, WTFMove(style)); } bool HTMLProgressElement::childShouldCreateRenderer(const Node& child) const { return hasShadowRootParent(child) && HTMLElement::childShouldCreateRenderer(child); } RenderProgress* HTMLProgressElement::renderProgress() const { if (is<RenderProgress>(renderer())) return downcast<RenderProgress>(renderer()); return downcast<RenderProgress>(descendantsOfType<Element>(*userAgentShadowRoot()).first()->renderer()); } void HTMLProgressElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == valueAttr) didElementStateChange(); else if (name == maxAttr) didElementStateChange(); else LabelableElement::parseAttribute(name, value); } void HTMLProgressElement::didAttachRenderers() { if (RenderProgress* render = renderProgress()) render->updateFromElement(); } double HTMLProgressElement::value() const { double value = parseToDoubleForNumberType(fastGetAttribute(valueAttr)); return !std::isfinite(value) || value < 0 ? 0 : std::min(value, max()); } void HTMLProgressElement::setValue(double value, ExceptionCode& ec) { if (!std::isfinite(value)) { ec = NOT_SUPPORTED_ERR; return; } setAttribute(valueAttr, AtomicString::number(value >= 0 ? value : 0)); } double HTMLProgressElement::max() const { double max = parseToDoubleForNumberType(fastGetAttribute(maxAttr)); return !std::isfinite(max) || max <= 0 ? 1 : max; } void HTMLProgressElement::setMax(double max, ExceptionCode& ec) { if (!std::isfinite(max)) { ec = NOT_SUPPORTED_ERR; return; } setAttribute(maxAttr, AtomicString::number(max > 0 ? max : 1)); } double HTMLProgressElement::position() const { if (!isDeterminate()) return HTMLProgressElement::IndeterminatePosition; return value() / max(); } bool HTMLProgressElement::isDeterminate() const { return fastHasAttribute(valueAttr); } void HTMLProgressElement::didElementStateChange() { m_value->setWidthPercentage(position() * 100); if (RenderProgress* render = renderProgress()) { bool wasDeterminate = render->isDeterminate(); render->updateFromElement(); if (wasDeterminate != isDeterminate()) setNeedsStyleRecalc(); } } void HTMLProgressElement::didAddUserAgentShadowRoot(ShadowRoot* root) { ASSERT(!m_value); Ref<ProgressInnerElement> inner = ProgressInnerElement::create(document()); root->appendChild(inner.copyRef()); Ref<ProgressBarElement> bar = ProgressBarElement::create(document()); Ref<ProgressValueElement> value = ProgressValueElement::create(document()); m_value = value.ptr(); m_value->setWidthPercentage(HTMLProgressElement::IndeterminatePosition * 100); bar->appendChild(*m_value, ASSERT_NO_EXCEPTION); inner->appendChild(WTFMove(bar), ASSERT_NO_EXCEPTION); } bool HTMLProgressElement::shouldAppearIndeterminate() const { return !isDeterminate(); } } // namespace
teamfx/openjfx-9-dev-rt
modules/javafx.web/src/main/native/Source/WebCore/html/HTMLProgressElement.cpp
C++
gpl-2.0
5,133
<a href="#na" class="spotlight graphic"> <div class="imgContainer"> <img src="<?php print path_to_theme() ?>/img/infoGraphic.png" alt=""> </div> <div class="textContainer"> <h2>Dementia Awarenes</h2> </div> </a>
JoshHarrington/seedly
sites/all/themes/seedly/templates/components/core/spotlights/spotlight_graphic1.php
PHP
gpl-2.0
258
/* * Copyright 2016-2020 Ping Identity Corporation * All Rights Reserved. */ /* * Copyright 2016-2020 Ping Identity Corporation * * Licensed 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. */ /* * Copyright (C) 2016-2020 Ping Identity Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (GPLv2 only) * or the terms of the GNU Lesser General Public License (LGPLv2.1 only) * 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, see <http://www.gnu.org/licenses>. */ package com.unboundid.ldap.sdk.unboundidds.tools; import java.util.Collections; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import com.unboundid.ldap.sdk.DN; import com.unboundid.ldap.sdk.Entry; import com.unboundid.ldap.sdk.Filter; import com.unboundid.ldap.sdk.LDAPException; import com.unboundid.ldap.sdk.RDN; import com.unboundid.ldap.sdk.schema.Schema; import com.unboundid.ldif.LDIFException; import com.unboundid.util.Debug; import com.unboundid.util.NotNull; import com.unboundid.util.Nullable; import com.unboundid.util.StaticUtils; import com.unboundid.util.ThreadSafety; import com.unboundid.util.ThreadSafetyLevel; import static com.unboundid.ldap.sdk.unboundidds.tools.ToolMessages.*; /** * This class provides an implementation of an LDIF reader entry translator that * can be used to determine the set into which an entry should be placed by * selecting the first set for which the associated filter matches the entry. * <BR> * <BLOCKQUOTE> * <B>NOTE:</B> This class, and other classes within the * {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only * supported for use against Ping Identity, UnboundID, and * Nokia/Alcatel-Lucent 8661 server products. These classes provide support * for proprietary functionality or for external specifications that are not * considered stable or mature enough to be guaranteed to work in an * interoperable way with other types of LDAP servers. * </BLOCKQUOTE> */ @ThreadSafety(level=ThreadSafetyLevel.NOT_THREADSAFE) final class SplitLDIFFilterTranslator extends SplitLDIFTranslator { // The map used to cache decisions made by this translator. @Nullable private final ConcurrentHashMap<String,Set<String>> rdnCache; // A map used to associate the search filter for each set with the name of // that set. @NotNull private final Map<Filter,Set<String>> setFilters; // A map of the names that will be used for each of the sets. @NotNull private final Map<Integer,Set<String>> setNames; // The schema to use for filter evaluation. @Nullable private final Schema schema; // The sets in which entries outside the split base should be placed. @NotNull private final Set<String> outsideSplitBaseSetNames; // The sets in which the split base entry should be placed. @NotNull private final Set<String> splitBaseEntrySetNames; /** * Creates a new instance of this translator with the provided information. * * @param splitBaseDN The base DN below which to * split entries. * @param schema The schema to use for filter * evaluation. * @param filters The filters to use to select * the appropriate backend set. * This must not be * {@code null} or empty. * @param assumeFlatDIT Indicates whether to assume * that the DIT is flat, and * there aren't any entries more * than one level below the * split base DN. If this is * {@code true}, then any * entries more than one level * below the split base DN will * be considered an error. * @param addEntriesOutsideSplitToAllSets Indicates whether entries * outside the split should be * added to all sets. * @param addEntriesOutsideSplitToDedicatedSet Indicates whether entries * outside the split should be * added to all sets. */ SplitLDIFFilterTranslator(@NotNull final DN splitBaseDN, @Nullable final Schema schema, @NotNull final LinkedHashSet<Filter> filters, final boolean assumeFlatDIT, final boolean addEntriesOutsideSplitToAllSets, final boolean addEntriesOutsideSplitToDedicatedSet) { super(splitBaseDN); this.schema = schema; if (assumeFlatDIT) { rdnCache = null; } else { rdnCache = new ConcurrentHashMap<>(StaticUtils.computeMapCapacity(100)); } final int numSets = filters.size(); outsideSplitBaseSetNames = new LinkedHashSet<>(StaticUtils.computeMapCapacity(numSets+1)); splitBaseEntrySetNames = new LinkedHashSet<>(StaticUtils.computeMapCapacity(numSets)); if (addEntriesOutsideSplitToDedicatedSet) { outsideSplitBaseSetNames.add(SplitLDIFEntry.SET_NAME_OUTSIDE_SPLIT); } setFilters = new LinkedHashMap<>(StaticUtils.computeMapCapacity(numSets)); setNames = new LinkedHashMap<>(StaticUtils.computeMapCapacity(numSets)); int i=0; for (final Filter f : filters) { final String setName = ".set" + (i+1); final Set<String> sets = Collections.singleton(setName); splitBaseEntrySetNames.add(setName); if (addEntriesOutsideSplitToAllSets) { outsideSplitBaseSetNames.add(setName); } setFilters.put(f, sets); setNames.put(i, sets); i++; } } /** * {@inheritDoc} */ @Override() @NotNull() public SplitLDIFEntry translate(@NotNull final Entry original, final long firstLineNumber) throws LDIFException { // Get the parsed DN for the entry. If we can't, that's an error and we // should only include it in the error set. final DN dn; try { dn = original.getParsedDN(); } catch (final LDAPException le) { Debug.debugException(le); return createEntry(original, ERR_SPLIT_LDIF_FILTER_TRANSLATOR_CANNOT_PARSE_DN.get( le.getMessage()), getErrorSetNames()); } // If the parsed DN is outside the split base DN, then return the // appropriate sets for that. if (! dn.isDescendantOf(getSplitBaseDN(), true)) { return createEntry(original, outsideSplitBaseSetNames); } // If the parsed DN matches the split base DN, then it will always go into // all of the split sets. if (dn.equals(getSplitBaseDN())) { return createEntry(original, splitBaseEntrySetNames); } // Determine which RDN component is immediately below the split base DN. final RDN[] rdns = dn.getRDNs(); final int targetRDNIndex = rdns.length - getSplitBaseRDNs().length - 1; final String normalizedRDNString = rdns[targetRDNIndex].toNormalizedString(); // If the target RDN component is not the first component of the DN, then // we'll use the cache to send this entry to the same set as its parent. if (targetRDNIndex > 0) { // If we aren't maintaining an RDN cache (which should only happen if // the --assumeFlatDIT argument was provided), then this is an error. if (rdnCache == null) { return createEntry(original, ERR_SPLIT_LDIF_FILTER_TRANSLATOR_NON_FLAT_DIT.get( getSplitBaseDN().toString()), getErrorSetNames()); } // Note that even if we are maintaining an RDN cache, it may not contain // the information that we need to determine which set should hold this // entry. There are two reasons for this: // // - The LDIF file contains an entry below the split base DN without // including the parent for that entry, (or includes a child entry // before its parent). // // - We are processing multiple entries in parallel, and the parent entry // is currently being processed in another thread and that thread hasn't // yet made the determination as to which set should be used for that // parent entry. // // In either case, use null for the target set names. If we are in the // parallel processing phase, then we will re-invoke this method later // at a point in which we can be confident that the caching should have // been performed If we still get null the second time through, then // the caller will consider that an error and handle it appropriately. return createEntry(original, rdnCache.get(normalizedRDNString)); } // At this point, we know that the entry is exactly one level below the // split base DN. Iterate through the filters and see if any of them // matches the entry. for (final Map.Entry<Filter,Set<String>> e : setFilters.entrySet()) { final Filter f = e.getKey(); try { if (f.matchesEntry(original, schema)) { final Set<String> sets = e.getValue(); if (rdnCache != null) { rdnCache.put(normalizedRDNString, sets); } return createEntry(original, sets); } } catch (final Exception ex) { Debug.debugException(ex); } } // If we've gotten here, then none of the filters matched so pick a set // based on a hash of the RDN. final SplitLDIFEntry e = createFromRDNHash(original, dn, setNames); if (rdnCache != null) { rdnCache.put(normalizedRDNString, e.getSets()); } return e; } }
UnboundID/ldapsdk
src/com/unboundid/ldap/sdk/unboundidds/tools/SplitLDIFFilterTranslator.java
Java
gpl-2.0
11,362
#include <stdlib.h> #include <string.h> #include <QStringList> #include <QDir> #include <QDebug> #include "acpiutils.h" //================================================================================== #define ACPI_PATH_PROC "/proc/acpi/" #define ACPI_PATH_SYS "/sys/class/" struct AcpiDevice { int type; const char *proc; const char *sys; const char *nameFilter; }; AcpiDevice acpiDevices[4] = { { AcpiDeviceType::Battery, "battery", "power_supply", "BAT*" }, { AcpiDeviceType::AcAdapter, "ac_adapter", "power_supply", "AC*" }, { AcpiDeviceType::ThermalZone, "thermal_zone", "thermal", "thermal_zone*" }, { AcpiDeviceType::CoolingDevice, "fan", "thermal", "cooling_device*" } }; //================================================================================== static bool getDeviceDir(QDir &dir, const char *acpiPath, const char *acpiDir) { char buf[1024]; snprintf (buf, 1024, "%s%s", acpiPath, acpiDir); dir.setPath(QString::fromUtf8(buf)); return dir.exists(); } bool AcpiUtil::find(QStringList &devices, QString &path, int acpiDeviceType) { QDir dir; if (!getDeviceDir(dir, ACPI_PATH_PROC, acpiDevices[acpiDeviceType].proc) && !getDeviceDir(dir, ACPI_PATH_SYS, acpiDevices[acpiDeviceType].sys)) { qDebug() << "AcpiUtil::find(): getDeviceDir() failed."; return false; } QString filter(acpiDevices[acpiDeviceType].nameFilter); QStringList nameFilters(filter); devices = dir.entryList(nameFilters); path = dir.absolutePath() + QDir::separator(); return true; } //================================================================================== bool AcpiUtil::read(QByteArray &result, const QString &path, const char *name) { QFile file(path + name); if (!file.exists()) return false; if (!file.open(QIODevice::ReadOnly)) return false; result = file.readAll(); file.close(); return true; } //================================================================================== int AcpiUtil::parseInt(const QByteArray &data) { const char *str = data.constData(); int n = -1; sscanf(str, "%d", &n); return n; }
yede/yepanel
src.panel/applet-acpi/acpiutils.cpp
C++
gpl-2.0
2,149
#!/usr/bin/python import sys, os, urllib, argparse, base64, time, threading, re from gi.repository import Gtk, WebKit, Notify webView = None def refresh(widget, event): global webView webView.reload() window_title = '' def HandleTitleChanged(webview, title): global window_title window_title = title parent = webview while parent.get_parent() != None: parent = webview.get_parent() parent.set_title(title) return True def HandleCreateWebView(webview, frame): info = Gtk.Window() info.set_default_size(1000, 700) child = WebKit.WebView() child.connect('create-web-view', HandleCreateWebView) child.connect('close-web-view', HandleCloseWebView) child.connect('navigation-policy-decision-requested', HandleNavigationRequested) #child.connect('notify::title', HandleTitleChanged) info.set_title('') info.add(child) info.show_all() return child def HandleCloseWebView(webview): parent = webview while parent.get_parent() != None: parent = webview.get_parent() parent.destroy() def HandleNewWindowPolicyDecisionRequested(webview, frame, request, navigation_action, policy_decision): if '&URL=' in request.get_uri(): os.system('xdg-open "%s"' % urllib.unquote(request.get_uri().split('&URL=')[1]).decode('utf8')) def HandleNavigationRequested(webview, frame, request, navigation_action, policy_decision): if '&URL=' in request.get_uri(): HandleCloseWebView(webview) return 1 prefills = {} submit = False ignore_submit = [] def prefill_password(webview, frame): global prefills, submit should_ignore_submit = False dom = webview.get_dom_document() forms = dom.get_forms() for i in range(0, forms.get_length()): form = forms.item(i) elements = form.get_elements() is_form_modified = False for j in range(0, elements.get_length()): element = elements.item(j) element_name = element.get_name() if element_name in ignore_submit: should_ignore_submit = True for key in prefills.keys(): if element_name == key: if prefills[key].lower() == 'true': element.set_checked(True) is_form_modified = True else: element.set_value(prefills[key]) is_form_modified = True if is_form_modified and submit and not should_ignore_submit: form.submit() def HandleMimeType(webview, frame, request, mimetype, policy_decision): print 'Requested decision for mimetype:', mimetype return True stop_threads = False search_notifys = [] def SearchNotify(webview): global stop_threads global window_title global search_notifys while True: if stop_threads: break dom = webview.get_dom_document() if not dom: continue body = dom.get_body() if not body: continue body_html = body.get_inner_html() if not body_html: continue for notice in search_notifys: msgs = list(set(re.findall(notice, body_html))) if len(msgs) > 0: for msg in msgs: Notify.init(window_title) msg_notify = Notify.Notification.new(window_title, msg, "dialog-information") msg_notify.show() time.sleep(2) # Don't duplicate the notification time.sleep(2) if __name__ == "__main__": parser_epilog = ("Example:\n\n" "./simple_browse.py https://owa.example.com --useragent=\"Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0\" --stylesheet=~/simple_browse/sample_styles/owa_style.css --username=<webmail username> --b64pass=\"<base64 encoded password>\" --forminput=trusted:true --submit --notify=PHNwYW4gY2xhc3M9Im53SXRtVHh0U2JqIj4oW1x3IF0rKTwvc3Bhbj4=\n\n" "This command will open Outlook Web Access, set the user agent to allow it to \nload using pipelight (for silverlight support), login to webmail, then apply a \ncustom css style to make webmail look like a desktop app. When new emails\narrive, notification will be sent to gnome-shell.\n") parser = argparse.ArgumentParser(description="Simple Browser: A simple webkit browser written in Python", epilog=parser_epilog, formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument("url") parser.add_argument("--useragent", help="An optional user agent to apply to the main page") parser.add_argument("--stylesheet", help="An optional stylesheet to apply to the main page") parser.add_argument("--username", help="A username we'll try to use to sign in") parser.add_argument("--password", help="A password for signing in") parser.add_argument("--b64pass", help="An alternative b64 encoded password for sign on") parser.add_argument("--forminput", help="A form field name and value to prefill (seperated by a colon). Only one value for each key is allowed.", action='append') parser.add_argument("--submit", help="Submit the filled form when we've finished entering values", action="store_true") parser.add_argument("--ignore-submit", help="Ignore the submit if the form contains this key", action='append') parser.add_argument("--title", help="Title for the window") parser.add_argument("--notify", help="A regex search string, base64 encoded, which will display a notification when found, example: <span class=\"nwItmTxtSbj\">([\w ]+)</span>", action='append') args = parser.parse_args() url = args.url user_agent = None if args.useragent: user_agent = args.useragent stylesheet = None if args.stylesheet: stylesheet = 'file://localhost%s' % os.path.abspath(args.stylesheet) if args.username: prefills['username'] = args.username if args.b64pass: prefills['password'] = base64.b64decode(args.b64pass) elif args.password: prefills['password'] = args.password if args.submit: submit = True if args.forminput: for field in args.forminput: key, value = field.split(':') if key in prefills: parser.print_help() exit(1) prefills[key] = value if args.ignore_submit: ignore_submit.extend(args.ignore_submit) if args.notify: for notice in args.notify: search_notifys.append(base64.b64decode(notice)) win = Gtk.Window() scrolled = Gtk.ScrolledWindow() win.set_default_size(1500, 900) webView = WebKit.WebView() webView.load_uri(url) overlay = Gtk.Overlay() overlay.add(webView) # Apply Settings settings = WebKit.WebSettings() if user_agent: settings.set_property('user-agent', user_agent) settings.set_property('enable-spell-checking', True) if stylesheet: settings.set_property('user-stylesheet-uri', stylesheet) webView.set_settings(settings) # Add Signal handlers to the webview webView.connect('create-web-view', HandleCreateWebView) webView.connect('close-web-view', HandleCloseWebView) webView.connect('new-window-policy-decision-requested', HandleNewWindowPolicyDecisionRequested) webView.connect('navigation-policy-decision-requested', HandleNavigationRequested) #webView.connect('notify::title', HandleTitleChanged) webView.connect('mime-type-policy-decision-requested', HandleMimeType) webView.connect('load-finished', prefill_password) win.set_title('') # Add the Refresh button fixed = Gtk.Fixed() fixed.set_halign(Gtk.Align.START) fixed.set_valign(Gtk.Align.START) overlay.add_overlay(fixed) fixed.show() image = Gtk.Image() image.set_from_pixbuf(Gtk.IconTheme().load_icon('gtk-refresh', 10, 0)) imgevent = Gtk.EventBox() imgevent.add(image) imgevent.connect('button-press-event', refresh) fixed.put(imgevent, 10, 10) win.add(scrolled) scrolled.add(overlay) win.show_all() win.connect('destroy', Gtk.main_quit) if args.title: window_title = args.title win.set_title(args.title) if search_notifys: t = threading.Thread(target=SearchNotify, args=(webView,)) t.start() Gtk.main() stop_threads = True
DavidMulder/simple_browse
simple_browse.py
Python
gpl-2.0
8,391
/**************************************************************************** ** ** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. ** ** This file is part of the tools applications of the Qt Toolkit. ** ** This file may be used under the terms of the GNU General Public ** License versions 2.0 or 3.0 as published by the Free Software ** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 ** included in the packaging of this file. Alternatively you may (at ** your option) use any later version of the GNU General Public ** License if such license has been publicly approved by Trolltech ASA ** (or its successors, if any) and the KDE Free Qt Foundation. In ** addition, as a special exception, Trolltech gives you certain ** additional rights. These rights are described in the Trolltech GPL ** Exception version 1.2, which can be found at ** http://www.trolltech.com/products/qt/gplexception/ and in the file ** GPL_EXCEPTION.txt in this package. ** ** Please review the following information to ensure GNU General ** Public Licensing requirements will be met: ** http://trolltech.com/products/qt/licenses/licensing/opensource/. If ** you are unsure which license is appropriate for your use, please ** review the following information: ** http://trolltech.com/products/qt/licenses/licensing/licensingoverview ** or contact the sales department at sales@trolltech.com. ** ** In addition, as a special exception, Trolltech, as the sole ** copyright holder for Qt Designer, grants users of the Qt/Eclipse ** Integration plug-in the right for the Qt/Eclipse Integration to ** link to functionality provided by Qt Designer and its related ** libraries. ** ** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, ** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly ** granted herein. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ****************************************************************************/ /* qscodemarker.cpp */ #include "node.h" #include "qscodemarker.h" QsCodeMarker::QsCodeMarker() { } QsCodeMarker::~QsCodeMarker() { } bool QsCodeMarker::recognizeCode( const QString& /* code */ ) { return true; } bool QsCodeMarker::recognizeExtension( const QString& ext ) { return ext == "js" || ext == "qs"; } bool QsCodeMarker::recognizeLanguage( const QString& lang ) { return lang == "JavaScript" || lang == "Qt Script"; } QString QsCodeMarker::plainName( const Node *node ) { QString name = node->name(); if ( node->type() == Node::Function ) name += "()"; return name; } QString QsCodeMarker::plainFullName( const Node *node, const Node * /* relative */ ) { QString fullName; for ( ;; ) { fullName.prepend( plainName(node) ); if ( node->parent()->name().isEmpty() ) break; node = node->parent(); fullName.prepend("."); } return fullName; } QString QsCodeMarker::markedUpCode( const QString& code, const Node * /* relative */, const QString& /* dirPath */ ) { return protect( code ); } QString QsCodeMarker::markedUpSynopsis( const Node *node, const Node * /* relative */, SynopsisStyle style ) { QString synopsis; QStringList extras; QString name; name = taggedNode( node ); if ( style != Detailed ) name = linkTag( node, name ); name = "<@name>" + name + "</@name>"; if ( style == Detailed && !node->parent()->name().isEmpty() && node->type() != Node::Enum ) name.prepend( taggedNode(node->parent()) + "." ); switch ( node->type() ) { case Node::Class: synopsis = "class " + name; break; case Node::Function: { const FunctionNode *func = (const FunctionNode *) node; synopsis = name; if ( style == SeparateList ) { synopsis += "()"; } else { synopsis += " ("; if ( !func->parameters().isEmpty() ) { synopsis += " "; int numOptional = 0; QList<Parameter>::ConstIterator p = func->parameters().begin(); while ( p != func->parameters().end() ) { if ( !(*p).defaultValue().isEmpty() ) { if ( p == func->parameters().begin() ) { synopsis += "[ "; } else { synopsis += " [ , "; } numOptional++; } else { if ( p != func->parameters().begin() ) synopsis += ", "; } if ( !(*p).name().isEmpty() ) synopsis += "<@param>" + protect( (*p).name() ) + "</@param> : "; synopsis += protect( (*p).leftType() ); ++p; } for ( int i = 0; i < numOptional; i++ ) synopsis += " ]"; synopsis += " "; } synopsis += ")"; } if ( style != SeparateList && !func->returnType().isEmpty() ) synopsis += " : " + protect( func->returnType() ); if ( style == Detailed && func->metaness() == FunctionNode::Signal ) extras << "[signal]"; } break; case Node::Property: { const PropertyNode *property = (const PropertyNode *) node; synopsis = name; if ( style != SeparateList ) synopsis += " : " + property->dataType(); if ( style == Detailed && property->setters().isEmpty() ) extras << "[read only]"; } break; case Node::Enum: { /* The letters A to F and X (upper- and lower-case) can appear in a hexadecimal constant (e.g. 0x3F). */ QRegExp letterRegExp( "[G-WYZg-wyz_]" ); const EnumNode *enume = (const EnumNode *) node; synopsis = name; if ( style == Summary && !enume->items().isEmpty() ) { synopsis += " : "; QString comma; QList<EnumItem>::ConstIterator it = enume->items().begin(); while ( it != enume->items().end() ) { if ( enume->itemAccess((*it).name()) == Node::Public ) { synopsis += comma; synopsis += (*it).name(); if ( (*it).value().indexOf(letterRegExp) != -1 ) synopsis += " = " + (*it).value(); comma = ", "; } ++it; } } } break; case Node::Namespace: case Node::Typedef: default: synopsis = name; } if ( style == Summary ) { if ( node->status() == Node::Preliminary ) { extras << "(preliminary)"; } else if ( node->status() == Node::Deprecated ) { extras << "(deprecated)"; } else if ( node->status() == Node::Obsolete ) { extras << "(obsolete)"; } } QString extra; if ( !extras.isEmpty() ) extra = "<@extra>" + extras.join(" ") + "</@extra>"; return synopsis + extra; } QString QsCodeMarker::markedUpName( const Node *node ) { QString name = linkTag( node, taggedNode(node) ); if ( node->type() == Node::Function ) name += "()"; return name; } QString QsCodeMarker::markedUpFullName( const Node *node, const Node * /* relative */ ) { QString fullName; for ( ;; ) { fullName.prepend( markedUpName(node) ); if ( node->parent()->name().isEmpty() ) break; node = node->parent(); fullName.prepend( "<@op>.</@op>" ); } return fullName; } QString QsCodeMarker::markedUpEnumValue(const QString & /* enumValue */, const Node * /* relative */) { return QString(); } QString QsCodeMarker::markedUpIncludes( const QStringList& /* includes */ ) { return QString(); } QString QsCodeMarker::functionBeginRegExp( const QString& funcName ) { return "^function[ \t].*\\b" + QRegExp::escape( funcName ); } QString QsCodeMarker::functionEndRegExp( const QString& /* funcName */ ) { return "^}"; } QList<Section> QsCodeMarker::sections( const InnerNode *inner, SynopsisStyle style, Status status ) { QList<Section> sections; if (inner->type() != Node::Class) return sections; const ClassNode *classe = static_cast<const ClassNode *>(inner); if ( style == Summary ) { FastSection enums(classe, "Enums", "enum", "enums"); FastSection functions(classe, "Functions", "function", "functions"); FastSection readOnlyProperties(classe, "Read-Only Properties", "property", "properties"); FastSection signalz(classe, "Signals", "signal", "signals"); FastSection writableProperties(classe, "Writable Properties", "property", "properties"); QStack<const ClassNode *> stack; stack.push( classe ); while ( !stack.isEmpty() ) { const ClassNode *ancestorClass = stack.pop(); NodeList::ConstIterator c = ancestorClass->childNodes().begin(); while ( c != ancestorClass->childNodes().end() ) { if ( (*c)->access() == Node::Public ) { if ( (*c)->type() == Node::Enum ) { insert( enums, *c, style, status ); } else if ( (*c)->type() == Node::Function ) { const FunctionNode *func = (const FunctionNode *) *c; if ( func->metaness() == FunctionNode::Signal ) { insert( signalz, *c, style, status ); } else { insert( functions, *c, style, status ); } } else if ( (*c)->type() == Node::Property ) { const PropertyNode *property = (const PropertyNode *) *c; if ( property->setters().isEmpty() ) { insert( readOnlyProperties, *c, style, status ); } else { insert( writableProperties, *c, style, status ); } } } ++c; } QList<RelatedClass>::ConstIterator r = ancestorClass->baseClasses().begin(); while ( r != ancestorClass->baseClasses().end() ) { stack.prepend( (*r).node ); ++r; } } append( sections, enums ); append( sections, writableProperties ); append( sections, readOnlyProperties ); append( sections, functions ); append( sections, signalz ); } else if ( style == Detailed ) { FastSection enums( classe, "Enum Documentation" ); FastSection functionsAndSignals( classe, "Function and Signal Documentation" ); FastSection properties( classe, "Property Documentation" ); NodeList::ConstIterator c = classe->childNodes().begin(); while ( c != classe->childNodes().end() ) { if ( (*c)->access() == Node::Public ) { if ( (*c)->type() == Node::Enum ) { insert( enums, *c, style, status ); } else if ( (*c)->type() == Node::Function ) { insert( functionsAndSignals, *c, style, status ); } else if ( (*c)->type() == Node::Property ) { insert( properties, *c, style, status ); } } ++c; } append( sections, enums ); append( sections, properties ); append( sections, functionsAndSignals ); } else { // ( style == SeparateList ) FastSection all( classe ); QStack<const ClassNode *> stack; stack.push( classe ); while ( !stack.isEmpty() ) { const ClassNode *ancestorClass = stack.pop(); NodeList::ConstIterator c = ancestorClass->childNodes().begin(); while ( c != ancestorClass->childNodes().end() ) { if ( (*c)->access() == Node::Public ) insert( all, *c, style, status ); ++c; } QList<RelatedClass>::ConstIterator r = ancestorClass->baseClasses().begin(); while ( r != ancestorClass->baseClasses().end() ) { stack.prepend( (*r).node ); ++r; } } append( sections, all ); } return sections; } const Node *QsCodeMarker::resolveTarget( const QString& /* target */, const Tree * /* tree */, const Node * /* relative */ ) { return 0; }
muromec/qtopia-ezx
qtopiacore/qt/tools/qdoc3/qscodemarker.cpp
C++
gpl-2.0
11,397
<?php defined('_JEXEC') or die('Restricted access'); ?> <?php $itemid = JoomdleHelperContent::getMenuItem(); ?> <div class="joomdle-userlist<?php echo $this->pageclass_sfx;?>"> <?php if ($this->params->get('show_page_heading', 1)) : ?> <h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1> <?php endif; ?> <?php if (is_array ($this->teachers)) foreach ($this->teachers as $teacher) : $user_info = JoomdleHelperMappings::get_user_info_for_joomla ($teacher['username']); if (!count ($user_info)) //not a Joomla user continue; ?> <div class="joomdle_user_list_item"> <div class="joomdle_user_list_item_pic"> <?php // Use thumbs if available if ((array_key_exists ('thumb_url', $user_info)) && ($user_info['thumb_url'] != '')) $user_info['pic_url'] = $user_info['thumb_url']; ?> <a href="<?php echo JRoute::_("index.php?option=com_joomdle&view=teacher&username=".$teacher['username']."&Itemid=$itemid"); ?>"><img height='64' width='64' src="<?php echo $user_info['pic_url']; ?>"></a> </div> <div class="joomdle_user_list_item_name"> <a href="<?php echo JRoute::_("index.php?option=com_joomdle&view=teacher&username=".$teacher['username']."&Itemid=$itemid"); ?>"><?php echo $teacher['firstname']." ".$teacher['lastname']; ?></a> </div> </div> <?php endforeach; ?> </div>
alons182/uninpe
components/com_joomdle/views/teachersabc/tmpl/default.php
PHP
gpl-2.0
1,444
/* Copyright_License { XCSoar Glide Computer - http://www.xcsoar.org/ Copyright (C) 2000-2015 The XCSoar Project A detailed list of copyright holders can be found in the file "AUTHORS". 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. } */ #include "GlobalIOThread.hpp" #include "IOThread.hpp" IOThread *io_thread; void InitialiseIOThread() { assert(io_thread == NULL); io_thread = new IOThread(); io_thread->Start(); } void DeinitialiseIOThread() { io_thread->Stop(); delete io_thread; io_thread = nullptr; }
f-penguin/xcsoar
src/IO/Async/GlobalIOThread.cpp
C++
gpl-2.0
1,186
/** * @file * @brief shared alias model loading code (md2, md3) */ /* Copyright (C) 1997-2001 Id Software, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "r_local.h" #include "../../shared/parse.h" #include "r_state.h" /* ============================================================================== ALIAS MODELS ============================================================================== */ void R_ModLoadAnims (mAliasModel_t *mod, const char *animname) { const char *text, *token; mAliasAnim_t *anim; int n; /* load the tags */ byte *animbuf = NULL; const char *buffer; FS_LoadFile(animname, &animbuf); buffer = (const char *)animbuf; /* count the animations */ n = Com_CountTokensInBuffer(buffer); if ((n % 4) != 0) { FS_FreeFile(animbuf); Com_Error(ERR_DROP, "invalid syntax: %s", animname); } /* each animation definition is made out of 4 tokens */ n /= 4; if (n > MAX_ANIMS) n = MAX_ANIMS; mod->animdata = Mem_PoolAllocTypeN(mAliasAnim_t, n, vid_modelPool); anim = mod->animdata; text = buffer; mod->num_anims = 0; do { /* get the name */ token = Com_Parse(&text); if (!text) break; Q_strncpyz(anim->name, token, sizeof(anim->name)); /* get the start */ token = Com_Parse(&text); if (!text) break; anim->from = atoi(token); if (anim->from < 0) Com_Error(ERR_FATAL, "R_ModLoadAnims: negative start frame for %s", animname); else if (anim->from > mod->num_frames) Com_Error(ERR_FATAL, "R_ModLoadAnims: start frame is higher than models frame count (%i) (model: %s)", mod->num_frames, animname); /* get the end */ token = Com_Parse(&text); if (!text) break; anim->to = atoi(token); if (anim->to < 0) Com_Error(ERR_FATAL, "R_ModLoadAnims: negative end frame for %s", animname); else if (anim->to > mod->num_frames) Com_Error(ERR_FATAL, "R_ModLoadAnims: end frame is higher than models frame count (%i) (model: %s)", mod->num_frames, animname); /* get the fps */ token = Com_Parse(&text); if (!text) break; anim->time = (atof(token) > 0.01) ? (1000.0 / atof(token)) : (1000.0 / 0.01); /* add it */ mod->num_anims++; anim++; } while (mod->num_anims < n); FS_FreeFile(animbuf); } /** * @brief Calculates a per-vertex tangentspace basis and stores it in GL arrays attached to the mesh * @param mesh The mesh to calculate normals for * @param framenum The animation frame to calculate normals for * @param translate The frame translation for the given animation frame * @param backlerp Whether to store the results in the GL arrays for the previous keyframe or the next keyframe * @sa R_ModCalcUniqueNormalsAndTangents */ static void R_ModCalcNormalsAndTangents (mAliasMesh_t *mesh, int framenum, const vec3_t translate, bool backlerp) { int i, j; mAliasVertex_t *vertexes = &mesh->vertexes[framenum * mesh->num_verts]; mAliasCoord_t *stcoords = mesh->stcoords; const int numIndexes = mesh->num_tris * 3; const int32_t *indexArray = mesh->indexes; vec3_t triangleNormals[MAX_ALIAS_TRIS]; vec3_t triangleTangents[MAX_ALIAS_TRIS]; vec3_t triangleBitangents[MAX_ALIAS_TRIS]; float *texcoords, *verts, *normals, *tangents; /* set up array pointers for either the previous keyframe or the next keyframe */ texcoords = mesh->texcoords; if (backlerp) { verts = mesh->verts; normals = mesh->normals; tangents = mesh->tangents; } else { verts = mesh->next_verts; normals = mesh->next_normals; tangents = mesh->next_tangents; } /* calculate per-triangle surface normals and tangents*/ for (i = 0, j = 0; i < numIndexes; i += 3, j++) { vec3_t dir1, dir2; vec2_t dir1uv, dir2uv; /* calculate two mostly perpendicular edge directions */ VectorSubtract(vertexes[indexArray[i + 0]].point, vertexes[indexArray[i + 1]].point, dir1); VectorSubtract(vertexes[indexArray[i + 2]].point, vertexes[indexArray[i + 1]].point, dir2); Vector2Subtract(stcoords[indexArray[i + 0]], stcoords[indexArray[i + 1]], dir1uv); Vector2Subtract(stcoords[indexArray[i + 2]], stcoords[indexArray[i + 1]], dir2uv); /* we have two edge directions, we can calculate a third vector from * them, which is the direction of the surface normal */ CrossProduct(dir1, dir2, triangleNormals[j]); /* normalize */ VectorNormalizeFast(triangleNormals[j]); /* then we use the texture coordinates to calculate a tangent space */ if ((dir1uv[1] * dir2uv[0] - dir1uv[0] * dir2uv[1]) != 0.0) { const float frac = 1.0 / (dir1uv[1] * dir2uv[0] - dir1uv[0] * dir2uv[1]); vec3_t tmp1, tmp2; /* calculate tangent */ VectorMul(-1.0 * dir2uv[1] * frac, dir1, tmp1); VectorMul(dir1uv[1] * frac, dir2, tmp2); VectorAdd(tmp1, tmp2, triangleTangents[j]); /* calculate bitangent */ VectorMul(-1.0 * dir2uv[0] * frac, dir1, tmp1); VectorMul(dir1uv[0] * frac, dir2, tmp2); VectorAdd(tmp1, tmp2, triangleBitangents[j]); /* normalize */ VectorNormalizeFast(triangleTangents[j]); VectorNormalizeFast(triangleBitangents[j]); } else { VectorClear(triangleTangents[j]); VectorClear(triangleBitangents[j]); } } /* for each vertex */ for (i = 0; i < mesh->num_verts; i++) { vec3_t n, b, v; vec4_t t; const int len = mesh->revIndexes[i].length; const int32_t *list = mesh->revIndexes[i].list; VectorClear(n); VectorClear(t); VectorClear(b); /* for each vertex that got mapped to this one (ie. for each triangle this vertex is a part of) */ for (j = 0; j < len; j++) { const int32_t idx = list[j] / 3; VectorAdd(n, triangleNormals[idx], n); VectorAdd(t, triangleTangents[idx], t); VectorAdd(b, triangleBitangents[idx], b); } /* normalization here does shared-vertex smoothing */ VectorNormalizeFast(n); VectorNormalizeFast(t); VectorNormalizeFast(b); /* Grahm-Schmidt orthogonalization */ Orthogonalize(t, n); /* calculate handedness */ CrossProduct(n, t, v); t[3] = (DotProduct(v, b) < 0.0) ? -1.0 : 1.0; /* copy this vertex's info to all the right places in the arrays */ for (j = 0; j < len; j++) { const int32_t idx = list[j]; const int meshIndex = mesh->indexes[list[j]]; Vector2Copy(stcoords[meshIndex], (texcoords + (2 * idx))); VectorAdd(vertexes[meshIndex].point, translate, (verts + (3 * idx))); VectorCopy(n, (normals + (3 * idx))); Vector4Copy(t, (tangents + (4 * idx))); } } } /** * @brief Tries to load a mdx file that contains the normals and the tangents for a model. * @sa R_ModCalcNormalsAndTangents * @sa R_ModCalcUniqueNormalsAndTangents * @param mod The model to load the mdx file for */ bool R_ModLoadMDX (model_t *mod) { int i; for (i = 0; i < mod->alias.num_meshes; i++) { mAliasMesh_t *mesh = &mod->alias.meshes[i]; char mdxFileName[MAX_QPATH]; byte *buffer = NULL, *buf; const int32_t *intbuf; uint32_t version; int sharedTris[MAX_ALIAS_VERTS]; Com_StripExtension(mod->name, mdxFileName, sizeof(mdxFileName)); Com_DefaultExtension(mdxFileName, sizeof(mdxFileName), ".mdx"); if (FS_LoadFile(mdxFileName, &buffer) == -1) return false; buf = buffer; if (strncmp((const char *) buf, IDMDXHEADER, strlen(IDMDXHEADER))) { FS_FreeFile(buf); Com_Error(ERR_DROP, "No mdx file buffer given"); } buffer += strlen(IDMDXHEADER) * sizeof(char); version = LittleLong(*(uint32_t*) buffer); if (version != MDX_VERSION) { FS_FreeFile(buf); Com_Error(ERR_DROP, "Invalid version of the mdx file, expected %i, found %i", MDX_VERSION, version); } buffer += sizeof(uint32_t); intbuf = (const int32_t *) buffer; mesh->num_verts = LittleLong(*intbuf); if (mesh->num_verts <= 0 || mesh->num_verts > MAX_ALIAS_VERTS) { FS_FreeFile(buf); Com_Error(ERR_DROP, "mdx file for %s has to many (or no) vertices: %i", mod->name, mesh->num_verts); } intbuf++; mesh->num_indexes = LittleLong(*intbuf); intbuf++; mesh->indexes = Mem_PoolAllocTypeN(int32_t, mesh->num_indexes, vid_modelPool); mesh->revIndexes = Mem_PoolAllocTypeN(mIndexList_t, mesh->num_verts, vid_modelPool); mesh->vertexes = Mem_PoolAllocTypeN(mAliasVertex_t, mesh->num_verts * mod->alias.num_frames, vid_modelPool); /* load index that maps triangle verts to Vertex objects */ for (i = 0; i < mesh->num_indexes; i++) { mesh->indexes[i] = LittleLong(*intbuf); intbuf++; } for (i = 0; i < mesh->num_verts; i++) sharedTris[i] = 0; /* set up reverse-index that maps Vertex objects to a list of triangle verts */ for (i = 0; i < mesh->num_indexes; i++) sharedTris[mesh->indexes[i]]++; for (i = 0; i < mesh->num_verts; i++) { mesh->revIndexes[i].length = 0; mesh->revIndexes[i].list = Mem_PoolAllocTypeN(int32_t, sharedTris[i], vid_modelPool); } for (i = 0; i < mesh->num_indexes; i++) mesh->revIndexes[mesh->indexes[i]].list[mesh->revIndexes[mesh->indexes[i]].length++] = i; FS_FreeFile(buf); } return true; } /** * @brief Calculates normals and tangents for all frames and does vertex merging based on smoothness * @param mesh The mesh to calculate normals for * @param nFrames How many frames the mesh has * @param smoothness How aggressively should normals be smoothed; value is compared with dotproduct of vectors to decide if they should be merged * @sa R_ModCalcNormalsAndTangents */ void R_ModCalcUniqueNormalsAndTangents (mAliasMesh_t *mesh, int nFrames, float smoothness) { int i, j; vec3_t triangleNormals[MAX_ALIAS_TRIS]; vec3_t triangleTangents[MAX_ALIAS_TRIS]; vec3_t triangleBitangents[MAX_ALIAS_TRIS]; const mAliasVertex_t *vertexes = mesh->vertexes; mAliasCoord_t *stcoords = mesh->stcoords; mAliasComplexVertex_t tmpVertexes[MAX_ALIAS_VERTS]; vec3_t tmpBitangents[MAX_ALIAS_VERTS]; const int numIndexes = mesh->num_tris * 3; const int32_t *indexArray = mesh->indexes; int indRemap[MAX_ALIAS_VERTS]; int sharedTris[MAX_ALIAS_VERTS]; int numVerts = 0; if (numIndexes >= MAX_ALIAS_VERTS) Com_Error(ERR_DROP, "model %s has too many tris", mesh->name); int32_t* const newIndexArray = Mem_PoolAllocTypeN(int32_t, numIndexes, vid_modelPool); /* calculate per-triangle surface normals */ for (i = 0, j = 0; i < numIndexes; i += 3, j++) { vec3_t dir1, dir2; vec2_t dir1uv, dir2uv; /* calculate two mostly perpendicular edge directions */ VectorSubtract(vertexes[indexArray[i + 0]].point, vertexes[indexArray[i + 1]].point, dir1); VectorSubtract(vertexes[indexArray[i + 2]].point, vertexes[indexArray[i + 1]].point, dir2); Vector2Subtract(stcoords[indexArray[i + 0]], stcoords[indexArray[i + 1]], dir1uv); Vector2Subtract(stcoords[indexArray[i + 2]], stcoords[indexArray[i + 1]], dir2uv); /* we have two edge directions, we can calculate a third vector from * them, which is the direction of the surface normal */ CrossProduct(dir1, dir2, triangleNormals[j]); /* then we use the texture coordinates to calculate a tangent space */ if ((dir1uv[1] * dir2uv[0] - dir1uv[0] * dir2uv[1]) != 0.0) { const float frac = 1.0 / (dir1uv[1] * dir2uv[0] - dir1uv[0] * dir2uv[1]); vec3_t tmp1, tmp2; /* calculate tangent */ VectorMul(-1.0 * dir2uv[1] * frac, dir1, tmp1); VectorMul(dir1uv[1] * frac, dir2, tmp2); VectorAdd(tmp1, tmp2, triangleTangents[j]); /* calculate bitangent */ VectorMul(-1.0 * dir2uv[0] * frac, dir1, tmp1); VectorMul(dir1uv[0] * frac, dir2, tmp2); VectorAdd(tmp1, tmp2, triangleBitangents[j]); } else { const float frac = 1.0 / (0.00001); vec3_t tmp1, tmp2; /* calculate tangent */ VectorMul(-1.0 * dir2uv[1] * frac, dir1, tmp1); VectorMul(dir1uv[1] * frac, dir2, tmp2); VectorAdd(tmp1, tmp2, triangleTangents[j]); /* calculate bitangent */ VectorMul(-1.0 * dir2uv[0] * frac, dir1, tmp1); VectorMul(dir1uv[0] * frac, dir2, tmp2); VectorAdd(tmp1, tmp2, triangleBitangents[j]); } /* normalize */ VectorNormalizeFast(triangleNormals[j]); VectorNormalizeFast(triangleTangents[j]); VectorNormalizeFast(triangleBitangents[j]); Orthogonalize(triangleTangents[j], triangleBitangents[j]); } /* do smoothing */ for (i = 0; i < numIndexes; i++) { const int idx = (i - i % 3) / 3; VectorCopy(triangleNormals[idx], tmpVertexes[i].normal); VectorCopy(triangleTangents[idx], tmpVertexes[i].tangent); VectorCopy(triangleBitangents[idx], tmpBitangents[i]); for (j = 0; j < numIndexes; j++) { const int idx2 = (j - j % 3) / 3; /* don't add a vertex with itself */ if (j == i) continue; /* only average normals if vertices have the same position * and the normals aren't too far apart to start with */ if (VectorEqual(vertexes[indexArray[i]].point, vertexes[indexArray[j]].point) && DotProduct(triangleNormals[idx], triangleNormals[idx2]) > smoothness) { /* average the normals */ VectorAdd(tmpVertexes[i].normal, triangleNormals[idx2], tmpVertexes[i].normal); /* if the tangents match as well, average them too. * Note that having matching normals without matching tangents happens * when the order of vertices in two triangles sharing the vertex * in question is different. This happens quite frequently if the * modeler does not go out of their way to avoid it. */ if (Vector2Equal(stcoords[indexArray[i]], stcoords[indexArray[j]]) && DotProduct(triangleTangents[idx], triangleTangents[idx2]) > smoothness && DotProduct(triangleBitangents[idx], triangleBitangents[idx2]) > smoothness) { /* average the tangents */ VectorAdd(tmpVertexes[i].tangent, triangleTangents[idx2], tmpVertexes[i].tangent); VectorAdd(tmpBitangents[i], triangleBitangents[idx2], tmpBitangents[i]); } } } VectorNormalizeFast(tmpVertexes[i].normal); VectorNormalizeFast(tmpVertexes[i].tangent); VectorNormalizeFast(tmpBitangents[i]); } /* assume all vertices are unique until proven otherwise */ for (i = 0; i < numIndexes; i++) indRemap[i] = -1; /* merge vertices that have become identical */ for (i = 0; i < numIndexes; i++) { vec3_t n, b, t, v; if (indRemap[i] != -1) continue; for (j = i + 1; j < numIndexes; j++) { if (Vector2Equal(stcoords[indexArray[i]], stcoords[indexArray[j]]) && VectorEqual(vertexes[indexArray[i]].point, vertexes[indexArray[j]].point) && (DotProduct(tmpVertexes[i].normal, tmpVertexes[j].normal) > smoothness) && (DotProduct(tmpVertexes[i].tangent, tmpVertexes[j].tangent) > smoothness)) { indRemap[j] = i; newIndexArray[j] = numVerts; } } VectorCopy(tmpVertexes[i].normal, n); VectorCopy(tmpVertexes[i].tangent, t); VectorCopy(tmpBitangents[i], b); /* normalization here does shared-vertex smoothing */ VectorNormalizeFast(n); VectorNormalizeFast(t); VectorNormalizeFast(b); /* Grahm-Schmidt orthogonalization */ VectorMul(DotProduct(t, n), n, v); VectorSubtract(t, v, t); VectorNormalizeFast(t); /* calculate handedness */ CrossProduct(n, t, v); tmpVertexes[i].tangent[3] = (DotProduct(v, b) < 0.0) ? -1.0 : 1.0; VectorCopy(n, tmpVertexes[i].normal); VectorCopy(t, tmpVertexes[i].tangent); newIndexArray[i] = numVerts++; indRemap[i] = i; } for (i = 0; i < numVerts; i++) sharedTris[i] = 0; for (i = 0; i < numIndexes; i++) sharedTris[newIndexArray[i]]++; /* set up reverse-index that maps Vertex objects to a list of triangle verts */ mesh->revIndexes = Mem_PoolAllocTypeN(mIndexList_t, numVerts, vid_modelPool); for (i = 0; i < numVerts; i++) { mesh->revIndexes[i].length = 0; mesh->revIndexes[i].list = Mem_PoolAllocTypeN(int32_t, sharedTris[i], vid_modelPool); } /* merge identical vertexes, storing only unique ones */ mAliasVertex_t* const newVertexes = Mem_PoolAllocTypeN(mAliasVertex_t, numVerts * nFrames, vid_modelPool); mAliasCoord_t* const newStcoords = Mem_PoolAllocTypeN(mAliasCoord_t, numVerts, vid_modelPool); for (i = 0; i < numIndexes; i++) { const int idx = indexArray[indRemap[i]]; const int idx2 = newIndexArray[i]; /* add vertex to new vertex array */ VectorCopy(vertexes[idx].point, newVertexes[idx2].point); Vector2Copy(stcoords[idx], newStcoords[idx2]); mesh->revIndexes[idx2].list[mesh->revIndexes[idx2].length++] = i; } /* copy over the points from successive frames */ for (i = 1; i < nFrames; i++) { for (j = 0; j < numIndexes; j++) { const int idx = indexArray[indRemap[j]] + (mesh->num_verts * i); const int idx2 = newIndexArray[j] + (numVerts * i); VectorCopy(vertexes[idx].point, newVertexes[idx2].point); } } /* copy new arrays back into original mesh */ Mem_Free(mesh->stcoords); Mem_Free(mesh->indexes); Mem_Free(mesh->vertexes); mesh->num_verts = numVerts; mesh->vertexes = newVertexes; mesh->stcoords = newStcoords; mesh->indexes = newIndexArray; } image_t* R_AliasModelGetSkin (const char *modelFileName, const char *skin) { image_t* result; if (skin[0] != '.') result = R_FindImage(skin, it_skin); else { char path[MAX_QPATH]; Com_ReplaceFilename(modelFileName, skin + 1, path, sizeof(path)); result = R_FindImage(path, it_skin); } return result; } image_t* R_AliasModelState (const model_t *mod, int *mesh, int *frame, int *oldFrame, int *skin) { /* check animations */ if ((*frame >= mod->alias.num_frames) || *frame < 0) { Com_Printf("R_AliasModelState %s: no such frame %d (# %i)\n", mod->name, *frame, mod->alias.num_frames); *frame = 0; } if ((*oldFrame >= mod->alias.num_frames) || *oldFrame < 0) { Com_Printf("R_AliasModelState %s: no such oldframe %d (# %i)\n", mod->name, *oldFrame, mod->alias.num_frames); *oldFrame = 0; } if (*mesh < 0 || *mesh >= mod->alias.num_meshes) *mesh = 0; if (!mod->alias.meshes) return NULL; /* use default skin - this is never null - but maybe the placeholder texture */ if (*skin < 0 || *skin >= mod->alias.meshes[*mesh].num_skins) *skin = 0; if (!mod->alias.meshes[*mesh].num_skins) Com_Error(ERR_DROP, "Model with no skins"); if (mod->alias.meshes[*mesh].skins[*skin].skin->texnum <= 0) Com_Error(ERR_DROP, "Texture is already freed and no longer uploaded, texnum is invalid for model %s", mod->name); return mod->alias.meshes[*mesh].skins[*skin].skin; } /** * @brief Converts the model data into the opengl arrays * @param mod The model to convert * @param mesh The particular mesh of the model to convert * @param backlerp The linear back interpolation when loading the data * @param framenum The frame number of the mesh to load (if animated) * @param oldframenum The old frame number (used to interpolate) * @param prerender If this is @c true, all data is filled to the arrays. If @c false, then * e.g. the normals are only filled to the arrays if the lighting is activated. * * @note If GLSL programs are enabled, the actual interpolation will be done on the GPU, but * this function is still needed to fill the GL arrays for the keyframes */ void R_FillArrayData (mAliasModel_t* mod, mAliasMesh_t *mesh, float backlerp, int framenum, int oldframenum, bool prerender) { const mAliasFrame_t *frame, *oldframe; vec3_t move; const float frontlerp = 1.0 - backlerp; vec3_t r_mesh_verts[MAX_ALIAS_VERTS]; vec_t *texcoord_array, *vertex_array_3d; frame = mod->frames + framenum; oldframe = mod->frames + oldframenum; /* try to do keyframe-interpolation on the GPU if possible*/ if (r_state.lighting_enabled) { /* we only need to change the array data if we've switched to a new keyframe */ if (mod->curFrame != framenum) { /* if we're rendering frames in order, the "next" keyframe from the previous * time through will be our "previous" keyframe now, so we can swap pointers * instead of generating it again from scratch */ if (mod->curFrame == oldframenum) { vec_t *tmp1 = mesh->verts; vec_t *tmp2 = mesh->normals; vec_t *tmp3 = mesh->tangents; mesh->verts = mesh->next_verts; mesh->next_verts = tmp1; mesh->normals = mesh->next_normals; mesh->next_normals = tmp2; mesh->tangents = mesh->next_tangents; mesh->next_tangents = tmp3; /* if we're alternating between two keyframes, we don't need to generate * anything; otherwise, generate the "next" keyframe*/ if (mod->oldFrame != framenum) R_ModCalcNormalsAndTangents(mesh, framenum, frame->translate, false); } else { /* if we're starting a new animation or otherwise not rendering keyframes * in order, we need to fill the arrays for both keyframes */ R_ModCalcNormalsAndTangents(mesh, oldframenum, oldframe->translate, true); R_ModCalcNormalsAndTangents(mesh, framenum, frame->translate, false); } /* keep track of which keyframes are currently stored in our arrays */ mod->oldFrame = oldframenum; mod->curFrame = framenum; } } else { /* otherwise, we have to do it on the CPU */ const mAliasVertex_t *v, *ov; int i; assert(mesh->num_verts < lengthof(r_mesh_verts)); v = &mesh->vertexes[framenum * mesh->num_verts]; ov = &mesh->vertexes[oldframenum * mesh->num_verts]; if (prerender) R_ModCalcNormalsAndTangents(mesh, 0, oldframe->translate, true); for (i = 0; i < 3; i++) move[i] = backlerp * oldframe->translate[i] + frontlerp * frame->translate[i]; for (i = 0; i < mesh->num_verts; i++, v++, ov++) { /* lerp the verts */ VectorSet(r_mesh_verts[i], move[0] + ov->point[0] * backlerp + v->point[0] * frontlerp, move[1] + ov->point[1] * backlerp + v->point[1] * frontlerp, move[2] + ov->point[2] * backlerp + v->point[2] * frontlerp); } R_ReallocateStateArrays(mesh->num_tris * 3); R_ReallocateTexunitArray(&texunit_diffuse, mesh->num_tris * 3); texcoord_array = texunit_diffuse.texcoord_array; vertex_array_3d = r_state.vertex_array_3d; /** @todo damn slow - optimize this */ for (i = 0; i < mesh->num_tris; i++) { /* draw the tris */ int j; for (j = 0; j < 3; j++) { const int arrayIndex = 3 * i + j; const int meshIndex = mesh->indexes[arrayIndex]; Vector2Copy(mesh->stcoords[meshIndex], texcoord_array); VectorCopy(r_mesh_verts[meshIndex], vertex_array_3d); texcoord_array += 2; vertex_array_3d += 3; } } } } /** * @brief Allocates data arrays for animated models. Only called once at loading time. */ void R_ModLoadArrayData (mAliasModel_t *mod, mAliasMesh_t *mesh, bool loadNormals) { const int v = mesh->num_tris * 3 * 3; const int t = mesh->num_tris * 3 * 4; const int st = mesh->num_tris * 3 * 2; assert(mesh->verts == NULL); assert(mesh->texcoords == NULL); assert(mesh->normals == NULL); assert(mesh->tangents == NULL); assert(mesh->next_verts == NULL); assert(mesh->next_normals == NULL); assert(mesh->next_tangents == NULL); mesh->verts = Mem_PoolAllocTypeN(float, v, vid_modelPool); mesh->normals = Mem_PoolAllocTypeN(float, v, vid_modelPool); mesh->tangents = Mem_PoolAllocTypeN(float, t, vid_modelPool); mesh->texcoords = Mem_PoolAllocTypeN(float, st, vid_modelPool); if (mod->num_frames == 1) { R_FillArrayData(mod, mesh, 0.0, 0, 0, loadNormals); } else { mesh->next_verts = Mem_PoolAllocTypeN(float, v, vid_modelPool); mesh->next_normals = Mem_PoolAllocTypeN(float, v, vid_modelPool); mesh->next_tangents = Mem_PoolAllocTypeN(float, t, vid_modelPool); mod->curFrame = -1; mod->oldFrame = -1; } }
Qazzian/ufoai_suspend
src/client/renderer/r_model_alias.cpp
C++
gpl-2.0
23,883
<?php /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2007 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * File Name: commands.php * This is the File Manager Connector for PHP. * * File Authors: * Frederico Caldeira Knabben (www.fckeditor.net) */ function GetFolders( $resourceType, $currentFolder ) { // Map the virtual path to the local server path. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; // Array that will hold the folders names. $aFolders = array() ; $oCurrentFolder = opendir( $sServerDir ) ; while ( $sFile = readdir( $oCurrentFolder ) ) { if ( $sFile != '.' && $sFile != '..' && is_dir( $sServerDir . $sFile ) ) $aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ; } closedir( $oCurrentFolder ) ; // Open the "Folders" node. echo "<Folders>" ; natcasesort( $aFolders ) ; foreach ( $aFolders as $sFolder ) echo $sFolder ; // Close the "Folders" node. echo "</Folders>" ; } function GetFoldersAndFiles( $resourceType, $currentFolder ) { // Map the virtual path to the local server path. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; // Arrays that will hold the folders and files names. $aFolders = array() ; $aFiles = array() ; $oCurrentFolder = opendir( $sServerDir ) ; while ( $sFile = readdir( $oCurrentFolder ) ) { if ( $sFile != '.' && $sFile != '..' ) { if ( is_dir( $sServerDir . $sFile ) ) $aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ; else { $iFileSize = filesize( $sServerDir . $sFile ) ; if ( $iFileSize > 0 ) { $iFileSize = round( $iFileSize / 1024 ) ; if ( $iFileSize < 1 ) $iFileSize = 1 ; } $aFiles[] = '<File name="' . ConvertToXmlAttribute( $sFile ) . '" size="' . $iFileSize . '" />' ; } } } // Send the folders natcasesort( $aFolders ) ; echo '<Folders>' ; foreach ( $aFolders as $sFolder ) echo $sFolder ; echo '</Folders>' ; // Send the files natcasesort( $aFiles ) ; echo '<Files>' ; foreach ( $aFiles as $sFiles ) echo $sFiles ; echo '</Files>' ; } function CreateFolder( $resourceType, $currentFolder ) { $sErrorNumber = '0' ; $sErrorMsg = '' ; if ( isset( $_GET['NewFolderName'] ) ) { $sNewFolderName = $_GET['NewFolderName'] ; if ( strpos( $sNewFolderName, '..' ) !== FALSE ) $sErrorNumber = '102' ; // Invalid folder name. else { // Map the virtual path to the local server path of the current folder. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; if ( is_writable( $sServerDir ) ) { $sServerDir .= $sNewFolderName ; $sErrorMsg = CreateServerFolder( $sServerDir ) ; switch ( $sErrorMsg ) { case '' : $sErrorNumber = '0' ; break ; case 'Invalid argument' : case 'No such file or directory' : $sErrorNumber = '102' ; // Path too long. break ; default : $sErrorNumber = '110' ; break ; } } else $sErrorNumber = '103' ; } } else $sErrorNumber = '102' ; // Create the "Error" node. echo '<Error number="' . $sErrorNumber . '" originalDescription="' . ConvertToXmlAttribute( $sErrorMsg ) . '" />' ; } function FileUpload( $resourceType, $currentFolder ) { $sErrorNumber = '0' ; $sFileName = '' ; if ( isset( $_FILES['NewFile'] ) && !is_null( $_FILES['NewFile']['tmp_name'] ) ) { global $Config ; $oFile = $_FILES['NewFile'] ; // Map the virtual path to the local server path. $sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ; // Get the uploaded file name. $sFileName = $oFile['name'] ; // Replace dots in the name with underscores (only one dot can be there... security issue). if ( $Config['ForceSingleExtension'] ) $sFileName = preg_replace( '/\\.(?![^.]*$)/', '_', $sFileName ) ; $sOriginalFileName = $sFileName ; // Get the extension. $sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ; $sExtension = strtolower( $sExtension ) ; $arAllowed = $Config['AllowedExtensions'][$resourceType] ; $arDenied = $Config['DeniedExtensions'][$resourceType] ; if ( ( count($arAllowed) == 0 || in_array( $sExtension, $arAllowed ) ) && ( count($arDenied) == 0 || !in_array( $sExtension, $arDenied ) ) ) { $iCounter = 0 ; while ( true ) { $sFilePath = $sServerDir . $sFileName ; if ( is_file( $sFilePath ) ) { $iCounter++ ; $sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ; $sErrorNumber = '201' ; } else { move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ; if ( is_file( $sFilePath ) ) { $oldumask = umask(0) ; chmod( $sFilePath, 0777 ) ; umask( $oldumask ) ; } break ; } } } else $sErrorNumber = '202' ; } else $sErrorNumber = '202' ; echo '<script type="text/javascript">' ; echo 'window.parent.frames["frmUpload"].OnUploadCompleted(' . $sErrorNumber . ',"' . str_replace( '"', '\\"', $sFileName ) . '") ;' ; echo '</script>' ; exit ; } ?>
grlf/eyedock
javascript/scribite_editors/fckeditor/editor/filemanager/browser/default/connectors/php/commands.php
PHP
gpl-2.0
5,598
/* * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ package javax.lang.model.type; /** * Indicates that an unknown kind of type was encountered. This can * occur if the language evolves and new kinds of types are added to * the {@code TypeMirror} hierarchy. May be thrown by a {@linkplain * TypeVisitor type visitor} to indicate that the visitor was created * for a prior version of the language. * * @author Joseph D. Darcy * @author Scott Seligman * @author Peter von der Ah&eacute; * @see TypeVisitor#visitUnknown * @since 1.6 */ public class UnknownTypeException extends RuntimeException { private static final long serialVersionUID = 269L; private transient TypeMirror type; private transient Object parameter; /** * Creates a new {@code UnknownTypeException}.The {@code p} * parameter may be used to pass in an additional argument with * information about the context in which the unknown type was * encountered; for example, the visit methods of {@link * TypeVisitor} may pass in their additional parameter. * * @param t the unknown type, may be {@code null} * @param p an additional parameter, may be {@code null} */ public UnknownTypeException(TypeMirror t, Object p) { super("Unknown type: " + t); type = t; this.parameter = p; } /** * Returns the unknown type. * The value may be unavailable if this exception has been * serialized and then read back in. * * @return the unknown type, or {@code null} if unavailable */ public TypeMirror getUnknownType() { return type; } /** * Returns the additional argument. * * @return the additional argument */ public Object getArgument() { return parameter; } }
unktomi/form-follows-function
mjavac/langtools/src/share/classes/javax/lang/model/type/UnknownTypeException.java
Java
gpl-2.0
2,970
/* * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ /* * @test * @bug 4881205 * @summary generics: array as generic argument type fails * @author gafter * * @compile -source 1.5 ArrayTypearg.java */ import java.util.List; import java.util.ArrayList; class ArrayTypearg { private void foo() { List<Object[]> list = new ArrayList<Object[]>(); Object o1 = list.get(0)[0]; } }
unktomi/form-follows-function
mjavac/langtools/test/tools/javac/generics/ArrayTypearg.java
Java
gpl-2.0
1,406
package co.edu.uniandes.csw.marketplace.providers; import javax.ws.rs.NameBinding; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @NameBinding @Retention(RetentionPolicy.RUNTIME) public @interface StatusCreated {}
MISO4203-201520/mp-books
MarketPlace.web/src/main/java/co/edu/uniandes/csw/marketplace/providers/StatusCreated.java
Java
gpl-2.0
253
/* * RAFTools - Copyright (C) 2016 Zane van Iperen. * Contact: zane@zanevaniperen.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, and only * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Any and all GPL restrictions may be circumvented with permission from the * the original author. */ package net.vs49688.rafview.wwise.objects; import java.nio.*; public class EventActionObject extends WwiseObject { public EventActionObject(int id, long length, ByteBuffer bb) { super(id, length); } }
vs49688/RAFTools
src/main/java/net/vs49688/rafview/wwise/objects/EventActionObject.java
Java
gpl-2.0
1,110
<?php if(!empty($_POST['email'])) { $data['firstname'] = $_POST['firstname']; $data['surname'] = $_POST['surname']; $data['email'] = $_POST['email']; $data['phone'] = sha1($_POST['phone']); $data['ipinterests'] = $_POST['ipinterests']; $data['displayvillage'] = $_POST['displayvillage']; $data['contactyou'] = $_POST['contactyou']; $sendmail = contact_form($data['firstname'],$data['surname'], $data['email'],$data['phone'],$data['ipinterests'],$data['displayvillage'], $data['contactyou']); if($sendmail){ $message = "Send message successful"; } else $message = 'Current can not send message. Please try again.'; } ?> <div class="span4 rightContact"> <h2>Contact Us</h2> <?php if($message != "") { $alert = $logged == true ? "alert-success" : "alert-danger"; echo '<div class="alert '.$alert.'">'.$message.'</div>'; } ?> <form action="" id="contactForm" method="post"> <p> <select class="select" name="sexoption"> <option value="mr">Mr.</option> <option value="mrs">Mrs.</option> </select> </p> <p> <input value="" type="text" name="firstname" placeholder="First Name (Required)"/> </p> <p> <input value="" type="text" name="surname" placeholder="Surname"/> </p> <p> <input id="email" value="" type="text" name="email" placeholder="Email Address (Required)"/> </p> <p> <input value="" type="text" name="phone" placeholder="Phone (Required)"/> </p> <div class="partiBox"> <h4>Particular Interests <span>(Required)</span></h4> <ul> <li class="checkboxStyle"> <input type="checkbox" id="interest01" name="ipinterests" class="ipinterests"> <label for="interest01"> Building a new home on vacant land </label> </li> <li class="checkboxStyle"> <input type="checkbox" id="interest02" name="ipinterests" class="ipinterests"> <label for="interest02"> Knockdown Rebuild (KDR) </label> </li> <li class="checkboxStyle"> <input type="checkbox" id="interest03" name="ipinterests" class="ipinterests"> <label for="interest03"> Home & Land Package </label> </li> <li class="checkboxStyle"> <input type="checkbox" id="interest04" name="ipinterests" class="ipinterests"> <label for="interest04"> Dual Occupancy or Duplex </label> </li> <li class="checkboxStyle"> <input type="checkbox" id="interest05" name="ipinterests" class="ipinterests"> <label for="interest05"> Building for Investment </label> </li> <li class="checkboxStyle"> <input type="checkbox" id="interest06" name="ipinterests" class="ipinterests"> <label for="interest06"> Multi Residential </label> </li> </ul> <div class="selectGroup"> <select class="select" name="displayvillage"> <option value="0">Closest Display Village?</option> <option value="display-center-locations">Display Centre Locations</option> <option value="display-home-for-sale">Display Homes for Sale</option> <option value="warwick-farm-display-village">Warwick Farm Display Village</option> </select> <select class="select" name="contactyou"> <option value="0">How should we contact you?</option> <option value="phone">Phone</option> <option value="email">Email</option> </select> </div> </div> <input type="submit" type="SUBMIT" value="SEND"/> </form> </div> <script type="text/javascript"> $(document).ready(function() { jQuery.validator.addMethod('selectcheck', function (value) { return (value != '0'); }, ""); $("#contactForm").validate({ rules: { 'firstname': { required: true }, 'surname': { required: true }, 'phone': { required: true }, 'email': { required: true, email: true }, 'ipinterests': { required: true }, 'displayvillage': { selectcheck: true }, 'contactyou': { selectcheck: true } }, errorPlacement: function(error, element){}, highlight: function(element) { //console.log(element); if($(element).is(':checkbox')) { var name = $(element).attr('name'); $('input[name='+name+']').parent('.checkboxStyle').addClass('error'); } else { $(element).addClass('error'); } }, unhighlight: function(element, errorClass, validClass) { $(element).removeClass(errorClass).addClass(validClass); // remove error class from elements/add valid class $('.checkboxStyle').removeClass(errorClass); // remove error class from ul element for checkbox groups and radio inputs }, submitHandler: function(form) { var boxes = $('.ipinterests:checkbox'); if(boxes.length > 0) { if( $('.ipinterests:checkbox:checked').length < 1) { alert('Please select at least one checkbox'); boxes[0].focus(); return false; } } form.submit(); }, }); }); </script>
nguyenthai2010/realestate
wp-content/themes/realestate/tpl-contact.php
PHP
gpl-2.0
6,562
package com.xebia.googlevrpanorama; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.AsyncTask; import android.support.annotation.UiThread; import android.util.Log; import android.util.Pair; import android.util.LruCache; import android.widget.RelativeLayout; import android.content.res.AssetManager; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.WritableMap; import com.facebook.react.uimanager.events.RCTEventEmitter; import com.google.vr.sdk.widgets.pano.VrPanoramaEventListener; import com.google.vr.sdk.widgets.pano.VrPanoramaView; import com.google.vr.sdk.widgets.pano.VrPanoramaView.Options; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.File; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; import java.lang.Runtime; import javax.annotation.Nullable; import org.apache.commons.io.IOUtils; public class RNGoogleVRPanoramaView extends RelativeLayout { private static final String TAG = RNGoogleVRPanoramaView.class.getSimpleName(); // public static Bitmap bitmap = null; // public Bitmap bitmap = null; private android.os.Handler _handler; private RNGoogleVRPanoramaViewManager _manager; private Activity _activity; private VrPanoramaView panoWidgetView; private ImageLoaderTask imageLoaderTask; private Options panoOptions = new Options(); private LruCache<String, Bitmap> mMemoryCache; private URL imageUrl = null; private String url; private int imageWidth; private int imageHeight; private boolean showFullScreen = false; private boolean showStereo = false; private boolean showInfo = false; private boolean isLocalUrl = false; // Get max available VM memory, exceeding this amount will throw an // OutOfMemory exception. Stored in kilobytes as LruCache takes an // int in its constructor. final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024); // Use 1/8th of the available memory for this memory cache. final int cacheSize = maxMemory / 8; @UiThread public RNGoogleVRPanoramaView(Context context, RNGoogleVRPanoramaViewManager manager, Activity activity) { super(context); _handler = new android.os.Handler(); _manager = manager; _activity = activity; mMemoryCache = new LruCache<String, Bitmap>(cacheSize) { @Override protected int sizeOf(String key, Bitmap bitmap) { // The cache size will be measured in kilobytes rather than // number of items. return bitmap.getByteCount() / 1024; } }; } public void setStereo(boolean showStereo) { this.showStereo = showStereo; } public void setInfo(boolean showInfo) { this.showInfo = showInfo; } public void setFullScreen(boolean showFullScreen) { this.showFullScreen = showFullScreen; } public void clear() { /* Log.d("Surya", "Clearing bitmap"); this.bitmap.recycle(); */ } public void addBitmapToMemoryCache(String key, Bitmap bitmap) { if (getBitmapFromMemCache(key) == null) { mMemoryCache.put(key, bitmap); } } public Bitmap getBitmapFromMemCache(String key) { return mMemoryCache.get(key); } public void onAfterUpdateTransaction(Context context) { panoWidgetView = new VrPanoramaView(_activity); panoWidgetView.setEventListener(new ActivityEventListener()); panoWidgetView.setStereoModeButtonEnabled(showStereo); panoWidgetView.setInfoButtonEnabled(showInfo); panoWidgetView.setFullscreenButtonEnabled(showFullScreen); this.addView(panoWidgetView); if (imageLoaderTask != null) { imageLoaderTask.cancel(true); } imageLoaderTask = new ImageLoaderTask(context); imageLoaderTask.execute(Pair.create(imageUrl, panoOptions)); } public void setImageUrl(String value) { if (imageUrl != null && imageUrl.toString().equals(value)) { return; } url = value; isLocalUrl = true; } public void setDimensions(int width, int height) { this.imageWidth = width; this.imageHeight = height; } public void setInputType(int value) { if (panoOptions.inputType == value) { return; } panoOptions.inputType = value; } class ImageLoaderTask extends AsyncTask<Pair<URL, Options>, Void, Boolean> { private Context mContext; public ImageLoaderTask (Context context){ mContext = context; } protected Boolean doInBackground(Pair<URL, Options>... fileInformation) { /* if (RNGoogleVRPanoramaView.bitmap != null) { RNGoogleVRPanoramaView.bitmap.recycle(); RNGoogleVRPanoramaView.bitmap = null; } */ final URL imageUrl = fileInformation[0].first; Options panoOptions = fileInformation[0].second; InputStream istr = null; Log.d(TAG, "Image loader task is called: " + url); Bitmap image = getBitmapFromMemCache(url); if (image == null) { if (!isLocalUrl) { try { HttpURLConnection connection = (HttpURLConnection) fileInformation[0].first.openConnection(); connection.connect(); istr = connection.getInputStream(); image = decodeSampledBitmap(istr); } catch (IOException e) { Log.e(TAG, "Could not load file: " + e); return false; } finally { try { if (istr!=null) { istr.close(); } } catch (IOException e) { Log.e(TAG, "Could not close input stream: " + e); } } } else { AssetManager assetManager = mContext.getAssets(); try { istr = assetManager.open(url); image = BitmapFactory.decodeStream(istr); } catch (IOException e) { Log.e(TAG, "Could not decode default bitmap: " + e); return false; } } } if (image != null) { //bitmap = image; Log.d(TAG, "Image does exist, so we're adding it to the pano: " + url); //Bitmap temp = getBitmapFromMemCache(url); //RNGoogleVRPanoramaView.bitmap = temp; panoWidgetView.loadImageFromBitmap(image, panoOptions); try { istr.close(); } catch (IOException e) { Log.e(TAG, "Could not close input stream: " + e); } } return true; } private Bitmap decodeSampledBitmap(InputStream inputStream) throws IOException { final byte[] bytes = getBytesFromInputStream(inputStream); BitmapFactory.Options options = new BitmapFactory.Options(); if(imageWidth != 0 && imageHeight != 0) { options.inJustDecodeBounds = true; BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); options.inSampleSize = calculateInSampleSize(options, imageWidth, imageHeight); options.inJustDecodeBounds = false; } return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); } private byte[] getBytesFromInputStream(InputStream inputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); IOUtils.copy(inputStream, baos); return baos.toByteArray(); } private int calculateInSampleSize( BitmapFactory.Options options, int reqWidth, int reqHeight) { // Raw height and width of image final int height = options.outHeight; final int width = options.outWidth; int inSampleSize = 1; if (height > reqHeight || width > reqWidth) { final int halfHeight = height / 2; final int halfWidth = width / 2; // Calculate the largest inSampleSize value that is a power of 2 and keeps both // height and width larger than the requested height and width. while ((halfHeight / inSampleSize) > reqHeight && (halfWidth / inSampleSize) > reqWidth) { inSampleSize *= 2; } } return inSampleSize; } } private class ActivityEventListener extends VrPanoramaEventListener { @Override public void onLoadSuccess() { emitEvent("onImageLoaded", null); } @Override public void onLoadError(String errorMessage) { Log.e(TAG, "Error loading pano: " + errorMessage); emitEvent("onImageLoadingFailed", null); } } void emitEvent(String name, @Nullable WritableMap event) { if (event == null) { event = Arguments.createMap(); } ((ReactContext)getContext()) .getJSModule(RCTEventEmitter.class) .receiveEvent(getId(), name, event); } }
Apacio/react-native-google-vr-panorama
android/src/main/java/com/xebia/googlevrpanorama/RNGoogleVRPanoramaView.java
Java
gpl-2.0
9,255
package model.protocol.osc.touchosc; public class SnappingFader { static final float SNAP_DELTA = 0.1f; private double currentRealValue; public SnappingFader(final double currentRealValue) { this.currentRealValue = currentRealValue; } public void tryUpdate(final double value, final ISnappingFaderEventHandler handler) { if (isInBoundary(value)) { currentRealValue = value; handler.snapSucceeded(); } else { handler.snapFailed(); } } public void forceUpdate(final double value) { currentRealValue = value; } public boolean isInBoundary(final double receivedValue) { return Math.abs(receivedValue - currentRealValue) <= SNAP_DELTA; } }
stereokrauts/stereoscope
stereoscope/src/main/java/model/protocol/osc/touchosc/SnappingFader.java
Java
gpl-2.0
671
package com.holdit.feedthemax; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.ImageButton; import android.widget.RelativeLayout; import android.widget.TextView; import static com.holdit.feedthemax.MainActivity.rbt1qu; import static com.holdit.feedthemax.R.id.rbt1price; import static com.holdit.feedthemax.R.id.rbt2price; import static com.holdit.feedthemax.R.id.rbt3price; /** * Created by Antek on 2017-05-10. * Activity started after robot button pressed */ public class RobotsActivity extends AppCompatActivity { @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.robots_layout); //final MainActivity mact = new MainActivity(); RelativeLayout rbt1rl = (RelativeLayout) findViewById(R.id.rbt1rl); RelativeLayout rbt2rl = (RelativeLayout) findViewById(R.id.rbt2rl); RelativeLayout rbt3rl = (RelativeLayout) findViewById(R.id.rbt3rl); final TextView rbt1prc = (TextView) findViewById(rbt1price); rbt1prc.setText(MainActivity.rbt1price + "C"); final TextView rbt2prc = (TextView) findViewById(rbt2price); rbt2prc.setText(MainActivity.rbt2price + "C"); final TextView rbt3prc = (TextView) findViewById(rbt3price); rbt3prc.setText(MainActivity.rbt3price + "C"); rbt1rl.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if (MainActivity.cookies >= MainActivity.rbt1price) { MainActivity.cookies -= MainActivity.rbt1price; MainActivity.cps ++; MainActivity.rbt1qu++; MainActivity.rbt1price = (int) (100 * Math.pow(1.15, MainActivity.rbt1qu)); rbt1prc.setText(MainActivity.rbt1price + "C"); } } }); rbt2rl.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if (MainActivity.cookies >= MainActivity.rbt2price) { MainActivity.cookies -= MainActivity.rbt2price; MainActivity.cps += 8; MainActivity.rbt2qu++; MainActivity.rbt2price = (int) (1100 * Math.pow(1.15, MainActivity.rbt2qu)); rbt2prc.setText(MainActivity.rbt2price + "C"); } } }); rbt3rl.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if (MainActivity.cookies >= MainActivity.rbt3price) { MainActivity.cookies -= MainActivity.rbt3price; MainActivity.cps += 47; MainActivity.rbt3qu++; MainActivity.rbt3price = (int) (12000 * Math.pow(1.15, MainActivity.rbt3qu)); rbt3prc.setText(MainActivity.rbt3price + "C"); } } }); } }
GreenGas48/Feed-The-Max
RobotsActivity.java
Java
gpl-2.0
3,148
package hrylab.xjtu.wifip2papp.wifidirect; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import android.net.wifi.p2p.WifiP2pDeviceList; import android.net.wifi.p2p.WifiP2pManager.PeerListListener; import android.util.Log; /* * @author NickHuang */ public class WifiPeerListListener implements PeerListListener{ private static final String TAG = "WifiPeerListListener"; private static final boolean D = true; private WifiConnector mConnector; private ExecutorService mExecutor; public WifiPeerListListener(WifiConnector mConnector){ this.mConnector = mConnector; mExecutor = Executors.newCachedThreadPool(); } @Override public void onPeersAvailable(WifiP2pDeviceList peers) { // TODO Auto-generated method stub mExecutor.submit(new UpdateAvailableWifiDevices(peers)); } private class UpdateAvailableWifiDevices implements Runnable{ private WifiP2pDeviceList wifiP2pDeviceList; public UpdateAvailableWifiDevices(WifiP2pDeviceList wifiP2pDeviceList){ this.wifiP2pDeviceList = wifiP2pDeviceList; } @Override public void run() { // TODO Auto-generated method stub if(D) Log.d(TAG, "Peers available. Count = " + wifiP2pDeviceList.getDeviceList().size()); mConnector.clearPeersWifiP2pDevices(); /* for(WifiP2pDevice device : wifiP2pDeviceList.getDeviceList()){ Log.d(TAG, "Available device: " + device.deviceName); mConnector.addWifiP2pDevice(device); } */ mConnector.addAllPeersWifiP2pDevices(wifiP2pDeviceList.getDeviceList()); mConnector.sendPeersAvaliableBroadcast(); } } }
RanHuang/AndroidProject
WiFi P2p/WifiP2pApp/src/hrylab/xjtu/wifip2papp/wifidirect/WifiPeerListListener.java
Java
gpl-2.0
1,609
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2007 Zuza Software Foundation # # This file is part of translate. # # translate 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. # # translate 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 translate; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """Manage the Wordfast Translation Memory format Wordfast TM format is the Translation Memory format used by the U{Wordfast<http://www.wordfast.net/>} computer aided translation tool. It is a bilingual base class derived format with L{WordfastTMFile} and L{WordfastUnit} providing file and unit level access. Wordfast tools ============== Wordfast is a computer aided translation tool. It is an application built on top of Microsoft Word and is implemented as a rather sophisticated set of macros. Understanding that helps us understand many of the seemingly strange choices around this format including: encoding, escaping and file naming. Implementation ============== The implementation covers the full requirements of a Wordfast TM file. The files are simple Tab Separated Value (TSV) files that can be read by Microsoft Excel and other spreadsheet programs. They use the .txt extension which does make it more difficult to automatically identify such files. The dialect of the TSV files is specified by L{WordfastDialect}. Encoding -------- The files are UTF-16 or ISO-8859-1 (Latin1) encoded. These choices are most likely because Microsoft Word is the base editing tool for Wordfast. The format is tab separated so we are able to detect UTF-16 vs Latin-1 by searching for the occurance of a UTF-16 tab character and then continuing with the parsing. Timestamps ---------- L{WordfastTime} allows for the correct management of the Wordfast YYYYMMDD~HHMMSS timestamps. However, timestamps on individual units are not updated when edited. Header ------ L{WordfastHeader} provides header management support. The header functionality is fully implemented through observing the behaviour of the files in real use cases, input from the Wordfast programmers and public documentation. Escaping -------- Wordfast TM implements a form of escaping that covers two aspects: 1. Placeable: bold, formating, etc. These are left as is and ignored. It is up to the editor and future placeable implementation to manage these. 2. Escapes: items that may confuse Excel or translators are escaped as &'XX;. These are fully implemented and are converted to and from Unicode. By observing behaviour and reading documentation we where able to observe all possible escapes. Unfortunately the escaping differs slightly between Windows and Mac version. This might cause errors in future. Functions allow for L{conversion to Unicode<_wf_to_char>} and L{back to Wordfast escapes<_char_to_wf>}. Extended Attributes ------------------- The last 4 columns allow users to define and manage extended attributes. These are left as is and are not directly managed byour implemenation. """ import csv import sys import time from translate.storage import base WF_TIMEFORMAT = "%Y%m%d~%H%M%S" """Time format used by Wordfast""" WF_FIELDNAMES_HEADER = ["date", "userlist", "tucount", "src-lang", "version", "target-lang", "license", "attr1list", "attr2list", "attr3list", "attr4list", "attr5list"] """Field names for the Wordfast header""" WF_FIELDNAMES = ["date", "user", "reuse", "src-lang", "source", "target-lang", "target", "attr1", "attr2", "attr3", "attr4"] """Field names for a Wordfast TU""" WF_FIELDNAMES_HEADER_DEFAULTS = { "date": "%19000101~121212", "userlist": "%User ID,TT,TT Translate-Toolkit", "tucount": "%TU=00000001", "src-lang": "%EN-US", "version": "%Wordfast TM v.5.51w9/00", "target-lang": "", "license": "%---00000001", "attr1list": "", "attr2list": "", "attr3list": "", "attr4list": "" } """Default or minimum header entries for a Wordfast file""" # TODO Needs validation. The following need to be checked against a WF TM file to ensure # that the correct Unicode values have been chosen for the characters. For now these look # correct and have been taken from Windows CP1252 and Macintosh code points found for # the respective character sets on Linux. WF_ESCAPE_MAP = ( ("&'26;", u"\u0026"), # & - Ampersand (must be first to prevent escaping of escapes) ("&'82;", u"\u201A"), # ‚ - Single low-9 quotation mark ("&'85;", u"\u2026"), # … - Elippsis ("&'91;", u"\u2018"), # ‘ - left single quotation mark ("&'92;", u"\u2019"), # ’ - right single quotation mark ("&'93;", u"\u201C"), # “ - left double quotation mark ("&'94;", u"\u201D"), # ” - right double quotation mark ("&'96;", u"\u2013"), # – - en dash (validate) ("&'97;", u"\u2014"), # — - em dash (validate) ("&'99;", u"\u2122"), # ™ - Trade mark # Windows only ("&'A0;", u"\u00A0"), #   - Non breaking space ("&'A9;", u"\u00A9"), # © - Copyright ("&'AE;", u"\u00AE"), # ® - Registered ("&'BC;", u"\u00BC"), # ¼ ("&'BD;", u"\u00BD"), # ½ ("&'BE;", u"\u00BE"), # ¾ # Mac only ("&'A8;", u"\u00AE"), # ® - Registered ("&'AA;", u"\u2122"), # ™ - Trade mark ("&'C7;", u"\u00AB"), # « - Left-pointing double angle quotation mark ("&'C8;", u"\u00BB"), # » - Right-pointing double angle quotation mark ("&'C9;", u"\u2026"), # … - Horizontal Elippsis ("&'CA;", u"\u00A0"), #   - Non breaking space ("&'D0;", u"\u2013"), # – - en dash (validate) ("&'D1;", u"\u2014"), # — - em dash (validate) ("&'D2;", u"\u201C"), # “ - left double quotation mark ("&'D3;", u"\u201D"), # ” - right double quotation mark ("&'D4;", u"\u2018"), # ‘ - left single quotation mark ("&'D5;", u"\u2019"), # ’ - right single quotation mark ("&'E2;", u"\u201A"), # ‚ - Single low-9 quotation mark ("&'E3;", u"\u201E"), # „ - Double low-9 quotation mark # Other markers #("&'B;", u"\n"), # Soft-break - XXX creates a problem with roundtripping could also be represented by \u2028 ) """Mapping of Wordfast &'XX; escapes to correct Unicode characters""" TAB_UTF16 = "\x00\x09" """The tab \\t character as it would appear in UTF-16 encoding""" def _char_to_wf(string): """Char -> Wordfast &'XX; escapes Full roundtripping is not possible because of the escaping of NEWLINE \\n and TAB \\t""" # FIXME there is no platform check to ensure that we use Mac encodings when running on a Mac if string: for code, char in WF_ESCAPE_MAP: string = string.replace(char.encode('utf-8'), code) string = string.replace("\n", "\\n").replace("\t", "\\t") return string def _wf_to_char(string): """Wordfast &'XX; escapes -> Char""" if string: for code, char in WF_ESCAPE_MAP: string = string.replace(code, char.encode('utf-8')) string = string.replace("\\n", "\n").replace("\\t", "\t") return string class WordfastDialect(csv.Dialect): """Describe the properties of a Wordfast generated TAB-delimited file.""" delimiter = "\t" lineterminator = "\r\n" quoting = csv.QUOTE_NONE if sys.version_info < (2, 5, 0): # We need to define the following items for csv in Python < 2.5 quoting = csv.QUOTE_MINIMAL # Wordfast does not quote anything, since we escape # \t anyway in _char_to_wf this should not be a problem doublequote = False skipinitialspace = False escapechar = None quotechar = '"' csv.register_dialect("wordfast", WordfastDialect) class WordfastTime(object): """Manages time stamps in the Wordfast format of YYYYMMDD~hhmmss""" def __init__(self, newtime=None): self._time = None if not newtime: self.time = None elif isinstance(newtime, basestring): self.timestring = newtime elif isinstance(newtime, time.struct_time): self.time = newtime def get_timestring(self): """Get the time in the Wordfast time format""" if not self._time: return None else: return time.strftime(WF_TIMEFORMAT, self._time) def set_timestring(self, timestring): """Set the time_sturct object using a Wordfast time formated string @param timestring: A Wordfast time string (YYYMMDD~hhmmss) @type timestring: String """ self._time = time.strptime(timestring, WF_TIMEFORMAT) timestring = property(get_timestring, set_timestring) def get_time(self): """Get the time_struct object""" return self._time def set_time(self, newtime): """Set the time_struct object @param newtime: a new time object @type newtime: time.time_struct """ if newtime and isinstance(newtime, time.struct_time): self._time = newtime else: self._time = None time = property(get_time, set_time) def __str__(self): if not self.timestring: return "" else: return self.timestring class WordfastHeader(object): """A wordfast translation memory header""" def __init__(self, header=None): self._header_dict = [] if not header: self.header = self._create_default_header() elif isinstance(header, dict): self.header = header def _create_default_header(self): """Create a default Wordfast header with the date set to the current time""" defaultheader = WF_FIELDNAMES_HEADER_DEFAULTS defaultheader['date'] = '%%%s' % WordfastTime(time.localtime()).timestring return defaultheader def getheader(self): """Get the header dictionary""" return self._header_dict def setheader(self, newheader): self._header_dict = newheader header = property(getheader, setheader) def settargetlang(self, newlang): self._header_dict['target-lang'] = '%%%s' % newlang targetlang = property(None, settargetlang) def settucount(self, count): self._header_dict['tucount'] = '%%TU=%08d' % count tucount = property(None, settucount) class WordfastUnit(base.TranslationUnit): """A Wordfast translation memory unit""" def __init__(self, source=None): self._dict = {} if source: self.source = source super(WordfastUnit, self).__init__(source) def _update_timestamp(self): """Refresh the timestamp for the unit""" self._dict['date'] = WordfastTime(time.localtime()).timestring def getdict(self): """Get the dictionary of values for a Wordfast line""" return self._dict def setdict(self, newdict): """Set the dictionary of values for a Wordfast line @param newdict: a new dictionary with Wordfast line elements @type newdict: Dict """ # TODO First check that the values are OK self._dict = newdict dict = property(getdict, setdict) def _get_source_or_target(self, key): if self._dict.get(key, None) is None: return None elif self._dict[key]: return _wf_to_char(self._dict[key]).decode('utf-8') else: return "" def _set_source_or_target(self, key, newvalue): if newvalue is None: self._dict[key] = None if isinstance(newvalue, unicode): newvalue = newvalue.encode('utf-8') newvalue = _char_to_wf(newvalue) if not key in self._dict or newvalue != self._dict[key]: self._dict[key] = newvalue self._update_timestamp() def getsource(self): return self._get_source_or_target('source') def setsource(self, newsource): self._rich_source = None return self._set_source_or_target('source', newsource) source = property(getsource, setsource) def gettarget(self): return self._get_source_or_target('target') def settarget(self, newtarget): self._rich_target = None return self._set_source_or_target('target', newtarget) target = property(gettarget, settarget) def settargetlang(self, newlang): self._dict['target-lang'] = newlang targetlang = property(None, settargetlang) def __str__(self): return str(self._dict) def istranslated(self): if not self._dict.get('source', None): return False return bool(self._dict.get('target', None)) class WordfastTMFile(base.TranslationStore): """A Wordfast translation memory file""" Name = _("Wordfast Translation Memory") Mimetypes = ["application/x-wordfast"] Extensions = ["txt"] def __init__(self, inputfile=None, unitclass=WordfastUnit): """construct a Wordfast TM, optionally reading in from inputfile.""" self.UnitClass = unitclass base.TranslationStore.__init__(self, unitclass=unitclass) self.filename = '' self.header = WordfastHeader() self._encoding = 'iso-8859-1' if inputfile is not None: self.parse(inputfile) def parse(self, input): """parsese the given file or file source string""" if hasattr(input, 'name'): self.filename = input.name elif not getattr(self, 'filename', ''): self.filename = '' if hasattr(input, "read"): tmsrc = input.read() input.close() input = tmsrc if TAB_UTF16 in input.split("\n")[0]: self._encoding = 'utf-16' else: self._encoding = 'iso-8859-1' try: input = input.decode(self._encoding).encode('utf-8') except: raise ValueError("Wordfast files are either UTF-16 (UCS2) or ISO-8859-1 encoded") for header in csv.DictReader(input.split("\n")[:1], fieldnames=WF_FIELDNAMES_HEADER, dialect="wordfast"): self.header = WordfastHeader(header) lines = csv.DictReader(input.split("\n")[1:], fieldnames=WF_FIELDNAMES, dialect="wordfast") for line in lines: newunit = WordfastUnit() newunit.dict = line self.addunit(newunit) def __str__(self): output = csv.StringIO() header_output = csv.StringIO() writer = csv.DictWriter(output, fieldnames=WF_FIELDNAMES, dialect="wordfast") unit_count = 0 for unit in self.units: if unit.istranslated(): unit_count += 1 writer.writerow(unit.dict) if unit_count == 0: return "" output.reset() self.header.tucount = unit_count outheader = csv.DictWriter(header_output, fieldnames=WF_FIELDNAMES_HEADER, dialect="wordfast") outheader.writerow(self.header.header) header_output.reset() decoded = "".join(header_output.readlines() + output.readlines()).decode('utf-8') try: return decoded.encode(self._encoding) except UnicodeEncodeError: return decoded.encode('utf-16')
lehmannro/translate
storage/wordfast.py
Python
gpl-2.0
16,175
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ defined('_JEXEC') or die('Unauthorized Access'); FD::import('admin:/includes/indexer/indexer'); abstract class SocialCluster { /** * The clusters's unique id. * @var int */ public $id = null; /** * The cluster category id. * @var int */ public $category_id = null; /** * The cluster type. * @var int */ public $cluster_type = null; /** * The creator unique id. * @var int */ public $creator_uid = null; /** * The creator type. * @var int */ public $creator_type = null; /** * The cluster's title. * @var string */ public $title = null; /** * The cluster's description. * @var string */ public $description = null; /** * The cluster's alias. * @var string */ public $alias = null; /** * The cluster's hits. * @var string */ public $hits = null; /** * The cluster's state. * @var boolean */ public $state = null; /** * The cluster's featured state. * @var boolean */ public $featured = null; /** * The cluster's creation date. * @var string */ public $created = null; /** * The cluster's type. * @var string */ public $type = null; /** * Stores the avatar sizes available on a cluster. * @var string */ public $avatarSizes = array('small', 'medium', 'large', 'square'); /** * Stores the avatars of a cluster. * @var string */ public $avatars = array('small' => '', 'medium' => '', 'large' => '', 'square' => ''); /** * Stores the cover photo of a cluster. * @var string */ public $cover = null; /** * Stores the params of a cluster. * @var string */ public $params = null; /** * The group's secret key. * @var int */ public $key = null; /** * Parent id of this cluster. * @var integer */ public $parent_id = null; /** * Parent type of this cluster. * @var string */ public $parent_type = null; /** * Longitude value of this cluster. * @var float */ public $longitude = null; /** * Latitude value of this cluster. * @var float */ public $latitude = null; /** * Address of this cluster. * @var string */ public $address = null; /** * The group's fields. * @var Array */ public $fields = array(); /** * Stores the object mapping. * @var SocialTableCluster */ protected $table = null; /** * Determines the storage type for the avatars * @var string */ protected $avatarStorage = 'joomla'; public function __construct() { $this->config = ES::config(); } /** * Initializes the provided properties into the existing object. Instead of * trying to query to fetch more info about this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @param object $params A standard object with key / value binding. */ public function initParams(&$params) { // Get all properties of this object $properties = get_object_vars($this); // Bind parameters to the object foreach($properties as $key => $val) { if (isset($params->$key)) { $this->$key = $params->$key; } } // Bind params json object here $this->_params->loadString($this->params); // Bind user avatars here. foreach($this->avatars as $size => $value) { if (isset($params->$size)) { $this->avatars[$size] = $params->$size; } } } /** * Increments the hit counter. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return True if successful. */ public function hit() { return $this->table->hit(); } /** * Retrieves a list of apps for this cluster type. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return array Array of apps object. */ public function getApps() { // TODO: Use dbcache instead static $apps = array(); if (!isset($apps[$this->cluster_type])) { $model = FD::model('Apps'); $options = array('group' => $this->cluster_type, 'type' => SOCIAL_APPS_TYPE_APPS, 'state' => SOCIAL_STATE_PUBLISHED); $clusterApps = $model->getApps($options); $apps[$this->cluster_type] = $clusterApps; } return $apps[$this->cluster_type]; } /** * Retrieve a single app for the cluster * * @since 1.4 * @access public * @param string * @return */ public function getApp($element) { static $apps = array(); $index = $this->cluster_type . $element; if (!isset($apps[$index])) { $model = ES::model('Apps'); $options = array('group' => $this->cluster_type, 'type' => SOCIAL_APPS_TYPE_APPS, 'state' => SOCIAL_STATE_PUBLISHED, 'element' => $element); $app = ES::table('App'); $app->load($options); $apps[$index] = $app; } return $apps[$index]; } /** * Determines if this cluster is new or not. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return boolean True if this cluster is a new cluster. */ public function isNew() { return empty($this->id); } /** * Retrieves the join date of a node. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @param integer $uid The node id. * @param string $type The node type. * @return SocialDate The date object of the joined date. */ public function getJoinedDate($uid, $type = SOCIAL_TYPE_USER) { $node = FD::table('ClusterNode'); $node->load(array('uid' => $uid, 'type' => $type, 'cluster_id' => $this->id)); $date = FD::date($node->created); return $date; } /** * Creates a new node object for this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @param integer $nodeId The node id. * @param string $nodeType The node type. * @param integer $state The state to set this node. * @return SocialTableClusterNode The cluster node table object. */ public function createNode($nodeId, $nodeType, $state = SOCIAL_STATE_PUBLISHED) { $node = FD::table('ClusterNode'); $node->cluster_id = $this->id; $node->uid = $nodeId; $node->type = $nodeType; $node->state = $state; $node->store(); return $node; } /** * Determines if this cluster has an avatar. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return boolean True if this cluster has an avatar. */ public function hasAvatar() { if (isset($this->avatars['small']) && !empty($this->avatars['small'])) { return true; } if (!empty($this->avatar_id)) { return true; } return false; } /** * Retrieves the default avatar location as it might have template overrides. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @param string $size The avatar size to retrieve for. * @return string The avatar uri. */ public function getDefaultAvatar($size) { static $defaults = null; if (!isset($defaults[$size])) { $app = JFactory::getApplication(); $config = FD::config(); $overriden = JPATH_ROOT . '/templates/' . $app->getTemplate() . '/html/com_easysocial/avatars/' . $this->cluster_type . '/' . $size . '.png'; $uri = rtrim(JURI::root(), '/') . '/templates/' . $app->getTemplate() . '/html/com_easysocial/avatars/' . $this->cluster_type . '/' . $size . '.png'; if (JFile::exists($overriden)) { $defaults[$size] = $uri; } else { $defaults[$size] = rtrim(JURI::root(), '/') . $config->get('avatars.default.' . $this->cluster_type . '.' . $size); } } return $defaults[$size]; } /** * Retrieves the user's avatar location * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @param string $size The avatar size to retrieve for. * @return string The avatar uri. */ public function getAvatar($size = SOCIAL_AVATAR_MEDIUM) { $config = FD::config(); // If the avatar size that is being requested is invalid, return default avatar. $default = $this->getDefaultAvatar($size); if (!$this->avatars[$size] || empty($this->avatars[$size])) { // Check if parent exist and call the parent. if ($this->hasParent()) { return $this->getParent()->getAvatar($size); } return $default; } // Get the path to the avatar storage. $container = FD::cleanPath($config->get('avatars.storage.container')); $location = FD::cleanPath($config->get('avatars.storage.' . $this->cluster_type)); // Build the path now. $path = $container . '/' . $location . '/' . $this->id . '/' . $this->avatars[$size]; if ($this->avatarStorage == SOCIAL_STORAGE_JOOMLA) { // Build final storage path. $absolutePath = JPATH_ROOT . '/' . $path; // Detect if this file really exists. if (!JFile::exists($absolutePath)) { return $default; } $uri = rtrim(JURI::root(), '/') . '/' . $path; } else { $storage = FD::storage($this->avatarStorage); $uri = $storage->getPermalink($path); } return $uri; } /** * Retrieves the photo table for the cluster's avatar. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return SocialTablePhoto The avatar photo table object. */ public function getAvatarPhoto() { static $photos = array(); if (!isset($photos[$this->id])) { $model = FD::model('Avatars'); $photo = $model->getPhoto($this->id, $this->cluster_type); $photos[$this->id] = $photo; } return $photos[$this->id]; } /** * Determines if this cluster has a cover photo. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return boolean True if this cluster has a cover photo. */ public function hasCover() { return !(empty($this->cover) || empty($this->cover->id)); } /** * Get the cover table object for this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return SocialTableCover The cover table object for this cluster. */ public static function getCoverObject($cluster = null) { $cover = FD::table('Cover'); if (!empty($cluster->cover_id)) { $coverData = new stdClass(); $coverData->id = $cluster->cover_id; $coverData->uid = $cluster->cover_uid; $coverData->type = $cluster->cover_type; $coverData->photo_id = $cluster->cover_photo_id; $coverData->cover_id = $cluster->cover_cover_id; $coverData->x = $cluster->cover_x; $coverData->y = $cluster->cover_y; $coverData->modified = $cluster->cover_modified; $cover->bind($coverData); } else { $cover->type = $cluster->cluster_type; } return $cover; } /** * Retrieves the group's cover position. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return integer The position of the cover. * */ public function getCoverPosition() { if (!$this->cover) { if ($this->hasParent()) { return $this->getParent()->getCoverPosition(); } return 0; } return $this->cover->getPosition(); } /** * Retrieves this cluster's cover uri. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return string The cover uri. * */ public function getCover() { if (!$this->cover) { if ($this->hasParent()) { return $this->getParent()->getCover(); } $cover = $this->getDefaultCover(); return $cover; } return $this->cover->getSource(); } /** * Returns the cover object. * * @author Jason Rey <jasonrey@stackideas.com> * @since 1.3 * @access public * @return SocialTableCover The cover object. */ public function getCoverData() { if ((empty($this->cover) || empty($this->cover->id)) && $this->hasParent()) { return $this->getParent()->cover; } return $this->cover; } /** * Retrieves the default cover location as it might have template overrides. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return string The default cover uri. */ public function getDefaultCover() { static $default = null; if (!$default) { $app = JFactory::getApplication(); $config = FD::config(); $overriden = JPATH_ROOT . '/templates/' . $app->getTemplate() . '/html/com_easysocial/covers/' . $this->cluster_type . '/default.png'; $uri = rtrim(JURI::root(), '/') . '/templates/' . $app->getTemplate() . '/html/com_easysocial/covers/' . $this->cluster_type . '/default.png'; if (JFile::exists($overriden)) { $default = $uri; } else { $default = rtrim(JURI::root(), '/') . $config->get('covers.default.' . $this->cluster_type . '.default'); } } return $default; } /** * Allows deletion of cover. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return True if successful. */ public function deleteCover() { $state = $this->cover->delete(); // Reset this user's cover $this->cover = FD::table('Cover'); return $state; } /** * Returns the last creation date of the cluster * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return SocialDate The created date object. */ public function getCreatedDate() { $date = FD::get('Date', $this->created); return $date; } /** * Retrieves the params for a cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return SocialRegistry The registry object. */ public function getParams() { $params = FD::registry($this->params); return $params; } /** * Method to standardize cluster object to be similar as a JUser object. * * @author Jason Rey <jasonrey@stackideas.com> * @since 1.3 * @access public * @param string $key The key to retrieve. * @return Mixed The value of the key. */ public function getParam($key) { return $this->getParams()->get($key); } /** * Retrieves the user's real name dependent on the system configurations. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return string The cluster's title. */ public function getName() { return $this->title; } /** * Allows caller to remove the cluster avatar. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return True if successful. */ public function removeAvatar() { $avatar = FD::table('Avatar'); $state = $avatar->load(array('uid' => $this->id, 'type' => $this->cluster_type)); if ($state) { $state = $avatar->delete(); } return $state; } /** * Override parent's delete implementation if necessary. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return bool The delete state. True on success, false otherwise. */ public function delete() { // If deletion was successful, we need to remove it from smart search $namespace = 'easysocial.' . $this->cluster_type . 's'; JPluginHelper::importPlugin('finder'); $dispatcher = JDispatcher::getInstance(); $dispatcher->trigger('onFinderAfterDelete', array($namespace, &$this->table)); $state = $this->table->delete(); return $state; } /** * Retrieves the custom field value from this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @param string $key The key of the field. * @return Mixed The value returned by the field. */ public function getFieldValue($key) { static $processed = array(); if (!isset($processed[$this->id])) { $processed[$this->id] = array(); } if (!isset($processed[$this->id][$key])) { if (!isset($this->fields[$key])) { $result = FD::model('Fields')->getCustomFields(array('group' => $this->cluster_type, 'uid' => $this->category_id, 'data' => true , 'dataId' => $this->id , 'dataType' => $this->cluster_type, 'key' => $key)); $this->fields[$key] = isset($result[0]) ? $result[0] : false; } $field = $this->fields[$key]; // Initialize a default property $processed[$this->id][$key] = ''; if ($field) { // Trigger the getFieldValue to obtain data from the field. $value = FD::fields()->getValue($field, $this->cluster_type); $processed[$this->id][$key] = $value; } } return $processed[$this->id][$key]; } /** * Retrieves the custom field data from this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @param string $key The key of the field. * @return Mixed The data returned by the field. */ public function getFieldData($key) { static $processed = array(); if (!isset($processed[$this->id])) { $processed[$this->id] = array(); } if (!isset($processed[$this->id][$key])) { if (!isset($this->fields[$key])) { $result = FD::model('Fields')->getCustomFields(array('group' => $this->cluster_type, 'uid' => $this->category_id, 'data' => true , 'dataId' => $this->id , 'dataType' => $this->cluster_type, 'key' => $key)); $this->fields[$key] = isset($result[0]) ? $result[0] : false; } $field = $this->fields[$key]; // Initialize a default property $processed[$this->id][$key] = ''; if ($field) { // Trigger the getFieldValue to obtain data from the field. $value = FD::fields()->getData($field, $this->cluster_type); $processed[$this->id][$key] = $value; } } return $processed[$this->id][$key]; } /** * Retrieves the category of this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return SocialTableClusterCategory The cluster category table object. */ public function getCategory() { static $categories = array(); if (!isset($categories[$this->category_id])) { $category = FD::table('ClusterCategory'); $category->load($this->category_id); $categories[$this->category_id] = $category; } return $categories[$this->category_id]; } /** * Preprocess before storing data into the table object. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return boolean True if successful. */ public function save() { // Determine if this record is a new user by identifying the id. $isNew = $this->isNew(); // Request parent to store data. $this->table->bind($this); // Try to store the item $state = $this->table->store(); if ($isNew) { $this->id = $this->table->id; } if ($this->state == 1) { $namespace = 'easysocial.' . $this->cluster_type . 's'; JPluginHelper::importPlugin('finder'); $dispatcher = JDispatcher::getInstance(); if ($this->type == SOCIAL_GROUPS_INVITE_TYPE) { // lets remove this item from smart search $dispatcher->trigger('onFinderAfterDelete', array($namespace, &$this->table)); } else { $dispatcher->trigger('onFinderAfterSave', array($namespace, &$this->table, $isNew)); } } return $state; } /** * Allows caller to remove all cluster associations with custom fields. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return True if successful. */ public function deleteCustomFields() { $model = FD::model('Fields'); $state = $model->deleteFields($this->id, $this->cluster_type); return $state; } /** * Delete stream related to this cluster * * @since 1.3 * @access public * @param string * @return */ public function deleteStream() { $model = FD::model('Clusters'); $state = $model->deleteClusterStream($this->id, $this->cluster_type); return $state; } /** * Deletes all the news from the cluster * * @since 1.3 * @access public * @param string * @return */ public function deleteNews() { $model = FD::model('ClusterNews'); $state = $model->delete($this->id); return $state; } /** * Determines if this cluster is featured. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return True if this cluster is featured. */ public function isFeatured() { return (bool) $this->featured; } /** * Allows caller to set the cluster as a featured item. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return boolean True if successful. */ public function setFeatured() { $this->table->featured = true; $state = $this->table->store(); // @TODO: Push into the stream that a group is set as featured group. if ($state) { $this->createStream(null, 'featured'); } return $state; } /** * Allows caller to remove the cluster from being a featured item. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return boolean True if successful. */ public function removeFeatured() { $this->table->featured = false; $state = $this->table->store(); return $state; } /** * Allows caller to switch owners. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @param integer $newUserId The new owner id. * @param integer $type The type of the owner. * @return bool True if successful. */ public function switchOwner($newUserId, $type = SOCIAL_TYPE_USER) { $this->creator_uid = $newUserId; $this->creator_type = $type; $this->table->bind($this); $this->table->store(); // Check if the member record exists for this table. $node = FD::table('ClusterNode'); $exists = $node->load(array('cluster_id' => $this->id, 'uid' => $this->creator_uid, 'type' => $this->creator_type)); // Remove other "owners" previously $model = FD::model('Clusters'); $model->removeOwners($this->id); if (!$exists) { // Insert a new owner record $node->cluster_id = $this->id; $node->uid = $this->creator_uid; $node->type = $this->creator_type; $node->state = SOCIAL_STATE_PUBLISHED; $node->owner = SOCIAL_STATE_PUBLISHED; $node->admin = SOCIAL_STATE_PUBLISHED; } else { $node->owner = SOCIAL_STATE_PUBLISHED; $node->admin = SOCIAL_STATE_PUBLISHED; } return $node->store(); } /** * Determines if the group is published. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return boolean True if is published. */ public function isPublished() { return $this->state == SOCIAL_CLUSTER_PUBLISHED; } public function isPending() { return $this->state == SOCIAL_CLUSTER_PENDING; } /** * Allows caller to remove a node item. * * @since 1.0 * @access public * @param integer $nodeId The node id. * @param string $nodeType The node type. * @return boolean True if successful. */ public function deleteNode($nodeId, $nodeType = SOCIAL_TYPE_USER) { $node = FD::table('ClusterNode'); $node->load(array('cluster_id' => $this->id, 'uid' => $nodeId, 'type' => $nodeType)); $state = $node->delete(); return $state; } /** * Allows caller to remove all node item associations. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return boolean True if successful. */ public function deleteNodes() { $model = FD::model('Clusters'); $state = $model->deleteNodeAssociation($this->id); return $state; } /** * Allows caller to remove videos * * @since 1.4 * @access public * @param string * @return */ public function deleteVideos($pk = null) { $db = ES::db(); $sql = $db->sql(); // Delete cluster albums $sql->clear(); $sql->select('#__social_videos'); $sql->where('uid', $this->id); $sql->where('type', $this->cluster_type); $db->setQuery($sql); $videos = $db->loadObjectList(); if (!$videos) { return true; } foreach ($videos as $row) { $video = ES::video($row->uid, $row->type, $row->id); $video->delete(); } return true; } /** * Allows caller to remove all photos albums. * * @author Sam <sam@stackideas.com> * @since 1.3 * @access public * @return boolean True if successful. */ public function deletePhotoAlbums( $pk = null ) { $db = FD::db(); $sql = $db->sql(); // Delete cluster albums $sql->clear(); $sql->select( '#__social_albums' ); $sql->where( 'uid' , $this->id ); $sql->where( 'type' , $this->cluster_type ); $db->setQuery( $sql ); $albums = $db->loadObjectList(); if( $albums ) { foreach( $albums as $row ) { $album = FD::table( 'Album' ); $album->load( $row->id ); $album->delete(); } } return true; } /** * Allows caller to unpublish this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return boolean True if successful. */ public function unpublish() { $this->table->state = SOCIAL_CLUSTER_UNPUBLISHED; $state = $this->table->store(); if ($state) { $this->state = SOCIAL_CLUSTER_UNPUBLISHED; } return $state; } /** * Allows caller to publish this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return boolean True if successful. */ public function publish() { $this->table->state = SOCIAL_CLUSTER_PUBLISHED; $state = $this->table->store(); if ($state) { $this->state = SOCIAL_CLUSTER_PUBLISHED; } return $state; } /** * Get the alias of this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return string The alias of this cluster. */ public function getAlias() { // Ensure that the name is a safe url. $alias = $this->id . ':' . JFilterOutput::stringURLSafe($this->alias); return $alias; } /** * Gets the SocialAccess object. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return SocialAccess The SocialAccess object. * */ public function getAccess() { static $data = null; if (!isset($data[$this->category_id])) { $access = FD::access($this->category_id, SOCIAL_TYPE_CLUSTERS); $data[$this->category_id] = $access; } return $data[$this->category_id]; } /** * Returns the cluster type * * @since 1.4 * @access public * @param string * @return */ public function getType() { return $this->cluster_type; } /** * Returns the total number of videos in this cluster * * @since 1.4 * @access public * @param string * @return */ public function getTotalVideos() { static $total = array(); if (!isset($total[$this->id])) { $model = ES::model('Videos'); $options = array('uid' => $this->id, 'type' => $this->cluster_type); $total[$this->id] = $model->getTotalVideos($options); } return $total[$this->id]; } /** * Return the total number of albums in this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return integer The total number of albums. */ public function getTotalAlbums() { static $total = array(); $sid = $this->id; if (!isset($total[$sid])) { $model = FD::model('Albums'); $options = array('uid' => $this->id, 'type' => $this->cluster_type); $total[$sid] = $model->getTotalAlbums($options); } return $total[$sid]; } /** * Return the total number of photos in this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @param boolean $daily If true, only get total number of photos daily. * @return integer The total number of photos. */ public function getTotalPhotos($daily = false) { static $total = array(); $sid = $this->id . $daily; if (!isset($total[$sid])) { $model = FD::model('Photos'); $options = array('uid' => $this->id, 'type' => $this->cluster_type); if ($daily) { $today = FD::date()->toMySQL(); $date = explode(' ', $today); $options['day'] = $date[0]; } $total[$sid] = $model->getTotalPhotos($options); } return $total[$sid]; } /** * Binds the user custom fields. * * @author Jason Rey <jasonrey@stackideas.com> * @since 1.2 * @access public * @param array $data An array of data that is being posted. * @return bool True on success, false otherwise. */ public function bindCustomFields($data) { // Get the registration model. $model = FD::model('Fields'); // Get the field id's that this profile is allowed to store data on. $fields = $model->getStorableFields($this->category_id , SOCIAL_TYPE_CLUSTERS); // If there's nothing to process, just ignore. if (!$fields) { return false; } // Let's go through all the storable fields and store them. foreach ($fields as $fieldId) { $key = SOCIAL_FIELDS_PREFIX . $fieldId; if (!isset($data[$key])) { continue; } $value = isset($data[$key]) ? $data[$key] : ''; // Test if field really exists to avoid any unwanted input $field = FD::table('Field'); // If field doesn't exist, just skip this. if (!$field->load($fieldId)) { continue; } // Let the table object handle the data storing $field->saveData($value, $this->id, $this->cluster_type); } } /** * Retrieve the creator of this group. * Need to support creator_type in the future. Assuming user for now. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @return SocialUser The creator object of this cluster. */ public function getCreator() { $user = FD::user($this->creator_uid); return $user; } /** * Determines if the provided user id is the owner of this cluster. * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @param int $userId The user's id to check against. * @return bool True if the user is the owner. */ public function isOwner($userId = null) { $userId = FD::user($userId)->id; // To test for ownership, just test against the uid and type if ($this->creator_uid == $userId && $this->creator_type == SOCIAL_TYPE_USER) { return true; } return false; } /** * Determines if the provided user id is an admin of this cluster * * @author Mark Lee <mark@stackideas.com> * @since 1.2 * @access public * @param int $userId The user's id to check against. * @return bool True if the user is the owner. */ public function isAdmin( $userId = null ) { $user = FD::user( $userId ); $userId = $user->id; if (isset( $this->admins[ $userId ] ) || $user->isSiteAdmin()) { return true; } return false; } /** * Creates the owner node. * * @author Jason Rey <jasonrey@stackideas.com> * @since 1.2 * @access public * @param int $userId The owner id. * @return bool True if successful. */ public function createOwner($userId = null) { if (empty($userId)) { $userId = FD::user()->id; } $member = FD::table('clusternode'); $state = $member->load(array('cluster_id' => $this->id, 'uid' => $userId, 'type' => SOCIAL_TYPE_USER)); $member->cluster_id = $this->id; $member->uid = $userId; $member->type = SOCIAL_TYPE_USER; $member->state = SOCIAL_STATE_PUBLISHED; $member->admin = true; $member->owner = true; $member->store(); return $member; } /** * Returns a Google Maps link based on the address * * @author Jason Rey <jasonrey@stackideas.com> * @since 1.3 * @access public * @return string The url of Google Maps. */ public function getAddressLink() { if (!empty($this->address)) { return 'https://maps.google.com/?q=' . urlencode($this->address); } return 'javascript:void(0);'; } public function getParent() { if (empty($this->parent_id) || empty($this->parent_type)) { return false; } return FD::cluster($this->parent_type, $this->parent_id); } public function hasParent() { return !empty($this->parent_id) && !empty($this->parent_type); } }
Creativetech-Solutions/joomla-easysocial-network
administrator/components/com_easysocial/includes/cluster/cluster.php
PHP
gpl-2.0
37,890
<?php // security check - must be included in all scripts if (!$GLOBALS['kewl_entry_point_run']) { die("You cannot view this page directly"); } /** * * Controller class for Chisimba for the phpinfo * * @author Derek Keats * @package timeline * */ class phpinfo extends controller { /** * @var $objLog String object property for holding the * logger object for logging user activity */ public $objLog; /** * Intialiser for the stories controller * * @param byref $ string $engine the engine object */ public function init() { //Get the activity logger class $this->objLog=$this->newObject('logactivity', 'logger'); // Set up event message $this->eventDispatcher->addObserver ( array ($this, 'modaccess' ) ); //Log this module call $this->objLog->log(); } /** * * The standard dispatch method for * */ public function dispatch() { $this->eventDispatcher->post($this, "test"); return "phpinfo_tpl.php"; } public function modaccess($notification) { if ($notification->getNotificationName () == 'test') { log_debug("PHPInfo module was accessed"); } else { log_debug("nothing to see here"); } } } ?>
chisimba/modules
phpinfo/controller.php
PHP
gpl-2.0
1,322
import logging import struct from memory import Memory from network import Mac, IpAddress from gbe import Gbe LOGGER = logging.getLogger(__name__) # Offsets for fields in the memory map, in bytes OFFSET_CORE_TYPE = 0x0 OFFSET_BUFFER_SIZE = 0x4 OFFSET_WORD_LEN = 0x8 OFFSET_MAC_ADDR = 0xc OFFSET_IP_ADDR = 0x14 OFFSET_GW_ADDR = 0x18 OFFSET_NETMASK = 0x1c OFFSET_MC_IP = 0x20 OFFSET_MC_MASK = 0x24 OFFSET_BUF_VLD = 0x28 OFFSET_FLAGS = 0x2c OFFSET_PORT = 0x30 OFFSET_STATUS = 0x34 OFFSET_CONTROL = 0x40 OFFSET_ARP_SIZE = 0x44 OFFSET_TX_PKT_RATE = 0x48 OFFSET_TX_PKT_CNT = 0x4c OFFSET_TX_VLD_RATE = 0x50 OFFSET_TX_VLD_CNT = 0x54 OFFSET_TX_OF_CNT = 0x58 OFFSET_TX_AF_CNT = 0x5c OFFSET_RX_PKT_RATE = 0x60 OFFSET_RX_PKT_CNT = 0x64 OFFSET_RX_VLD_RATE = 0x68 OFFSET_RX_VLD_CNT = 0x6c OFFSET_RX_OF_CNT = 0x70 OFFSET_RX_AF_CNT = 0x74 OFFSET_COUNT_RST = 0x78 OFFSET_ARP_CACHE = 0x1000 OFFSET_TX_BUFFER = 0x4000 OFFSET_RX_BUFFER = 0x8000 # Sizes for fields in the memory map, in bytes SIZE_CORE_TYPE = 0x4 SIZE_BUFFER_SIZE = 0x4 SIZE_WORD_LEN = 0x4 SIZE_MAC_ADDR = 0x8 SIZE_IP_ADDR = 0x4 SIZE_GW_ADDR = 0x4 SIZE_NETMASK = 0x4 SIZE_MC_IP = 0x4 SIZE_MC_MASK = 0x4 SIZE_BUF_AVAIL = 0x4 SIZE_FLAGS = 0x4 SIZE_PORT = 0x4 SIZE_STATUS = 0x8 SIZE_CONTROL = 0x8 SIZE_ARP_SIZE = 0x4 SIZE_TX_PKT_RATE = 0x4 SIZE_TX_PKT_CNT = 0x4 SIZE_TX_VLD_RATE = 0x4 SIZE_TX_VLD_CNT = 0x4 SIZE_TX_OF_CNT = 0x4 SIZE_TX_AF_CNT = 0x4 SIZE_RX_PKT_RATE = 0x4 SIZE_RX_PKT_CNT = 0x4 SIZE_RX_VLD_RATE = 0x4 SIZE_RX_VLD_CNT = 0x4 SIZE_RX_OF_CNT = 0x4 SIZE_RX_AF_CNT = 0x4 SIZE_COUNT_RST = 0x4 SIZE_ARP_CACHE = 0x3000 SIZE_TX_BUFFER = 0x4000 SIZE_RX_BUFFER = 0x4000 class OneGbe(Memory, Gbe): """ To do with the CASPER ten GBE yellow block implemented on FPGAs, and interfaced-to via KATCP memory reads/writes. """ def __init__(self, parent, name, address, length_bytes, device_info=None): """ :param parent: Parent object who owns this TenGbe instance :param name: Unique name of the instance :param address: :param length_bytes: :param device_info: Information about this device """ Memory.__init__(self, name, 32, address, length_bytes) Gbe.__init__(self, parent, name, address, length_bytes, device_info) self.memmap_compliant = self._check_memmap_compliance() @property def mac(self): return self.get_gbe_core_details()['mac'] @property def ip_address(self): return self.get_gbe_core_details()['ip'] @property def port(self): return self.get_gbe_core_details()['fabric_port'] def _check_memmap_compliance(self): """ Look at the first word of the core's memory map and try to figure out if it compliant with the harmonized ethernet map. This isn't flawless, but unless the user sets a very weird MAC address for their core (which is what the old core's map stored in register 0, it should be OK). """ x = self.parent.read(self.name, 4) cpu_tx_en, cpu_rx_en, rev, core_type = struct.unpack('4B', x) if (cpu_tx_en > 1) or (cpu_rx_en > 1) or (core_type != 2): return False else: return True def post_create_update(self, raw_device_info): """ Update the device with information not available at creation. :param raw_device_info: info about this block that may be useful """ super(TenGbe, self).post_create_update(raw_device_info) self.snaps = {'tx': None, 'rx': None} for snapshot in self.parent.snapshots: if snapshot.name.find(self.name + '_') == 0: name = snapshot.name.replace(self.name + '_', '') if name == 'txs_ss': self.snaps['tx'] = snapshot.name elif name == 'rxs_ss': self.snaps['rx'] = snapshot.name else: errmsg = '%s: incorrect snap %s under tengbe ' \ 'block' % (self.fullname, snapshot.name) LOGGER.error(errmsg) raise RuntimeError(errmsg) def read_txsnap(self): """ Read the TX snapshot embedded in this TenGBE yellow block """ return self.snaps['tx'].read(timeout=10)['data'] def read_rxsnap(self): """ Read the RX snapshot embedded in this TenGBE yellow block """ return self.snaps['rx'].read(timeout=10)['data'] # def fabric_start(self): # """ # Setup the interface by writing to the fabric directly, bypassing tap. # :param self: # :return: # """ # if self.tap_running(): # log_runtime_error( # LOGGER, 'TAP running on %s, stop tap before ' # 'accessing fabric directly.' % self.name) # mac_location = 0x00 # ip_location = 0x10 # port_location = 0x22 # self.parent.write(self.name, self.mac.packed(), mac_location) # self.parent.write(self.name, self.ip_address.packed(), ip_location) # # self.parent.write_int(self.name, self.port, offset = port_location) def dhcp_start(self): """ Configure this interface, then start a DHCP client on ALL interfaces. """ #if self.mac is None: # TODO get MAC from EEPROM serial number and assign here # self.mac = '0' reply, _ = self.parent.transport.katcprequest( name='tap-start', request_timeout=5, require_ok=True, request_args=(self.name, self.name, '0.0.0.0', str(self.port), str(self.mac), )) if reply.arguments[0] != 'ok': raise RuntimeError('%s: failure starting tap driver.' % self.name) reply, _ = self.parent.transport.katcprequest( name='tap-arp-config', request_timeout=1, require_ok=True, request_args=(self.name, 'mode', '0')) if reply.arguments[0] != 'ok': raise RuntimeError('%s: failure disabling ARP.' % self.name) reply, _ = self.parent.transport.katcprequest( name='tap-dhcp', request_timeout=30, require_ok=True, request_args=(self.name, )) if reply.arguments[0] != 'ok': raise RuntimeError('%s: failure starting DHCP client.' % self.name) reply, _ = self.parent.transport.katcprequest( name='tap-arp-config', request_timeout=1, require_ok=True, request_args=(self.name, 'mode', '-1')) if reply.arguments[0] != 'ok': raise RuntimeError('%s: failure re-enabling ARP.' % self.name) # it looks like the command completed without error, so # update the basic core details self.get_gbe_core_details() def tap_start(self, restart=False): """ Program a 10GbE device and start the TAP driver. :param restart: stop before starting """ if len(self.name) > 8: raise NameError('%s: tap device identifier must be shorter than 9 ' 'characters..' % self.fullname) if restart: self.tap_stop() if self.tap_running(): LOGGER.info('%s: tap already running.' % self.fullname) return LOGGER.info('%s: starting tap driver.' % self.fullname) reply, _ = self.parent.transport.katcprequest( name='tap-start', request_timeout=-1, require_ok=True, request_args=(self.name, self.name, str(self.ip_address), str(self.port), str(self.mac), )) if reply.arguments[0] != 'ok': raise RuntimeError('%s: failure starting tap driver.' % self.fullname) def tap_stop(self): """ Stop a TAP driver. """ if not self.tap_running(): return LOGGER.info('%s: stopping tap driver.' % self.fullname) reply, _ = self.parent.transport.katcprequest( name='tap-stop', request_timeout=-1, require_ok=True, request_args=(self.name, )) if reply.arguments[0] != 'ok': raise RuntimeError('%s: failure stopping tap ' 'device.' % self.fullname) def tap_info(self): """ Get info on the tap instance running on this interface. """ uninforms = [] def handle_inform(msg): uninforms.append(msg) self.parent.unhandled_inform_handler = handle_inform _, informs = self.parent.transport.katcprequest( name='tap-info', request_timeout=-1, require_ok=False, request_args=(self.name, )) self.parent.unhandled_inform_handler = None # process the tap-info if len(informs) == 1: return {'name': informs[0].arguments[0], 'ip': informs[0].arguments[1]} elif len(informs) == 0: return {'name': '', 'ip': ''} else: raise RuntimeError('%s: invalid return from tap-info?' % self.fullname) # TODO - this request should return okay if the tap isn't # running - it shouldn't fail # if reply.arguments[0] != 'ok': # log_runtime_error(LOGGER, 'Failure getting tap info for ' # 'device %s." % str(self)) def tap_running(self): """ Determine if an instance if tap is already running on for this ten GBE interface. """ tapinfo = self.tap_info() if tapinfo['name'] == '': return False return True def tap_arp_reload(self): """ Have the tap driver reload its ARP table right now. """ reply, _ = self.parent.transport.katcprequest( name="tap-arp-reload", request_timeout=-1, require_ok=True, request_args=(self.name, )) if reply.arguments[0] != 'ok': raise RuntimeError('Failure requesting ARP reload for tap ' 'device %s.' % str(self)) def multicast_receive(self, ip_str, group_size): """ Send a request to KATCP to have this tap instance send a multicast group join request. :param ip_str: A dotted decimal string representation of the base mcast IP address. :param group_size: An integer for how many mcast addresses from base to respond to. """ # mask = 255*(2 ** 24) + 255*(2 ** 16) + 255*(2 ** 8) + (255-group_size) # self.parent.write_int(self.name, str2ip(ip_str), offset=12) # self.parent.write_int(self.name, mask, offset=13) # mcast_group_string = ip_str + '+' + str(group_size) mcast_group_string = ip_str reply, _ = self.parent.transport.katcprequest( 'tap-multicast-add', -1, True, request_args=(self.name, 'recv', mcast_group_string, )) if reply.arguments[0] == 'ok': if mcast_group_string not in self.multicast_subscriptions: self.multicast_subscriptions.append(mcast_group_string) return else: raise RuntimeError('%s: failed adding multicast receive %s to ' 'tap device.' % (self.fullname, mcast_group_string)) def multicast_remove(self, ip_str): """ Send a request to be removed from a multicast group. :param ip_str: A dotted decimal string representation of the base mcast IP address. """ try: reply, _ = self.parent.transport.katcprequest( 'tap-multicast-remove', -1, True, request_args=(self.name, IpAddress.str2ip(ip_str), )) except: raise RuntimeError('%s: tap-multicast-remove does not seem to ' 'be supported on %s' % (self.fullname, self.parent.host)) if reply.arguments[0] == 'ok': if ip_str not in self.multicast_subscriptions: LOGGER.warning( '%s: That is odd, %s removed from mcast subscriptions, but ' 'it was not in its list of sbscribed addresses.' % ( self.fullname, ip_str)) self.multicast_subscriptions.remove(ip_str) return else: raise RuntimeError('%s: failed removing multicast address %s ' 'from tap device' % (self.fullname, IpAddress.str2ip(ip_str))) def _fabric_enable_disable(self, target_val): """ :param target_val: """ if self.memmap_compliant: word_bytes = list( struct.unpack('>4B', self.parent.read(self.name, 4, OFFSET_FLAGS))) if word_bytes[0] == target_val: return word_bytes[0] = target_val word_packed = struct.pack('>4B', *word_bytes) self.parent.write(self.name, word_packed, OFFSET_FLAGS) else: # 0x20 or (0x20 / 4)? What was the /4 for? word_bytes = list( struct.unpack('>4B', self.parent.read(self.name, 4, 0x20))) if word_bytes[1] == target_val: return word_bytes[1] = target_val word_packed = struct.pack('>4B', *word_bytes) self.parent.write(self.name, word_packed, 0x20) def fabric_enable(self): """ Enable the core fabric """ self._fabric_enable_disable(1) def fabric_disable(self): """ Enable the core fabric """ self._fabric_enable_disable(0) def fabric_soft_reset_toggle(self): """ Toggle the fabric soft reset """ if self.memmap_compliant: word_bytes = struct.unpack('>4B', self.parent.read(self.name, 4, OFFSET_FLAGS)) word_bytes = list(word_bytes) def write_val(val): word_bytes[2] = val word_packed = struct.pack('>4B', *word_bytes) if val == 0: self.parent.write(self.name, word_packed, OFFSET_FLAGS) else: self.parent.blindwrite(self.name, word_packed, OFFSET_FLAGS) if word_bytes[2] == 1: write_val(0) write_val(1) write_val(0) else: word_bytes = struct.unpack('>4B', self.parent.read(self.name, 4, 0x20)) word_bytes = list(word_bytes) def write_val(val): word_bytes[0] = val word_packed = struct.pack('>4B', *word_bytes) if val == 0: self.parent.write(self.name, word_packed, 0x20) else: self.parent.blindwrite(self.name, word_packed, 0x20) if word_bytes[0] == 1: write_val(0) write_val(1) write_val(0) def get_gbe_core_details(self, read_arp=False, read_cpu=False): """ Get 10GbE core details. assemble struct for header stuff... .. code-block:: python \"\"\" 0x00 - 0x07: MAC address 0x08 - 0x0b: Not used 0x0c - 0x0f: Gateway addr 0x10 - 0x13: IP addr 0x14 - 0x17: Not assigned 0x18 - 0x1b: Buffer sizes 0x1c - 0x1f: Not assigned 0x20 : Soft reset (bit 0) 0x21 : Fabric enable (bit 0) 0x22 - 0x23: Fabric port 0x24 - 0x27: XAUI status (bit 2,3,4,5 = lane sync, bit6 = chan_bond) 0x28 - 0x2b: PHY config 0x28 : RX_eq_mix 0x29 : RX_eq_pol 0x2a : TX_preemph 0x2b : TX_diff_ctrl 0x30 - 0x33: Multicast IP RX base address 0x34 - 0x37: Multicast IP mask 0x38 - 0x3b: Subnet mask 0x1000 : CPU TX buffer 0x2000 : CPU RX buffer 0x3000 : ARP tables start word_width = 8 \"\"\" self.add_field(Bitfield.Field('mac0', 0, word_width, 0, 0 * word_width)) self.add_field(Bitfield.Field('mac1', 0, word_width, 0, 1 * word_width)) self.add_field(Bitfield.Field('mac2', 0, word_width, 0, 2 * word_width)) self.add_field(Bitfield.Field('mac3', 0, word_width, 0, 3 * word_width)) self.add_field(Bitfield.Field('mac4', 0, word_width, 0, 4 * word_width)) self.add_field(Bitfield.Field('mac5', 0, word_width, 0, 5 * word_width)) self.add_field(Bitfield.Field('mac6', 0, word_width, 0, 6 * word_width)) self.add_field(Bitfield.Field('mac7', 0, word_width, 0, 7 * word_width)) self.add_field(Bitfield.Field('unused_1', 0, (0x0c - 0x08) * word_width, 0, 8 * word_width)) self.add_field(Bitfield.Field('gateway_ip0', 0, word_width, 0, 0x0c * word_width)) self.add_field(Bitfield.Field('gateway_ip1', 0, word_width, 0, 0x0d * word_width)) self.add_field(Bitfield.Field('gateway_ip2', 0, word_width, 0, 0x0e * word_width)) self.add_field(Bitfield.Field('gateway_ip3', 0, word_width, 0, 0x0f * word_width)) self.add_field(Bitfield.Field('ip0', 0, word_width, 0, 0x10 * word_width)) self.add_field(Bitfield.Field('ip1', 0, word_width, 0, 0x11 * word_width)) self.add_field(Bitfield.Field('ip2', 0, word_width, 0, 0x12 * word_width)) self.add_field(Bitfield.Field('ip3', 0, word_width, 0, 0x13 * word_width)) self.add_field(Bitfield.Field('unused_2', 0, (0x18 - 0x14) * word_width, 0, 0x14 * word_width)) self.add_field(Bitfield.Field('buf_sizes', 0, (0x1c - 0x18) * word_width, 0, 0x18 * word_width)) self.add_field(Bitfield.Field('unused_3', 0, (0x20 - 0x1c) * word_width, 0, 0x1c * word_width)) self.add_field(Bitfield.Field('soft_reset', 2, 1, 0, 0x20 * word_width)) self.add_field(Bitfield.Field('fabric_enable', 2, 1, 0, 0x21 * word_width)) self.add_field(Bitfield.Field('port', 0, (0x24 - 0x22) * word_width, 0, 0x22 * word_width)) self.add_field(Bitfield.Field('xaui_status', 0, (0x28 - 0x24) * word_width, 0, 0x24 * word_width)) self.add_field(Bitfield.Field('rx_eq_mix', 0, word_width, 0, 0x28 * word_width)) self.add_field(Bitfield.Field('rq_eq_pol', 0, word_width, 0, 0x29 * word_width)) self.add_field(Bitfield.Field('tx_preempth', 0, word_width, 0, 0x2a * word_width)) self.add_field(Bitfield.Field('tx_diff_ctrl', 0, word_width, 0, 0x2b * word_width)) #self.add_field(Bitfield.Field('buffer_tx', 0, 0x1000 * word_width, 0, 0x1000 * word_width)) #self.add_field(Bitfield.Field('buffer_rx', 0, 0x1000 * word_width, 0, 0x2000 * word_width)) #self.add_field(Bitfield.Field('arp_table', 0, 0x1000 * word_width, 0, 0x3000 * word_width)) """ if self.memmap_compliant: data = self.parent.read(self.name, 16384) data = list(struct.unpack('>16384B', data)) returnval = { 'ip_prefix': '%i.%i.%i.' % (data[0x14], data[0x15], data[0x16]), 'ip': IpAddress('%i.%i.%i.%i' % (data[0x14], data[0x15], data[0x16], data[0x17])), 'subnet_mask': IpAddress('%i.%i.%i.%i' % ( data[0x1c], data[0x1d], data[0x1e], data[0x1f])), 'mac': Mac('%i:%i:%i:%i:%i:%i' % (data[0x0e], data[0x0f], data[0x10], data[0x11], data[0x12], data[0x13])), 'gateway_ip': IpAddress('%i.%i.%i.%i' % (data[0x18], data[0x19], data[0x1a], data[0x1b])), 'fabric_port': ((data[0x32] << 8) + (data[0x33])), 'fabric_en': bool(data[0x2f] & 1), 'multicast': {'base_ip': IpAddress('%i.%i.%i.%i' % ( data[0x20], data[0x21], data[0x22], data[0x23])), 'ip_mask': IpAddress('%i.%i.%i.%i' % ( data[0x24], data[0x25], data[0x26], data[0x27])), 'rx_ips': []} } else: data = self.parent.read(self.name, 16384) data = list(struct.unpack('>16384B', data)) returnval = { 'ip_prefix': '%i.%i.%i.' % (data[0x10], data[0x11], data[0x12]), 'ip': IpAddress('%i.%i.%i.%i' % (data[0x10], data[0x11], data[0x12], data[0x13])), 'subnet_mask': IpAddress('%i.%i.%i.%i' % ( data[0x38], data[0x39], data[0x3a], data[0x3b])), 'mac': Mac('%i:%i:%i:%i:%i:%i' % (data[0x02], data[0x03], data[0x04], data[0x05], data[0x06], data[0x07])), 'gateway_ip': IpAddress('%i.%i.%i.%i' % (data[0x0c], data[0x0d], data[0x0e], data[0x0f])), 'fabric_port': ((data[0x22] << 8) + (data[0x23])), 'fabric_en': bool(data[0x21] & 1), 'xaui_lane_sync': [bool(data[0x27] & 4), bool(data[0x27] & 8), bool(data[0x27] & 16), bool(data[0x27] & 32)], 'xaui_status': [data[0x24], data[0x25], data[0x26], data[0x27]], 'xaui_chan_bond': bool(data[0x27] & 64), 'xaui_phy': {'rx_eq_mix': data[0x28], 'rx_eq_pol': data[0x29], 'tx_preemph': data[0x2a], 'tx_swing': data[0x2b]}, 'multicast': {'base_ip': IpAddress('%i.%i.%i.%i' % ( data[0x30], data[0x31], data[0x32], data[0x33])), 'ip_mask': IpAddress('%i.%i.%i.%i' % ( data[0x34], data[0x35], data[0x36], data[0x37])), 'rx_ips': []} } possible_addresses = [int(returnval['multicast']['base_ip'])] mask_int = int(returnval['multicast']['ip_mask']) for ctr in range(32): mask_bit = (mask_int >> ctr) & 1 if not mask_bit: new_ips = [] for ip in possible_addresses: new_ips.append(ip & (~(1 << ctr))) new_ips.append(new_ips[-1] | (1 << ctr)) possible_addresses.extend(new_ips) tmp = list(set(possible_addresses)) for ip in tmp: returnval['multicast']['rx_ips'].append(IpAddress(ip)) if read_arp: returnval['arp'] = self.get_arp_details(data) if read_cpu: returnval.update(self.get_cpu_details(data)) self.core_details = returnval return returnval def get_arp_details(self, port_dump=None): """ Get ARP details from this interface. :param port_dump: A list of raw bytes from interface memory. :type port_dump: list """ if self.memmap_compliant: arp_addr = OFFSET_ARP_CACHE else: arp_addr = 0x3000 if port_dump is None: port_dump = self.parent.read(self.name, 16384) port_dump = list(struct.unpack('>16384B', port_dump)) returnval = [] for addr in range(256): mac = [] for ctr in range(2, 8): mac.append(port_dump[arp_addr + (addr * 8) + ctr]) returnval.append(mac) return returnval def get_cpu_details(self, port_dump=None): """ Read details of the CPU buffers. :param port_dump: """ #TODO Not memmap compliant if port_dump is None: port_dump = self.parent.read(self.name, 16384) port_dump = list(struct.unpack('>16384B', port_dump)) returnval = {'cpu_tx': {}} for ctr in range(4096 / 8): tmp = [] for ctr2 in range(8): tmp.append(port_dump[4096 + (8 * ctr) + ctr2]) returnval['cpu_tx'][ctr*8] = tmp returnval['cpu_rx_buf_unack_data'] = port_dump[6 * 4 + 3] returnval['cpu_rx'] = {} for ctr in range(port_dump[6 * 4 + 3] + 8): tmp = [] for ctr2 in range(8): tmp.append(port_dump[8192 + (8 * ctr) + ctr2]) returnval['cpu_rx'][ctr * 8] = tmp return returnval def set_arp_table(self, macs): """Set the ARP table with a list of MAC addresses. The list, `macs`, is passed such that the zeroth element is the MAC address of the device with IP XXX.XXX.XXX.0, and element N is the MAC address of the device with IP XXX.XXX.XXX.N""" if self.memmap_compliant: arp_addr = OFFSET_ARP_CACHE else: arp_addr = 0x3000 macs = list(macs) macs_pack = struct.pack('>%dQ' % (len(macs)), *macs) self.parent.write(self.name, macs_pack, offset=arp_addr) # end
ska-sa/casperfpga
src/onegbe.py
Python
gpl-2.0
26,401
""" Django settings for Outcumbent project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) TEMPLATE_DIRS = ('templates') # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '3&@zwum@#!0f+g(k-pvlw#9n05t$kuz_5db58-02739t+u*u(r' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'outcumbent', ) MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) ROOT_URLCONF = 'Outcumbent.urls' WSGI_APPLICATION = 'Outcumbent.wsgi.application' # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'outcumbentdb', 'USER': 'root', #'PASSWORD': 'root', 'HOST': '127.0.0.1', 'PORT': '3306' } } # Internationalization # https://docs.djangoproject.com/en/1.6/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.6/howto/static-files/ STATIC_URL = '/static/'
praxeo/outcumbent
Outcumbent/settings.py
Python
gpl-2.0
2,140
<?php /** * @author Adam Charron <adam.c@vanillaforums.com> * @copyright 2009-2020 Vanilla Forums Inc. * @license Proprietary */ // First argument is paths from circleci glob. Basically a space separated list of file paths. $in = $argv[1]; if (!is_string($in)) { die('Only a string is allowed'); } // Break out the individual paths. $paths = explode(' ', $in); $regexContents = ''; foreach ($paths as $i => $path) { // Use just the test name. Full file paths don't work in a filter expression. $name = pathinfo($path, PATHINFO_FILENAME); $regexContents .= preg_quote($name); if ($i !== count($paths) - 1) { $regexContents .= '|'; } } $regex = "/^(.*\\\)?($regexContents)/"; // Output the regex. echo $regex;
vanilla/vanilla
.circleci/scripts/makePHPUnitFilter.php
PHP
gpl-2.0
752
<!DOCTYPE html> <html dir="rtl" lang="fa"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width,initial-scale=1, user-scalable=yes"> <meta name="keywords" content="{header_meta_keywords}"/> <meta name="description" content="{header_meta_description}"/> <?php if(isset($header_meta_robots)) {?> <meta name="robots" content="{header_meta_robots}" /> <?php } ?> <title>{header_title}</title> <?php if(isset($header_canonical_url) && $header_canonical_url) {?> <link rel="canonical" href="{header_canonical_url}"/> <?php } ?> <?php if(isset($header_next_url)) {?> <link rel="next" href="{header_next_url}"/> <?php } ?> <?php if(isset($header_prev_url)) {?> <link rel="prev" href="{header_prev_url}"/> <?php } ?> <?php if(isset($lang_pages)) { if(sizeof($lang_pages)>1) foreach($lang_pages as $lp) { $abbr=$lp['lang_abbr']; $link=$lp['link']; echo '<link rel="alternate" hreflang="'.$abbr.'" href="'.$link.'" />'."\n"; } else { $langs=array_keys($lang_pages); $lang=$langs[0]; echo '<link rel="alternate" hreflang="x-default" href="'.$lang_pages[$lang]['link'].'" />'."\n"; } } ?> <link rel="shortcut icon" href="{images_url}/favicon.png"/> <link rel="apple-touch-icon-precomposed" sizes="64x64" href="{images_url}/favicon.png" /> <link rel="apple-touch-icon" sizes="64x64" href="{images_url}/favicon.png" /> <link rel="stylesheet" type="text/css" href="{styles_url}/skeleton.css" /> <link rel="stylesheet" type="text/css" href="{styles_url}/style-rtl.css" /> <link rel="stylesheet" type="text/css" href="{styles_url}/customer.css" /> <?php if(isset($page_main_image)) { ?> <meta property="og:image" content="{page_main_image}" > <meta property="og:title" content="{header_title}"> <meta property="og:description" content="{header_description}"> <meta property="og:url" content="{header_canonical_url}"> <meta property="og:type" content="website"> <meta property="og:site_name" content="{main_name_text}"> <?php } ?> <!--[if ! lte IE 8]>--> <script src="{scripts_url}/jquery-2.1.3.min.js"></script> <!--<![endif]--> <!--[if lte IE 8]> <script src="{scripts_url}/jquery-1.11.1.min.js"></script> <![endif]--> <script src="{scripts_url}/customer_common.js"></script> <script src="{scripts_url}/scripts.js"></script> <!--[if lte IE 9]> <link rel="stylesheet" type="text/css" href="{styles_url}/style-ie.css" /> <![endif]--> </head> <body class="rtl customer-env" style="height:100%;"> <div class="header"> <div class="logo"> <a href="<?php echo get_link('home_url')?>" class="logo-img"><img src="{images_url}/logo-notext.png"/></a> <a href="<?php echo get_link('home_url')?>" class="logo-text"><img src="{images_url}/logo-text-fa.png" /></a> </div> <div class="top-menu"> <ul> <!-- <li> <a href=""></a> </li> --> <?php if(isset($lang_pages) && sizeof($lang_pages)>1) { ?> <li class="has-sub lang-li"> <a class="lang"></a> <ul> <?php foreach($lang_pages as $lang => $spec ) { ?> <li> <a <?php $class="lang-".$spec['lang_abbr']; if($spec['selected']) $class.=" selected"; echo "class='$class'"; ?> href="<?php echo $spec['link']; ?>"> <?php echo $lang;?> </a> </li> <?php } ?> </ul> </li> <?php } ?> </ul> </div> </div> <div class="content"> <div> <div class="side-menu-container"> <div class="side-menu"> <div class="mobile"> <img src="{images_url}/logo-text-fa.png"/> <div class="click"> <div></div> <div></div> <div></div> <div></div> </div> </div> <ul class="side-menu-ul"> <?php foreach($categories as $cat) { if(!$cat['show_in_list']) continue; $id=$cat['id']; $name=$cat['names'][$selected_lang]; $link=get_customer_category_details_link($id,$cat['hash'],$cat['urls'][$selected_lang]); echo "<li><a href='$link'>$name</a>\n"; if($cat['children']) { echo "<ul>\n"; foreach($cat['children'] as $child) { if(!$child['show_in_list']) continue; $id=$child['id']; $name=$child['names'][$selected_lang]; $link=get_customer_category_details_link($id,$child['hash'],$child['urls'][$selected_lang]); echo "<li><a href='$link'>$name</a>\n"; } echo "</ul>\n"; } echo "</li>\n"; } ?> <li><a href='<?php echo get_link("customer_contact_us");?>'>{contact_us_text}</a> </ul> </div> </div> <div class="message-main"> <?php if(isset($message) && strlen($message)>0) echo '<div class="message">'.$message.'</div>'; ?>
MohsenKoohi/BurgeCMF
Web/application/views/fa/customer/header.php
PHP
gpl-2.0
5,587
<?php include('../functions.php');?> <?php include('../login/auth.php');?> <?php include('../helpers/class.phpmailer.php');?> <?php //POST variables $campaign_id = mysqli_real_escape_string($mysqli, $_POST['campaign_id']); $test_email = mysqli_real_escape_string($mysqli, $_POST['test_email']); $test_email = str_replace(" ", "", $test_email); $test_email_array = explode(',', $test_email); //select campaign to send test email $q = 'SELECT * FROM campaigns WHERE id = '.$campaign_id.' AND userID = '.get_app_info('main_userID'); $r = mysqli_query($mysqli, $q); if ($r && mysqli_num_rows($r) > 0) { while($row = mysqli_fetch_array($r)) { $from_name = stripslashes($row['from_name']); $from_email = stripslashes($row['from_email']); $reply_to = stripslashes($row['reply_to']); $title = stripslashes($row['title']); $plain_text = stripslashes($row['plain_text']); $html_text = stripslashes($row['html_text']); } //tags for subject preg_match_all('/\[([a-zA-Z0-9!#%^&*()+=$@._-|\/?<>~`"\'\s]+),\s*fallback=/i', $title, $matches_var, PREG_PATTERN_ORDER); preg_match_all('/,\s*fallback=([a-zA-Z0-9!,#%^&*()+=$@._-|\/?<>~`"\'\s]*)\]/i', $title, $matches_val, PREG_PATTERN_ORDER); preg_match_all('/(\[[a-zA-Z0-9!#%^&*()+=$@._-|\/?<>~`"\'\s]+,\s*fallback=[a-zA-Z0-9!,#%^&*()+=$@._-|\/?<>~`"\'\s]*\])/i', $title, $matches_all, PREG_PATTERN_ORDER); $matches_var = $matches_var[1]; $matches_val = $matches_val[1]; $matches_all = $matches_all[1]; for($i=0;$i<count($matches_var);$i++) { $field = $matches_var[$i]; $fallback = $matches_val[$i]; $tag = $matches_all[$i]; //for each match, replace tag with fallback $title = str_replace($tag, $fallback, $title); } //tags for HTML preg_match_all('/\[([a-zA-Z0-9!#%^&*()+=$@._-|\/?<>~`"\'\s]+),\s*fallback=/i', $html_text, $matches_var, PREG_PATTERN_ORDER); preg_match_all('/,\s*fallback=([a-zA-Z0-9!,#%^&*()+=$@._-|\/?<>~`"\'\s]*)\]/i', $html_text, $matches_val, PREG_PATTERN_ORDER); preg_match_all('/(\[[a-zA-Z0-9!#%^&*()+=$@._-|\/?<>~`"\'\s]+,\s*fallback=[a-zA-Z0-9!,#%^&*()+=$@._-|\/?<>~`"\'\s]*\])/i', $html_text, $matches_all, PREG_PATTERN_ORDER); $matches_var = $matches_var[1]; $matches_val = $matches_val[1]; $matches_all = $matches_all[1]; for($i=0;$i<count($matches_var);$i++) { $field = $matches_var[$i]; $fallback = $matches_val[$i]; $tag = $matches_all[$i]; //for each match, replace tag with fallback $html_text = str_replace($tag, $fallback, $html_text); } //tags for Plain text preg_match_all('/\[([a-zA-Z0-9!#%^&*()+=$@._-|\/?<>~`"\'\s]+),\s*fallback=/i', $plain_text, $matches_var, PREG_PATTERN_ORDER); preg_match_all('/,\s*fallback=([a-zA-Z0-9!,#%^&*()+=$@._-|\/?<>~`"\'\s]*)\]/i', $plain_text, $matches_val, PREG_PATTERN_ORDER); preg_match_all('/(\[[a-zA-Z0-9!#%^&*()+=$@._-|\/?<>~`"\'\s]+,\s*fallback=[a-zA-Z0-9!,#%^&*()+=$@._-|\/?<>~`"\'\s]*\])/i', $plain_text, $matches_all, PREG_PATTERN_ORDER); $matches_var = $matches_var[1]; $matches_val = $matches_val[1]; $matches_all = $matches_all[1]; for($i=0;$i<count($matches_var);$i++) { $field = $matches_var[$i]; $fallback = $matches_val[$i]; $tag = $matches_all[$i]; //for each match, replace tag with fallback $plain_text = str_replace($tag, $fallback, $plain_text); } //set web version links $html_text = str_replace('<webversion', '<a href="#webversion-not-active-during-tests" ', $html_text); $html_text = str_replace('</webversion>', '</a>', $html_text); $html_text = str_replace('[webversion]', 'http://the_webversion_link', $html_text); $plain_text = str_replace('[webversion]', '[webversion-not-active-during-tests]', $plain_text); //set unsubscribe links $html_text = str_replace('<unsubscribe', '<a href="#unsubscribes-not-active-during-tests" ', $html_text); $html_text = str_replace('</unsubscribe>', '</a>', $html_text); $html_text = str_replace('[unsubscribe]', 'http://the_unsubscribe_link', $html_text); $plain_text = str_replace('[unsubscribe]', '[unsubscribes-not-active-during-tests]', $plain_text); //get smtp settings $q3 = 'SELECT apps.smtp_host, apps.smtp_port, apps.smtp_ssl, apps.smtp_username, apps.smtp_password FROM campaigns, apps WHERE apps.id = campaigns.app AND campaigns.id = '.$campaign_id; $r3 = mysqli_query($mysqli, $q3); if ($r3 && mysqli_num_rows($r3) > 0) { while($row = mysqli_fetch_array($r3)) { $smtp_host = $row['smtp_host']; $smtp_port = $row['smtp_port']; $smtp_ssl = $row['smtp_ssl']; $smtp_username = $row['smtp_username']; $smtp_password = $row['smtp_password']; } } } for($i=0;$i<count($test_email_array);$i++) { //Email tag $html_text2 = str_replace('[Email]', $test_email_array[$i], $html_text); $plain_text2 = str_replace('[Email]', $test_email_array[$i], $plain_text); $title2 = str_replace('[Email]', $test_email_array[$i], $title); //send test email $mail = new PHPMailer(); if(get_app_info('s3_key')!='' && get_app_info('s3_secret')!='') { $mail->IsAmazonSES(); $mail->AddAmazonSESKey(get_app_info('s3_key'), get_app_info('s3_secret')); } else if($smtp_host!='' && $smtp_port!='' && $smtp_username!='' && $smtp_password!='') { $mail->IsSMTP(); $mail->SMTPDebug = 0; $mail->SMTPAuth = true; $mail->SMTPSecure = $smtp_ssl; $mail->Host = $smtp_host; $mail->Port = $smtp_port; $mail->Username = $smtp_username; $mail->Password = $smtp_password; } $mail->Timezone = get_app_info('timezone'); $mail->CharSet = "UTF-8"; $mail->From = $from_email; $mail->FromName = $from_name; $mail->Subject = $title2; $mail->AltBody = $plain_text2; $mail->MsgHTML($html_text2); $mail->AddAddress($test_email_array[$i], ''); $mail->AddReplyTo($reply_to, $from_name); if(file_exists('../../uploads/attachments/'.$campaign_id)) { foreach(glob('../../uploads/attachments/'.$campaign_id.'/*') as $attachment){ if(file_exists($attachment)) $mail->AddAttachment($attachment); } } $mail->Send(); } ?>
oniiru/html
sendy/includes/create/test-send.php
PHP
gpl-2.0
5,991
/* * This file is part of the CMaNGOS Project. See AUTHORS file for Copyright information * * 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 */ /** \file \ingroup realmd */ #include "Common.h" #include "RealmList.h" #include "AuthCodes.h" #include "Util.h" // for Tokens typedef #include "Policies/Singleton.h" #include "Database/DatabaseEnv.h" INSTANTIATE_SINGLETON_1(RealmList); extern DatabaseType LoginDatabase; // will only support WoW 1.12.1/1.12.2/1.12.3 , WoW:TBC 2.4.3 and official release for WoW:WotLK and later, client builds 10505, 8606, 6141, 6005, 5875 // if you need more from old build then add it in cases in realmd sources code // list sorted from high to low build and first build used as low bound for accepted by default range (any > it will accepted by realmd at least) static RealmBuildInfo ExpectedRealmdClientBuilds[] = { {12340, 3, 3, 5, 'a'}, // highest supported build, also auto accept all above for simplify future supported builds testing {11723, 3, 3, 3, 'a'}, {11403, 3, 3, 2, ' '}, {11159, 3, 3, 0, 'a'}, {10505, 3, 2, 2, 'a'}, {8606, 2, 4, 3, ' '}, {6141, 1, 12, 3, ' '}, {6005, 1, 12, 2, ' '}, {5875, 1, 12, 1, ' '}, {0, 0, 0, 0, ' '} // terminator }; RealmBuildInfo const* FindBuildInfo(uint16 _build) { // first build is low bound of always accepted range if (_build >= ExpectedRealmdClientBuilds[0].build) return &ExpectedRealmdClientBuilds[0]; // continue from 1 with explicit equal check for (int i = 1; ExpectedRealmdClientBuilds[i].build; ++i) if (_build == ExpectedRealmdClientBuilds[i].build) return &ExpectedRealmdClientBuilds[i]; // none appropriate build return nullptr; } RealmList::RealmList() : m_UpdateInterval(0), m_NextUpdateTime(time(nullptr)) { } RealmList& sRealmList { static RealmList realmlist; return realmlist; } /// Load the realm list from the database void RealmList::Initialize(uint32 updateInterval) { m_UpdateInterval = updateInterval; ///- Get the content of the realmlist table in the database UpdateRealms(true); } void RealmList::UpdateRealm(uint32 ID, const std::string& name, const std::string& address, uint32 port, uint8 icon, RealmFlags realmflags, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, const std::string& builds) { ///- Create new if not exist or update existed Realm& realm = m_realms[name]; realm.m_ID = ID; realm.icon = icon; realm.realmflags = realmflags; realm.timezone = timezone; realm.allowedSecurityLevel = allowedSecurityLevel; realm.populationLevel = popu; Tokens tokens = StrSplit(builds, " "); Tokens::iterator iter; for (iter = tokens.begin(); iter != tokens.end(); ++iter) { uint32 build = atol((*iter).c_str()); realm.realmbuilds.insert(build); } uint16 first_build = !realm.realmbuilds.empty() ? *realm.realmbuilds.begin() : 0; realm.realmBuildInfo.build = first_build; realm.realmBuildInfo.major_version = 0; realm.realmBuildInfo.minor_version = 0; realm.realmBuildInfo.bugfix_version = 0; realm.realmBuildInfo.hotfix_version = ' '; if (first_build) if (RealmBuildInfo const* bInfo = FindBuildInfo(first_build)) if (bInfo->build == first_build) realm.realmBuildInfo = *bInfo; ///- Append port to IP address. std::ostringstream ss; ss << address << ":" << port; realm.address = ss.str(); } void RealmList::UpdateIfNeed() { // maybe disabled or updated recently if (!m_UpdateInterval || m_NextUpdateTime > time(nullptr)) return; m_NextUpdateTime = time(nullptr) + m_UpdateInterval; // Clears Realm list m_realms.clear(); // Get the content of the realmlist table in the database UpdateRealms(false); } void RealmList::UpdateRealms(bool init) { DETAIL_LOG("Updating Realm List..."); //// 0 1 2 3 4 5 6 7 8 9 QueryResult* result = LoginDatabase.Query("SELECT id, name, address, port, icon, realmflags, timezone, allowedSecurityLevel, population, realmbuilds FROM realmlist WHERE (realmflags & 1) = 0 ORDER BY name"); ///- Circle through results and add them to the realm map if (result) { do { Field* fields = result->Fetch(); uint32 Id = fields[0].GetUInt32(); std::string name = fields[1].GetCppString(); uint8 realmflags = fields[5].GetUInt8(); uint8 allowedSecurityLevel = fields[7].GetUInt8(); if (realmflags & ~(REALM_FLAG_OFFLINE | REALM_FLAG_NEW_PLAYERS | REALM_FLAG_RECOMMENDED | REALM_FLAG_SPECIFYBUILD)) { sLog.outError("Realm (id %u, name '%s') can only be flagged as OFFLINE (mask 0x02), NEWPLAYERS (mask 0x20), RECOMMENDED (mask 0x40), or SPECIFICBUILD (mask 0x04) in DB", Id, name.c_str()); realmflags &= (REALM_FLAG_OFFLINE | REALM_FLAG_NEW_PLAYERS | REALM_FLAG_RECOMMENDED | REALM_FLAG_SPECIFYBUILD); } UpdateRealm( Id, name, fields[2].GetCppString(), fields[3].GetUInt32(), fields[4].GetUInt8(), RealmFlags(realmflags), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat(), fields[9].GetCppString()); if (init) sLog.outString("Added realm id %u, name '%s'", Id, name.c_str()); } while (result->NextRow()); delete result; } }
natedahl32/portalclassic
src/realmd/RealmList.cpp
C++
gpl-2.0
6,721
// <copyright file="BlackWhiteProcessor.cs" company="James Jackson-South"> // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // </copyright> namespace ImageSharp.Processors { using System.Numerics; /// <summary> /// Converts the colors of the image to their black and white equivalent. /// </summary> /// <typeparam name="TColor">The pixel format.</typeparam> /// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam> public class BlackWhiteProcessor<TColor, TPacked> : ColorMatrixFilter<TColor, TPacked> where TColor : struct, IPackedPixel<TPacked> where TPacked : struct { /// <inheritdoc/> public override Matrix4x4 Matrix => new Matrix4x4() { M11 = 1.5f, M12 = 1.5f, M13 = 1.5f, M21 = 1.5f, M22 = 1.5f, M23 = 1.5f, M31 = 1.5f, M32 = 1.5f, M33 = 1.5f, M41 = -1f, M42 = -1f, M43 = -1f, }; } }
cornell/apropos
src/ImageSharp/Filters/Processors/ColorMatrix/BlackWhiteProcessor.cs
C#
gpl-2.0
1,125
#include "precomp.h" #include "jheaderarea.h" #include "private/jheaderarea_p.h" // - JSortFilterProxyModelData - class JSortFilterProxyModelData { public: QMap<int/*column*/, QRegExp> mapRegExp; }; // - class JSortFilterProxyModel - JSortFilterProxyModel::JSortFilterProxyModel(QObject *parent) : QSortFilterProxyModel(parent) { d = new JSortFilterProxyModelData(); } JSortFilterProxyModel::~JSortFilterProxyModel() { delete d; } void JSortFilterProxyModel::setFilterRegExp(int column, const QRegExp &regExp) { d->mapRegExp[column] = regExp; invalidateFilter(); } void JSortFilterProxyModel::removeFilter(int column) { if (d->mapRegExp.contains(column)) { d->mapRegExp.remove(column); invalidateFilter(); } } bool JSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const { QAbstractItemModel *model = sourceModel(); if (!model) { return true; } bool bResult = true; QMapIterator<int, QRegExp> iter(d->mapRegExp); while (iter.hasNext()) { iter.next(); QModelIndex index = model->index(source_row, iter.key(), source_parent); if (!index.isValid()) { return true; } bResult = bResult && model->data(index).toString().contains(iter.value()); } return bResult; } // - class JHeaderArea - JHeaderArea::JHeaderArea(QWidget *parent) : QFrame(parent) , d_ptr(new JHeaderAreaPrivate(this)) { Q_D(JHeaderArea); d->init(); } JHeaderArea::~JHeaderArea() { d_ptr->deleteLater(); } bool JHeaderArea::autoUpdateTitle() const { Q_D(const JHeaderArea); return d->autoUpdateTitle; } bool JHeaderArea::titleVisible() const { Q_D(const JHeaderArea); return d->titleArea->isVisible(); } QString JHeaderArea::title() const { Q_D(const JHeaderArea); return d->titleArea->text(); } int JHeaderArea::titleHeight() const { Q_D(const JHeaderArea); return d->titleArea->height(); } QFont JHeaderArea::titleFont() const { Q_D(const JHeaderArea); return d->titleArea->font(); } Qt::Alignment JHeaderArea::titleAlignment() const { Q_D(const JHeaderArea); return d->titleArea->alignment(); } bool JHeaderArea::filterVisible() const { Q_D(const JHeaderArea); return d->filterVisible(); } int JHeaderArea::filterHeight() const { Q_D(const JHeaderArea); return d->filterArea->height(); } void JHeaderArea::setTitleStyle(const QString &styleSheet) { Q_D(JHeaderArea); d->titleArea->setStyleSheet(styleSheet); } void JHeaderArea::setFilterStyle(const QString &styleSheet) { Q_D(JHeaderArea); d->filterArea->setStyleSheet(styleSheet); } bool JHeaderArea::filterItemVisible(int column) const { Q_D(const JHeaderArea); return d->filterItemVisible(column); } QStringList JHeaderArea::filterItem(int column) const { Q_D(const JHeaderArea); return d->filterItem(column); } bool JHeaderArea::filterItemEditable(int column) const { Q_D(const JHeaderArea); return d->filterItemEditable(column); } void JHeaderArea::setFilterItemEditable(bool editable, int column) { Q_D(JHeaderArea); d->setFilterItemEditable(editable, column); } bool JHeaderArea::setFilterItem(int column, const QString &text) { Q_D(JHeaderArea); if (!d->sourceModel) { return false; } if (column < 0 || column >= d->sourceModel->columnCount()) { return false; } d->setFilterItem(column, text); return true; } bool JHeaderArea::setFilterItem(int column, const QStringList &texts) { Q_D(JHeaderArea); if (!d->sourceModel) { return false; } if (column < 0 || column >= d->sourceModel->columnCount()) { return false; } d->setFilterItem(column, texts); return true; } void JHeaderArea::setFilterItem(const QList<int> &columns) { Q_D(JHeaderArea); if (!d->sourceModel) { return; } QListIterator<int> iter(columns); while (iter.hasNext()) { int column = iter.next(); if (column < 0 || column >= d->sourceModel->columnCount()) { continue; } d->setFilterItem(column, ""); } } void JHeaderArea::setFilterItem(const QList<QPair<int, QString> > &columns) { Q_D(JHeaderArea); if (!d->sourceModel) { return; } QListIterator<QPair<int, QString> > iter(columns); while (iter.hasNext()) { const QPair<int, QString> &column = iter.next(); int col = column.first; if (col < 0 || col >= d->sourceModel->columnCount()) { continue; } d->setFilterItem(col, column.second); } } void JHeaderArea::setFilterItem(const QList<QPair<int, QStringList> > &columns) { Q_D(JHeaderArea); if (!d->sourceModel) { return; } QListIterator<QPair<int, QStringList> > iter(columns); while (iter.hasNext()) { const QPair<int, QStringList> &column = iter.next(); int col = column.first; if (col < 0 || col >= d->sourceModel->columnCount()) { continue; } d->setFilterItem(col, column.second); } } void JHeaderArea::setFilterItemAsComboBox(const QList<int> columns) { Q_D(JHeaderArea); if (!d->sourceModel) { return; } QListIterator<int> iter(columns); while (iter.hasNext()) { int column = iter.next(); if (column < 0 || column >= d->sourceModel->columnCount()) { continue; } d->setFilterItem(column); } } void JHeaderArea::setAllFilterItemWithLineEdit() { Q_D(JHeaderArea); d->replaceFilterItemWithLineEdit(); } void JHeaderArea::setAllFilterItemWithComboBox() { Q_D(JHeaderArea); d->replaceFilterItemWithComboBox(); } void JHeaderArea::removeFilterItem(int column) { Q_D(JHeaderArea); if (!d->sourceModel) { return; } if (column < 0 || column >= d->sourceModel->columnCount()) { return; } d->removeFilterItem(column); } void JHeaderArea::clearFilterItem() { Q_D(JHeaderArea); d->clearFilterItem(); } JSortFilterProxyModel *JHeaderArea::filterModel() { Q_D(JHeaderArea); if (d->sourceModel) { return d->cusSortModel; } else { return &d->sortModel; } } void JHeaderArea::setFilterProxyModel(JSortFilterProxyModel *model) { Q_D(JHeaderArea); d->cusSortModel = model; d->updateFilterModel(filterVisible()); } bool JHeaderArea::attach(QAbstractItemView *view) { Q_D(JHeaderArea); if (d->attach(view)) { Q_EMIT attached(); return true; } else { return false; } } void JHeaderArea::detach() { Q_D(JHeaderArea); d->detach(); Q_EMIT detached(); } void JHeaderArea::setAutoUpdateTitle(bool enable) { Q_D(JHeaderArea); d->setAutpUpdateTitle(enable); } void JHeaderArea::setTitleVisible(bool visible) { Q_D(JHeaderArea); d->titleArea->setVisible(visible); Q_EMIT titleVisibleChanged(visible); } void JHeaderArea::setTitle(const QString &text) { Q_D(JHeaderArea); if (d->titleArea->text() != text) { d->titleArea->setText(text); Q_EMIT titleChanged(text); } } void JHeaderArea::setTitleHeight(int height) { Q_D(JHeaderArea); if (d->titleArea->height() != height) { d->titleArea->setFixedHeight(height); Q_EMIT titleHeightChanged(height); } } void JHeaderArea::setTitleFont(const QFont &font) { Q_D(JHeaderArea); d->titleArea->setFont(font); } void JHeaderArea::setTitleAlignment(Qt::Alignment alignment) { Q_D(JHeaderArea); d->titleArea->setAlignment(alignment); } void JHeaderArea::setFilterVisible(bool visible) { Q_D(JHeaderArea); d->setFilterVisible(visible); Q_EMIT filterVisibleChanged(visible); } void JHeaderArea::setFilterHeight(int height) { Q_D(JHeaderArea); d->filterArea->setFixedHeight(height); d->updateArea(); Q_EMIT filterHeightChanged(height); } void JHeaderArea::setSwitchEnabled(bool enable) { Q_D(JHeaderArea); d->setSwitchEnable(enable); }
iclosure/jsmartkits
src/jwidgets/src/jheaderarea.cpp
C++
gpl-2.0
8,104
"use strict" var merge = require('merge'); var HttpError = require('http-errors'); var Path = require('path'); module.exports = BaseController.extend({ view: { file: '', partials: {}, params: {} }, before: function(next) { this.view.file = this.req.route; next(); }, after: function(next) { if(this.res.headersSent) { return true; } var params = this.view.params; params.partials = {}; // Parse route for partials set not by config for(var i in this.view.partials) { params.partials[i] = Path.join(this.req.route, this.view.partials[i]); } // Merge partials with configuration partials params.partials = merge(true, { _content: this.view.file }, this.config.partials, params.partials); // Test if the partials do exist to prevent hard-to-solve issues for(var i in params.partials) { try { require.resolve(Path.join(app.basedir, app.config.path.view, params.partials[i] + '.hjs')); } catch(e) { throw new HttpError(404, 'Partial ' + partials[i] + ' Not Found'); } } // Do the actial rendering this.res.render(this.config.layout, params); next(); }, init: function(req, res) { // Load specific settings for the WebController this.view = merge(true, this.view, {}); this.config = merge(true, this.config, app.config.web); this.parent(req, res); } });
ehmPlankje/express-mvc-boilerplate
controller/_abstract/WebController.js
JavaScript
gpl-2.0
1,593
/* * CCastleInterface.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * * License: GNU General Public License v2.0 or later * Full text of license available in license.txt file, in main folder * */ #include "StdInc.h" #include "CCastleInterface.h" #include "CAdvmapInterface.h" #include "CHeroWindow.h" #include "CTradeWindow.h" #include "GUIClasses.h" #include "../CBitmapHandler.h" #include "../CGameInfo.h" #include "../CMessage.h" #include "../CMusicHandler.h" #include "../CPlayerInterface.h" #include "../Graphics.h" #include "../gui/CGuiHandler.h" #include "../gui/SDL_Extensions.h" #include "../windows/InfoWindows.h" #include "../widgets/MiscWidgets.h" #include "../widgets/CComponent.h" #include "../../CCallback.h" #include "../../lib/CArtHandler.h" #include "../../lib/CBuildingHandler.h" #include "../../lib/CCreatureHandler.h" #include "../../lib/CGeneralTextHandler.h" #include "../../lib/CModHandler.h" #include "../../lib/spells/CSpellHandler.h" #include "../../lib/CTownHandler.h" #include "../../lib/GameConstants.h" #include "../../lib/mapObjects/CGHeroInstance.h" #include "../../lib/mapObjects/CGTownInstance.h" const CBuilding * CBuildingRect::getBuilding() { if (!str->building) return nullptr; if (str->hiddenUpgrade) // hidden upgrades, e.g. hordes - return base (dwelling for hordes) return town->town->buildings.at(str->building->getBase()); return str->building; } CBuildingRect::CBuildingRect(CCastleBuildings * Par, const CGTownInstance *Town, const CStructure *Str) :CShowableAnim(0, 0, Str->defName, CShowableAnim::BASE | CShowableAnim::USE_RLE), parent(Par), town(Town), str(Str), stateCounter(80) { recActions = ACTIVATE | DEACTIVATE | DISPOSE | SHARE_POS; addUsedEvents(LCLICK | RCLICK | HOVER); pos.x += str->pos.x; pos.y += str->pos.y; if (!str->borderName.empty()) border = BitmapHandler::loadBitmap(str->borderName, true); else border = nullptr; if (!str->areaName.empty()) area = BitmapHandler::loadBitmap(str->areaName); else area = nullptr; } CBuildingRect::~CBuildingRect() { SDL_FreeSurface(border); SDL_FreeSurface(area); } bool CBuildingRect::operator<(const CBuildingRect & p2) const { return (str->pos.z) < (p2.str->pos.z); } void CBuildingRect::hover(bool on) { if(on) { if(!(active & MOVE)) addUsedEvents(MOVE); } else { if(active & MOVE) removeUsedEvents(MOVE); if(parent->selectedBuilding == this) { parent->selectedBuilding = nullptr; GH.statusbar->clear(); } } } void CBuildingRect::clickLeft(tribool down, bool previousState) { if( previousState && getBuilding() && area && !down && (parent->selectedBuilding==this)) if (!CSDL_Ext::isTransparent(area, GH.current->motion.x-pos.x, GH.current->motion.y-pos.y) ) //inside building image parent->buildingClicked(getBuilding()->bid); } void CBuildingRect::clickRight(tribool down, bool previousState) { if((!area) || (!((bool)down)) || (this!=parent->selectedBuilding) || getBuilding() == nullptr) return; if( !CSDL_Ext::isTransparent(area, GH.current->motion.x-pos.x, GH.current->motion.y-pos.y) ) //inside building image { BuildingID bid = getBuilding()->bid; const CBuilding *bld = town->town->buildings.at(bid); if (bid < BuildingID::DWELL_FIRST) { CRClickPopup::createAndPush(CInfoWindow::genText(bld->Name(), bld->Description()), new CComponent(CComponent::building, bld->town->faction->index, bld->bid)); } else { int level = ( bid - BuildingID::DWELL_FIRST ) % GameConstants::CREATURES_PER_TOWN; GH.pushInt(new CDwellingInfoBox(parent->pos.x+parent->pos.w/2, parent->pos.y+parent->pos.h/2, town, level)); } } } SDL_Color multiplyColors (const SDL_Color &b, const SDL_Color &a, double f) { SDL_Color ret; ret.r = a.r*f + b.r*(1-f); ret.g = a.g*f + b.g*(1-f); ret.b = a.b*f + b.b*(1-f); ret.a = a.a*f + b.b*(1-f); return ret; } void CBuildingRect::show(SDL_Surface * to) { const ui32 stageDelay = 16; const ui32 S1_TRANSP = 16; //0.5 sec building appear 0->100 transparency const ui32 S2_WHITE_B = 32; //0.5 sec border glows from white to yellow const ui32 S3_YELLOW_B= 48; //0.5 sec border glows from yellow to normal const ui32 BUILDED = 80; // 1 sec delay, nothing happens if (stateCounter < S1_TRANSP) { setAlpha(255*stateCounter/stageDelay); CShowableAnim::show(to); } else { setAlpha(255); CShowableAnim::show(to); } if (border && stateCounter > S1_TRANSP) { if (stateCounter == BUILDED) { if (parent->selectedBuilding == this) blitAtLoc(border,0,0,to); return; } if (border->format->palette != nullptr) { // key colors in glowing border SDL_Color c1 = {200, 200, 200, 255}; SDL_Color c2 = {120, 100, 60, 255}; SDL_Color c3 = {200, 180, 110, 255}; ui32 colorID = SDL_MapRGB(border->format, c3.r, c3.g, c3.b); SDL_Color oldColor = border->format->palette->colors[colorID]; SDL_Color newColor; if (stateCounter < S2_WHITE_B) newColor = multiplyColors(c1, c2, static_cast<double>(stateCounter % stageDelay) / stageDelay); else if (stateCounter < S3_YELLOW_B) newColor = multiplyColors(c2, c3, static_cast<double>(stateCounter % stageDelay) / stageDelay); else newColor = oldColor; SDL_SetColors(border, &newColor, colorID, 1); blitAtLoc(border,0,0,to); SDL_SetColors(border, &oldColor, colorID, 1); } } if (stateCounter < BUILDED) stateCounter++; } void CBuildingRect::showAll(SDL_Surface * to) { if (stateCounter == 0) return; CShowableAnim::showAll(to); if(!active && parent->selectedBuilding == this && border) blitAtLoc(border,0,0,to); } std::string CBuildingRect::getSubtitle()//hover text for building { if (!getBuilding()) return ""; int bid = getBuilding()->bid; if (bid<30)//non-dwellings - only buiding name return town->town->buildings.at(getBuilding()->bid)->Name(); else//dwellings - recruit %creature% { auto & availableCreatures = town->creatures[(bid-30)%GameConstants::CREATURES_PER_TOWN].second; if(availableCreatures.size()) { int creaID = availableCreatures.back();//taking last of available creatures return CGI->generaltexth->allTexts[16] + " " + CGI->creh->creatures.at(creaID)->namePl; } else { logGlobal->warnStream() << "Problem: dwelling with id " << bid << " offers no creatures!"; return "#ERROR#"; } } } void CBuildingRect::mouseMoved (const SDL_MouseMotionEvent & sEvent) { if(area && isItIn(&pos,sEvent.x, sEvent.y)) { if(CSDL_Ext::isTransparent(area, GH.current->motion.x-pos.x, GH.current->motion.y-pos.y)) //hovered pixel is inside this building { if(parent->selectedBuilding == this) { parent->selectedBuilding = nullptr; GH.statusbar->clear(); } } else //inside the area of this building { if(! parent->selectedBuilding //no building hovered || (*parent->selectedBuilding)<(*this)) //or we are on top { parent->selectedBuilding = this; GH.statusbar->setText(getSubtitle()); } } } } CDwellingInfoBox::CDwellingInfoBox(int centerX, int centerY, const CGTownInstance *Town, int level): CWindowObject(RCLICK_POPUP | PLAYER_COLORED, "CRTOINFO", Point(centerX, centerY)) { OBJ_CONSTRUCTION_CAPTURING_ALL; const CCreature * creature = CGI->creh->creatures.at(Town->creatures.at(level).second.back()); title = new CLabel(80, 30, FONT_SMALL, CENTER, Colors::WHITE, creature->namePl); animation = new CCreaturePic(30, 44, creature, true, true); std::string text = boost::lexical_cast<std::string>(Town->creatures.at(level).first); available = new CLabel(80,190, FONT_SMALL, CENTER, Colors::WHITE, CGI->generaltexth->allTexts[217] + text); costPerTroop = new CLabel(80, 227, FONT_SMALL, CENTER, Colors::WHITE, CGI->generaltexth->allTexts[346]); for(int i = 0; i<GameConstants::RESOURCE_QUANTITY; i++) { if(creature->cost[i]) { resPicture.push_back(new CAnimImage("RESOURCE", i, 0, 0, 0)); resAmount.push_back(new CLabel(0,0, FONT_SMALL, CENTER, Colors::WHITE, boost::lexical_cast<std::string>(creature->cost[i]))); } } int posY = 238; int posX = pos.w/2 - resAmount.size() * 25 + 5; for (size_t i=0; i<resAmount.size(); i++) { resPicture[i]->moveBy(Point(posX, posY)); resAmount[i]->moveBy(Point(posX+16, posY+43)); posX += 50; } } void CHeroGSlot::hover (bool on) { if(!on) { GH.statusbar->clear(); return; } CHeroGSlot *other = upg ? owner->garrisonedHero : owner->visitingHero; std::string temp; if(hero) { if(selection)//view NNN { temp = CGI->generaltexth->tcommands[4]; boost::algorithm::replace_first(temp,"%s",hero->name); } else if(other->hero && other->selection)//exchange { temp = CGI->generaltexth->tcommands[7]; boost::algorithm::replace_first(temp,"%s",hero->name); boost::algorithm::replace_first(temp,"%s",other->hero->name); } else// select NNN (in ZZZ) { if(upg)//down - visiting { temp = CGI->generaltexth->tcommands[32]; boost::algorithm::replace_first(temp,"%s",hero->name); } else //up - garrison { temp = CGI->generaltexth->tcommands[12]; boost::algorithm::replace_first(temp,"%s",hero->name); } } } else //we are empty slot { if(other->selection && other->hero) //move NNNN { temp = CGI->generaltexth->tcommands[6]; boost::algorithm::replace_first(temp,"%s",other->hero->name); } else //empty { temp = CGI->generaltexth->allTexts[507]; } } if(temp.size()) GH.statusbar->setText(temp); } void CHeroGSlot::clickLeft(tribool down, bool previousState) { CHeroGSlot *other = upg ? owner->garrisonedHero : owner->visitingHero; if(!down) { owner->garr->setSplittingMode(false); owner->garr->selectSlot(nullptr); if(hero && selection) { setHighlight(false); LOCPLINT->openHeroWindow(hero); } else if(other->hero && other->selection) { bool allow = true; if(upg) //moving hero out of town - check if it is allowed { if(!hero && LOCPLINT->cb->howManyHeroes(false) >= VLC->modh->settings.MAX_HEROES_ON_MAP_PER_PLAYER) { std::string tmp = CGI->generaltexth->allTexts[18]; //You already have %d adventuring heroes under your command. boost::algorithm::replace_first(tmp,"%d",boost::lexical_cast<std::string>(LOCPLINT->cb->howManyHeroes(false))); LOCPLINT->showInfoDialog(tmp,std::vector<CComponent*>(), soundBase::sound_todo); allow = false; } else if(!other->hero->stacksCount()) //hero has no creatures - strange, but if we have appropriate error message... { LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[19],std::vector<CComponent*>(), soundBase::sound_todo); //This hero has no creatures. A hero must have creatures before he can brave the dangers of the countryside. allow = false; } } setHighlight(false); other->setHighlight(false); if(allow) { owner->swapArmies(); hero = other->hero; } } else if(hero) { setHighlight(true); owner->garr->selectSlot(nullptr); showAll(screen2); } hover(false);hover(true); //refresh statusbar } } void CHeroGSlot::clickRight(tribool down, bool previousState) { if(hero && down) { GH.pushInt(new CInfoBoxPopup(Point(pos.x + 175, pos.y + 100), hero)); } } void CHeroGSlot::deactivate() { vstd::clear_pointer(selection); CIntObject::deactivate(); } CHeroGSlot::CHeroGSlot(int x, int y, int updown, const CGHeroInstance *h, HeroSlots * Owner) { owner = Owner; pos.x += x; pos.y += y; pos.w = 58; pos.h = 64; upg = updown; selection = nullptr; image = nullptr; set(h); addUsedEvents(LCLICK | RCLICK | HOVER); } CHeroGSlot::~CHeroGSlot() { } void CHeroGSlot::setHighlight( bool on ) { OBJ_CONSTRUCTION_CAPTURING_ALL; vstd::clear_pointer(selection); if (on) selection = new CAnimImage("TWCRPORT", 1, 0); if(owner->garrisonedHero->hero && owner->visitingHero->hero) //two heroes in town { for(auto & elem : owner->garr->splitButtons) //splitting enabled when slot higlighted elem->block(!on); } } void CHeroGSlot::set(const CGHeroInstance *newHero) { OBJ_CONSTRUCTION_CAPTURING_ALL; if (image) delete image; hero = newHero; if (newHero) image = new CAnimImage("PortraitsLarge", newHero->portrait, 0, 0, 0); else if(!upg && owner->showEmpty) //up garrison image = new CAnimImage("CREST58", LOCPLINT->castleInt->town->getOwner().getNum(), 0, 0, 0); else image = nullptr; } template <class ptr> class SORTHELP { public: bool operator () (const ptr *a , const ptr *b) { return (*a)<(*b); } }; SORTHELP<CBuildingRect> buildSorter; SORTHELP<CStructure> structSorter; CCastleBuildings::CCastleBuildings(const CGTownInstance* Town): town(Town), selectedBuilding(nullptr) { OBJ_CONSTRUCTION_CAPTURING_ALL; background = new CPicture(town->town->clientInfo.townBackground); pos.w = background->pos.w; pos.h = background->pos.h; recreate(); } void CCastleBuildings::recreate() { selectedBuilding = nullptr; OBJ_CONSTRUCTION_CAPTURING_ALL; //clear existing buildings for(auto build : buildings) delete build; buildings.clear(); groups.clear(); //Generate buildings list auto buildingsCopy = town->builtBuildings;// a bit modified copy of built buildings if(vstd::contains(town->builtBuildings, BuildingID::SHIPYARD)) { auto bayPos = town->bestLocation(); if(!bayPos.valid()) logGlobal->warnStream() << "Shipyard in non-coastal town!"; std::vector <const CGObjectInstance *> vobjs = LOCPLINT->cb->getVisitableObjs(bayPos, false); //there is visitable obj at shipyard output tile and it's a boat or hero (on boat) if(!vobjs.empty() && (vobjs.front()->ID == Obj::BOAT || vobjs.front()->ID == Obj::HERO)) { buildingsCopy.insert(BuildingID::SHIP); } } for(const CStructure * structure : town->town->clientInfo.structures) { if (!structure->building) { buildings.push_back(new CBuildingRect(this, town, structure)); continue; } if (vstd::contains(buildingsCopy, structure->building->bid)) { groups[structure->building->getBase()].push_back(structure); } } for(auto & entry : groups) { const CBuilding * build = town->town->buildings.at(entry.first); const CStructure * toAdd = *boost::max_element(entry.second, [=](const CStructure * a, const CStructure * b) { return build->getDistance(a->building->bid) < build->getDistance(b->building->bid); }); buildings.push_back(new CBuildingRect(this, town, toAdd)); } boost::sort(buildings, [] (const CBuildingRect * a, const CBuildingRect * b) { return *a < *b; }); } CCastleBuildings::~CCastleBuildings() { } void CCastleBuildings::addBuilding(BuildingID building) { //FIXME: implement faster method without complete recreation of town BuildingID base = town->town->buildings.at(building)->getBase(); recreate(); auto & structures = groups.at(base); for(CBuildingRect * rect : buildings) { if (vstd::contains(structures, rect->str)) { //reset animation if (structures.size() == 1) rect->stateCounter = 0; // transparency -> fully visible stage else rect->stateCounter = 16; // already in fully visible stage break; } } } void CCastleBuildings::removeBuilding(BuildingID building) { //FIXME: implement faster method without complete recreation of town recreate(); } void CCastleBuildings::show(SDL_Surface * to) { CIntObject::show(to); for(CBuildingRect * str : buildings) str->show(to); } void CCastleBuildings::showAll(SDL_Surface * to) { CIntObject::showAll(to); for(CBuildingRect * str : buildings) str->showAll(to); } const CGHeroInstance* CCastleBuildings::getHero() { if (town->visitingHero) return town->visitingHero; if (town->garrisonHero) return town->garrisonHero; return nullptr; } void CCastleBuildings::buildingClicked(BuildingID building) { logGlobal->traceStream()<<"You've clicked on "<<building; const CBuilding *b = town->town->buildings.find(building)->second; if(building >= BuildingID::DWELL_FIRST) { enterDwelling((building-BuildingID::DWELL_FIRST)%GameConstants::CREATURES_PER_TOWN); } else { switch(building) { case BuildingID::MAGES_GUILD_1: case BuildingID::MAGES_GUILD_2: case BuildingID::MAGES_GUILD_3: case BuildingID::MAGES_GUILD_4: case BuildingID::MAGES_GUILD_5: enterMagesGuild(); break; case BuildingID::TAVERN: LOCPLINT->showTavernWindow(town); break; case BuildingID::SHIPYARD: if(town->shipyardStatus() == IBoatGenerator::GOOD) LOCPLINT->showShipyardDialog(town); else if(town->shipyardStatus() == IBoatGenerator::BOAT_ALREADY_BUILT) LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[51]); break; case BuildingID::FORT: case BuildingID::CITADEL: case BuildingID::CASTLE: GH.pushInt(new CFortScreen(town)); break; case BuildingID::VILLAGE_HALL: case BuildingID::CITY_HALL: case BuildingID::TOWN_HALL: case BuildingID::CAPITOL: enterTownHall(); break; case BuildingID::MARKETPLACE: GH.pushInt(new CMarketplaceWindow(town, town->visitingHero)); break; case BuildingID::BLACKSMITH: enterBlacksmith(town->town->warMachine); break; case BuildingID::SPECIAL_1: switch(town->subID) { case ETownType::RAMPART://Mystic Pond enterFountain(building); break; case ETownType::TOWER: case ETownType::DUNGEON://Artifact Merchant case ETownType::CONFLUX: if(town->visitingHero) GH.pushInt(new CMarketplaceWindow(town, town->visitingHero, EMarketMode::RESOURCE_ARTIFACT)); else LOCPLINT->showInfoDialog(boost::str(boost::format(CGI->generaltexth->allTexts[273]) % b->Name())); //Only visiting heroes may use the %s. break; default: enterBuilding(building); break; } break; case BuildingID::SHIP: LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[51]); //Cannot build another boat break; case BuildingID::SPECIAL_2: switch(town->subID) { case ETownType::RAMPART: //Fountain of Fortune enterFountain(building); break; case ETownType::STRONGHOLD: //Freelancer's Guild if(getHero()) GH.pushInt(new CMarketplaceWindow(town, getHero(), EMarketMode::CREATURE_RESOURCE)); else LOCPLINT->showInfoDialog(boost::str(boost::format(CGI->generaltexth->allTexts[273]) % b->Name())); //Only visiting heroes may use the %s. break; case ETownType::CONFLUX: //Magic University if (getHero()) GH.pushInt(new CUniversityWindow(getHero(), town)); else enterBuilding(building); break; default: enterBuilding(building); break; } break; case BuildingID::SPECIAL_3: switch(town->subID) { case ETownType::CASTLE: //Brotherhood of sword LOCPLINT->showTavernWindow(town); break; case ETownType::INFERNO: //Castle Gate enterCastleGate(); break; case ETownType::NECROPOLIS: //Skeleton Transformer GH.pushInt( new CTransformerWindow(getHero(), town) ); break; case ETownType::DUNGEON: //Portal of Summoning if (town->creatures[GameConstants::CREATURES_PER_TOWN].second.empty())//No creatures LOCPLINT->showInfoDialog(CGI->generaltexth->tcommands[30]); else enterDwelling(GameConstants::CREATURES_PER_TOWN); break; case ETownType::STRONGHOLD: //Ballista Yard enterBlacksmith(ArtifactID::BALLISTA); break; default: enterBuilding(building); break; } break; default: enterBuilding(building); break; } } } void CCastleBuildings::enterBlacksmith(ArtifactID artifactID) { const CGHeroInstance *hero = town->visitingHero; if(!hero) { LOCPLINT->showInfoDialog(boost::str(boost::format(CGI->generaltexth->allTexts[273]) % town->town->buildings.find(BuildingID::BLACKSMITH)->second->Name())); return; } int price = CGI->arth->artifacts[artifactID]->price; bool possible = LOCPLINT->cb->getResourceAmount(Res::GOLD) >= price && !hero->hasArt(artifactID); CreatureID cre = artifactID.toArtifact()->warMachine; GH.pushInt(new CBlacksmithDialog(possible, cre, artifactID, hero->id)); } void CCastleBuildings::enterBuilding(BuildingID building) { std::vector<CComponent*> comps(1, new CComponent(CComponent::building, town->subID, building)); LOCPLINT->showInfoDialog( town->town->buildings.find(building)->second->Description(),comps); } void CCastleBuildings::enterCastleGate() { if (!town->visitingHero) { LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[126]); return;//only visiting hero can use castle gates } std::vector <int> availableTowns; std::vector <const CGTownInstance*> Towns = LOCPLINT->cb->getTownsInfo(true); for(auto & Town : Towns) { const CGTownInstance *t = Town; if (t->id != this->town->id && t->visitingHero == nullptr && //another town, empty and this is t->hasBuilt(BuildingID::CASTLE_GATE, ETownType::INFERNO)) { availableTowns.push_back(t->id.getNum());//add to the list } } auto gateIcon = new CAnimImage(town->town->clientInfo.buildingsIcons, BuildingID::CASTLE_GATE);//will be deleted by selection window GH.pushInt (new CObjectListWindow(availableTowns, gateIcon, CGI->generaltexth->jktexts[40], CGI->generaltexth->jktexts[41], std::bind (&CCastleInterface::castleTeleport, LOCPLINT->castleInt, _1))); } void CCastleBuildings::enterDwelling(int level) { assert(level >= 0 && level < town->creatures.size()); auto recruitCb = [=](CreatureID id, int count){ LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, level); }; GH.pushInt(new CRecruitmentWindow(town, level, town, recruitCb, -87)); } void CCastleBuildings::enterFountain(BuildingID building) { std::vector<CComponent*> comps(1, new CComponent(CComponent::building,town->subID,building)); std::string descr = town->town->buildings.find(building)->second->Description(); if ( building == BuildingID::FOUNTAIN_OF_FORTUNE) descr += "\n\n"+town->town->buildings.find(BuildingID::MYSTIC_POND)->second->Description(); if (town->bonusValue.first == 0)//fountain was builded this week descr += "\n\n"+ CGI->generaltexth->allTexts[677]; else//fountain produced something; { descr+= "\n\n"+ CGI->generaltexth->allTexts[678]; boost::algorithm::replace_first(descr,"%s",CGI->generaltexth->restypes[town->bonusValue.first]); boost::algorithm::replace_first(descr,"%d",boost::lexical_cast<std::string>(town->bonusValue.second)); } LOCPLINT->showInfoDialog(descr, comps); } void CCastleBuildings::enterMagesGuild() { const CGHeroInstance *hero = getHero(); if(hero && !hero->hasSpellbook()) //hero doesn't have spellbok { if(LOCPLINT->cb->getResourceAmount(Res::GOLD) < 500) //not enough gold to buy spellbook { openMagesGuild(); LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[213]); } else { CFunctionList<void()> onYes = [this](){ openMagesGuild(); }; CFunctionList<void()> onNo = onYes; onYes += [hero](){ LOCPLINT->cb->buyArtifact(hero, ArtifactID::SPELLBOOK); }; std::vector<CComponent*> components(1, new CComponent(CComponent::artifact,ArtifactID::SPELLBOOK,0)); LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[214], onYes, onNo, true, components); } } else { openMagesGuild(); } } void CCastleBuildings::enterTownHall() { if(town->visitingHero && town->visitingHero->hasArt(2) && !vstd::contains(town->builtBuildings, BuildingID::GRAIL)) //hero has grail, but town does not have it { if(!vstd::contains(town->forbiddenBuildings, BuildingID::GRAIL)) { LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[597], //Do you wish this to be the permanent home of the Grail? [&](){ LOCPLINT->cb->buildBuilding(town, BuildingID::GRAIL); }, [&](){ openTownHall(); }, true); } else { LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[673]); dynamic_cast<CInfoWindow*>(GH.topInt())->buttons[0]->addCallback(std::bind(&CCastleBuildings::openTownHall, this)); } } else { openTownHall(); } } void CCastleBuildings::openMagesGuild() { std::string mageGuildBackground; mageGuildBackground = LOCPLINT->castleInt->town->town->clientInfo.guildBackground; GH.pushInt(new CMageGuildScreen(LOCPLINT->castleInt,mageGuildBackground)); } void CCastleBuildings::openTownHall() { GH.pushInt(new CHallInterface(town)); } CCastleInterface::CCastleInterface(const CGTownInstance * Town, const CGTownInstance * from): CWindowObject(PLAYER_COLORED | BORDERED), hall(nullptr), fort(nullptr), town(Town) { OBJ_CONSTRUCTION_CAPTURING_ALL; LOCPLINT->castleInt = this; addUsedEvents(KEYBOARD); builds = new CCastleBuildings(town); panel = new CPicture("TOWNSCRN", 0, builds->pos.h); panel->colorize(LOCPLINT->playerID); pos.w = panel->pos.w; pos.h = builds->pos.h + panel->pos.h; center(); updateShadow(); garr = new CGarrisonInt(305, 387, 4, Point(0,96), panel->bg, Point(62,374), town->getUpperArmy(), town->visitingHero); garr->type |= REDRAW_PARENT; heroes = new HeroSlots(town, Point(241, 387), Point(241, 483), garr, true); title = new CLabel(85, 387, FONT_MEDIUM, TOPLEFT, Colors::WHITE, town->name); income = new CLabel(195, 443, FONT_SMALL, CENTER); icon = new CAnimImage("ITPT", 0, 0, 15, 387); exit = new CButton(Point(744, 544), "TSBTNS", CButton::tooltip(CGI->generaltexth->tcommands[8]), [&](){close();}, SDLK_RETURN); exit->assignedKeys.insert(SDLK_ESCAPE); exit->setImageOrder(4, 5, 6, 7); split = new CButton(Point(744, 382), "TSBTNS.DEF", CButton::tooltip(CGI->generaltexth->tcommands[3]), [&](){garr->splitClick();}); split->addCallback(std::bind(&HeroSlots::splitClicked, heroes)); garr->addSplitBtn(split); Rect barRect(9, 182, 732, 18); statusbar = new CGStatusBar(new CPicture(*panel, barRect, 9, 555, false)); resdatabar = new CResDataBar("ARESBAR", 3, 575, 32, 2, 85, 85); townlist = new CTownList(3, Point(744, 414), "IAM014", "IAM015"); if (from) townlist->select(from); townlist->select(town); //this will scroll list to select current town townlist->onSelect = std::bind(&CCastleInterface::townChange, this); recreateIcons(); CCS->musich->playMusic(town->town->clientInfo.musicTheme, true); } CCastleInterface::~CCastleInterface() { LOCPLINT->castleInt = nullptr; } void CCastleInterface::close() { if(town->tempOwner == LOCPLINT->playerID) //we may have opened window for an allied town { if(town->visitingHero && town->visitingHero->tempOwner == LOCPLINT->playerID) adventureInt->select(town->visitingHero); else adventureInt->select(town); } CWindowObject::close(); } void CCastleInterface::castleTeleport(int where) { const CGTownInstance * dest = LOCPLINT->cb->getTown(ObjectInstanceID(where)); LOCPLINT->cb->teleportHero(town->visitingHero, dest); LOCPLINT->eraseCurrentPathOf(town->visitingHero, false); } void CCastleInterface::townChange() { const CGTownInstance * dest = LOCPLINT->towns[townlist->getSelectedIndex()]; const CGTownInstance * town = this->town;// "this" is going to be deleted if ( dest == town ) return; close(); GH.pushInt(new CCastleInterface(dest, town)); } void CCastleInterface::addBuilding(BuildingID bid) { deactivate(); builds->addBuilding(bid); recreateIcons(); activate(); } void CCastleInterface::removeBuilding(BuildingID bid) { deactivate(); builds->removeBuilding(bid); recreateIcons(); activate(); } void CCastleInterface::recreateIcons() { OBJ_CONSTRUCTION_CAPTURING_ALL; delete fort; delete hall; size_t iconIndex = town->town->clientInfo.icons[town->hasFort()][town->builded >= CGI->modh->settings.MAX_BUILDING_PER_TURN]; icon->setFrame(iconIndex); TResources townIncome = town->dailyIncome(); income->setText(boost::lexical_cast<std::string>(townIncome[Res::GOLD])); hall = new CTownInfo( 80, 413, town, true); fort = new CTownInfo(122, 413, town, false); for (auto & elem : creainfo) delete elem; creainfo.clear(); for (size_t i=0; i<4; i++) creainfo.push_back(new CCreaInfo(Point(14+55*i, 459), town, i)); for (size_t i=0; i<4; i++) creainfo.push_back(new CCreaInfo(Point(14+55*i, 507), town, i+4)); } CCreaInfo::CCreaInfo(Point position, const CGTownInstance *Town, int Level, bool compact, bool ShowAvailable): town(Town), level(Level), showAvailable(ShowAvailable) { OBJ_CONSTRUCTION_CAPTURING_ALL; pos += position; if ( town->creatures.size() <= level || town->creatures[level].second.empty()) { level = -1; label = nullptr; picture = nullptr; creature = nullptr; return;//No creature } addUsedEvents(LCLICK | RCLICK | HOVER); ui32 creatureID = town->creatures[level].second.back(); creature = CGI->creh->creatures[creatureID]; picture = new CAnimImage("CPRSMALL", creature->iconIndex, 0, 8, 0); std::string value; if (showAvailable) value = boost::lexical_cast<std::string>(town->creatures[level].first); else value = boost::lexical_cast<std::string>(town->creatureGrowth(level)); if (compact) { label = new CLabel(40, 32, FONT_TINY, BOTTOMRIGHT, Colors::WHITE, value); pos.x += 8; pos.w = 32; pos.h = 32; } else { label = new CLabel(24, 40, FONT_SMALL, CENTER, Colors::WHITE, value); pos.w = 48; pos.h = 48; } } void CCreaInfo::update() { if (label) { std::string value; if (showAvailable) value = boost::lexical_cast<std::string>(town->creatures[level].first); else value = boost::lexical_cast<std::string>(town->creatureGrowth(level)); if (value != label->text) label->setText(value); } } void CCreaInfo::hover(bool on) { std::string message = CGI->generaltexth->allTexts[588]; boost::algorithm::replace_first(message,"%s",creature->namePl); if(on) { GH.statusbar->setText(message); } else if (message == GH.statusbar->getText()) GH.statusbar->clear(); } void CCreaInfo::clickLeft(tribool down, bool previousState) { if(previousState && (!down)) { int offset = LOCPLINT->castleInt? (-87) : 0; auto recruitCb = [=](CreatureID id, int count) { LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, level); }; GH.pushInt(new CRecruitmentWindow(town, level, town, recruitCb, offset)); } } int CCreaInfo::AddToString(std::string from, std::string & to, int numb) { if (numb == 0) return 0; boost::algorithm::replace_first(from,"%+d", (numb > 0 ? "+" : "")+boost::lexical_cast<std::string>(numb)); //negative values don't need "+" to+="\n"+from; return numb; } std::string CCreaInfo::genGrowthText() { GrowthInfo gi = town->getGrowthInfo(level); std::string descr = boost::str(boost::format(CGI->generaltexth->allTexts[589]) % creature->nameSing % gi.totalGrowth()); for(const GrowthInfo::Entry &entry : gi.entries) { descr +="\n" + entry.description; } return descr; } void CCreaInfo::clickRight(tribool down, bool previousState) { if(down) { if (showAvailable) GH.pushInt(new CDwellingInfoBox(screen->w/2, screen->h/2, town, level)); else CRClickPopup::createAndPush(genGrowthText(), new CComponent(CComponent::creature, creature->idNumber)); } } CTownInfo::CTownInfo(int posX, int posY, const CGTownInstance* Town, bool townHall): town(Town), building(nullptr) { OBJ_CONSTRUCTION_CAPTURING_ALL; addUsedEvents(RCLICK | HOVER); pos.x += posX; pos.y += posY; int buildID; picture = nullptr; if (townHall) { buildID = 10 + town->hallLevel(); picture = new CAnimImage("ITMTL.DEF", town->hallLevel()); } else { buildID = 6 + town->fortLevel(); if (buildID == 6) return;//FIXME: suspicious statement, fix or comment picture = new CAnimImage("ITMCL.DEF", town->fortLevel()-1); } building = town->town->buildings.at(BuildingID(buildID)); pos = picture->pos; } void CTownInfo::hover(bool on) { if(on) { if ( building ) GH.statusbar->setText(building->Name()); } else GH.statusbar->clear(); } void CTownInfo::clickRight(tribool down, bool previousState) { if(building && down) CRClickPopup::createAndPush(CInfoWindow::genText(building->Name(), building->Description()), new CComponent(CComponent::building, building->town->faction->index, building->bid)); } void CCastleInterface::keyPressed( const SDL_KeyboardEvent & key ) { if(key.state != SDL_PRESSED) return; switch(key.keysym.sym) { #if 0 // code that can be used to fix blit order in towns using +/- keys. Quite ugly but works case SDLK_KP_PLUS : if (builds->selectedBuilding) { OBJ_CONSTRUCTION_CAPTURING_ALL; CStructure * str = const_cast<CStructure *>(builds->selectedBuilding->str); str->pos.z++; delete builds; builds = new CCastleBuildings(town); for(const CStructure * str : town->town->clientInfo.structures) { if (str->building) logGlobal->errorStream() << int(str->building->bid) << " -> " << int(str->pos.z); } } break; case SDLK_KP_MINUS: if (builds->selectedBuilding) { OBJ_CONSTRUCTION_CAPTURING_ALL; CStructure * str = const_cast<CStructure *>(builds->selectedBuilding->str); str->pos.z--; delete builds; builds = new CCastleBuildings(town); for(const CStructure * str : town->town->clientInfo.structures) { if (str->building) logGlobal->errorStream() << int(str->building->bid) << " -> " << int(str->pos.z); } } break; #endif case SDLK_UP: townlist->selectPrev(); break; case SDLK_DOWN: townlist->selectNext(); break; case SDLK_SPACE: heroes->swapArmies(); break; case SDLK_t: if(town->hasBuilt(BuildingID::TAVERN)) LOCPLINT->showTavernWindow(town); break; default: break; } } HeroSlots::HeroSlots(const CGTownInstance * Town, Point garrPos, Point visitPos, CGarrisonInt *Garrison, bool ShowEmpty): showEmpty(ShowEmpty), town(Town), garr(Garrison) { OBJ_CONSTRUCTION_CAPTURING_ALL; garrisonedHero = new CHeroGSlot(garrPos.x, garrPos.y, 0, town->garrisonHero, this); visitingHero = new CHeroGSlot(visitPos.x, visitPos.y, 1, town->visitingHero, this); } void HeroSlots::update() { garrisonedHero->set(town->garrisonHero); visitingHero->set(town->visitingHero); } void HeroSlots::splitClicked() { if(!!town->visitingHero && town->garrisonHero && (visitingHero->selection || garrisonedHero->selection)) { LOCPLINT->heroExchangeStarted(town->visitingHero->id, town->garrisonHero->id, QueryID(-1)); } } void HeroSlots::swapArmies() { if(!town->garrisonHero && town->visitingHero) //visiting => garrison, merge armies: town army => hero army { if(!town->visitingHero->canBeMergedWith(*town)) { LOCPLINT->showInfoDialog(CGI->generaltexth->allTexts[275], std::vector<CComponent*>(), soundBase::sound_todo); return; } } LOCPLINT->cb->swapGarrisonHero(town); } void CHallInterface::CBuildingBox::hover(bool on) { if(on) { std::string toPrint; if(state==EBuildingState::PREREQUIRES || state == EBuildingState::MISSING_BASE) toPrint = CGI->generaltexth->hcommands[5]; else if(state==EBuildingState::CANT_BUILD_TODAY) toPrint = CGI->generaltexth->allTexts[223]; else toPrint = CGI->generaltexth->hcommands[state]; boost::algorithm::replace_first(toPrint,"%s",building->Name()); GH.statusbar->setText(toPrint); } else GH.statusbar->clear(); } void CHallInterface::CBuildingBox::clickLeft(tribool down, bool previousState) { if(previousState && (!down)) GH.pushInt(new CBuildWindow(town,building,state,0)); } void CHallInterface::CBuildingBox::clickRight(tribool down, bool previousState) { if(down) GH.pushInt(new CBuildWindow(town,building,state,1)); } CHallInterface::CBuildingBox::CBuildingBox(int x, int y, const CGTownInstance * Town, const CBuilding * Building): town(Town), building(Building) { OBJ_CONSTRUCTION_CAPTURING_ALL; addUsedEvents(LCLICK | RCLICK | HOVER); pos.x += x; pos.y += y; pos.w = 154; pos.h = 92; state = LOCPLINT->cb->canBuildStructure(town,building->bid); static int panelIndex[12] = { 3, 3, 3, 0, 0, 2, 2, 1, 2, 2, 3, 3}; static int iconIndex[12] = {-1, -1, -1, 0, 0, 1, 2, -1, 1, 1, -1, -1}; new CAnimImage(town->town->clientInfo.buildingsIcons, building->bid, 0, 2, 2); new CAnimImage("TPTHBAR", panelIndex[state], 0, 1, 73); if (iconIndex[state] >=0) new CAnimImage("TPTHCHK", iconIndex[state], 0, 136, 56); new CLabel(75, 81, FONT_SMALL, CENTER, Colors::WHITE, building->Name()); //todo: add support for all possible states if(state >= EBuildingState::BUILDING_ERROR) state = EBuildingState::FORBIDDEN; } CHallInterface::CHallInterface(const CGTownInstance *Town): CWindowObject(PLAYER_COLORED | BORDERED, Town->town->clientInfo.hallBackground), town(Town) { OBJ_CONSTRUCTION_CAPTURING_ALL; resdatabar = new CMinorResDataBar(); resdatabar->pos.x += pos.x; resdatabar->pos.y += pos.y; Rect barRect(5, 556, 740, 18); statusBar = new CGStatusBar(new CPicture(*background, barRect, 5, 556, false)); title = new CLabel(399, 12, FONT_MEDIUM, CENTER, Colors::WHITE, town->town->buildings.at(BuildingID(town->hallLevel()+BuildingID::VILLAGE_HALL))->Name()); exit = new CButton(Point(748, 556), "TPMAGE1.DEF", CButton::tooltip(CGI->generaltexth->hcommands[8]), [&](){close();}, SDLK_RETURN); exit->assignedKeys.insert(SDLK_ESCAPE); auto & boxList = town->town->clientInfo.hallSlots; boxes.resize(boxList.size()); for(size_t row=0; row<boxList.size(); row++) //for each row { for(size_t col=0; col<boxList[row].size(); col++) //for each box { const CBuilding *building = nullptr; for(auto & elem : boxList[row][col])//we are looking for the first not build structure { auto buildingID = elem; building = town->town->buildings.at(buildingID); if(!vstd::contains(town->builtBuildings,buildingID)) break; } int posX = pos.w/2 - boxList[row].size()*154/2 - (boxList[row].size()-1)*20 + 194*col, posY = 35 + 104*row; if (building) boxes[row].push_back(new CBuildingBox(posX, posY, town, building)); } } } void CBuildWindow::buyFunc() { LOCPLINT->cb->buildBuilding(town,building->bid); GH.popInts(2); //we - build window and hall screen } std::string CBuildWindow::getTextForState(int state) { std::string ret; if(state < EBuildingState::ALLOWED) ret = CGI->generaltexth->hcommands[state]; switch (state) { case EBuildingState::ALREADY_PRESENT: case EBuildingState::CANT_BUILD_TODAY: case EBuildingState::NO_RESOURCES: ret.replace(ret.find_first_of("%s"), 2, building->Name()); break; case EBuildingState::ALLOWED: return CGI->generaltexth->allTexts[219]; //all prereq. are met case EBuildingState::PREREQUIRES: { auto toStr = [&](const BuildingID build) -> std::string { return town->town->buildings.at(build)->Name(); }; ret = CGI->generaltexth->allTexts[52]; ret += "\n" + town->genBuildingRequirements(building->bid).toString(toStr); break; } case EBuildingState::MISSING_BASE: { std::string msg = CGI->generaltexth->localizedTexts["townHall"]["missingBase"].String(); ret = boost::str(boost::format(msg) % town->town->buildings.at(building->upgrade)->Name()); break; } } return ret; } CBuildWindow::CBuildWindow(const CGTownInstance *Town, const CBuilding * Building, int state, bool rightClick): CWindowObject(PLAYER_COLORED | (rightClick ? RCLICK_POPUP : 0), "TPUBUILD"), town(Town), building(Building) { OBJ_CONSTRUCTION_CAPTURING_ALL; new CAnimImage(town->town->clientInfo.buildingsIcons, building->bid, 0, 125, 50); new CGStatusBar(new CPicture(*background, Rect(8, pos.h - 26, pos.w - 16, 19), 8, pos.h - 26)); new CLabel(197, 30, FONT_MEDIUM, CENTER, Colors::WHITE, boost::str(boost::format(CGI->generaltexth->hcommands[7]) % building->Name())); new CTextBox(building->Description(), Rect(33, 135, 329, 67), 0, FONT_MEDIUM, CENTER); new CTextBox(getTextForState(state), Rect(33, 216, 329, 67), 0, FONT_SMALL, CENTER); //Create components for all required resources std::vector<CComponent *> components; for(int i = 0; i<GameConstants::RESOURCE_QUANTITY; i++) { if(building->resources[i]) { components.push_back(new CComponent(CComponent::resource, i, building->resources[i], CComponent::small)); } } new CComponentBox(components, Rect(25, 300, pos.w - 50, 130)); if(!rightClick) { //normal window std::string tooltipYes = boost::str(boost::format(CGI->generaltexth->allTexts[595]) % building->Name()); std::string tooltipNo = boost::str(boost::format(CGI->generaltexth->allTexts[596]) % building->Name()); CButton * buy = new CButton(Point(45, 446), "IBUY30", CButton::tooltip(tooltipYes), [&](){ buyFunc(); }, SDLK_RETURN); buy->borderColor = Colors::METALLIC_GOLD; buy->block(state!=7 || LOCPLINT->playerID != town->tempOwner); CButton * cancel = new CButton(Point(290, 445), "ICANCEL", CButton::tooltip(tooltipNo), [&](){ close();}, SDLK_ESCAPE); cancel->borderColor = Colors::METALLIC_GOLD; } } std::string CFortScreen::getBgName(const CGTownInstance *town) { ui32 fortSize = town->creatures.size(); if (fortSize > GameConstants::CREATURES_PER_TOWN && town->creatures.back().second.empty()) fortSize--; if (fortSize == GameConstants::CREATURES_PER_TOWN) return "TPCASTL7"; else return "TPCASTL8"; } CFortScreen::CFortScreen(const CGTownInstance * town): CWindowObject(PLAYER_COLORED | BORDERED, getBgName(town)) { OBJ_CONSTRUCTION_CAPTURING_ALL; ui32 fortSize = town->creatures.size(); if (fortSize > GameConstants::CREATURES_PER_TOWN && town->creatures.back().second.empty()) fortSize--; const CBuilding *fortBuilding = town->town->buildings.at(BuildingID(town->fortLevel()+6)); title = new CLabel(400, 12, FONT_BIG, CENTER, Colors::WHITE, fortBuilding->Name()); std::string text = boost::str(boost::format(CGI->generaltexth->fcommands[6]) % fortBuilding->Name()); exit = new CButton(Point(748, 556), "TPMAGE1", CButton::tooltip(text), [&](){ close(); }, SDLK_RETURN); exit->assignedKeys.insert(SDLK_ESCAPE); std::vector<Point> positions = { Point(10, 22), Point(404, 22), Point(10, 155), Point(404,155), Point(10, 288), Point(404,288) }; if (fortSize == GameConstants::CREATURES_PER_TOWN) positions.push_back(Point(206,421)); else { positions.push_back(Point(10, 421)); positions.push_back(Point(404,421)); } for (ui32 i=0; i<fortSize; i++) { BuildingID buildingID; if (fortSize == GameConstants::CREATURES_PER_TOWN) { if (vstd::contains(town->builtBuildings, BuildingID::DWELL_UP_FIRST+i)) buildingID = BuildingID(BuildingID::DWELL_UP_FIRST+i); else buildingID = BuildingID(BuildingID::DWELL_FIRST+i); } else buildingID = BuildingID::SPECIAL_3; recAreas.push_back(new RecruitArea(positions[i].x, positions[i].y, town, i)); } resdatabar = new CMinorResDataBar(); resdatabar->pos.x += pos.x; resdatabar->pos.y += pos.y; Rect barRect(4, 554, 740, 18); statusBar = new CGStatusBar(new CPicture(*background, barRect, 4, 554, false)); } void CFortScreen::creaturesChanged() { for (auto & elem : recAreas) elem->creaturesChanged(); } LabeledValue::LabeledValue(Rect size, std::string name, std::string descr, int min, int max) { pos.x+=size.x; pos.y+=size.y; pos.w = size.w; pos.h = size.h; init(name, descr, min, max); } LabeledValue::LabeledValue(Rect size, std::string name, std::string descr, int val) { pos.x+=size.x; pos.y+=size.y; pos.w = size.w; pos.h = size.h; init(name, descr, val, val); } void LabeledValue::init(std::string nameText, std::string descr, int min, int max) { OBJ_CONSTRUCTION_CAPTURING_ALL; addUsedEvents(HOVER); hoverText = descr; std::string valueText; if (min && max) { valueText = boost::lexical_cast<std::string>(min); if (min != max) valueText += '-' + boost::lexical_cast<std::string>(max); } name = new CLabel(3, 0, FONT_SMALL, TOPLEFT, Colors::WHITE, nameText); value = new CLabel(pos.w-3, pos.h-2, FONT_SMALL, BOTTOMRIGHT, Colors::WHITE, valueText); } void LabeledValue::hover(bool on) { if(on) GH.statusbar->setText(hoverText); else { GH.statusbar->clear(); parent->hovered = false; } } const CCreature * CFortScreen::RecruitArea::getMyCreature() { if (!town->creatures.at(level).second.empty()) // built return VLC->creh->creatures[town->creatures.at(level).second.back()]; if (!town->town->creatures.at(level).empty()) // there are creatures on this level return VLC->creh->creatures[town->town->creatures.at(level).front()]; return nullptr; } const CBuilding * CFortScreen::RecruitArea::getMyBuilding() { BuildingID myID = BuildingID(BuildingID::DWELL_FIRST).advance(level); if (level == GameConstants::CREATURES_PER_TOWN) return town->town->buildings.at(BuildingID::PORTAL_OF_SUMMON); if (!town->town->buildings.count(myID)) return nullptr; const CBuilding * build = town->town->buildings.at(myID); while (town->town->buildings.count(myID)) { if (town->hasBuilt(myID)) build = town->town->buildings.at(myID); myID.advance(GameConstants::CREATURES_PER_TOWN); } return build; } CFortScreen::RecruitArea::RecruitArea(int posX, int posY, const CGTownInstance *Town, int Level): town(Town), level(Level), availableCount(nullptr) { OBJ_CONSTRUCTION_CAPTURING_ALL; pos.x +=posX; pos.y +=posY; pos.w = 386; pos.h = 126; if (!town->creatures[level].second.empty()) addUsedEvents(LCLICK | RCLICK | HOVER);//Activate only if dwelling is present icons = new CPicture("TPCAINFO", 261, 3); if (getMyBuilding() != nullptr) { new CAnimImage(town->town->clientInfo.buildingsIcons, getMyBuilding()->bid, 0, 4, 21); new CLabel(78, 101, FONT_SMALL, CENTER, Colors::WHITE, getMyBuilding()->Name()); if (vstd::contains(town->builtBuildings, getMyBuilding()->bid)) { ui32 available = town->creatures[level].first; std::string availableText = CGI->generaltexth->allTexts[217]+ boost::lexical_cast<std::string>(available); availableCount = new CLabel(78, 119, FONT_SMALL, CENTER, Colors::WHITE, availableText); } } if (getMyCreature() != nullptr) { hoverText = boost::str(boost::format(CGI->generaltexth->tcommands[21]) % getMyCreature()->namePl); new CCreaturePic(159, 4, getMyCreature(), false); new CLabel(78, 11, FONT_SMALL, CENTER, Colors::WHITE, getMyCreature()->namePl); Rect sizes(287, 4, 96, 18); values.push_back(new LabeledValue(sizes, CGI->generaltexth->allTexts[190], CGI->generaltexth->fcommands[0], getMyCreature()->Attack())); sizes.y+=20; values.push_back(new LabeledValue(sizes, CGI->generaltexth->allTexts[191], CGI->generaltexth->fcommands[1], getMyCreature()->Defense())); sizes.y+=21; values.push_back(new LabeledValue(sizes, CGI->generaltexth->allTexts[199], CGI->generaltexth->fcommands[2], getMyCreature()->getMinDamage(), getMyCreature()->getMaxDamage())); sizes.y+=20; values.push_back(new LabeledValue(sizes, CGI->generaltexth->allTexts[388], CGI->generaltexth->fcommands[3], getMyCreature()->MaxHealth())); sizes.y+=21; values.push_back(new LabeledValue(sizes, CGI->generaltexth->allTexts[193], CGI->generaltexth->fcommands[4], getMyCreature()->valOfBonuses(Bonus::STACKS_SPEED))); sizes.y+=20; values.push_back(new LabeledValue(sizes, CGI->generaltexth->allTexts[194], CGI->generaltexth->fcommands[5], town->creatureGrowth(level))); } } void CFortScreen::RecruitArea::hover(bool on) { if(on) GH.statusbar->setText(hoverText); else GH.statusbar->clear(); } void CFortScreen::RecruitArea::creaturesChanged() { if (availableCount) { std::string availableText = CGI->generaltexth->allTexts[217] + boost::lexical_cast<std::string>(town->creatures[level].first); availableCount->setText(availableText); } } void CFortScreen::RecruitArea::clickLeft(tribool down, bool previousState) { if(!down && previousState) LOCPLINT->castleInt->builds->enterDwelling(level); } void CFortScreen::RecruitArea::clickRight(tribool down, bool previousState) { clickLeft(down, false); //r-click does same as l-click - opens recr. window } CMageGuildScreen::CMageGuildScreen(CCastleInterface * owner,std::string imagem) :CWindowObject(BORDERED,imagem) { OBJ_CONSTRUCTION_CAPTURING_ALL; window = new CPicture(owner->town->town->clientInfo.guildWindow , 332, 76); resdatabar = new CMinorResDataBar(); resdatabar->pos.x += pos.x; resdatabar->pos.y += pos.y; Rect barRect(7, 556, 737, 18); statusBar = new CGStatusBar(new CPicture(*background, barRect, 7, 556, false)); exit = new CButton(Point(748, 556), "TPMAGE1.DEF", CButton::tooltip(CGI->generaltexth->allTexts[593]), [&](){ close(); }, SDLK_RETURN); exit->assignedKeys.insert(SDLK_ESCAPE); static const std::vector<std::vector<Point> > positions = { {Point(222,445), Point(312,445), Point(402,445), Point(520,445), Point(610,445), Point(700,445)}, {Point(48,53), Point(48,147), Point(48,241), Point(48,335), Point(48,429)}, {Point(570,82), Point(672,82), Point(570,157), Point(672,157)}, {Point(183,42), Point(183,148), Point(183,253)}, {Point(491,325), Point(591,325)} }; for(size_t i=0; i<owner->town->town->mageLevel; i++) { size_t spellCount = owner->town->spellsAtLevel(i+1,false); //spell at level with -1 hmmm? for(size_t j=0; j<spellCount; j++) { if(i<owner->town->mageGuildLevel() && owner->town->spells[i].size()>j) spells.push_back( new Scroll(positions[i][j], CGI->spellh->objects[owner->town->spells[i][j]])); else new CAnimImage("TPMAGES.DEF", 1, 0, positions[i][j].x, positions[i][j].y);//closed scroll } } } CMageGuildScreen::Scroll::Scroll(Point position, const CSpell *Spell) :spell(Spell) { OBJ_CONSTRUCTION_CAPTURING_ALL; addUsedEvents(LCLICK | RCLICK | HOVER); pos += position; image = new CAnimImage("SPELLSCR", spell->id); pos = image->pos; } void CMageGuildScreen::Scroll::clickLeft(tribool down, bool previousState) { if(down) LOCPLINT->showInfoDialog(spell->getLevelInfo(0).description, new CComponent(CComponent::spell,spell->id)); } void CMageGuildScreen::Scroll::clickRight(tribool down, bool previousState) { if(down) CRClickPopup::createAndPush(spell->getLevelInfo(0).description, new CComponent(CComponent::spell, spell->id)); } void CMageGuildScreen::Scroll::hover(bool on) { if(on) GH.statusbar->setText(spell->name); else GH.statusbar->clear(); } CBlacksmithDialog::CBlacksmithDialog(bool possible, CreatureID creMachineID, ArtifactID aid, ObjectInstanceID hid): CWindowObject(PLAYER_COLORED, "TPSMITH") { OBJ_CONSTRUCTION_CAPTURING_ALL; statusBar = new CGStatusBar(new CPicture(*background, Rect(8, pos.h - 26, pos.w - 16, 19), 8, pos.h - 26)); animBG = new CPicture("TPSMITBK", 64, 50); animBG->needRefresh = true; const CCreature *creature = CGI->creh->creatures[creMachineID]; anim = new CCreatureAnim(64, 50, creature->animDefName, Rect()); anim->clipRect(113,125,200,150); title = new CLabel(165, 28, FONT_BIG, CENTER, Colors::YELLOW, boost::str(boost::format(CGI->generaltexth->allTexts[274]) % creature->nameSing)); costText = new CLabel(165, 218, FONT_MEDIUM, CENTER, Colors::WHITE, CGI->generaltexth->jktexts[43]); costValue = new CLabel(165, 290, FONT_MEDIUM, CENTER, Colors::WHITE, boost::lexical_cast<std::string>(CGI->arth->artifacts[aid]->price)); std::string text = boost::str(boost::format(CGI->generaltexth->allTexts[595]) % creature->nameSing); buy = new CButton(Point(42, 312), "IBUY30.DEF", CButton::tooltip(text), [&](){ close(); }, SDLK_RETURN); text = boost::str(boost::format(CGI->generaltexth->allTexts[596]) % creature->nameSing); cancel = new CButton(Point(224, 312), "ICANCEL.DEF", CButton::tooltip(text), [&](){ close(); }, SDLK_ESCAPE); if(possible) buy->addCallback([=](){ LOCPLINT->cb->buyArtifact(LOCPLINT->cb->getHero(hid),aid); }); else buy->block(true); new CAnimImage("RESOURCE", 6, 0, 148, 244); }
Fayth/vcmi
client/windows/CCastleInterface.cpp
C++
gpl-2.0
53,353
<?php /** * **************************************************************************** * birthday - MODULE FOR XOOPS * Script made by Hervé Thouzard (http://www.herve-thouzard.com/) * Created on 10 juil. 08 at 11:37:48 * **************************************************************************** */ define('_AM_BIRTHDAY_ACTION', 'Acción'); define('_AM_BIRTHDAY_CONF_DELITEM', '¿Está seguro de que desea eliminar este artículo?'); define('_AM_BIRTHDAY_GO_TO_MODULE', 'Ir al módulo'); define('_AM_BIRTHDAY_PREFERENCES', 'Preferencias'); define('_AM_BIRTHDAY_MAINTAIN', 'mantenimiento a caché y tablas'); define('_AM_BIRTHDAY_ADMINISTRATION', 'Administración'); define('_AM_BIRTHDAY_USE_ANONYMOUS', 'Utilice el usuario anónimo si no desea vincular esta tarjeta a un usuario de su sitio'); define('_AM_BIRTHDAY_ERROR_1', 'Error, ID imposible establecer!'); define('_AM_BIRTHDAY_NOT_FOUND', 'Error, No se encuentra el tema!');
mambax7/birthday
language/spanish/admin.php
PHP
gpl-2.0
942
<?php /* * Title : Pinpoint Booking System WordPress Plugin (PRO) * Version : 2.1.1 * File : includes/extras/class-backend-extra-groups.php * File Version : 1.0.1 * Created / Last Modified : 25 August 2015 * Author : Dot on Paper * Copyright : © 2012 Dot on Paper * Website : http://www.dotonpaper.net * Description : Back end extra groups PHP class. */ if (!class_exists('DOPBSPBackEndExtraGroups')){ class DOPBSPBackEndExtraGroups extends DOPBSPBackEndExtra{ /* * Constructor */ function __construct(){ } /* * Sort extra groups. * * @post ids (string): list of groups ids in new order */ function sort(){ global $wpdb; global $DOPBSP; $ids = explode(',', $_POST['ids']); $i = 0; foreach ($ids as $id){ $i++; $wpdb->update($DOPBSP->tables->extras_groups, array('position' => $i), array('id' => $id)); } die(); } } }
BlueSkyVacations-Pantheon/BlueSkyVacations-Pantheon
wp-content/plugins/booking-system/includes/extras/class-backend-extra-groups.php
PHP
gpl-2.0
1,443
""" This package supplies tools for working with automated services connected to a server. It was written with IRC in mind, so it's not very generic, in that it pretty much assumes a single client connected to a central server, and it's not easy for a client to add further connections at runtime (But possible, though you might have to avoid selector.Reactor.loop. """ __all__ = [ "irc", "selector", "connection", "irc2num" ]
kaaveland/anybot
im/__init__.py
Python
gpl-2.0
449
<?php define('__BASE_DIR__', __DIR__); require('src/Lime/App.php'); $app = new Lime\App(); require(__BASE_DIR__ . '/app/core/functions.php'); require(__BASE_DIR__ . '/app/config/config.php'); require(__BASE_DIR__ . '/app/config/routes.php'); $app->run(); ?>
bstaint/limewiki
index.php
PHP
gpl-2.0
262
/* * This program is copyright © 2008-2012 Eric Bishop and is distributed under the terms of the GNU GPL * version 2.0 with a special clarification/exception that permits adapting the program to * configure proprietary "back end" software provided that all modifications to the web interface * itself remain covered by the GPL. * See http://gargoyle-router.com/faq.html#qfoss for more information */ /* * mountPoint refers to the blkid mount point * mountPath may refer to either blkid mount point * or symlink to dev_[devid], wherever share is * actually mounted */ var driveToMountPoints = []; var mountPointToDrive = []; var mountPointToFs = []; var mountPointToDriveSize = []; /* * These global data structure are special -- they contain * the data that will be saved once the user hits the save changes button * * In other sections we load/save to uci variable, but we have 3 packages (samba, nfsd and vsftpd) to worry * about for shares, and the conversion to uci isn't particularly straightforward. So, we save in a global * variable in a simpler format, and then update uci when we do the final save */ var userNames = []; var nameToSharePath = []; var sharePathList = []; var sharePathToShareData = []; var badUserNames = [ "ftp", "anonymous", "root", "daemon", "network", "nobody" ]; var ftpFirewallRule = "wan_ftp_server_command"; var pasvFirewallRule = "wan_ftp_server_pasv"; function saveChanges() { //proofread var errors = []; var sambaGroup = document.getElementById("cifs_workgroup").value var ftpWanAccess = document.getElementById("ftp_wan_access").checked var ftpWanPasv = document.getElementById("ftp_wan_pasv").checked var pasvMin = document.getElementById("pasv_min_port").value var pasvMax = document.getElementById("pasv_max_port").value if( document.getElementById("shared_disks").style.display != "none") { if(sambaGroup == "") { errors.push("Invalid CIFS Workgroup"); } if(ftpWanAccess && uciOriginal.get("firewall", ftpFirewallRule, "local_port") != "21") { var conflict = checkForPortConflict("21", "tcp"); if(conflict != "") { errors.push("Cannot enable WAN FTP access because port conflicts with " + conflict); } } if(ftpWanAccess && ftpWanPasv) { var intPasvMin = parseInt(pasvMin) var intPasvMax = parseInt(pasvMax) var pasvValid = false if( (!isNaN(intPasvMin)) && (!isNaN(intPasvMax)) ) { if(intPasvMin < intPasvMax) { pasvValid = true } } if(!pasvValid) { errors.push("Invalid FTP passive port range") } else { var oldPasvMin = uciOriginal.get("firewall", pasvFirewallRule, "start_port"); var oldPasvMax = uciOriginal.get("firewall", pasvFirewallRule, "end_port"); var ignorePorts = []; if(oldPasvMin != "" && oldPasvMax != "") { ignorePorts["tcp"] = []; ignorePorts["tcp"][oldPasvMin + "-" + oldPasvMax] = 1 } var conflict = checkForPortConflict( "" + intPasvMin + "-" + intPasvMax, "tcp", ignorePorts ) if(conflict != "") { errors.push("Pasive FTP port range conflicts with " + conflict); } } } } if(errors.length > 0) { alert( errors.join("\n") + "\n\nCould not save settings" ); return; } //prepare to save setControlsEnabled(false, true); var uci = uciOriginal.clone(); //update share_users uci.removeAllSectionsOfType("share_users", "user"); var userTable = document.getElementById("share_user_table"); if(userTable != null) { var userTableData = getTableDataArray(userTable); while(userTableData.length >0) { var nextUserData = userTableData.shift(); var user = nextUserData[0] var pass = (nextUserData[1]).value if( pass != null && pass != "") { uci.set("share_users", user, "", "user") uci.set("share_users", user, "password", pass) } else { var salt = uciOriginal.get("share_users", user, "password_salt") var sha1 = uciOriginal.get("share_users", user, "password_sha1") if(salt != "" && sha1 != "") { uci.set("share_users", user, "", "user") uci.set("share_users", user, "password_salt", salt) uci.set("share_users", user, "password_sha1", sha1) } } } } //update firewall if(ftpWanAccess) { uci.set("firewall", ftpFirewallRule, "", "remote_accept") uci.set("firewall", ftpFirewallRule, "proto", "tcp") uci.set("firewall", ftpFirewallRule, "zone", "wan") uci.set("firewall", ftpFirewallRule, "local_port", "21") uci.set("firewall", ftpFirewallRule, "remote_port", "21") if(ftpWanPasv) { uci.set("firewall", pasvFirewallRule, "", "remote_accept") uci.set("firewall", pasvFirewallRule, "proto", "tcp") uci.set("firewall", pasvFirewallRule, "zone", "wan") uci.set("firewall", pasvFirewallRule, "start_port", pasvMin) uci.set("firewall", pasvFirewallRule, "end_port", pasvMax) } else { uci.removeSection("firewall", pasvFirewallRule); } } else { uci.removeSection("firewall", ftpFirewallRule); uci.removeSection("firewall", pasvFirewallRule); } //update shares uci.removeAllSectionsOfType("samba", "samba") uci.removeAllSectionsOfType("samba", "sambashare") uci.removeAllSectionsOfType("vsftpd", "vsftpd") uci.removeAllSectionsOfType("vsftpd", "share") uci.removeAllSectionsOfType("nfsd", "nfsshare") uci.set("samba", "global", "", "samba") uci.set("samba", "global", "workgroup", sambaGroup); var haveAnonymousFtp = false; var makeDirCmds = []; for( fullMountPath in sharePathToShareData ) { //[shareName, shareDrive, shareDiskMount, shareSubdir, fullSharePath, isCifs, isFtp, isNfs, anonymousAccess, rwUsers, roUsers, nfsAccess, nfsAccessIps] var shareData = sharePathToShareData[fullMountPath] if( shareData[3] != "" ) { makeDirCmds.push("mkdir -p \"" + fullMountPath + "\"" ) } var shareName = shareData[0] var shareId = shareName.replace(/[^0-9A-Za-z]+/, "_").toLowerCase() var isCifs = shareData[5]; var isFtp = shareData[6]; var isNfs = shareData[7]; var anonymousAccess = shareData[8] var rwUsers = shareData[9] var roUsers = shareData[10] var nfsAccess = shareData[11]; var nfsAccessIps = shareData[12] if(isCifs) { var pkg = "samba" uci.set(pkg, shareId, "", "sambashare") uci.set(pkg, shareId, "name", shareName); uci.set(pkg, shareId, "path", fullMountPath); uci.set(pkg, shareId, "create_mask", "0777"); uci.set(pkg, shareId, "dir_mask", "0777"); uci.set(pkg, shareId, "browseable", "yes"); uci.set(pkg, shareId, "read_only", (anonymousAccess == "ro" ? "yes" : "no")); uci.set(pkg, shareId, "guest_ok", (anonymousAccess == "none" ? "no" : "yes")); if(rwUsers.length > 0) { uci.set(pkg, shareId, "users_rw", rwUsers, false) } if(roUsers.length > 0) { uci.set(pkg, shareId, "users_ro", roUsers, false) } } if(isFtp) { var pkg = "vsftpd" uci.set(pkg, shareId, "", "share") uci.set(pkg, shareId, "name", shareName); uci.set(pkg, shareId, "share_dir", fullMountPath); if(rwUsers.length > 0) { uci.set(pkg, shareId, "users_rw", rwUsers, false) } if(roUsers.length > 0) { uci.set(pkg, shareId, "users_ro", roUsers, false) } if(anonymousAccess != "none") { haveAnonymousFtp = true; uci.set(pkg, shareId, "users_" + anonymousAccess, [ "anonymous" ], true); } } if(isNfs) { var pkg = "nfsd" uci.set(pkg, shareId, "", "nfsshare") uci.set(pkg, shareId, "name", shareName); uci.set(pkg, shareId, "path", fullMountPath); uci.set(pkg, shareId, "sync", "1"); uci.set(pkg, shareId, "insecure", "1"); uci.set(pkg, shareId, "subtree_check", "0"); uci.set(pkg, shareId, "read_only", (nfsAccess == "ro" ? "1" : "0")); if(nfsAccessIps instanceof Array) { uci.set(pkg, shareId, "allowed_hosts", nfsAccessIps, false) } else { uci.set(pkg, shareId, "allowed_hosts", [ "*" ], false) } } } uci.set("vsftpd", "global", "", "vsftpd") uci.set("vsftpd", "global", "anonymous", (haveAnonymousFtp ? "yes" : "no")) uci.set("vsftpd", "global", "anonymous_write", (haveAnonymousFtp ? "yes" : "no")) //write possible but write on individual share dirs set individually elsewhere if(ftpWanPasv) { uci.set("vsftpd", "global", "pasv_min_port", pasvMin) uci.set("vsftpd", "global", "pasv_max_port", pasvMax) } var postCommands = []; if( uciOriginal.get("firewall", ftpFirewallRule, "local_port") != uci.get("firewall", ftpFirewallRule, "local_port") || uciOriginal.get("firewall", pasvFirewallRule, "start_port") != uci.get("firewall", pasvFirewallRule, "start_port") || uciOriginal.get("firewall", pasvFirewallRule, "end_port") != uci.get("firewall", pasvFirewallRule, "end_port") ) { postCommands.push("/etc/init.d/firewall restart"); } postCommands.push("/etc/init.d/share_users restart"); postCommands.push("/etc/init.d/samba restart"); postCommands.push("/etc/init.d/vsftpd restart"); postCommands.push("/etc/init.d/nfsd restart"); var commands = uci.getScriptCommands(uciOriginal) + "\n" + makeDirCmds.join("\n") + "\n" + postCommands.join("\n") + "\n"; var param = getParameterDefinition("commands", commands) + "&" + getParameterDefinition("hash", document.cookie.replace(/^.*hash=/,"").replace(/[\t ;]+.*$/, "")); var stateChangeFunction = function(req) { if(req.readyState == 4) { uciOriginal = uci.clone(); setControlsEnabled(true); } } runAjax("POST", "utility/run_commands.sh", param, stateChangeFunction); } function addUser() { var user = document.getElementById("new_user").value var pass1 = document.getElementById("user_pass").value var pass2 = document.getElementById("user_pass_confirm").value //validate var errors = []; var testUser = user.replace(/[0-9a-zA-Z]+/g, ""); if(user == "") { errors.push("Username cannot be empty") } if(testUser != "") { errors.push("Username can contain only letters and numbers") } if(pass1 == "" && pass2 == "") { errors.push("Password cannot be empty") } if(pass1 != pass2) { errors.push("Passwords don't match") } if(errors.length == 0) { //check to make sure user isn't a dupe var userTable = document.getElementById("share_user_table"); if(userTable != null) { var found = 0; var userData = getTableDataArray(userTable, true, false); var userIndex; for(userIndex=0; userIndex < userData.length && found == 0; userIndex++) { found = userData[userIndex][0] == user ? 1 : found; } if(found) { errors.push("Duplicate Username") } } var badUserIndex; for(badUserIndex=0;badUserIndex < badUserNames.length && errors.length == 0; badUserIndex++) { if(user.toLowerCase() == (badUserNames[badUserIndex]).toLowerCase() ) { errors.push("Username '" + user + "' is reserved and not permitted"); } } } if(errors.length > 0) { alert( errors.join("\n") + "\n\nCould not add user" ); } else { var userTable = document.getElementById("share_user_table"); if(userTable == null) { var tableContainer = document.getElementById("user_table_container"); userTable = createTable(["", ""], [], "share_user_table", true, false, removeUserCallback); setSingleChild(tableContainer, userTable); } var userPass = createInput("hidden") userPass.value = pass1 var editButton = createEditButton(editUser); addTableRow(userTable, [ user, userPass, editButton], true, false, removeUserCallback) addOptionToSelectElement("user_access", user, user); userNames.push(user) document.getElementById("new_user").value = "" document.getElementById("user_pass").value = "" document.getElementById("user_pass_confirm").value = "" } } function removeUserCallback(table, row) { var removeUser=row.childNodes[0].firstChild.data; //remove from userNames var newUserNames = removeStringFromArray(userNames, removeUser) userNames = newUserNames; //if no users left, set a message indicating this instead of an empty table if(userNames.length == 0) { var container = document.getElementById("user_table_container"); var tableObject = document.createElement("div"); tableObject.innerHTML = "<span style=\"text-align:center\"><em>No Share Users Defined</em></span>"; setSingleChild(container, tableObject); } //remove in all shares for (sharePath in sharePathToShareData) { var shareData = sharePathToShareData[sharePath] var rwUsers = shareData[9] var roUsers = shareData[10] shareData[9] = removeStringFromArray(rwUsers, removeUser) shareData[10] = removeStringFromArray(roUsers, removeUser) sharePathToShareData[sharePath] = shareData; } //remove from controls of share currently being configured removeOptionFromSelectElement("user_access", removeUser); var accessTable = document.getElementById("user_access_table") if(accessTable != null) { var accessTableData = getTableDataArray(accessTable, true, false); var newTableData = []; while(accessTableData.length >0) { var next = accessTableData.shift(); if(next[0] != removeUser) { newTableData.push(next) } } var newAccessTable = createTable(["", ""], newTableData, "user_access_table", true, false, removeUserAccessCallback); setSingleChild(document.getElementById("user_access_table_container"), newAccessTable); } } function editUser() { if( typeof(editUserWindow) != "undefined" ) { //opera keeps object around after //window is closed, so we need to deal //with error condition try { editUserWindow.close(); } catch(e){} } try { xCoor = window.screenX + 225; yCoor = window.screenY+ 225; } catch(e) { xCoor = window.left + 225; yCoor = window.top + 225; } editUserWindow = window.open("share_user_edit.sh", "edit", "width=560,height=300,left=" + xCoor + ",top=" + yCoor ); var okButton = createInput("button", editUserWindow.document); var cancelButton = createInput("button", editUserWindow.document); okButton.value = "Change Password"; okButton.className = "default_button"; cancelButton.value = "Cancel"; cancelButton.className = "default_button"; editShareUserRow=this.parentNode.parentNode; editShareUser=editShareUserRow.childNodes[0].firstChild.data; runOnEditorLoaded = function () { updateDone=false; if(editUserWindow.document != null) { if(editUserWindow.document.getElementById("bottom_button_container") != null) { editUserWindow.document.getElementById("share_user_text").appendChild( document.createTextNode(editShareUser) ) editUserWindow.document.getElementById("bottom_button_container").appendChild(okButton); editUserWindow.document.getElementById("bottom_button_container").appendChild(cancelButton); cancelButton.onclick = function() { editUserWindow.close(); } okButton.onclick = function() { var pass1 = editUserWindow.document.getElementById("new_password").value; var pass2 = editUserWindow.document.getElementById("new_password_confirm").value; var errors = [] if(pass1 == "" && pass2 == "") { errors.push("Password cannot be empty") } if(pass1 != pass2) { errors.push("Passwords don't match") } if(errors.length > 0) { alert(errors.join("\n") + "\nPassword unchanged."); } else { editShareUserRow.childNodes[1].firstChild.value = pass1 editUserWindow.close(); } } editUserWindow.moveTo(xCoor,yCoor); editUserWindow.focus(); updateDone = true; } } if(!updateDone) { setTimeout( "runOnEditorLoaded()", 250); } } runOnEditorLoaded(); } function updateWanFtpVisibility() { document.getElementById("ftp_pasv_container").style.display = document.getElementById("ftp_wan_access").checked ? "block" : "none" var pasvCheck = document.getElementById("ftp_wan_pasv") enableAssociatedField(pasvCheck, "pasv_min_port", 50990) enableAssociatedField(pasvCheck, "pasv_max_port", 50999) } function resetData() { document.getElementById("no_disks").style.display = storageDrives.length == 0 ? "block" : "none"; document.getElementById("shared_disks").style.display = storageDrives.length > 0 ? "block" : "none"; document.getElementById("disk_unmount").style.display = storageDrives.length > 0 ? "block" : "none"; document.getElementById("disk_format").style.display = storageDrives.length > 0 || drivesWithNoMounts.length > 0 ? "block" : "none" if(storageDrives.length > 0) { //workgroup var s = uciOriginal.getAllSectionsOfType("samba", "samba"); document.getElementById("cifs_workgroup").value = s.length > 0 ? uciOriginal.get("samba", s.shift(), "workgroup") : "Workgroup"; // wan access to FTP var wanFtp = uciOriginal.get("firewall", ftpFirewallRule, "local_port") == "21" document.getElementById("ftp_wan_access").checked = wanFtp; var pminText = document.getElementById("pasv_min_port"); var pmaxText = document.getElementById("pasv_max_port"); var pmin = uciOriginal.get("firewall", pasvFirewallRule, "start_port") var pmax = uciOriginal.get("firewall", pasvFirewallRule, "end_port") pminText.value = pmin == "" || pmax == "" ? 50990 : pmin; pmaxText.value = pmin == "" || pmax == "" ? 50999 : pmax; document.getElementById("ftp_wan_pasv").checked = (wanFtp && pmin != "" && pmax != "") || (!wanFtp); //enable pasv by default when WAN FTP access is selected updateWanFtpVisibility() //share users userNames = uciOriginal.getAllSectionsOfType("share_users", "user"); //global var tableObject; if(userNames.length > 0) { var userTableData = [] var userIndex for(userIndex=0; userIndex < userNames.length; userIndex++) { userEditButton = createEditButton( editUser ) userPass = createInput("hidden") userPass.value = "" userTableData.push( [ userNames[userIndex], userPass, userEditButton ] ) } var tableObject = createTable(["", "", ""], userTableData, "share_user_table", true, false, removeUserCallback); } else { tableObject = document.createElement("div"); tableObject.innerHTML = "<span style=\"text-align:center\"><em>No Share Users Defined</em></span>"; } var tableContainer = document.getElementById("user_table_container"); while(tableContainer.firstChild != null) { tableContainer.removeChild( tableContainer.firstChild); } tableContainer.appendChild(tableObject); setAllowableSelections("user_access", userNames, userNames); //globals driveToMountPoints = []; mountPointToDrive = []; mountPointToFs = []; mountPointToDriveSize = []; mountPointList = [] var driveIndex = 0; for(driveIndex=0; driveIndex < storageDrives.length; driveIndex++) { var mountPoints = [ storageDrives[driveIndex][1], storageDrives[driveIndex][2] ]; driveToMountPoints[ storageDrives[driveIndex][0] ] = mountPoints; var mpIndex; for(mpIndex=0;mpIndex < 2; mpIndex++) { var mp = mountPoints[mpIndex]; mountPointToDrive[ mp ] = storageDrives[driveIndex][0]; mountPointToFs[ mp ] = storageDrives[driveIndex][3]; mountPointToDriveSize[ mp ] = parseBytes( storageDrives[driveIndex][4] ).replace(/ytes/, ""); mountPointList.push(mp); } } sharePathList = []; //global sharePathToShareData = []; //global nameToSharePath = []; //global var mountedDrives = []; var sambaShares = uciOriginal.getAllSectionsOfType("samba", "sambashare"); var nfsShares = uciOriginal.getAllSectionsOfType("nfsd", "nfsshare"); var ftpShares = uciOriginal.getAllSectionsOfType("vsftpd", "share"); var getMounted = function(shareList, config) { var shareIndex; for(shareIndex=0; shareIndex < shareList.length; shareIndex++) { var shareId = shareList[shareIndex] var fullSharePath = uciOriginal.get(config, shareId, (config == "vsftpd" ? "share_dir" : "path") ); var shareMountPoint = null; var shareDirectory = null; var shareDrive = null; var mpIndex; for(mpIndex=0;mpIndex<mountPointList.length && shareMountPoint==null && fullSharePath !=null; mpIndex++) { var mp = mountPointList[mpIndex] if( fullSharePath.indexOf(mp) == 0 ) { shareMountPoint = mp shareDirectory = fullSharePath.substr( mp.length); shareDirectory = shareDirectory.replace(/^\//, "").replace(/\/$/, "") shareDrive = mountPointToDrive[shareMountPoint]; } } if( shareDrive != null ) { mountedDrives[ shareDrive ] = 1; //shareMountPoint->[shareName, shareDrive, shareDiskMount, shareSubdir, fullSharePath, isCifs, isFtp, isNfs, anonymousAccess, rwUsers, roUsers, nfsAccess, nfsAccessIps] var shareData = sharePathToShareData[fullSharePath] == null ? ["", "", "", "", "", false, false, false, "none", [], [], "ro", "*" ] : sharePathToShareData[fullSharePath] ; //name if( shareData[0] == "" || config == "samba") { shareData[0] = uciOriginal.get(config, shareId, "name"); shareData[0] == "" ? shareId : shareData[0]; } shareData[1] = shareDrive //drive shareData[2] = shareMountPoint //share drive mount shareData[3] = shareDirectory //directory shareData[4] = fullSharePath //full path shareData[5] = config == "samba" ? true : shareData[5] //isCIFS shareData[6] = config == "vsftpd" ? true : shareData[6] //isFTP shareData[7] = config == "nfsd" ? true : shareData[7] //isNFS //both samba and vsftpd have ro_users and rw_users list options //however, they handle anonymous access a bit differently //samba has guest_ok option, while vsftpd includes "anonymous" (or "ftp") user in lists if(config == "vsftpd" || config == "samba") { var readTypes = ["rw", "ro"] var readTypeShareDataIndices = [9,10] var rtIndex; for(rtIndex=0; rtIndex < 2; rtIndex++) { var shareDataUserList = []; var readType = readTypes[rtIndex] var userVar = "users_" + readType var userList = uciOriginal.get(config, shareId, userVar); if(userList instanceof Array) { var uIndex; for(uIndex=0; uIndex < userList.length; uIndex++) { var user = userList[uIndex]; if(user == "anonymous" || user == "ftp") { //handle anonymous for vsftpd shareData[ 8 ] = readType } else { shareDataUserList.push(user); } } } shareData[ readTypeShareDataIndices[rtIndex] ] = shareDataUserList; } if(config == "samba") { //handle anonymous for samba if( uciOriginal.get(config, shareId, "guest_ok").toLowerCase() == "yes" || uciOriginal.get(config, shareId, "public").toLowerCase() == "yes" ) { shareData[ 8 ] = uciOriginal.get(config, shareId, "read_only").toLowerCase() == "yes" ? "ro" : "rw" } } } if(config == "nfsd") { shareData[ 11 ] = uciOriginal.get(config, shareList[shareIndex], "read_only") == "1" ? "ro" : "rw"; var allowedHostsStr = uciOriginal.get(config, shareList[shareIndex], "allowed_hosts"); if(allowedHostsStr instanceof Array) { allowedHostsStr = allowedHostsStr.join(","); } if(allowedHosts != "" && allowedHosts != "*") { var allowedHosts = allowedHostsStr.split(/[\t ]*,[\t ]*/); var allowedIps = []; var foundStar = false; while(allowedHosts.length > 0) { var h = allowedHosts.shift(); foundStar = h == "*" ? true : foundStar if(validateIpRange(h) == 0) { allowedIps.push(h); } } shareData[ 12 ] = foundStar ? "*" : allowedIps; } } sharePathToShareData[ fullSharePath ] = shareData if(nameToSharePath [ shareData[0] ] != fullSharePath) { nameToSharePath[ shareData[0] ] = fullSharePath sharePathList.push(fullSharePath) } } } } getMounted(sambaShares, "samba"); getMounted(ftpShares, "vsftpd"); getMounted(nfsShares, "nfsd"); if(setDriveList(document)) { document.getElementById("sharing_add_heading_container").style.display = "block"; document.getElementById("sharing_add_controls_container").style.display = "block"; shareSettingsToDefault(); } else { document.getElementById("sharing_add_heading_container").style.display = "none"; document.getElementById("sharing_add_controls_container").style.display = "none"; } //create current share table //name, disk, subdirectory, type, [edit], [remove] var shareTableData = []; var shareIndex; for(shareIndex=0; shareIndex < sharePathList.length; shareIndex++) { var shareData = sharePathToShareData[ sharePathList[shareIndex] ] var vis = [] vis["cifs"] = shareData[5] vis["ftp"] = shareData[6] vis["nfs"] = shareData[7] shareTableData.push( [ shareData[0], shareData[1], "/" + shareData[3], getVisStr(vis), createEditButton(editShare) ] ) } var shareTable = createTable(["Name", "Disk", "Subdirectory", "Share Type", ""], shareTableData, "share_table", true, false, removeShareCallback); var tableContainer = document.getElementById('sharing_mount_table_container'); setSingleChild(tableContainer, shareTable); } // format setttings // // note that 'drivesWithNoMounts', refers to drives not mounted on the OS, // not lack of network shared/mounts which is what the other variables // refer to. This can be confusing, so I'm putting this comment here if(drivesWithNoMounts.length > 0) { var dindex; var driveIds = []; var driveText = []; for(dindex=0; dindex< drivesWithNoMounts.length ; dindex++) { driveIds.push( "" + dindex); driveText.push( drivesWithNoMounts[dindex][0] + " (" + parseBytes(parseInt(drivesWithNoMounts[dindex][1])) + ")") } setAllowableSelections("format_disk_select", driveIds, driveText); } document.getElementById("swap_percent").value = "25"; document.getElementById("storage_percent").value = "75"; var vis = (drivesWithNoMounts.length > 0); setVisibility( ["no_unmounted_drives", "format_warning", "format_disk_select_container", "swap_percent_container", "storage_percent_container", "usb_format_button_container"], [ (!vis), vis, vis, vis, vis, vis ] ) updateFormatPercentages() } //returns (boolean) whether drive list is empty function setDriveList(controlDocument) { var driveList = []; var driveDisplayList = []; for(driveIndex=0; driveIndex < storageDrives.length; driveIndex++) { var driveName = storageDrives[driveIndex][0] var driveFs = storageDrives[driveIndex][3]; var driveSize = parseBytes( storageDrives[driveIndex][4] ).replace(/ytes/, ""); driveList.push( driveName ) driveDisplayList.push( driveName + " (" + driveFs + ", " + driveSize + ")" ) } setAllowableSelections("share_disk", driveList, driveDisplayList, controlDocument); return (driveList.length > 0) } function shareSettingsToDefault(controlDocument) { controlDocument = controlDocument == null ? document : controlDocument var currentDrive = getSelectedValue("share_disk", controlDocument); var defaultData = [ "share_" + (sharePathList.length + 1), currentDrive, driveToMountPoints[currentDrive][0], "", driveToMountPoints[currentDrive][0], true, true, true, "none", [], [], "ro", "*" ] ; setDocumentFromShareData(controlDocument, defaultData) } function createUserAccessTable(clear, controlDocument) { controlDocument = controlDocument == null ? document : controlDocument var userAccessTable = controlDocument.getElementById("user_access_table"); if(clear || userAccessTable == null) { var container = controlDocument.getElementById("user_access_table_container"); userAccessTable = createTable(["", ""], [], "user_access_table", true, false, removeUserAccessCallback, null, controlDocument); setSingleChild(container, userAccessTable); } } function addUserAccess(controlDocument) { controlDocument = controlDocument == null ? document : controlDocument var addUser = getSelectedValue("user_access", controlDocument) if(addUser == null || addUser == "") { alert("No User To Add -- You must configure a new share user above.") } else { var access = getSelectedValue("user_access_type", controlDocument) removeOptionFromSelectElement("user_access", addUser, controlDocument); createUserAccessTable(false) var userAccessTable = controlDocument.getElementById("user_access_table"); addTableRow(userAccessTable, [ addUser, access ], true, false, removeUserAccessCallback, null, controlDocument) } } function removeUserAccessCallback(table, row) { var removeUser=row.childNodes[0].firstChild.data; addOptionToSelectElement("user_access", removeUser, removeUser, null, table.ownerDocument); } function updateFormatPercentages(ctrlId) { var valid = false; if(ctrlId == null) { ctrlId="swap_percent"; } var otherCtrlId = ctrlId == "swap_percent" ? "storage_percent" : "swap_percent" var sizeId = ctrlId == "swap_percent" ? "swap_size" : "storage_size" var otherSizeId = ctrlId == "swap_percent" ? "storage_size" : "swap_size" var driveId = getSelectedValue("format_disk_select") if(driveId != null) { try { var percent1 = parseFloat(document.getElementById(ctrlId).value) if( percent1 != "NaN" && percent1 <= 100 && percent1 >= 0) { document.getElementById(ctrlId).style.color = "black" var percent2 = 100 - percent1; var size = parseInt(drivesWithNoMounts[parseInt(driveId)][1]); var size1 = (percent1 * size)/100; var size2 = size - size1; document.getElementById(otherCtrlId).value = "" + percent2 setChildText(sizeId, "(" + parseBytes(size1) + ")"); setChildText(otherSizeId, "(" + parseBytes(size2) + ")"); valid=true } else { document.getElementById(ctrlId).style.color = "red" } } catch(e) { document.getElementById(ctrlId).style.color = "red" } } return valid } function getVis(controlDocument) { controlDocument = controlDocument == null ? document : controlDocument var vis = [] var visTypes = ["ftp", "cifs", "nfs"] var vIndex; for(vIndex=0; vIndex < visTypes.length; vIndex++) { vis[ visTypes[vIndex] ] = controlDocument.getElementById( "share_type_" + visTypes[vIndex] ).checked } return vis; } function getVisStr(vis) { var shareTypeStr = function(type){ return vis[type] ? type.toUpperCase() : ""; } var visStr = shareTypeStr("cifs") + "+" + shareTypeStr("ftp") + "+" + shareTypeStr("nfs"); return visStr.replace(/\+\+/g, "+").replace(/^\+/, "").replace(/\+$/, ""); } function getShareDataFromDocument(controlDocument, originalName) { controlDocument = controlDocument == null ? document : controlDocument var shareDrive = getSelectedValue("share_disk", controlDocument); var shareSubdir = controlDocument.getElementById("share_dir").value shareSubdir = shareSubdir.replace(/^\//, "").replace(/\/$/, "") var shareSpecificity = getSelectedValue("share_specificity", controlDocument); var shareName = controlDocument.getElementById("share_name").value; var shareDiskMount = driveToMountPoints[shareDrive][ ( shareSpecificity == "blkid" ? 0 : 1 ) ]; var altDiskMount = driveToMountPoints[shareDrive][ ( shareSpecificity == "blkid" ? 1 : 0 ) ]; var fullSharePath = (shareDiskMount + "/" + shareSubdir).replace(/\/\//g, "/").replace(/\/$/, ""); var altSharePath = (altDiskMount + "/" + shareSubdir).replace(/\/\//g, "/").replace(/\/$/, ""); var enabledTypes = getVis(controlDocument); var anonymousAccess = getSelectedValue("anonymous_access", controlDocument) var roUsers = []; var rwUsers = []; var userAccessTable = controlDocument.getElementById("user_access_table") if(userAccessTable != null) { var userAccessTableData = getTableDataArray(userAccessTable, true, false); var uatIndex; for(uatIndex=0; uatIndex < userAccessTableData.length; uatIndex++) { var rowData = userAccessTableData[uatIndex]; if(rowData[1] == "R/O") { roUsers.push(rowData[0]); } if(rowData[1] == "R/W") { rwUsers.push(rowData[0]); } } } var nfsAccess = getSelectedValue("nfs_access", controlDocument) var nfsAccessIps = getSelectedValue("nfs_policy", controlDocument) == "share" ? "*" : []; if( typeof(nfsAccessIps) != "string") { var nfsIpTable = controlDocument.getElementById("nfs_ip_table"); if(nfsIpTable != null) { var nfsIpData = getTableDataArray(nfsIpTable); var nipIndex; for(nipIndex=0; nipIndex < nfsIpData.length; nipIndex++) { nfsAccessIps.push( nfsIpData[nipIndex][0] ); } } } // error checking var errors = []; if( !(enabledTypes["ftp"] || enabledTypes["cifs"] || enabledTypes["nfs"]) ) { errors.push("You must select at least one share type (FTP, CIFS, NFS)") } if( enabledTypes["ftp"] || enabledTypes["cifs"]) { if( roUsers.length == 0 && rwUsers.length == 0 && anonymousAccess == "none" ) { errors.push("FTP and/or CIFS share type selected, but neither anonymous access or users are configured"); } } if( sharePathToShareData[ fullSharePath ] != null || sharePathToShareData[ altSharePath ] != null ) { var existing = sharePathToShareData[ fullSharePath ]; existing = existing == null ? sharePathToShareData[ altSharePath ] : existing if(originalName == null || existing[0] != originalName ) { errors.push("Specified Shared Directory Is Already Configured: " + existing[0]) } } if( nameToSharePath[ shareName ] != null && (originalName == null || originalName != shareName)) { errors.push( "Share name is a duplicate" ) } var result = []; result["errors"] = errors; if(errors.length == 0) { result["share"] = [shareName, shareDrive, shareDiskMount, shareSubdir, fullSharePath, enabledTypes["cifs"], enabledTypes["ftp"], enabledTypes["nfs"], anonymousAccess, rwUsers, roUsers, nfsAccess, nfsAccessIps] } return result; } function setDocumentFromShareData(controlDocument, shareData) { controlDocument = controlDocument == null ? document : controlDocument var shareDrive = shareData[1] setDriveList(controlDocument); setSelectedValue("share_disk", shareDrive, controlDocument) controlDocument.getElementById("share_dir").value = "/" + shareData[3] controlDocument.getElementById("share_name").value = shareData[0] var shareSpecificity = (shareData[2] == driveToMountPoints[shareDrive][0]) ? "blkid" : "dev"; setSelectedValue("share_specificity", shareSpecificity, controlDocument) controlDocument.getElementById("share_type_cifs").checked = shareData[5] controlDocument.getElementById("share_type_ftp").checked = shareData[6] controlDocument.getElementById("share_type_nfs").checked = shareData[7] setSelectedValue("anonymous_access", shareData[8], controlDocument) createUserAccessTable(true,controlDocument) var userAccessTable = controlDocument.getElementById("user_access_table") var userIndices = []; userIndices[9] = "rw" userIndices[10] = "ro" var userTypeIndex var usersWithEntries = []; for( userTypeIndex in userIndices) { var userType = userIndices[userTypeIndex] var userList = shareData[ userTypeIndex ]; var ulIndex; for(ulIndex=0;ulIndex < userList.length; ulIndex++) { addTableRow(userAccessTable, [ userList[ulIndex], userType == "rw" ? "R/W" : "R/O" ], true, false, removeUserAccessCallback, null, controlDocument) usersWithEntries[ userList[ulIndex] ] = 1 } } setSelectedValue("nfs_access", shareData[11], controlDocument); var nfsAccessIps = shareData[12]; setSelectedValue("nfs_policy", typeof(nfsAccessIps) == "string" ? "share" : "ip", controlDocument); if(nfsAccessIps instanceof Array) { addAddressStringToTable(controlDocument,nfsAccessIps.join(","),"nfs_ip_table_container","nfs_ip_table",false, 2, true, 250) } //update user select element var usersWithoutEntries = []; var uIndex; for(uIndex = 0; uIndex < userNames.length; uIndex++) { var u = userNames[uIndex]; if(usersWithEntries[ u ] != 1) { usersWithoutEntries.push(u); } } setAllowableSelections("user_access", usersWithoutEntries, usersWithoutEntries, controlDocument); setShareTypeVisibility(controlDocument) setSharePaths(controlDocument); } function addNewShare() { var rawShareData = getShareDataFromDocument(document, null) var errors = rawShareData["errors"] if(errors.length > 0) { var errStr = errors.join("\n") + "\n\nCould Not Add Share" alert(errStr) } else { var shareData = rawShareData["share"] var shareName = shareData[0] var fullSharePath = shareData[4]; var shareType = getVisStr( getVis() ); sharePathToShareData[ fullSharePath ] = shareData sharePathList.push(fullSharePath) nameToSharePath [ shareName ] = fullSharePath var shareTable = document.getElementById("share_table") addTableRow(shareTable, [shareName, shareData[1], "/" + shareData[3], shareType, createEditButton(editShare) ], true, false, removeShareCallback) shareSettingsToDefault(); } } function setShareTypeVisibility(controlDocument) { controlDocument = controlDocument == null ? document : controlDocument var vis = getVis(controlDocument); vis["ftp_or_cifs"] = vis["ftp"] || vis["cifs"] var getTypeDisplay = function(type) { return vis[type] ? type.toUpperCase() : "" } var userLabel = (getTypeDisplay("cifs") + "/" + getTypeDisplay("ftp")).replace(/^\//, "").replace(/\/$/, ""); setChildText("anonymous_access_label", userLabel + " Anonymous Access:", null, null, null, controlDocument) setChildText("user_access_label", userLabel + " Users With Access:", null, null, null, controlDocument) var visIds = []; visIds[ "ftp_or_cifs" ] = [ "anonymous_access_container", "user_access_container" ]; visIds["nfs"] = [ "nfs_access_container", "nfs_policy_container", "nfs_ip_container", "nfs_spacer", "nfs_path_container" ]; visIds["ftp"] = [ "ftp_path_container" ] for(idType in visIds) { var ids = visIds[idType] var idIndex; for(idIndex=0; idIndex<ids.length;idIndex++) { controlDocument.getElementById( ids[idIndex] ).style.display = vis[ idType ] ? "block" : "none" } } if(vis["nfs"]) { setInvisibleIfIdMatches("nfs_policy", ["share"], "nfs_ip_container", "block", controlDocument); } } function setSharePaths(controlDocument) { controlDocument = controlDocument == null ? document : controlDocument; var escapedName=escape(controlDocument.getElementById("share_name").value); var ip = uciOriginal.get("network", "lan", "ipaddr"); if(controlDocument.getElementById("share_type_nfs").checked) { controlDocument.getElementById("nfs_path_container").style.display = "block"; setChildText("nfs_path", ip + ":/nfs/" + escapedName, null, null, null, controlDocument); } else { controlDocument.getElementById("nfs_path_container").style.display = "none"; } if(controlDocument.getElementById("share_type_ftp").checked) { controlDocument.getElementById("ftp_path_container").style.display = "block"; setChildText("ftp_path", "ftp://" + ip + "/" + escapedName, null, null, null, controlDocument); } else { controlDocument.getElementById("ftp_path_container").style.display = "none"; } } function createEditButton( editFunction ) { editButton = createInput("button"); editButton.value = "Edit"; editButton.className="default_button"; editButton.onclick = editFunction; editButton.className = "default_button" ; editButton.disabled = false ; return editButton; } function removeShareCallback(table, row) { var removeName=row.childNodes[0].firstChild.data; var removePath = nameToSharePath[removeName] delete nameToSharePath[removeName] delete sharePathToShareData[removePath] var newSharePathList = [] while(sharePathList.length > 0) { var next = sharePathList.shift() if(next != removePath){ newSharePathList.push(next) } } sharePathList = newSharePathList; setSharePaths(); } function editShare() { if( typeof(editShareWindow) != "undefined" ) { //opera keeps object around after //window is closed, so we need to deal //with error condition try { editShareWindow.close(); } catch(e){} } try { xCoor = window.screenX + 225; yCoor = window.screenY+ 225; } catch(e) { xCoor = window.left + 225; yCoor = window.top + 225; } editShareWindow = window.open("usb_storage_edit.sh", "edit", "width=560,height=600,left=" + xCoor + ",top=" + yCoor ); var saveButton = createInput("button", editShareWindow.document); var closeButton = createInput("button", editShareWindow.document); saveButton.value = "Close and Apply Changes"; saveButton.className = "default_button"; closeButton.value = "Close and Discard Changes"; closeButton.className = "default_button"; editRow=this.parentNode.parentNode; editName=editRow.childNodes[0].firstChild.data; editPath=nameToSharePath[editName]; editShareData=sharePathToShareData[ editPath ]; var runOnEditorLoaded = function () { var updateDone=false; if(editShareWindow.document != null) { if(editShareWindow.document.getElementById("bottom_button_container") != null) { updateDone = true; editShareWindow.document.getElementById("bottom_button_container").appendChild(saveButton); editShareWindow.document.getElementById("bottom_button_container").appendChild(closeButton); setDocumentFromShareData(editShareWindow.document, editShareData) closeButton.onclick = function() { editShareWindow.close(); } saveButton.onclick = function() { var rawShareData = getShareDataFromDocument(editShareWindow.document, editName) var errors = rawShareData["errors"]; if(errors.length > 0) { alert(errors.join("\n") + "\nCould not update share."); } else { var shareData = rawShareData["share"] var shareName = shareData[0] var fullSharePath = shareData[4]; var shareType = getVisStr( getVis(editShareWindow.document) ); if(editName != shareName) { delete nameToSharePath[ editName ] } if(editPath != fullSharePath) { var newSharePathList = [] while(sharePathList.length > 0) { var next = sharePathList.shift(); if(next != editPath) { newSharePathList.push(next) } } newSharePathList.push(fullSharePath) sharePathList = newSharePathList delete sharePathToShareData[ editPath ] } sharePathToShareData[ fullSharePath ] = shareData nameToSharePath [ shareName ] = fullSharePath editRow.childNodes[0].firstChild.data = shareName editRow.childNodes[1].firstChild.data = shareData[1] editRow.childNodes[2].firstChild.data = "/" + shareData[3] editRow.childNodes[3].firstChild.data = shareType editShareWindow.close(); } } editShareWindow.moveTo(xCoor,yCoor); editShareWindow.focus(); } } if(!updateDone) { setTimeout(runOnEditorLoaded, 250); } } runOnEditorLoaded(); } function unmountAllUsb() { setControlsEnabled(false, true, "Unmounting Disks"); var commands = "/etc/init.d/samba stop ; /etc/init.d/vsftpd stop ; /etc/init.d/nfsd stop ; /etc/init.d/usb_storage stop ; " var param = getParameterDefinition("commands", commands) + "&" + getParameterDefinition("hash", document.cookie.replace(/^.*hash=/,"").replace(/[\t ;]+.*$/, "")); var stateChangeFunction = function(req) { if(req.readyState == 4) { //reload page window.location=window.location setControlsEnabled(true); } } runAjax("POST", "utility/run_commands.sh", param, stateChangeFunction); } function formatDiskRequested() { if( !updateFormatPercentages("swap_percent") ) { alert("ERROR: Invalid Allocation Percentages Specified"); return; } var validFunc = doDiskFormat; var invalidFunc = function(){ alert("ERROR: Invalid Password"); setControlsEnabled(true); } var driveId = drivesWithNoMounts[ parseInt(getSelectedValue("format_disk_select")) ][0] confirmPassword("Are you sure you want to format drive " + driveId + "?\n\n" + "All data on this drive will be lost.\n\nTo proceed, enter your router login password:", validFunc, invalidFunc); } function doDiskFormat() { var driveId = drivesWithNoMounts[ parseInt(getSelectedValue("format_disk_select")) ][0] var swapPercent = parseFloat(document.getElementById("swap_percent").value) //format shell script requires percent as an integer, round as necessary if(swapPercent >0 && swapPercent <1) { swapPercent = 1 } if(swapPercent >99 && swapPercent < 100) { swapPerent = 99 } swapPercent=Math.round(swapPercent) if(confirm("Password Accepted.\n\nThis is your LAST CHANCE to cancel. Press 'OK' only if you are SURE you want to format " + driveId)) { setControlsEnabled(false, true, "Formatting,\nPlease Be Patient..."); var commands = "/usr/sbin/gargoyle_format_usb \"" + driveId + "\" \"" + swapPercent + "\" \"4\" ; sleep 1 ; /etc/init.d/usb_storage restart ; sleep 1 " var param = getParameterDefinition("commands", commands) + "&" + getParameterDefinition("hash", document.cookie.replace(/^.*hash=/,"").replace(/[\t ;]+.*$/, "")); var stateChangeFunction = function(req) { if(req.readyState == 4) { alert("Formatting Complete."); window.location=window.location setControlsEnabled(true) } } runAjax("POST", "utility/run_commands.sh", param, stateChangeFunction); } else { setControlsEnabled(true) } }
ivyswen/m4530r
package/plugin-gargoyle-usb-storage/files/www/js/usb_storage.js
JavaScript
gpl-2.0
45,629
<?php /** * A ReCaptchaResponse is returned from recaptcha_check_answer() * @author TE * @todo clone etc... * @see http://code.google.com/p/recaptcha/ */ class ReCaptchaResponse { protected $isValid; protected $error; /** * * Enter description here ... */ public function __construct() { $this->isValid = false; $this->error = ReCaptchaErrorEnum::VERIFY_PARAMS_INCORRECT; } /** * * @param string $name */ public function __get( $name ) { switch ($name) { case 'valid': case 'is_valid': // historical case value return $this->isValid; break; default: if (isset($this->$name)) { return $this->$name; } break; } } /** * * @param string $name * @param mixed $value */ public function __set( $name, $value ) { switch ($name) { case 'valid': case 'is_valid': // historical case value $this->isValid = (string)$value; break; default: if (isset($this->$name)) { $this->$name = $value; } break; } } } ?>
donaldinou/recaptcha-php-poo
net/recaptcha/lib/recaptcharesponse.php
PHP
gpl-2.0
1,028
<?php /** * @package Author * @author * @website * @email * @copyright * @license **/ // no direct access defined('_JEXEC') or die('Restricted access'); class OperacionModelFacturaciones extends JModelList{ public function __construct($config = array()){ if (empty($config['filter_fields'])) { $config['filter_fields'] = array( 'nombre', 'a.nombre', 'disabled', 'a.disabled', ); if (JLanguageAssociations::isEnabled()){ $config['filter_fields'][] = 'association'; } } parent::__construct($config); } protected function populateState($ordering = null, $direction = null){ $this->setState('filter.search', $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search')); // Load the parameters. $this->setState('params', JComponentHelper::getParams('com_administracion')); $this->setState('filter.id_cliente', $this->getUserStateFromRequest($this->context . '.filter.id_cliente', 'filter_id_cliente', '', 'int')); $this->setState('filter.id_vehiculos', $this->getUserStateFromRequest($this->context . '.filter.id_vehiculos', 'filter_id_vehiculos', '', 'int')); $this->setState('filter.id_conductor', $this->getUserStateFromRequest($this->context . '.filter.id_conductor', 'filter_id_conductor', '', 'int')); $this->setState('filter.id_material_recoger', $this->getUserStateFromRequest($this->context . '.filter.id_material_recoger', 'filter_id_material_recoger', '', 'int')); $this->setState('filter.tipo_orden', $this->getUserStateFromRequest($this->context . '.filter.tipo_orden', 'filter_tipo_orden', '', 'int')); $this->setState('filter.id_estadodepago', $this->getUserStateFromRequest($this->context . '.filter.id_estadodepago', 'filter_id_estadodepago', '', 'int')); $this->setState('filter.id_estadodeorden', $this->getUserStateFromRequest($this->context . '.filter.id_estadodeorden', 'filter_id_estadodeorden', '', 'int')); // List state information. parent::populateState($ordering, $direction); } protected function getStoreId($id = ''){ // Compile the store id. $id .= ':'.$this->getState('filter.search'); $id .= ':'.$this->getState('filter.id_cliente'); $id .= ':'.$this->getState('filter.id_vehiculos'); $id .= ':'.$this->getState('filter.id_conductor'); $id .= ':'.$this->getState('filter.id_material_recoger'); $id .= ':'.$this->getState('filter.tipo_orden'); $id .= ':'.$this->getState('filter.id_estadodepago'); $id .= ':'.$this->getState('filter.id_estadodeorden'); return parent::getStoreId($id); } function getListQuery(){ // Create a new query object. $db = $this->getDbo(); $my = JFactory::getUser(); $query = $db->getQuery(true); $query->select( $this->getState('list.select', 'a.*, b.nombre as cliente, c.nombre as tipoorden, d.placa as placa, e.nombre AS estado_pedido, f.nombre AS estado_facturacion') ); $query->from('#__operacion_ordenes_pedido AS a'); $query->join('inner', '#__core_clientes AS b ON a.id_cliente = b.id'); $query->join('inner', '#__core_tipo_operacion AS c ON a.tipo_orden = c.id'); $query->join('inner', '#__core_vehiculos AS d ON a.id_vehiculo = d.id'); $query->join('inner', '#__operacion_ordenes_estado AS e ON a.id_estado = e.id'); $query->join('inner', '#__operacion_estado_factura AS f ON a.estado_factura = f.id'); $search = $this->getState('filter.search'); if (!empty($search)){ if (stripos($search, 'id:') === 0){ $query->where('a.id = '.(int) substr($search, 3)); }else { $search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%')); $query->where('(b.nombre LIKE '.$search.')'); } } // Filter on the level. if ($level = $this->getState('filter.id_cliente')){ $query->where('a.id_cliente = ' . (int) $level); } // Filter on the vehiculo. if ($id_vehiculos = $this->getState('filter.id_vehiculos')){ $query->where('a.id_vehiculo = ' . (int) $id_vehiculos); } if ($id_conductor = $this->getState('filter.id_conductor')){ $query->where('a.id_conductor = ' . (int) $id_conductor); } if ($id_material_recoger = $this->getState('filter.id_material_recoger')){ $query->where('a.id_material = ' . (int) $id_material_recoger); } if ($tipo_orden = $this->getState('filter.tipo_orden')){ $query->where('a.tipo_orden = ' . (int) $tipo_orden); } if ($id_estadodepago = $this->getState('filter.id_estadodepago')){ $query->where('a.estado_factura = ' . (int) $id_estadodepago); } if ($id_estadodeorden = $this->getState('filter.id_estadodeorden')){ $query->where('a.id_estado = ' . (int) $id_estadodeorden); } if($my->id_cantera > 0){ $query->where('(a.id_cantera = '. $my->id_cantera. ')'); } $query->where('a.principal= 1 AND a.id_estado in (2,5)'); $listOrdering = $this->getState('list.ordering', 'a.id'); $listDirn = $db->escape($this->getState('list.direction', 'ASC')); $query->order($db->escape($listOrdering) . ' ' . $listDirn); return $query; }//function }//class ?>
andresgcortes/Concan
components/com_operacion/models/facturaciones.php
PHP
gpl-2.0
5,080
using System; namespace BlueBit.CarsEvidence.GUI.Desktop.Model.Attributes { public class CanEditAllInDocumentViewAttribute : Attribute { } }
tomasz-orynski/BlueBit.CarsEvidence
BlueBit.CarsEvidence.GUI.Desktop/Model/Attributes/CanEditAllInDocumentView.cs
C#
gpl-2.0
157
#include "script_component.hpp" class CfgPatches { class ADDON { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; author = ECSTRING(common,ACETeam); authors[] = {"KoffeinFlummi", "BaerMitUmlaut"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "CfgEventHandlers.hpp" #include "CfgMoves.hpp" #include "CfgSounds.hpp" #include "CfgVehicles.hpp" #include "CfgWaypoints.hpp"
voiperr/ACE3
addons/fastroping/config.cpp
C++
gpl-2.0
512
/******************************************************************************\ * Utopia Player - A cross-platform, multilingual, tagging media manager * * Copyright (C) 2006-2007 John Eric Martin <john.eric.martin@gmail.com> * * * * 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., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * \******************************************************************************/ #include "xmlrubyhandler.h" XmlRubyHandler::XmlRubyHandler() { mText.clear(); mRuby.clear(); mColor.clear(); currentText = QString(""); currentRuby = QString(""); currentColor.clear(); currentElement.clear(); }; bool XmlRubyHandler::startDocument() { currentElement.clear(); currentElement.push(QString::fromUtf8("BASE")); mText.clear(); mRuby.clear(); mColor.clear(); currentText = QString(""); currentRuby = QString(""); currentColor.clear(); currentColor.push( QColor("#000000") ); return true; }; bool XmlRubyHandler::startElement( const QString & namespaceURI, const QString & localName, const QString & qName, const QXmlAttributes & atts ) { currentElement.push(qName); if( ( ( qName == "font" && !atts.value("color").isEmpty() ) || qName == "ruby") && !currentText.isEmpty() ) { mText << currentText; mRuby << currentRuby; mColor << currentColor.top(); currentText = QString(""); currentRuby = QString(""); } if(!atts.value("color").isEmpty()) currentColor.push( QColor( atts.value("color") ) ); return true; }; bool XmlRubyHandler::characters( const QString & ch ) { if( currentElement.top() == QString::fromUtf8("rp") || currentElement.top() == QString::fromUtf8("ruby") ) return true; if( currentElement.top() == QString::fromUtf8("rt") ) { currentRuby += ch; return true; } currentText += ch; return true; }; bool XmlRubyHandler::endElement( const QString & namespaceURI, const QString & localName, const QString & qName ) { currentElement.pop(); if( ( qName == QString::fromUtf8("ruby") || qName == QString::fromUtf8("font") ) && !currentText.isEmpty() ) { mText << currentText; mRuby << currentRuby; mColor << currentColor.top(); currentText = QString(""); currentRuby = QString(""); } if( qName == QString::fromUtf8("font") ) currentColor.pop(); return true; }; bool XmlRubyHandler::endDocument() { if( !currentText.isEmpty() ) { mText << currentText; mRuby << currentRuby; mColor << currentColor.top(); } return true; };
erikku/utopiaplayer
utopialyrics/src/xmlrubyhandler.cpp
C++
gpl-2.0
3,497
package Vistas; import Conexion.ConexioSQLite; import static Vistas.Cuenta.modeloCuenta; import static Vistas.Cuenta.sumaProductos; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JOptionPane; import javax.swing.table.DefaultTableModel; public class Productos extends javax.swing.JDialog { public static DefaultTableModel modelo; public static ConexioSQLite conexion; public Cuenta cuenta; public static String valor; public Productos(java.awt.Frame parent, boolean modal, String idMesa) { super(parent, modal); initComponents(); this.setLocationRelativeTo(null); cargar_tabla_productos(); valor = idMesa; } @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); tabla_productos = new javax.swing.JTable(); jButton1 = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); txt_cantidad = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("PRODUCTOS"); tabla_productos.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); tabla_productos.setRowHeight(23); jScrollPane1.setViewportView(tabla_productos); jButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jButton1.setText("Agregar"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jLabel2.setText("Cantidad :"); txt_cantidad.setFont(new java.awt.Font("Tahoma", 1, 22)); // NOI18N txt_cantidad.setForeground(new java.awt.Color(255, 0, 0)); txt_cantidad.setHorizontalAlignment(javax.swing.JTextField.CENTER); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 541, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txt_cantidad, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txt_cantidad, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); pack(); }// </editor-fold>//GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed String id = "", producto = ""; int subtotal = 0, precio = 0, cantidad = 0; int select = tabla_productos.getSelectedRow(); if (select == -1) { JOptionPane.showMessageDialog(null, "Seleccione una Fila"); } else { if (txt_cantidad.getText().equals("")) { JOptionPane.showMessageDialog(null, "Ingrese la Cantidad"); } else { cantidad = Integer.parseInt(txt_cantidad.getText()); if (cantidad <= 0) { JOptionPane.showMessageDialog(null, "La cantidad debe ser mayor a (0) "); } else { id = tabla_productos.getValueAt(select, 0).toString(); producto = tabla_productos.getValueAt(select, 1).toString(); precio = Integer.parseInt(tabla_productos.getValueAt(select, 2).toString()); subtotal = (precio * cantidad); Object datos[] = {id, producto, precio, cantidad, subtotal}; modeloCuenta.addRow(datos); } } } }//GEN-LAST:event_jButton1ActionPerformed // public static void main(String args[]) { // /* Set the Nimbus look and feel */ // //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> // /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. // * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html // */ // try { // for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { // if ("Nimbus".equals(info.getName())) { // javax.swing.UIManager.setLookAndFeel(info.getClassName()); // break; // } // } // } catch (ClassNotFoundException ex) { // java.util.logging.Logger.getLogger(Productos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); // } catch (InstantiationException ex) { // java.util.logging.Logger.getLogger(Productos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); // } catch (IllegalAccessException ex) { // java.util.logging.Logger.getLogger(Productos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); // } catch (javax.swing.UnsupportedLookAndFeelException ex) { // java.util.logging.Logger.getLogger(Productos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); // } // //</editor-fold> // // /* Create and display the dialog */ // java.awt.EventQueue.invokeLater(new Runnable() { // public void run() { // Productos dialog = new Productos(new javax.swing.JFrame(), true, valor); // dialog.addWindowListener(new java.awt.event.WindowAdapter() { // @Override // public void windowClosing(java.awt.event.WindowEvent e) { // System.exit(0); // } // }); // dialog.setVisible(true); // } // }); // } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable tabla_productos; private javax.swing.JTextField txt_cantidad; // End of variables declaration//GEN-END:variables // METODO PARA CARGAR TABLA PROYECTOS public void cargar_tabla_productos() { try { conexion = new ConexioSQLite(); conexion.coneccionbase(); String[] titulos = {"ID", "PRODUCTO", "PRECIO"}; String[] registro = new String[3]; modelo = new DefaultTableModel(null, titulos); try { ResultSet rs = conexion.consultaProductos(); while (rs.next()) { registro[0] = rs.getString("ID"); registro[1] = rs.getString("DESCRIPCION"); registro[2] = rs.getString("PRECIO"); modelo.addRow(registro); } tabla_productos.setModel(modelo); } catch (SQLException ex) { JOptionPane.showMessageDialog(null, ex); } } catch (Exception ex) { Logger.getLogger(Productos.class.getName()).log(Level.SEVERE, null, ex); } } }
cristian0193/EstructuraDatos
ProyectoFinalBaresUCC/src/Vistas/Productos.java
Java
gpl-2.0
9,862
package helper; import java.awt.AlphaComposite; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.image.BufferedImage; import javax.swing.JPanel; public class GhostGlassPane extends JPanel { private AlphaComposite composite; private BufferedImage dragged = null; private Point location = new Point(0, 0); public GhostGlassPane() { setOpaque(false); composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f); } public void setImage(BufferedImage dragged) { this.dragged = dragged; } public void setPoint(Point location) { this.location = location; } public void paintComponent(Graphics g) { if (dragged == null) return; Graphics2D g2 = (Graphics2D) g; g2.setComposite(composite); g2.drawImage(dragged, (int) (location.getX() - (dragged.getWidth(this) / 2)), (int) (location.getY() - (dragged.getHeight(this) / 2)), null); } }
pja35/ThePyBotWarPro
src/main/java/helper/GhostGlassPane.java
Java
gpl-2.0
1,128
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Crowdsignal (PollDaddy) shortcode. * * Formats: * [polldaddy type="iframe" survey="EB151947E5950FCF" height="auto" domain="jeherve" id="a-survey-with-branches"] * [crowdsignal type="iframe" survey="EB151947E5950FCF" height="auto" domain="jeherve" id="a-survey-with-branches"] * https://polldaddy.com/poll/7910844/ * https://jeherve.survey.fm/a-survey * https://jeherve.survey.fm/a-survey-with-branches * [crowdsignal type="iframe" survey="7676FB1FF2B56CE9" height="auto" domain="jeherve" id="a-survey"] * [crowdsignal survey="7676FB1FF2B56CE9"] * [polldaddy survey="7676FB1FF2B56CE9"] * [crowdsignal poll=9541291] * [crowdsignal poll=9541291 type=slider] * [crowdsignal rating=8755352] * * @package Jetpack */ use Automattic\Jetpack\Assets; use Automattic\Jetpack\Constants; // Keep compatibility with the PollDaddy plugin. if ( ! class_exists( 'CrowdsignalShortcode' ) && ! class_exists( 'PolldaddyShortcode' ) ) { /** * Class wrapper for Crowdsignal shortcodes */ class CrowdsignalShortcode { /** * Should the Crowdsignal JavaScript be added to the page? * * @var bool */ private static $add_script = false; /** * Array of Polls / Surveys present on the page, and that need to be added. * * @var bool|array */ private static $scripts = false; /** * Add all the actions & register the shortcode. */ public function __construct() { add_action( 'init', array( $this, 'register_scripts' ) ); add_shortcode( 'crowdsignal', array( $this, 'crowdsignal_shortcode' ) ); add_shortcode( 'polldaddy', array( $this, 'polldaddy_shortcode' ) ); add_filter( 'pre_kses', array( $this, 'crowdsignal_embed_to_shortcode' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'check_infinite' ) ); add_action( 'infinite_scroll_render', array( $this, 'crowdsignal_shortcode_infinite' ), 11 ); } /** * Register scripts that may be enqueued later on by the shortcode. */ public static function register_scripts() { wp_register_script( 'crowdsignal-shortcode', Assets::get_file_url_for_environment( '_inc/build/crowdsignal-shortcode.min.js', '_inc/crowdsignal-shortcode.js' ), array( 'jquery' ), JETPACK__VERSION, true ); wp_register_script( 'crowdsignal-survey', Assets::get_file_url_for_environment( '_inc/build/crowdsignal-survey.min.js', '_inc/crowdsignal-survey.js' ), array(), JETPACK__VERSION, true ); wp_register_script( 'crowdsignal-rating', 'https://polldaddy.com/js/rating/rating.js', array(), JETPACK__VERSION, true ); } /** * JavaScript code for a specific survey / poll. * * @param array $settings Array of information about a survey / poll. * @param string $survey_link HTML link tag for a specific survey or poll. * @param string $survey_url Link to the survey or poll. */ private function get_async_code( array $settings, $survey_link, $survey_url ) { wp_enqueue_script( 'crowdsignal-survey' ); if ( 'button' === $settings['type'] ) { $placeholder = sprintf( '<a class="cs-embed pd-embed" href="%1$s" data-settings="%2$s">%3$s</a>', esc_url( $survey_url ), esc_attr( wp_json_encode( $settings ) ), esc_html( $settings['title'] ) ); } else { $placeholder = sprintf( '<div class="cs-embed pd-embed" data-settings="%1$s"></div><noscript>%2$s</noscript>', esc_attr( wp_json_encode( $settings ) ), $survey_link ); } return $placeholder; } /** * Crowdsignal Poll Embed script - transforms code that looks like that: * <script type="text/javascript" charset="utf-8" async src="http://static.polldaddy.com/p/123456.js"></script> * <noscript><a href="http://polldaddy.com/poll/123456/">What is your favourite color?</a></noscript> * into the [crowdsignal poll=...] shortcode format * * @param string $content Post content. */ public function crowdsignal_embed_to_shortcode( $content ) { if ( ! is_string( $content ) || false === strpos( $content, 'polldaddy.com/p/' ) ) { return $content; } $regexes = array(); $regexes[] = '#<script[^>]+?src="https?://(secure|static)\.polldaddy\.com/p/([0-9]+)\.js"[^>]*+>\s*?</script>\r?\n?(<noscript>.*?</noscript>)?#i'; $regexes[] = '#&lt;script(?:[^&]|&(?!gt;))+?src="https?://(secure|static)\.polldaddy\.com/p/([0-9]+)\.js"(?:[^&]|&(?!gt;))*+&gt;\s*?&lt;/script&gt;\r?\n?(&lt;noscript&gt;.*?&lt;/noscript&gt;)?#i'; foreach ( $regexes as $regex ) { if ( ! preg_match_all( $regex, $content, $matches, PREG_SET_ORDER ) ) { continue; } foreach ( $matches as $match ) { if ( ! isset( $match[2] ) ) { continue; } $id = (int) $match[2]; if ( $id > 0 ) { $content = str_replace( $match[0], " [crowdsignal poll=$id]", $content ); /** This action is documented in modules/shortcodes/youtube.php */ do_action( 'jetpack_embed_to_shortcode', 'crowdsignal', $id ); } } } return $content; } /** * Support for legacy Polldaddy shortcode. * * @param array $atts Shortcode attributes. */ public function polldaddy_shortcode( $atts ) { if ( ! is_array( $atts ) ) { return '<!-- Polldaddy shortcode passed invalid attributes -->'; } $atts['site'] = 'polldaddy.com'; return $this->crowdsignal_shortcode( $atts ); } /** * Shortcode for Crowdsignal * [crowdsignal poll|survey|rating="123456"] * * @param array $atts Shortcode attributes. */ public function crowdsignal_shortcode( $atts ) { global $post; global $content_width; if ( ! is_array( $atts ) ) { return '<!-- Crowdsignal shortcode passed invalid attributes -->'; } $attributes = shortcode_atts( array( 'survey' => null, 'link_text' => esc_html__( 'Take Our Survey', 'jetpack' ), 'poll' => 'empty', 'rating' => 'empty', 'unique_id' => null, 'item_id' => null, 'title' => null, 'permalink' => null, 'cb' => 0, // cache buster. Helps with testing. 'type' => 'button', 'body' => '', 'button' => '', 'text_color' => '000000', 'back_color' => 'FFFFFF', 'align' => '', 'style' => '', 'width' => $content_width, 'height' => floor( $content_width * 3 / 4 ), 'delay' => 100, 'visit' => 'single', 'domain' => '', 'id' => '', 'site' => 'crowdsignal.com', ), $atts, 'crowdsignal' ); $inline = ! in_the_loop() && ! Constants::is_defined( 'TESTING_IN_JETPACK' ); $no_script = false; $infinite_scroll = false; if ( is_home() && current_theme_supports( 'infinite-scroll' ) ) { $infinite_scroll = true; } if ( function_exists( 'get_option' ) && get_option( 'polldaddy_load_poll_inline' ) ) { $inline = true; } if ( is_feed() || ( defined( 'DOING_AJAX' ) && ! $infinite_scroll ) ) { $no_script = false; } self::$add_script = $infinite_scroll; /* * Rating embed. */ if ( (int) $attributes['rating'] > 0 && ! $no_script ) { if ( empty( $attributes['unique_id'] ) ) { $attributes['unique_id'] = is_page() ? 'wp-page-' . $post->ID : 'wp-post-' . $post->ID; } if ( empty( $attributes['item_id'] ) ) { $attributes['item_id'] = is_page() ? '_page_' . $post->ID : '_post_' . $post->ID; } if ( empty( $attributes['title'] ) ) { /** This filter is documented in core/src/wp-includes/general-template.php */ $attributes['title'] = apply_filters( 'wp_title', $post->post_title, '', '' ); } if ( empty( $attributes['permalink'] ) ) { $attributes['permalink'] = get_permalink( $post->ID ); } $rating = (int) $attributes['rating']; $unique_id = preg_replace( '/[^\-_a-z0-9]/i', '', wp_strip_all_tags( $attributes['unique_id'] ) ); $item_id = wp_strip_all_tags( $attributes['item_id'] ); $item_id = preg_replace( '/[^_a-z0-9]/i', '', $item_id ); $settings = wp_json_encode( array( 'id' => $rating, 'unique_id' => $unique_id, 'title' => rawurlencode( trim( $attributes['title'] ) ), 'permalink' => esc_url( $attributes['permalink'] ), 'item_id' => $item_id, ) ); $item_id = esc_js( $item_id ); if ( class_exists( 'Jetpack_AMP_Support' ) && Jetpack_AMP_Support::is_amp_request() ) { return sprintf( '<a href="%s" target="_blank">%s</a>', esc_url( $attributes['permalink'] ), esc_html( trim( $attributes['title'] ) ) ); } elseif ( $inline ) { $rating_js = "<!--//--><![CDATA[//><!--\n"; $rating_js .= "PDRTJS_settings_{$rating}{$item_id}={$settings};"; $rating_js .= "\n//--><!]]>"; wp_enqueue_script( 'crowdsignal-rating' ); wp_add_inline_script( 'crowdsignal-rating', $rating_js, 'before' ); return sprintf( '<div class="cs-rating pd-rating" id="pd_rating_holder_%1$d%2$s"></div>', absint( $rating ), esc_attr( $item_id ) ); } else { if ( false === self::$scripts ) { self::$scripts = array(); } $data = array( 'id' => $rating, 'item_id' => $item_id, 'settings' => $settings, ); self::$scripts['rating'][] = $data; add_action( 'wp_footer', array( $this, 'generate_scripts' ) ); if ( $infinite_scroll ) { return sprintf( '<div class="cs-rating pd-rating" id="pd_rating_holder_%1$d%2$s" data-settings="%3$s"></div>', absint( $rating ), esc_attr( $item_id ), esc_attr( wp_json_encode( $data ) ) ); } else { return sprintf( '<div class="cs-rating pd-rating" id="pd_rating_holder_%1$d%2$s"></div>', absint( $rating ), esc_attr( $item_id ) ); } } } elseif ( (int) $attributes['poll'] > 0 ) { /* * Poll embed. */ if ( empty( $attributes['title'] ) ) { $attributes['title'] = esc_html__( 'Take Our Poll', 'jetpack' ); } $poll = (int) $attributes['poll']; if ( 'crowdsignal.com' === $attributes['site'] ) { $poll_url = sprintf( 'https://poll.fm/%d', $poll ); } else { $poll_url = sprintf( 'https://polldaddy.com/p/%d', $poll ); } $poll_js = sprintf( 'https://secure.polldaddy.com/p/%d.js', $poll ); $poll_link = sprintf( '<a href="%s" target="_blank">%s</a>', esc_url( $poll_url ), esc_html( $attributes['title'] ) ); if ( $no_script || ( class_exists( 'Jetpack_AMP_Support' ) && Jetpack_AMP_Support::is_amp_request() ) ) { return $poll_link; } else { /* * Slider poll. */ if ( 'slider' === $attributes['type'] && ! $inline ) { if ( ! in_array( $attributes['visit'], array( 'single', 'multiple' ), true ) ) { $attributes['visit'] = 'single'; } $settings = array( 'type' => 'slider', 'embed' => 'poll', 'delay' => (int) $attributes['delay'], 'visit' => $attributes['visit'], 'id' => (int) $poll, 'site' => $attributes['site'], ); return $this->get_async_code( $settings, $poll_link, $poll_url ); } else { if ( 1 === $attributes['cb'] ) { $attributes['cb'] = '?cb=' . time(); } else { $attributes['cb'] = false; } $margins = ''; $float = ''; if ( in_array( $attributes['align'], array( 'right', 'left' ), true ) ) { $float = sprintf( 'float: %s;', $attributes['align'] ); if ( 'left' === $attributes['align'] ) { $margins = 'margin: 0px 10px 0px 0px;'; } elseif ( 'right' === $attributes['align'] ) { $margins = 'margin: 0px 0px 0px 10px'; } } /* * Force the normal style embed on single posts/pages * otherwise it's not rendered on infinite scroll themed blogs * ('infinite_scroll_render' isn't fired) */ if ( is_singular() ) { $inline = true; } if ( false === $attributes['cb'] && ! $inline ) { if ( false === self::$scripts ) { self::$scripts = array(); } $data = array( 'url' => $poll_js ); self::$scripts['poll'][ (int) $poll ] = $data; add_action( 'wp_footer', array( $this, 'generate_scripts' ) ); wp_enqueue_script( 'crowdsignal-shortcode' ); wp_localize_script( 'crowdsignal-shortcode', 'crowdsignal_shortcode_options', array( 'script_url' => esc_url_raw( Assets::get_file_url_for_environment( '_inc/build/polldaddy-shortcode.min.js', '_inc/polldaddy-shortcode.js' ) ), ) ); /** * Hook into the Crowdsignal shortcode before rendering. * * @since 8.4.0 * * @param int $poll Poll ID. */ do_action( 'crowdsignal_shortcode_before', (int) $poll ); return sprintf( '<a name="pd_a_%1$d"></a><div class="CSS_Poll PDS_Poll" id="PDI_container%1$d" data-settings="%2$s" style="%3$s%4$s"></div><div id="PD_superContainer"></div><noscript>%5$s</noscript>', absint( $poll ), esc_attr( wp_json_encode( $data ) ), $float, $margins, $poll_link ); } else { if ( $inline ) { $attributes['cb'] = ''; } wp_enqueue_script( 'crowdsignal-' . absint( $poll ), esc_url( $poll_js . $attributes['cb'] ), array(), JETPACK__VERSION, true ); /** This action is already documented in modules/shortcodes/crowdsignal.php */ do_action( 'crowdsignal_shortcode_before', (int) $poll ); return sprintf( '<a id="pd_a_%1$s"></a><div class="CSS_Poll PDS_Poll" id="PDI_container%1$s" style="%2$s%3$s"></div><div id="PD_superContainer"></div><noscript>%4$s</noscript>', absint( $poll ), $float, $margins, $poll_link ); } } } } elseif ( ! empty( $attributes['survey'] ) ) { /* * Survey embed. */ if ( in_array( $attributes['type'], array( 'iframe', 'button', 'banner', 'slider' ), true ) ) { if ( empty( $attributes['title'] ) ) { $attributes['title'] = esc_html__( 'Take Our Survey', 'jetpack' ); if ( ! empty( $attributes['link_text'] ) ) { $attributes['title'] = $attributes['link_text']; } } if ( 'banner' === $attributes['type'] || 'slider' === $attributes['type'] ) { $inline = false; } $survey_url = ''; if ( 'true' !== $attributes['survey'] ) { $survey = preg_replace( '/[^a-f0-9]/i', '', $attributes['survey'] ); if ( 'crowdsignal.com' === $attributes['site'] ) { $survey_url = 'https://survey.fm/' . $survey; } else { $survey_url = 'https://polldaddy.com/s/' . $survey; } } else { if ( isset( $attributes['domain'] ) && isset( $attributes['id'] ) ) { $survey_url = 'https://' . $attributes['domain'] . '.survey.fm/' . $attributes['id']; } } $survey_link = sprintf( '<a href="%s" target="_blank" rel="noopener noreferrer">%s</a>', esc_url( $survey_url ), esc_html( $attributes['title'] ) ); $settings = array(); if ( 'iframe' === $attributes['type'] ) { if ( 'auto' !== $attributes['height'] ) { if ( isset( $content_width ) && is_numeric( $attributes['width'] ) && $attributes['width'] > $content_width ) { $attributes['width'] = $content_width; } if ( ! $attributes['width'] ) { $attributes['width'] = '100%'; } else { $attributes['width'] = (int) $attributes['width']; } if ( ! $attributes['height'] ) { $attributes['height'] = '600'; } else { $attributes['height'] = (int) $attributes['height']; } return sprintf( '<iframe src="%1$s?iframe=1" frameborder="0" width="%2$d" height="%3$d" scrolling="auto" allowtransparency="true" marginheight="0" marginwidth="0">%4$s</iframe>', esc_url( $survey_url ), absint( $attributes['width'] ), absint( $attributes['height'] ), $survey_link ); } elseif ( ! empty( $attributes['domain'] ) && ! empty( $attributes['id'] ) ) { $domain = preg_replace( '/[^a-z0-9\-]/i', '', $attributes['domain'] ); $id = preg_replace( '/[\/\?&\{\}]/', '', $attributes['id'] ); $auto_src = esc_url( "https://{$domain}.survey.fm/{$id}" ); $auto_src = wp_parse_url( $auto_src ); if ( ! is_array( $auto_src ) || 0 === count( $auto_src ) ) { return '<!-- no crowdsignal output -->'; } if ( ! isset( $auto_src['host'] ) || ! isset( $auto_src['path'] ) ) { return '<!-- no crowdsignal output -->'; } $domain = $auto_src['host'] . '/'; $id = ltrim( $auto_src['path'], '/' ); $settings = array( 'type' => $attributes['type'], 'auto' => true, 'domain' => $domain, 'id' => $id, 'site' => $attributes['site'], ); } } else { $text_color = preg_replace( '/[^a-f0-9]/i', '', $attributes['text_color'] ); $back_color = preg_replace( '/[^a-f0-9]/i', '', $attributes['back_color'] ); if ( ! in_array( $attributes['align'], array( 'right', 'left', 'top-left', 'top-right', 'middle-left', 'middle-right', 'bottom-left', 'bottom-right', ), true ) ) { $attributes['align'] = ''; } if ( ! in_array( $attributes['style'], array( 'inline', 'side', 'corner', 'rounded', 'square', ), true ) ) { $attributes['style'] = ''; } $settings = array_filter( array( 'title' => wp_strip_all_tags( $attributes['title'] ), 'type' => $attributes['type'], 'body' => wp_strip_all_tags( $attributes['body'] ), 'button' => wp_strip_all_tags( $attributes['button'] ), 'text_color' => $text_color, 'back_color' => $back_color, 'align' => $attributes['align'], 'style' => $attributes['style'], 'id' => $survey, 'site' => $attributes['site'], ) ); } if ( empty( $settings ) ) { return '<!-- no crowdsignal output -->'; } return $this->get_async_code( $settings, $survey_link, $survey_url ); } } else { return '<!-- no crowdsignal output -->'; } } /** * Enqueue JavaScript containing all ratings / polls on the page. * Hooked into wp_footer */ public function generate_scripts() { if ( is_array( self::$scripts ) ) { if ( isset( self::$scripts['rating'] ) ) { $script = "<!--//--><![CDATA[//><!--\n"; foreach ( self::$scripts['rating'] as $rating ) { $script .= "PDRTJS_settings_{$rating['id']}{$rating['item_id']}={$rating['settings']}; if ( typeof PDRTJS_RATING !== 'undefined' ){if ( typeof PDRTJS_{$rating['id']}{$rating['item_id']} == 'undefined' ){PDRTJS_{$rating['id']}{$rating['item_id']} = new PDRTJS_RATING( PDRTJS_settings_{$rating['id']}{$rating['item_id']} );}}"; } $script .= "\n//--><!]]>"; wp_enqueue_script( 'crowdsignal-rating' ); wp_add_inline_script( 'crowdsignal-rating', $script, 'before' ); } if ( isset( self::$scripts['poll'] ) ) { foreach ( self::$scripts['poll'] as $poll_id => $poll ) { wp_enqueue_script( 'crowdsignal-' . absint( $poll_id ), esc_url( $poll['url'] ), array(), JETPACK__VERSION, true ); } } } self::$scripts = false; } /** * If the theme uses infinite scroll, include jquery at the start */ public function check_infinite() { if ( current_theme_supports( 'infinite-scroll' ) && class_exists( 'The_Neverending_Home_Page' ) && The_Neverending_Home_Page::archive_supports_infinity() ) { wp_enqueue_script( 'jquery' ); } } /** * Dynamically load the .js, if needed * * This hooks in late (priority 11) to infinite_scroll_render to determine * a posteriori if a shortcode has been called. */ public function crowdsignal_shortcode_infinite() { // only try to load if a shortcode has been called and theme supports infinite scroll. if ( self::$add_script ) { wp_enqueue_script( 'crowdsignal-shortcode' ); wp_localize_script( 'crowdsignal-shortcode', 'crowdsignal_shortcode_options', array( 'script_url' => esc_url_raw( Assets::get_file_url_for_environment( '_inc/build/polldaddy-shortcode.min.js', '_inc/polldaddy-shortcode.js' ) ), ) ); } } } // Kick it all off. new CrowdsignalShortcode(); if ( ! function_exists( 'crowdsignal_link' ) ) { /** * Replace link with shortcode. * Examples: https://poll.fm/10499328 | https://7iger.survey.fm/test-embed * * @param string $content Post content. */ function crowdsignal_link( $content ) { if ( class_exists( 'Jetpack_AMP_Support' ) && Jetpack_AMP_Support::is_amp_request() ) { return $content; } // Replace poll links. $content = jetpack_preg_replace_outside_tags( '!(?:\n|\A)https?://(polldaddy\.com/poll|poll\.fm)/([0-9]+?)(/.*)?(?:\n|\Z)!i', '[crowdsignal poll=$2]', $content ); // Replace survey.fm links. $content = preg_replace( '!(?:\n|\A)https?://(.*).survey.fm/(.*)(/.*)?(?:\n|\Z)!i', '[crowdsignal type="iframe" survey="true" height="auto" domain="$1" id="$2"]', $content ); return $content; } // higher priority because we need it before auto-link and autop get to it. add_filter( 'the_content', 'crowdsignal_link', 1 ); add_filter( 'the_content_rss', 'crowdsignal_link', 1 ); } }
Automattic/vip-go-mu-plugins
jetpack-9.4/modules/shortcodes/crowdsignal.php
PHP
gpl-2.0
22,364
<?php /** @package catalog::modules::services @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: currencies.php v1.0 2013-08-08 datazen $ */ class lC_Services_currencies { function start() { global $lC_Language, $lC_Currencies, $lC_Vqmod; include($lC_Vqmod->modCheck('includes/classes/currencies.php')); $lC_Currencies = new lC_Currencies(); if ((isset($_SESSION['currency']) == false) || isset($_GET['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == '1') && ($lC_Currencies->getCode($lC_Language->getCurrencyID()) != $_SESSION['currency']) ) ) { if (isset($_GET['currency']) && $lC_Currencies->exists($_GET['currency'])) { $_SESSION['currency'] = $_GET['currency']; } else { $_SESSION['currency'] = (USE_DEFAULT_LANGUAGE_CURRENCY == '1') ? $lC_Currencies->getCode($lC_Language->getCurrencyID()) : DEFAULT_CURRENCY; } if ( isset($_SESSION['cartID']) ) { unset($_SESSION['cartID']); } } return true; } function stop() { return true; } } ?>
loadedcommerce/loaded7
catalog/includes/modules/services/currencies.php
PHP
gpl-2.0
1,257
/** * OWASP Benchmark Project v1.2 * * This file is part of the Open Web Application Security Project (OWASP) * Benchmark Project. For details, please see * <a href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>. * * The OWASP Benchmark 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. * * The OWASP Benchmark 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. * * @author Nick Sanidas * @created 2015 */ package org.owasp.benchmark.testcode; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet(value="/xss-01/BenchmarkTest00544") public class BenchmarkTest00544 extends HttpServlet { private static final long serialVersionUID = 1L; @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); String param = ""; boolean flag = true; java.util.Enumeration<String> names = request.getParameterNames(); while (names.hasMoreElements() && flag) { String name = (String) names.nextElement(); String[] values = request.getParameterValues(name); if (values != null) { for(int i=0;i<values.length && flag; i++){ String value = values[i]; if (value.equals("BenchmarkTest00544")) { param = name; flag = false; } } } } String bar = "alsosafe"; if (param != null) { java.util.List<String> valuesList = new java.util.ArrayList<String>( ); valuesList.add("safe"); valuesList.add( param ); valuesList.add( "moresafe" ); valuesList.remove(0); // remove the 1st safe value bar = valuesList.get(1); // get the last 'safe' value } response.setHeader("X-XSS-Protection", "0"); response.getWriter().print(bar.toCharArray()); } }
h3xstream/Benchmark
src/main/java/org/owasp/benchmark/testcode/BenchmarkTest00544.java
Java
gpl-2.0
2,453
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ultra.CoreCaller; using Ultra.FASControls.Controllers; namespace Ultra.FASControls { public partial class SerNoCaller_WL { //CtlItemController protected static EFCaller<UltraDbEntity.T_ERP_Item> _Calr_Item = null; public static EFCaller<UltraDbEntity.T_ERP_Item> Calr_Item { get { return _Calr_Item = _Calr_Item ?? new EFCaller<UltraDbEntity.T_ERP_Item>(new CtlItemController()); } } //CtlItemComboController protected static EFCaller<UltraDbEntity.T_ERP_ItemCombo> _Calr_ItemCombo = null; public static EFCaller<UltraDbEntity.T_ERP_ItemCombo> Calr_ItemCombo { get { return _Calr_ItemCombo = _Calr_ItemCombo ?? new EFCaller<UltraDbEntity.T_ERP_ItemCombo>(new CtlItemComboController()); } } //CtlItemImports_FullBakController protected static EFCaller<UltraDbEntity.T_ERP_ItemImports_FullBak> _Calr_ItemImports_FullBak = null; public static EFCaller<UltraDbEntity.T_ERP_ItemImports_FullBak> Calr_ItemImports_FullBak { get { return _Calr_ItemImports_FullBak = _Calr_ItemImports_FullBak ?? new EFCaller<UltraDbEntity.T_ERP_ItemImports_FullBak>(new CtlItemImports_FullBakController()); } } //CtlItemPackSkuController protected static EFCaller<UltraDbEntity.T_ERP_ItemPackSku> _Calr_ItemPackSku = null; public static EFCaller<UltraDbEntity.T_ERP_ItemPackSku> Calr_ItemPackSku { get { return _Calr_ItemPackSku = _Calr_ItemPackSku ?? new EFCaller<UltraDbEntity.T_ERP_ItemPackSku>(new CtlItemPackSkuController()); } } //CtlItemStyleController protected static EFCaller<UltraDbEntity.T_ERP_ItemStyle> _Calr_ItemStyle = null; public static EFCaller<UltraDbEntity.T_ERP_ItemStyle> Calr_ItemStyle { get { return _Calr_ItemStyle = _Calr_ItemStyle ?? new EFCaller<UltraDbEntity.T_ERP_ItemStyle>(new CtlItemStyleController()); } } //CtlItemImportsController protected static EFCaller<UltraDbEntity.T_ERP_ItemImports> _Calr_ItemImports = null; public static EFCaller<UltraDbEntity.T_ERP_ItemImports> Calr_ItemImports { get { return _Calr_ItemImports = _Calr_ItemImports ?? new EFCaller<UltraDbEntity.T_ERP_ItemImports>(new CtlItemImportsController()); } } //CtlWareAreaController protected static EFCaller<UltraDbEntity.T_ERP_WareArea> _Calr_WareArea = null; public static EFCaller<UltraDbEntity.T_ERP_WareArea> Calr_WareArea { get { return _Calr_WareArea = _Calr_WareArea ?? new EFCaller<UltraDbEntity.T_ERP_WareArea>(new CtlWareAreaController()); } } //CtlV_ERP_InventCollectController protected static EFCaller<UltraDbEntity.V_ERP_InventCollect> _Calr_V_ERP_InventCollect = null; public static EFCaller<UltraDbEntity.V_ERP_InventCollect> Calr_V_ERP_InventCollect { get { return _Calr_V_ERP_InventCollect = _Calr_V_ERP_InventCollect ?? new EFCaller<UltraDbEntity.V_ERP_InventCollect>(new CtlV_ERP_InventCollectController()); } } //CtlWreckPriceController protected static EFCaller<UltraDbEntity.T_ERP_WreckPrice> _Calr_WreckPrice = null; public static EFCaller<UltraDbEntity.T_ERP_WreckPrice> Calr_WreckPrice { get { return _Calr_WreckPrice = _Calr_WreckPrice ?? new EFCaller<UltraDbEntity.T_ERP_WreckPrice>(new CtlWreckPriceController()); } } //CtlWreckTypeController protected static EFCaller<UltraDbEntity.T_ERP_WreckType> _Calr_WreckType = null; public static EFCaller<UltraDbEntity.T_ERP_WreckType> Calr_WreckType { get { return _Calr_WreckType = _Calr_WreckType ?? new EFCaller<UltraDbEntity.T_ERP_WreckType>(new CtlWreckTypeController()); } } //CtlWorkerController protected static EFCaller<UltraDbEntity.T_ERP_Worker> _Calr_Worker = null; public static EFCaller<UltraDbEntity.T_ERP_Worker> Calr_Worker { get { return _Calr_Worker = _Calr_Worker ?? new EFCaller<UltraDbEntity.T_ERP_Worker>(new CtlWorkerController()); } } } }
Tyreezhang/OYWLWeb
Ultra.FASControls/Caller/SerNoCaller_WL.cs
C#
gpl-2.0
5,178
<?php /** * @package JooDatabase - http://joodb.feenders.de * @copyright Copyright (C) Computer - Daten - Netze : Feenders. All rights reserved. * @license GNU/GPL, see LICENSE.php * @author Dirk Hoeschen (hoeschen@feenders.de) */ function JoodbBuildRoute(&$query) { $segments = array(); // get a menu item based on Itemid or currently active $app = JFactory::getApplication(); $menu = $app->getMenu(); // we need a menu item. Either the one specified in the query, or the current active one if none specified if (empty($query['Itemid'])) { $menuItem = $menu->getActive(); $menuItemGiven = false; } else { $menuItem = $menu->getItem($query['Itemid']); $menuItemGiven = true; } $mView = (empty($menuItem->query['view'])) ? null : $menuItem->query['view']; $mId = (empty($menuItem->query['id'])) ? null : $menuItem->query['id']; // are we dealing with an article that is attached to a menu item? if (($mView == 'article') and (isset($query['id'])) and ($mId == intval($query['id']))) { unset($query['view']); unset($query['id']); } if(isset($query['view'])) { if ($mView!=$query['view'] || $menuItem->query['option']!="com_joodb") $segments[] = $query['view']; unset($query['view']); }; if (empty($query['Itemid'])) { if(isset($query['joobase'])) { $segments[] = $query['joobase']; unset($query['joobase']); }; } else if(isset($query['joobase'])) unset($query['joobase']); if(isset($query['id'])) { $segments[] = $query['id']; unset($query['id']); }; return $segments; } function JoodbParseRoute( $segments ) { $vars = array(); // Count route segments $count = count($segments)-1; //routing for articles if menu item unknown joodb ID is included if($count>=2) { $vars['view'] = $segments[$count-2]; $id = explode( ':', $segments[$count-1] ); $vars['joobase'] = $id[0]; $id = explode( ':', $segments[$count] ); $vars['id'] = $id[0]; } else if($count==1) { $vars['view'] = $segments[0]; $id = explode( ':', $segments[1] ); $vars['id'] = $id[0]; } else { $vars['view'] = $segments[0]; } return $vars; }
rodhoff/cdn1
components/com_joodb/router.php
PHP
gpl-2.0
2,116
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * This file is available under and governed by the GNU General Public * License version 2 only, as published by the Free Software Foundation. * However, the following notice accompanied the original version of this * file: * * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at * http://creativecommons.org/publicdomain/zero/1.0/ */ package java.util.concurrent.atomic; import java.lang.invoke.MethodHandles; import java.lang.invoke.VarHandle; import java.util.function.LongBinaryOperator; import java.util.function.LongUnaryOperator; /** * A {@code long} array in which elements may be updated atomically. * See the {@link VarHandle} specification for descriptions of the * properties of atomic accesses. * @since 1.5 * @author Doug Lea */ public class AtomicLongArray implements java.io.Serializable { private static final long serialVersionUID = -2308431214976778248L; private static final VarHandle AA = MethodHandles.arrayElementVarHandle(long[].class); private final long[] array; /** * Creates a new AtomicLongArray of the given length, with all * elements initially zero. * * @param length the length of the array */ public AtomicLongArray(int length) { array = new long[length]; } /** * Creates a new AtomicLongArray with the same length as, and * all elements copied from, the given array. * * @param array the array to copy elements from * @throws NullPointerException if array is null */ public AtomicLongArray(long[] array) { // Visibility guaranteed by final field guarantees this.array = array.clone(); } /** * Returns the length of the array. * * @return the length of the array */ public final int length() { return array.length; } /** * Returns the current value of the element at index {@code i}, * with memory effects as specified by {@link VarHandle#getVolatile}. * * @param i the index * @return the current value */ public final long get(int i) { return (long)AA.getVolatile(array, i); } /** * Sets the element at index {@code i} to {@code newValue}, * with memory effects as specified by {@link VarHandle#setVolatile}. * * @param i the index * @param newValue the new value */ public final void set(int i, long newValue) { AA.setVolatile(array, i, newValue); } /** * Sets the element at index {@code i} to {@code newValue}, * with memory effects as specified by {@link VarHandle#setRelease}. * * @param i the index * @param newValue the new value * @since 1.6 */ public final void lazySet(int i, long newValue) { AA.setRelease(array, i, newValue); } /** * Atomically sets the element at index {@code i} to {@code * newValue} and returns the old value, * with memory effects as specified by {@link VarHandle#getAndSet}. * * @param i the index * @param newValue the new value * @return the previous value */ public final long getAndSet(int i, long newValue) { return (long)AA.getAndSet(array, i, newValue); } /** * Atomically sets the element at index {@code i} to {@code newValue} * if the element's current value {@code == expectedValue}, * with memory effects as specified by {@link VarHandle#compareAndSet}. * * @param i the index * @param expectedValue the expected value * @param newValue the new value * @return {@code true} if successful. False return indicates that * the actual value was not equal to the expected value. */ public final boolean compareAndSet(int i, long expectedValue, long newValue) { return AA.compareAndSet(array, i, expectedValue, newValue); } /** * Possibly atomically sets the element at index {@code i} to * {@code newValue} if the element's current value {@code == expectedValue}, * with memory effects as specified by {@link VarHandle#weakCompareAndSet}. * * @param i the index * @param expectedValue the expected value * @param newValue the new value * @return {@code true} if successful */ public final boolean weakCompareAndSet(int i, long expectedValue, long newValue) { return AA.weakCompareAndSet(array, i, expectedValue, newValue); } /** * Atomically increments the value of the element at index {@code i}, * with memory effects as specified by {@link VarHandle#getAndAdd}. * * <p>Equivalent to {@code getAndAdd(i, 1)}. * * @param i the index * @return the previous value */ public final long getAndIncrement(int i) { return (long)AA.getAndAdd(array, i, 1L); } /** * Atomically decrements the value of the element at index {@code i}, * with memory effects as specified by {@link VarHandle#getAndAdd}. * * <p>Equivalent to {@code getAndAdd(i, -1)}. * * @param i the index * @return the previous value */ public final long getAndDecrement(int i) { return (long)AA.getAndAdd(array, i, -1L); } /** * Atomically adds the given value to the element at index {@code i}, * with memory effects as specified by {@link VarHandle#getAndAdd}. * * @param i the index * @param delta the value to add * @return the previous value */ public final long getAndAdd(int i, long delta) { return (long)AA.getAndAdd(array, i, delta); } /** * Atomically increments the value of the element at index {@code i}, * with memory effects as specified by {@link VarHandle#addAndGet}. * * <p>Equivalent to {@code addAndGet(i, 1)}. * * @param i the index * @return the updated value */ public final long incrementAndGet(int i) { return (long)AA.addAndGet(array, i, 1L); } /** * Atomically decrements the value of the element at index {@code i}, * with memory effects as specified by {@link VarHandle#addAndGet}. * * <p>Equivalent to {@code addAndGet(i, -1)}. * * @param i the index * @return the updated value */ public final long decrementAndGet(int i) { return (long)AA.addAndGet(array, i, -1L); } /** * Atomically adds the given value to the element at index {@code i}, * with memory effects as specified by {@link VarHandle#addAndGet}. * * @param i the index * @param delta the value to add * @return the updated value */ public long addAndGet(int i, long delta) { return (long)AA.addAndGet(array, i, delta); } /** * Atomically updates the element at index {@code i} with the results * of applying the given function, returning the previous value. The * function should be side-effect-free, since it may be re-applied * when attempted updates fail due to contention among threads. * * @param i the index * @param updateFunction a side-effect-free function * @return the previous value * @since 1.8 */ public final long getAndUpdate(int i, LongUnaryOperator updateFunction) { long prev = get(i), next = 0L; for (boolean haveNext = false;;) { if (!haveNext) next = updateFunction.applyAsLong(prev); if (weakCompareAndSetVolatile(i, prev, next)) return prev; haveNext = (prev == (prev = get(i))); } } /** * Atomically updates the element at index {@code i} with the results * of applying the given function, returning the updated value. The * function should be side-effect-free, since it may be re-applied * when attempted updates fail due to contention among threads. * * @param i the index * @param updateFunction a side-effect-free function * @return the updated value * @since 1.8 */ public final long updateAndGet(int i, LongUnaryOperator updateFunction) { long prev = get(i), next = 0L; for (boolean haveNext = false;;) { if (!haveNext) next = updateFunction.applyAsLong(prev); if (weakCompareAndSetVolatile(i, prev, next)) return next; haveNext = (prev == (prev = get(i))); } } /** * Atomically updates the element at index {@code i} with the * results of applying the given function to the current and given * values, returning the previous value. The function should be * side-effect-free, since it may be re-applied when attempted * updates fail due to contention among threads. The function is * applied with the current value of the element at index {@code i} * as its first argument, and the given update as the second * argument. * * @param i the index * @param x the update value * @param accumulatorFunction a side-effect-free function of two arguments * @return the previous value * @since 1.8 */ public final long getAndAccumulate(int i, long x, LongBinaryOperator accumulatorFunction) { long prev = get(i), next = 0L; for (boolean haveNext = false;;) { if (!haveNext) next = accumulatorFunction.applyAsLong(prev, x); if (weakCompareAndSetVolatile(i, prev, next)) return prev; haveNext = (prev == (prev = get(i))); } } /** * Atomically updates the element at index {@code i} with the * results of applying the given function to the current and given * values, returning the updated value. The function should be * side-effect-free, since it may be re-applied when attempted * updates fail due to contention among threads. The function is * applied with the current value of the element at index {@code i} * as its first argument, and the given update as the second * argument. * * @param i the index * @param x the update value * @param accumulatorFunction a side-effect-free function of two arguments * @return the updated value * @since 1.8 */ public final long accumulateAndGet(int i, long x, LongBinaryOperator accumulatorFunction) { long prev = get(i), next = 0L; for (boolean haveNext = false;;) { if (!haveNext) next = accumulatorFunction.applyAsLong(prev, x); if (weakCompareAndSetVolatile(i, prev, next)) return next; haveNext = (prev == (prev = get(i))); } } /** * Returns the String representation of the current values of array. * @return the String representation of the current values of array */ public String toString() { int iMax = array.length - 1; if (iMax == -1) return "[]"; StringBuilder b = new StringBuilder(); b.append('['); for (int i = 0; ; i++) { b.append(get(i)); if (i == iMax) return b.append(']').toString(); b.append(',').append(' '); } } // jdk9 /** * Returns the current value of the element at index {@code i}, * with memory semantics of reading as if the variable was declared * non-{@code volatile}. * * @param i the index * @return the value * @since 9 */ public final long getPlain(int i) { return (long)AA.get(array, i); } /** * Sets the element at index {@code i} to {@code newValue}, * with memory semantics of setting as if the variable was * declared non-{@code volatile} and non-{@code final}. * * @param i the index * @param newValue the new value * @since 9 */ public final void setPlain(int i, long newValue) { AA.set(array, i, newValue); } /** * Returns the current value of the element at index {@code i}, * with memory effects as specified by {@link VarHandle#getOpaque}. * * @param i the index * @return the value * @since 9 */ public final long getOpaque(int i) { return (long)AA.getOpaque(array, i); } /** * Sets the element at index {@code i} to {@code newValue}, * with memory effects as specified by {@link VarHandle#setOpaque}. * * @param i the index * @param newValue the new value * @since 9 */ public final void setOpaque(int i, long newValue) { AA.setOpaque(array, i, newValue); } /** * Returns the current value of the element at index {@code i}, * with memory effects as specified by {@link VarHandle#getAcquire}. * * @param i the index * @return the value * @since 9 */ public final long getAcquire(int i) { return (long)AA.getAcquire(array, i); } /** * Sets the element at index {@code i} to {@code newValue}, * with memory effects as specified by {@link VarHandle#setRelease}. * * @param i the index * @param newValue the new value * @since 9 */ public final void setRelease(int i, long newValue) { AA.setRelease(array, i, newValue); } /** * Atomically sets the element at index {@code i} to {@code newValue} * if the element's current value, referred to as the <em>witness * value</em>, {@code == expectedValue}, * with memory effects as specified by * {@link VarHandle#compareAndExchange}. * * @param i the index * @param expectedValue the expected value * @param newValue the new value * @return the witness value, which will be the same as the * expected value if successful * @since 9 */ public final long compareAndExchange(int i, long expectedValue, long newValue) { return (long)AA.compareAndExchange(array, i, expectedValue, newValue); } /** * Atomically sets the element at index {@code i} to {@code newValue} * if the element's current value, referred to as the <em>witness * value</em>, {@code == expectedValue}, * with memory effects as specified by * {@link VarHandle#compareAndExchangeAcquire}. * * @param i the index * @param expectedValue the expected value * @param newValue the new value * @return the witness value, which will be the same as the * expected value if successful * @since 9 */ public final long compareAndExchangeAcquire(int i, long expectedValue, long newValue) { return (long)AA.compareAndExchangeAcquire(array, i, expectedValue, newValue); } /** * Atomically sets the element at index {@code i} to {@code newValue} * if the element's current value, referred to as the <em>witness * value</em>, {@code == expectedValue}, * with memory effects as specified by * {@link VarHandle#compareAndExchangeRelease}. * * @param i the index * @param expectedValue the expected value * @param newValue the new value * @return the witness value, which will be the same as the * expected value if successful * @since 9 */ public final long compareAndExchangeRelease(int i, long expectedValue, long newValue) { return (long)AA.compareAndExchangeRelease(array, i, expectedValue, newValue); } /** * Possibly atomically sets the element at index {@code i} to * {@code newValue} if the element's current value {@code == expectedValue}, * with memory effects as specified by * {@link VarHandle#weakCompareAndSetVolatile}. * * @param i the index * @param expectedValue the expected value * @param newValue the new value * @return {@code true} if successful * @since 9 */ public final boolean weakCompareAndSetVolatile(int i, long expectedValue, long newValue) { return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue); } /** * Possibly atomically sets the element at index {@code i} to * {@code newValue} if the element's current value {@code == expectedValue}, * with memory effects as specified by * {@link VarHandle#weakCompareAndSetAcquire}. * * @param i the index * @param expectedValue the expected value * @param newValue the new value * @return {@code true} if successful * @since 9 */ public final boolean weakCompareAndSetAcquire(int i, long expectedValue, long newValue) { return AA.weakCompareAndSetAcquire(array, i, expectedValue, newValue); } /** * Possibly atomically sets the element at index {@code i} to * {@code newValue} if the element's current value {@code == expectedValue}, * with memory effects as specified by * {@link VarHandle#weakCompareAndSetRelease}. * * @param i the index * @param expectedValue the expected value * @param newValue the new value * @return {@code true} if successful * @since 9 */ public final boolean weakCompareAndSetRelease(int i, long expectedValue, long newValue) { return AA.weakCompareAndSetRelease(array, i, expectedValue, newValue); } }
FauxFaux/jdk9-jdk
src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java
Java
gpl-2.0
18,582
/* * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.oracle.tools.packager.jnlp; import com.oracle.tools.packager.AbstractBundler; import com.oracle.tools.packager.BundlerParamInfo; import com.oracle.tools.packager.ConfigException; import com.oracle.tools.packager.Log; import com.oracle.tools.packager.RelativeFileSet; import com.oracle.tools.packager.StandardBundlerParam; import com.oracle.tools.packager.UnsupportedPlatformException; import com.sun.javafx.tools.packager.PackagerException; import com.sun.javafx.tools.resource.PackagerResource; import com.sun.javafx.tools.packager.TemplatePlaceholders; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintStream; import java.io.StringReader; import java.io.StringWriter; import java.security.cert.CertificateEncodingException; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Base64; import java.util.Collection; import java.util.EnumMap; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.ResourceBundle; import java.util.regex.Matcher; import java.util.regex.Pattern; import static com.oracle.tools.packager.StandardBundlerParam.*; import jdk.packager.internal.legacy.JLinkBundlerHelper; public class JNLPBundler extends AbstractBundler { private static final ResourceBundle I18N = ResourceBundle.getBundle(JNLPBundler.class.getName()); private static final String dtFX = "dtjava.js"; private static final String webfilesDir = "web-files"; //Note: leading "." is important for IE8 private static final String EMBEDDED_DT = "./"+webfilesDir+"/"+dtFX; private static final String PUBLIC_DT = "https://java.com/js/dtjava.js"; private static final String JFX_NS_URI = "http://javafx.com"; public static final StandardBundlerParam<String> OUT_FILE = new StandardBundlerParam<>( I18N.getString("param.out-file.name"), I18N.getString("param.out-file.description"), "jnlp.outfile", String.class, null, null); public static final StandardBundlerParam<Boolean> SWING_APP = new StandardBundlerParam<>( I18N.getString("param.swing-app.name"), I18N.getString("param.swing-app.description"), "jnlp.swingApp", Boolean.class, p -> Boolean.FALSE, (s, p) -> Boolean.parseBoolean(s)); public static final StandardBundlerParam<Boolean> INCLUDE_DT = new StandardBundlerParam<>( I18N.getString("param.include-deployment-toolkit.name"), I18N.getString("param.include-deployment-toolkit.description"), "jnlp.includeDT", Boolean.class, p -> Boolean.FALSE, (s, p) -> Boolean.parseBoolean(s)); public static final StandardBundlerParam<Boolean> EMBED_JNLP = new StandardBundlerParam<>( I18N.getString("param.embed-jnlp.name"), I18N.getString("param.embed-jnlp.description"), "jnlp.embedJnlp", Boolean.class, p -> Boolean.FALSE, (s, p) -> Boolean.parseBoolean(s)); public static final StandardBundlerParam<Boolean> EXTENSION = new StandardBundlerParam<>( I18N.getString("param.extension.name"), I18N.getString("param.extension.description"), "jnlp.extension", Boolean.class, p -> Boolean.FALSE, (s, p) -> Boolean.parseBoolean(s)); @SuppressWarnings("unchecked") public static final StandardBundlerParam<Map<File, File>> TEMPLATES = new StandardBundlerParam<>( I18N.getString("param.templates.name"), I18N.getString("param.templates.description"), "jnlp.templates", (Class<Map<File, File>>) (Object) Map.class, p -> new LinkedHashMap<>(), null); public static final StandardBundlerParam<String> CODEBASE = new StandardBundlerParam<>( I18N.getString("param.codebase.name"), I18N.getString("param.codebase.description"), "jnlp.codebase", String.class, p -> null, null); public static final StandardBundlerParam<String> PLACEHOLDER = new StandardBundlerParam<>( I18N.getString("param.placeholder.name"), I18N.getString("param.placeholder.description"), "jnlp.placeholder", String.class, p -> "javafx-app-placeholder", (s, p) -> { if (!s.startsWith("'")) { s = "'" + s; } if (!s.endsWith("'")) { s = s + "'"; } return s; }); public static final StandardBundlerParam<Boolean> OFFLINE_ALLOWED = new StandardBundlerParam<>( I18N.getString("param.offline-allowed.name"), I18N.getString("param.offline-allowed.description"), "jnlp.offlineAllowed", Boolean.class, p -> true, (s, p) -> Boolean.valueOf(s)); public static final StandardBundlerParam<Boolean> ALL_PERMISSIONS = new StandardBundlerParam<>( I18N.getString("param.all-permissions.name"), I18N.getString("param.all-permissions.description"), "jnlp.allPermisions", Boolean.class, p -> false, (s, p) -> Boolean.valueOf(s)); public static final StandardBundlerParam<Integer> WIDTH = new StandardBundlerParam<>( I18N.getString("param.width.name"), I18N.getString("param.width.description"), "jnlp.width", Integer.class, p -> 0, (s, p) -> Integer.parseInt(s)); public static final StandardBundlerParam<Integer> HEIGHT = new StandardBundlerParam<>( I18N.getString("param.height.name"), I18N.getString("param.height.description"), "jnlp.height", Integer.class, p -> 0, (s, p) -> Integer.parseInt(s)); public static final StandardBundlerParam<String> EMBEDDED_WIDTH = new StandardBundlerParam<>( I18N.getString("param.embedded-width.name"), I18N.getString("param.embedded-width.description"), "jnlp.embeddedWidth", String.class, p -> Integer.toString(WIDTH.fetchFrom(p)), (s, p) -> s); public static final StandardBundlerParam<String> EMBEDDED_HEIGHT = new StandardBundlerParam<>( I18N.getString("param.embedded-height.name"), I18N.getString("param.embedded-height.description"), "jnlp.embeddedHeight", String.class, p -> Integer.toString(HEIGHT.fetchFrom(p)), (s, p) -> s); public static final StandardBundlerParam<String> FALLBACK_APP = new StandardBundlerParam<>( I18N.getString("param.fallback-app.name"), I18N.getString("param.fallback-app.description"), "jnlp.fallbackApp", String.class, p -> null, (s, p) -> s); public static final StandardBundlerParam<String> UPDATE_MODE = new StandardBundlerParam<>( I18N.getString("param.update-mode.name"), I18N.getString("param.update-mode.description"), "jnlp.updateMode", String.class, p -> "background", (s, p) -> s); public static final StandardBundlerParam<String> FX_PLATFORM = new StandardBundlerParam<>( I18N.getString("param.fx-platform.name"), I18N.getString("param.fx-platform.description"), "jnlp.fxPlatform", String.class, p -> "1.8+", (s, p) -> s); public static final StandardBundlerParam<String> JRE_PLATFORM = new StandardBundlerParam<>( I18N.getString("param.jre-platform.name"), I18N.getString("param.jre-platform.description"), "jnlp.jrePlatform", String.class, p -> "1.8+", (s, p) -> s); @SuppressWarnings("unchecked") public static final StandardBundlerParam<List<Map<String, ? super Object>>> ICONS = new StandardBundlerParam<>( I18N.getString("param.icons.name"), I18N.getString("param.icons.description"), "jnlp.icons", (Class<List<Map<String, ? super Object>>>) (Object) List.class, params -> new ArrayList<>(1), null ); @SuppressWarnings("unchecked") public static final StandardBundlerParam<Map<String, String>> APP_PARAMS = new StandardBundlerParam<>( I18N.getString("param.params.name"), I18N.getString("param.params.description"), "jnlp.params", (Class<Map<String, String>>) (Object) Map.class, params -> new HashMap<>(), null ); @SuppressWarnings("unchecked") public static final StandardBundlerParam<Map<String, String>> ESCAPED_APPLET_PARAMS = new StandardBundlerParam<>( I18N.getString("param.escaped-applet-params.name"), I18N.getString("param.escaped-applet-params.description"), "jnlp.escapedAppletParams", (Class<Map<String, String>>) (Object) Map.class, params -> new HashMap<>(), null ); @SuppressWarnings("unchecked") public static final StandardBundlerParam<Map<String, String>> APPLET_PARAMS = new StandardBundlerParam<>( I18N.getString("param.applet-params.name"), I18N.getString("param.applet-params.description"), "jnlp.appletParams", (Class<Map<String, String>>) (Object) Map.class, params -> new HashMap<>(), null ); @SuppressWarnings("unchecked") public static final StandardBundlerParam<Map<String, String>> JS_CALLBACKS = new StandardBundlerParam<>( I18N.getString("param.js-callbacks.name"), I18N.getString("param.js-callbacks.description"), "jnlp.jsCallbacks", (Class<Map<String, String>>) (Object) Map.class, params -> new HashMap<>(), null ); public static final StandardBundlerParam<Boolean> INSTALL_HINT = new StandardBundlerParam<>( I18N.getString("param.menu-install-hint.name"), I18N.getString("param.menu-install-hint.description"), "jnlp.install", Boolean.class, params -> null, // valueOf(null) is false, and we actually do want null in some cases (s, p) -> (s == null || "null".equalsIgnoreCase(s))? null : Boolean.valueOf(s) ); public static final StandardBundlerParam<String> ICONS_HREF = new StandardBundlerParam<>( I18N.getString("param.icons-href.name"), I18N.getString("param.icons-href.description"), "jnlp.icons.href", String.class, null, null ); public static final StandardBundlerParam<String> ICONS_KIND = new StandardBundlerParam<>( I18N.getString("param.icons-kind.name"), I18N.getString("param.icons-kind.description"), "jnlp.icons.kind", String.class, params -> null, null ); public static final StandardBundlerParam<String> ICONS_WIDTH = new StandardBundlerParam<>( I18N.getString("param.icons-width.name"), I18N.getString("param.icons-width.description"), "jnlp.icons.width", String.class, params -> null, null ); public static final StandardBundlerParam<String> ICONS_HEIGHT = new StandardBundlerParam<>( I18N.getString("param.icons-height.name"), I18N.getString("param.icons-height.description"), "jnlp.icons.height", String.class, params -> null, null ); public static final StandardBundlerParam<String> ICONS_DEPTH = new StandardBundlerParam<>( I18N.getString("param.icons-depth.name"), I18N.getString("param.icons-depth.description"), "jnlp.icons.depth", String.class, params -> null, null ); private enum Mode {FX, APPLET, SwingAPP} @Override public String getName() { return I18N.getString("bundler.name"); } @Override public String getDescription() { return I18N.getString("bundler.description"); } @Override public String getID() { return "jnlp"; } @Override public String getBundleType() { return "JNLP"; } @Override public Collection<BundlerParamInfo<?>> getBundleParameters() { return Arrays.asList( ALL_PERMISSIONS, APPLET_PARAMS, APP_NAME, APP_PARAMS, APP_RESOURCES_LIST, ARGUMENTS, CODEBASE, DESCRIPTION, EMBED_JNLP, EMBEDDED_HEIGHT, EMBEDDED_WIDTH, ESCAPED_APPLET_PARAMS, EXTENSION, // FALLBACK_APP, // FX_PLATFORM, HEIGHT, ICONS, IDENTIFIER, INCLUDE_DT, INSTALL_HINT, JRE_PLATFORM, JS_CALLBACKS, JVM_OPTIONS, JVM_PROPERTIES, MAIN_CLASS, MENU_HINT, OFFLINE_ALLOWED, OUT_FILE, PRELOADER_CLASS, PLACEHOLDER, SHORTCUT_HINT, SWING_APP, TEMPLATES, TITLE, UPDATE_MODE, VENDOR, WIDTH ); } @Override public boolean validate(Map<String, ? super Object> params) throws UnsupportedPlatformException, ConfigException { if (OUT_FILE.fetchFrom(params) == null) { throw new ConfigException( I18N.getString("error.no-outfile"), I18N.getString("error.no-outfile.advice")); } if (APP_RESOURCES_LIST.fetchFrom(params) == null) { throw new ConfigException( I18N.getString("error.no-app-resources"), I18N.getString("error.no-app-resources.advice")); } if (!EXTENSION.fetchFrom(params)) { StandardBundlerParam.validateMainClassInfoFromAppResources(params); } return true; } private String readTextFile(File in) throws PackagerException { StringBuilder sb = new StringBuilder(); try (InputStreamReader isr = new InputStreamReader(new FileInputStream(in))) { char[] buf = new char[16384]; int len; while ((len = isr.read(buf)) > 0) { sb.append(buf, sb.length(), len); } } catch (IOException ex) { throw new PackagerException(ex, "ERR_FileReadFailed", in.getAbsolutePath()); } return sb.toString(); } private String processTemplate(Map<String, ? super Object> params, String inpText, Map<TemplatePlaceholders, String> templateStrings) { //Core pattern matches // #DT.SCRIPT# // #DT.EMBED.CODE.ONLOAD# // #DT.EMBED.CODE.ONLOAD(App2)# String corePattern = "(#[\\w\\.\\(\\)]+#)"; //This will match // "/*", "//" or "<!--" with arbitrary number of spaces String prefixGeneric = "[/\\*-<!]*[ \\t]*"; //This will match // "/*", "//" or "<!--" with arbitrary number of spaces String suffixGeneric = "[ \\t]*[\\*/>-]*"; //NB: result core match is group number 1 Pattern mainPattern = Pattern.compile( prefixGeneric + corePattern + suffixGeneric); Matcher m = mainPattern.matcher(inpText); StringBuffer result = new StringBuffer(); while (m.find()) { String match = m.group(); String coreMatch = m.group(1); //have match, not validate it is not false positive ... // e.g. if we matched just some spaces in prefix/suffix ... boolean inComment = (match.startsWith("<!--") && match.endsWith("-->")) || (match.startsWith("//")) || (match.startsWith("/*") && match.endsWith(" */")); //try to find if we have match String coreReplacement = null; //map with rules have no template ids //int p = coreMatch.indexOf("\\("); //strip leading/trailing #, then split of id part String parts[] = coreMatch.substring(1, coreMatch.length()-1).split("[\\(\\)]"); String rulePart = parts[0]; String idPart = (parts.length == 1) ? //strip trailing ')' null : parts[1]; if (templateStrings.containsKey( TemplatePlaceholders.fromString(rulePart)) && (idPart == null /* it is ok for templateId to be not null, e.g. DT.SCRIPT.CODE */ || idPart.equals(IDENTIFIER.fetchFrom(params)))) { coreReplacement = templateStrings.get( TemplatePlaceholders.fromString(rulePart)); } if (coreReplacement != null) { if (inComment || coreMatch.length() == match.length()) { m.appendReplacement(result, coreReplacement); } else { // pattern matched something that is not comment // Very unlikely but lets play it safe int pp = match.indexOf(coreMatch); String v = match.substring(0, pp) + coreReplacement + match.substring(pp + coreMatch.length()); m.appendReplacement(result, v); } } } m.appendTail(result); return result.toString(); } @Override public File execute(Map<String, ? super Object> params, File outputParentDir) { Map<File, File> templates = TEMPLATES.fetchFrom(params); boolean templateOn = !templates.isEmpty(); Map<TemplatePlaceholders, String> templateStrings = null; if (templateOn) { templateStrings = new EnumMap<>(TemplatePlaceholders.class); } try { //In case of FX app we will have one JNLP and one HTML //In case of Swing with FX we will have 2 JNLP files and one HTML String outfile = OUT_FILE.fetchFrom(params); boolean isSwingApp = SWING_APP.fetchFrom(params); String jnlp_filename_webstart = outfile + ".jnlp"; String jnlp_filename_browser = isSwingApp ? (outfile + "_browser.jnlp") : jnlp_filename_webstart; String html_filename = outfile + ".html"; //create out dir outputParentDir.mkdirs(); boolean includeDT = INCLUDE_DT.fetchFrom(params); if (includeDT && !extractWebFiles(outputParentDir)) { throw new PackagerException("ERR_NoEmbeddedDT"); } ByteArrayOutputStream jnlp_bos_webstart = new ByteArrayOutputStream(); ByteArrayOutputStream jnlp_bos_browser = new ByteArrayOutputStream(); //for swing case we need to generate 2 JNLP files if (isSwingApp) { PrintStream jnlp_ps = new PrintStream(jnlp_bos_webstart); generateJNLP(params, jnlp_ps, jnlp_filename_webstart, Mode.SwingAPP); jnlp_ps.close(); //save JNLP save(outputParentDir, jnlp_filename_webstart, jnlp_bos_webstart.toByteArray()); jnlp_ps = new PrintStream(jnlp_bos_browser); generateJNLP(params, jnlp_ps, jnlp_filename_browser, Mode.APPLET); jnlp_ps.close(); //save JNLP save(outputParentDir, jnlp_filename_browser, jnlp_bos_browser.toByteArray()); } else { PrintStream jnlp_ps = new PrintStream(jnlp_bos_browser); generateJNLP(params, jnlp_ps, jnlp_filename_browser, Mode.FX); jnlp_ps.close(); //save JNLP save(outputParentDir, jnlp_filename_browser, jnlp_bos_browser.toByteArray()); jnlp_bos_webstart = jnlp_bos_browser; } //we do not need html if this is component and not main app boolean isExtension = EXTENSION.fetchFrom(params); if (!isExtension) { // even though the html is unused if templateOn, // the templateStrings is updated as a side effect. ByteArrayOutputStream html_bos = new ByteArrayOutputStream(); PrintStream html_ps = new PrintStream(html_bos); generateHTML(params, html_ps, jnlp_bos_browser.toByteArray(), jnlp_filename_browser, jnlp_bos_webstart.toByteArray(), jnlp_filename_webstart, templateStrings, isSwingApp); html_ps.close(); //process template file if (templateOn) { for (Map.Entry<File, File> t: TEMPLATES.fetchFrom(params).entrySet()) { File out = t.getValue(); if (out == null) { System.out.println( "Perform inplace substitution for " + t.getKey().getAbsolutePath()); out = t.getKey(); } save(out, processTemplate(params, readTextFile(t.getKey()), templateStrings).getBytes()); } } else { //save HTML save(outputParentDir, html_filename, html_bos.toByteArray()); } } //copy jar files for (RelativeFileSet rfs : APP_RESOURCES_LIST.fetchFrom(params)) { copyFiles(rfs, outputParentDir); } return outputParentDir; } catch (Exception ex) { Log.info("JNLP failed : " + ex.getMessage()); ex.printStackTrace(); Log.debug(ex); return null; } } private static void copyFiles(RelativeFileSet resources, File outdir) throws IOException, PackagerException { File rootDir = resources.getBaseDirectory(); for (String s : resources.getIncludedFiles()) { final File srcFile = new File(rootDir, s); if (srcFile.exists() && srcFile.isFile()) { //skip file copying if jar is in the same location final File destFile = new File(outdir, s); if (!srcFile.getCanonicalFile().equals(destFile.getCanonicalFile())) { copyFileToOutDir(new FileInputStream(srcFile), destFile); } else { Log.verbose(MessageFormat.format(I18N.getString("error.jar-no-self-copy"), s)); } } } } //return null if args are default private String getJvmArguments(Map<String, ? super Object> params, boolean includeProperties) { List<String> jvmargs = JVM_OPTIONS.fetchFrom(params); Map<String, String> properties = JVM_PROPERTIES.fetchFrom(params); StringBuilder sb = new StringBuilder(); for (String v : jvmargs) { sb.append(v); //may need to escape if parameter has spaces sb.append(" "); } if (includeProperties) { for (Map.Entry<String, String> entry : properties.entrySet()) { sb.append("-D"); sb.append(entry.getKey()); sb.append("="); sb.append(entry.getValue()); //may need to escape if value has spaces sb.append(" "); } } if (sb.length() > 0) { return sb.toString(); } return null; } private void generateJNLP(Map<String, ? super Object> params, PrintStream out, String jnlp_filename, Mode m) throws IOException, CertificateEncodingException { String codebase = CODEBASE.fetchFrom(params); String title = TITLE.fetchFrom(params); String vendor = VENDOR.fetchFrom(params); String description = DESCRIPTION.fetchFrom(params); try { XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newFactory(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); XMLStreamWriter xout = xmlOutputFactory.createXMLStreamWriter(baos, "utf-8"); xout.writeStartDocument("utf-8", "1.0"); xout.writeCharacters("\n"); xout.writeStartElement("jnlp"); xout.writeAttribute("spec", "1.0"); xout.writeNamespace("jfx", "http://javafx.com"); if (codebase != null) { xout.writeAttribute("codebase", codebase); } xout.writeAttribute("href", jnlp_filename); xout.writeStartElement("information"); xout.writeStartElement("title"); if (title != null) { xout.writeCharacters(title); } else { xout.writeCData("Sample JavaFX Application"); } xout.writeEndElement(); xout.writeStartElement("vendor"); if (vendor != null) { xout.writeCharacters(vendor); } else { xout.writeCharacters("Unknown vendor"); } xout.writeEndElement(); xout.writeStartElement("description"); if (description != null) { xout.writeCharacters(description); } else { xout.writeCharacters("Sample JavaFX 2.0 application."); } xout.writeEndElement(); for (Map<String, ? super Object> iconInfo : ICONS.fetchFrom(params)) { String href = ICONS_HREF.fetchFrom(iconInfo); String kind = ICONS_KIND.fetchFrom(iconInfo); String width = ICONS_WIDTH.fetchFrom(iconInfo); String height = ICONS_HEIGHT.fetchFrom(iconInfo); String depth = ICONS_DEPTH.fetchFrom(iconInfo); xout.writeStartElement("icon"); xout.writeAttribute("href", href); if (kind != null) xout.writeAttribute("kind", kind); if (width != null) xout.writeAttribute("width", width); if (height != null) xout.writeAttribute("height", height); if (depth != null) xout.writeAttribute("depth", depth); xout.writeEndElement(); } boolean offlineAllowed = OFFLINE_ALLOWED.fetchFrom(params); boolean isExtension = EXTENSION.fetchFrom(params); if (offlineAllowed && !isExtension) { xout.writeEmptyElement("offline-allowed"); } Boolean needShortcut = SHORTCUT_HINT.fetchFrom(params); Boolean needMenu = MENU_HINT.fetchFrom(params); Boolean needInstall = INSTALL_HINT.fetchFrom(params); if ((needShortcut != null && Boolean.TRUE.equals(needShortcut)) || (needMenu != null && Boolean.TRUE.equals(needMenu)) || (needInstall != null && Boolean.TRUE.equals(needInstall))) { xout.writeStartElement("shortcut"); if (Boolean.TRUE.equals(needInstall)) { xout.writeAttribute("installed", needInstall.toString()); } if (Boolean.TRUE.equals(needShortcut)) { xout.writeEmptyElement("desktop"); } if (Boolean.TRUE.equals(needMenu)) { xout.writeEmptyElement("menu"); } xout.writeEndElement(); } xout.writeEndElement(); // information boolean allPermissions = ALL_PERMISSIONS.fetchFrom(params); if (allPermissions) { xout.writeStartElement("security"); xout.writeEmptyElement("all-permissions"); xout.writeEndElement(); } String updateMode = UPDATE_MODE.fetchFrom(params); if (updateMode != null) { xout.writeStartElement("update"); xout.writeAttribute("check", UPDATE_MODE.fetchFrom(params)); xout.writeEndElement(); // update } boolean needToCloseResourceTag = false; //jre is available for all platforms if (!isExtension) { xout.writeStartElement("resources"); needToCloseResourceTag = true; xout.writeStartElement("j2se"); xout.writeAttribute("version", JRE_PLATFORM.fetchFrom(params)); String vmargs = getJvmArguments(params, false); if (vmargs != null) { xout.writeAttribute("java-vm-args", vmargs); } xout.writeAttribute("href", "http://java.sun.com/products/autodl/j2se"); xout.writeEndElement(); //j2se for (Map.Entry<String, String> entry : JVM_PROPERTIES.fetchFrom(params).entrySet()) { xout.writeStartElement("property"); xout.writeAttribute("name", entry.getKey()); xout.writeAttribute("value", entry.getValue()); xout.writeEndElement(); //property } } String currentOS = null, currentArch = null; // //NOTE: This should sort the list by os+arch; it will reduce the number of resource tags // String pendingPrint = null; //for (DeployResource resource: deployParams.resources) { for (RelativeFileSet rfs : APP_RESOURCES_LIST.fetchFrom(params)) { //if not same OS or arch then open new resources element if (!needToCloseResourceTag || ((currentOS == null && rfs.getOs() != null) || currentOS != null && !currentOS.equals(rfs.getOs())) || ((currentArch == null && rfs.getArch() != null) || currentArch != null && !currentArch.equals(rfs.getArch()))) { //we do not print right a way as it may be empty block // Not all resources make sense for JNLP (e.g. data or license) if (needToCloseResourceTag) { xout.writeEndElement(); } needToCloseResourceTag = true; currentOS = rfs.getOs(); currentArch = rfs.getArch(); xout.writeStartElement("resources"); if (currentOS != null) xout.writeAttribute("os", currentOS); if (currentArch != null) xout.writeAttribute("arch", currentArch); } for (String relativePath : rfs.getIncludedFiles()) { final File srcFile = new File(rfs.getBaseDirectory(), relativePath); if (srcFile.exists() && srcFile.isFile()) { RelativeFileSet.Type type = rfs.getType(); if (type == RelativeFileSet.Type.UNKNOWN) { if (relativePath.endsWith(".jar")) { type = RelativeFileSet.Type.jar; } else if (relativePath.endsWith(".jnlp")) { type = RelativeFileSet.Type.jnlp; } else if (relativePath.endsWith(".dll")) { type = RelativeFileSet.Type.nativelib; } else if (relativePath.endsWith(".so")) { type = RelativeFileSet.Type.nativelib; } else if (relativePath.endsWith(".dylib")) { type = RelativeFileSet.Type.nativelib; } } switch (type) { case jar: xout.writeStartElement("jar"); xout.writeAttribute("href", relativePath); xout.writeAttribute("size", Long.toString(srcFile.length())); if (rfs.getMode() != null) { xout.writeAttribute("download", rfs.getMode()); } xout.writeEndElement(); //jar break; case jnlp: xout.writeStartElement("extension"); xout.writeAttribute("href", relativePath); xout.writeEndElement(); //extension break; case nativelib: xout.writeStartElement("nativelib"); xout.writeAttribute("href", relativePath); xout.writeEndElement(); //nativelib break; } } } } if (needToCloseResourceTag) { xout.writeEndElement(); } if (!isExtension) { Integer width = WIDTH.fetchFrom(params); Integer height = HEIGHT.fetchFrom(params); if (width == null) { width = 0; } if (height == null) { height = 0; } String applicationClass = MAIN_CLASS.fetchFrom(params); String preloader = PRELOADER_CLASS.fetchFrom(params); Map<String, String> appParams = APP_PARAMS.fetchFrom(params); List<String> arguments = ARGUMENTS.fetchFrom(params); String appName = APP_NAME.fetchFrom(params); if (m == Mode.APPLET) { xout.writeStartElement("applet-desc"); xout.writeAttribute("width", Integer.toString(width)); xout.writeAttribute("height", Integer.toString(height)); xout.writeAttribute("main-class", applicationClass); xout.writeAttribute("name", appName); xout.writeStartElement("param"); xout.writeAttribute("name", "requiredFXVersion"); xout.writeAttribute("value", FX_PLATFORM.fetchFrom(params)); xout.writeEndElement(); // param for (Map.Entry<String, String> appParamEntry : appParams.entrySet()) { xout.writeStartElement("param"); xout.writeAttribute("name", appParamEntry.getKey()); if (appParamEntry.getValue() != null) { xout.writeAttribute("value", appParamEntry.getValue()); } xout.writeEndElement(); // param } xout.writeEndElement(); // applet-desc } else if (m == Mode.SwingAPP) { xout.writeStartElement("application-desc"); xout.writeAttribute("main-class", applicationClass); xout.writeAttribute("name", appName); for (String a : arguments) { xout.writeStartElement("argument"); xout.writeCharacters(a); xout.writeEndElement(); // argument } xout.writeEndElement(); } else { //JavaFX application //embed fallback application String fallbackApp = FALLBACK_APP.fetchFrom(params); if (fallbackApp != null) { xout.writeStartElement("applet-desc"); xout.writeAttribute("width", Integer.toString(width)); xout.writeAttribute("height", Integer.toString(height)); xout.writeAttribute("main-class", fallbackApp); xout.writeAttribute("name", appName); xout.writeStartElement("param"); xout.writeAttribute("name", "requiredFXVersion"); xout.writeAttribute("value", FX_PLATFORM.fetchFrom(params)); xout.writeEndElement(); // param xout.writeEndElement(); // applet-desc } xout.writeStartElement("jfx", "javafx-desc", JFX_NS_URI); xout.writeAttribute("width", Integer.toString(width)); xout.writeAttribute("height", Integer.toString(height)); xout.writeAttribute("main-class", applicationClass); xout.writeAttribute("name", appName); if (preloader != null) { xout.writeAttribute("preloader-class", preloader); } if (appParams != null) { for (Map.Entry<String, String> appParamEntry : appParams.entrySet()) { xout.writeStartElement("param"); xout.writeAttribute("name", appParamEntry.getKey()); if (appParamEntry.getValue() != null) { xout.writeAttribute("value", appParamEntry.getValue()); } xout.writeEndElement(); // param } } if (arguments != null) { for (String a : arguments) { xout.writeStartElement("argument"); xout.writeCharacters(a); xout.writeEndElement(); // argument } } xout.writeEndElement(); //javafx-desc } } xout.writeEndElement(); // jnlp // now pretty print String s = baos.toString(); out.println(xmlPrettyPrint(s)); } catch (XMLStreamException | TransformerException e) { e.printStackTrace(); } } private String xmlPrettyPrint(String s) throws TransformerException { // System.out.println(s); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); StringWriter formattedStringWriter = new StringWriter(); transformer.transform(new StreamSource(new StringReader(s)), new StreamResult(formattedStringWriter)); return formattedStringWriter.toString(); } private void addToList(List<String> l, String name, String value, boolean isString) { if (isString) { l.add(name + " : '" + value.replaceAll("(['\"\\\\])", "\\\\$1") + "'"); } else { l.add(name + " : " + value); } } private String listToString(List<String> lst, String offset) { StringBuilder b = new StringBuilder(); if (lst == null || lst.isEmpty()) { return offset + "{}"; } b.append(offset).append("{\n"); boolean first = true; for (String s : lst) { if (!first) { b.append(",\n"); } first = false; b.append(offset).append(" "); b.append(s); } b.append("\n"); b.append(offset).append("}"); return b.toString(); } private String encodeAsBase64(byte inp[]) { return Base64.getEncoder().encodeToString(inp); } private void generateHTML(Map<String, ? super Object> params, PrintStream theOut, byte[] jnlp_bytes_browser, String jnlpfile_browser, byte[] jnlp_bytes_webstart, String jnlpfile_webstart, Map<TemplatePlaceholders, String> templateStrings, boolean swingMode) { String poff = " "; String poff2 = poff + poff; String poff3 = poff2 + poff; try { XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newFactory(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); XMLStreamWriter xout = xmlOutputFactory.createXMLStreamWriter(baos, "utf-8"); String appletParams = getAppletParameters(params); String jnlp_content_browser = null; String jnlp_content_webstart = null; boolean embedJNLP = EMBED_JNLP.fetchFrom(params); boolean includeDT = INCLUDE_DT.fetchFrom(params); if (embedJNLP) { jnlp_content_browser = encodeAsBase64(jnlp_bytes_browser); jnlp_content_webstart = encodeAsBase64(jnlp_bytes_webstart); } xout.writeStartElement("html"); xout.writeStartElement("head"); String dtURL = includeDT ? EMBEDDED_DT : PUBLIC_DT; if (templateStrings != null) { templateStrings.put(TemplatePlaceholders.SCRIPT_URL, dtURL); ByteArrayOutputStream baos2 = new ByteArrayOutputStream(); XMLStreamWriter xo2 = xmlOutputFactory.createXMLStreamWriter(baos2, "utf-8"); xo2.writeStartElement("SCRIPT"); xo2.writeAttribute("src", dtURL); xo2.writeEndElement(); xo2.close(); templateStrings.put(TemplatePlaceholders.SCRIPT_CODE, baos2.toString()); } xout.writeStartElement("SCRIPT"); xout.writeAttribute("src", dtURL); xout.writeEndElement(); List<String> w_app = new ArrayList<>(); List<String> w_platform = new ArrayList<>(); List<String> w_callback = new ArrayList<>(); addToList(w_app, "url", jnlpfile_webstart, true); if (jnlp_content_webstart != null) { addToList(w_app, "jnlp_content", jnlp_content_webstart, true); } addToList(w_platform, "javafx", FX_PLATFORM.fetchFrom(params), true); String vmargs = getJvmArguments(params, true); if (vmargs != null) { addToList(w_platform, "jvmargs", vmargs, true); } if (!"".equals(appletParams)) { addToList(w_app, "params", "{" + appletParams + "}", false); } for (Map.Entry<String, String> callbackEntry : JS_CALLBACKS.fetchFrom(params).entrySet()) { addToList(w_callback, callbackEntry.getKey(), callbackEntry.getValue(), false); } //prepare content of launchApp function StringBuilder out_launch_code = new StringBuilder(); out_launch_code.append(poff2).append("dtjava.launch("); out_launch_code.append(listToString(w_app, poff3)).append(",\n"); out_launch_code.append(listToString(w_platform, poff3)).append(",\n"); out_launch_code.append(listToString(w_callback, poff3)).append("\n"); out_launch_code.append(poff2).append(");\n"); xout.writeStartElement("script"); xout.writeCharacters("\n" + poff + "function launchApplication(jnlpfile) {\n"); xout.writeCharacters(out_launch_code.toString()); xout.writeCharacters(poff2 + "return false;\n"); xout.writeCharacters(poff + "}\n"); xout.writeEndElement(); if (templateStrings != null) { templateStrings.put(TemplatePlaceholders.LAUNCH_CODE, out_launch_code.toString()); } //applet deployment String appId = IDENTIFIER.fetchFrom(params); String placeholder = PLACEHOLDER.fetchFrom(params); //prepare content of embedApp() List<String> p_app = new ArrayList<>(); List<String> p_platform = new ArrayList<>(); List<String> p_callback = new ArrayList<>(); if (appId != null) { addToList(p_app, "id", appId, true); } boolean isSwingApp = SWING_APP.fetchFrom(params); if (isSwingApp) { addToList(p_app, "toolkit", "swing", true); } addToList(p_app, "url", jnlpfile_browser, true); addToList(p_app, "placeholder", placeholder, true); addToList(p_app, "width", EMBEDDED_WIDTH.fetchFrom(params), true); addToList(p_app, "height", EMBEDDED_HEIGHT.fetchFrom(params), true); if (jnlp_content_browser != null) { addToList(p_app, "jnlp_content", jnlp_content_browser, true); } addToList(p_platform, "javafx", FX_PLATFORM.fetchFrom(params), true); if (vmargs != null) { addToList(p_platform, "jvmargs", vmargs, true); } for (Map.Entry<String, String> callbackEntry : JS_CALLBACKS.fetchFrom(params).entrySet()) { addToList(w_callback, callbackEntry.getKey(), callbackEntry.getValue(), false); } if (!"".equals(appletParams)) { addToList(p_app, "params", "{" + appletParams + "}", false); } if (swingMode) { //Splash will not work in SwingMode //Unless user overwrites onGetSplash handler (and that means he handles splash on his own) // we will reset splash function to be "none" boolean needOnGetSplashImpl = true; for (String callback : JS_CALLBACKS.fetchFrom(params).keySet()) { if ("onGetSplash".equals(callback)) { needOnGetSplashImpl = false; } } if (needOnGetSplashImpl) { addToList(p_callback, "onGetSplash", "function() {}", false); } } StringBuilder out_embed_dynamic = new StringBuilder(); out_embed_dynamic.append("dtjava.embed(\n"); out_embed_dynamic.append(listToString(p_app, poff3)).append(",\n"); out_embed_dynamic.append(listToString(p_platform, poff3)).append(",\n"); out_embed_dynamic.append(listToString(p_callback, poff3)).append("\n"); out_embed_dynamic.append(poff2).append(");\n"); //now wrap content with function String embedFuncName = "javafxEmbed" + IDENTIFIER.fetchFrom(params); ByteArrayOutputStream baos_embed_onload = new ByteArrayOutputStream(); XMLStreamWriter xo_embed_onload = xmlOutputFactory.createXMLStreamWriter(baos_embed_onload, "utf-8"); writeEmbeddedDynamic(out_embed_dynamic, embedFuncName, xo_embed_onload); xo_embed_onload.close(); String out_embed_onload = xmlPrettyPrint(baos_embed_onload.toString()); if (templateStrings != null) { templateStrings.put( TemplatePlaceholders.EMBED_CODE_ONLOAD, out_embed_onload); templateStrings.put( TemplatePlaceholders.EMBED_CODE_DYNAMIC, out_embed_dynamic.toString()); } writeEmbeddedDynamic(out_embed_dynamic, embedFuncName, xout); xout.writeEndElement(); //head xout.writeStartElement("body"); xout.writeStartElement("h2"); xout.writeCharacters("Test page for "); xout.writeStartElement("b"); xout.writeCharacters(APP_NAME.fetchFrom(params)); xout.writeEndElement(); // b xout.writeEndElement(); // h2 xout.writeStartElement("b"); xout.writeCharacters("Webstart:"); xout.writeEndElement(); xout.writeStartElement("a"); xout.writeAttribute("href", jnlpfile_webstart); xout.writeAttribute("onclick", "return launchApplication('" + jnlpfile_webstart + "');"); xout.writeCharacters("click to launch this app as webstart"); xout.writeEndElement(); // a xout.writeEmptyElement("br"); xout.writeEmptyElement("hr"); xout.writeEmptyElement("br"); xout.writeCharacters("\n"); xout.writeComment(" Applet will be inserted here "); xout.writeStartElement("div"); xout.writeAttribute("id", placeholder); xout.writeEndElement(); //div xout.writeEndElement(); // body xout.writeEndElement(); // html xout.close(); theOut.print(xmlPrettyPrint(baos.toString())); } catch (XMLStreamException | TransformerException e) { e.printStackTrace(); } } private void writeEmbeddedDynamic(StringBuilder out_embed_dynamic, String embedFuncName, XMLStreamWriter xo_embed_onload) throws XMLStreamException { xo_embed_onload.writeStartElement("script"); xo_embed_onload.writeCharacters("\n function "); xo_embed_onload.writeCharacters(embedFuncName); xo_embed_onload.writeCharacters("() {\n "); xo_embed_onload.writeCharacters(out_embed_dynamic.toString()); xo_embed_onload.writeCharacters(" }\n "); xo_embed_onload.writeComment( " Embed FX application into web page once page is loaded "); xo_embed_onload.writeCharacters("\n dtjava.addOnloadCallback("); xo_embed_onload.writeCharacters(embedFuncName); xo_embed_onload.writeCharacters(");\n"); xo_embed_onload.writeEndElement(); } private void save(File outdir, String fname, byte[] content) throws IOException { save(new File(outdir, fname), content); } private void save(File f, byte[] content) throws IOException { if (f.exists()) { f.delete(); } FileOutputStream fos = new FileOutputStream(f); fos.write(content); fos.close(); } private static void copyFileToOutDir( InputStream isa, File fout) throws PackagerException { final File outDir = fout.getParentFile(); if (!outDir.exists() && !outDir.mkdirs()) { throw new PackagerException("ERR_CreatingDirFailed", outDir.getPath()); } try (InputStream is = isa; OutputStream out = new FileOutputStream(fout)) { byte[] buf = new byte[16384]; int len; while ((len = is.read(buf)) > 0) { out.write(buf, 0, len); } } catch (IOException ex) { throw new PackagerException(ex, "ERR_FileCopyFailed", outDir.getPath()); } } private String getAppletParameters(Map<String, ? super Object> params) { StringBuilder result = new StringBuilder(); boolean addComma = false; for (Map.Entry<String, String> entry : ESCAPED_APPLET_PARAMS.fetchFrom(params).entrySet()) { if (addComma) { result.append(", "); } addComma = true; result.append("'") .append(quoteEscape(entry.getKey())) .append("' : '") .append(quoteEscape(entry.getValue())) .append("'"); } for (Map.Entry<String, String> entry : APPLET_PARAMS.fetchFrom(params).entrySet()) { if (addComma) { result.append(", "); } addComma = true; result.append("'") .append(quoteEscape(entry.getKey())) .append("' : ") .append(entry.getValue()); } return result.toString(); } String quoteEscape(String s) { return s.replaceAll("(['\"\\\\])", "\\\\$1"); } private static String[] webFiles = { "javafx-loading-100x100.gif", dtFX, "javafx-loading-25x25.gif", "error.png", "upgrade_java.png", "javafx-chrome.png", "get_java.png", "upgrade_javafx.png", "get_javafx.png" }; private static String prefixWebFiles = "dtoolkit/resources/web-files/"; private boolean extractWebFiles(File outDir) throws PackagerException { return doExtractWebFiles(webFiles, outDir, webfilesDir); } private boolean doExtractWebFiles(String lst[], File outDir, String webFilesDir) throws PackagerException { File f = new File(outDir, webFilesDir); f.mkdirs(); for (String s: lst) { InputStream is = PackagerResource.class.getResourceAsStream(prefixWebFiles+s); if (is == null) { System.err.println("Internal error. Missing resources [" + (prefixWebFiles+s) + "]"); return false; } else { copyFileToOutDir(is, new File(f, s)); } } return true; } }
teamfx/openjfx-10-dev-rt
modules/jdk.packager/src/main/java/com/oracle/tools/packager/jnlp/JNLPBundler.java
Java
gpl-2.0
56,509
<?php /* Template Name: Page - Contact Us */ ?> <?php if($_POST) { if($_POST['your-email']) { $toEmailName = get_option('blogname'); $toEmail = get_site_emailId(); $subject = $_POST['your-subject']; $message = ''; $message .= '<p>Dear '.$toEmailName.',</p>'; $message .= '<p>Name : '.$_POST['your-name'].',</p>'; $message .= '<p>Email : '.$_POST['your-email'].',</p>'; $message .= '<p>Message : '.nl2br($_POST['your-message']).'</p>'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n"; // Additional headers $headers .= 'To: '.$toEmailName.' <'.$toEmail.'>' . "\r\n"; $headers .= 'From: '.$_POST['your-name'].' <'.$_POST['your-email'].'>' . "\r\n"; // Mail it wp_mail($toEmail, $subject, $message, $headers); if(strstr($_REQUEST['request_url'],'?')) { $url = $_REQUEST['request_url'].'&msg=success' ; }else { $url = $_REQUEST['request_url'].'?msg=success' ; } echo "<script type='text/javascript'>location.href='".$url."';</script>"; } } ?> <?php get_header(); ?> <div class="<?php templ_content_css();?>" > <div class="content_top"></div> <div class="content_bg"> <!-- CONTENT AREA START --> <?php if (function_exists('dynamic_sidebar')){ dynamic_sidebar('page_content_above'); }?> <!-- contact --> <?php global $is_home; ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <div class="entry"> <div <?php post_class('single clear'); ?> id="post_<?php the_ID(); ?>"> <div class="post-meta"> <?php templ_page_title_above(); //page title above action hook?> <?php echo templ_page_title_filter(get_the_title()); //page tilte filter?> <?php templ_page_title_below(); //page title below action hook?> </div> <div class="post-content"> <?php the_content(); ?> </div> </div> </div> <?php endwhile; ?> <?php endif; ?> <?php if($_REQUEST['msg'] == 'success') { ?> <p class="success_msg"> <?php _e('Your message is sent successfully.','templatic');?> </p> <?php } ?> <form action="<?php echo get_permalink($post->ID);?>" method="post" id="contact_frm" name="contact_frm" class="wpcf7-form"> <input type="hidden" name="request_url" value="<?php echo $_SERVER['REQUEST_URI'];?>" /> <div class="form_row "> <label> <?php _e('Name','templatic');?> <span class="indicates">*</span></label> <input type="text" name="your-name" id="your-name" value="" class="textfield" size="40" /> <span id="your_name_Info" class="error"></span> </div> <div class="form_row "> <label> <?php _e('Email','templatic');?> <span class="indicates">*</span></label> <input type="text" name="your-email" id="your-email" value="" class="textfield" size="40" /> <span id="your_emailInfo" class="error"></span> </div> <div class="form_row "> <label> <?php _e('Subject','templatic');?> <span class="indicates">*</span></label> <input type="text" name="your-subject" id="your-subject" value="" size="40" class="textfield" /> <span id="your_subjectInfo"></span> </div> <div class="form_row"> <label> <?php _e('Message','templatic');?> <span class="indicates">*</span></label> <textarea name="your-message" id="your-message" cols="40" class="textarea textarea2" rows="10"></textarea> <span id="your_messageInfo" class="error"></span> </div> <input type="submit" value="Send" class="b_submit" /> </form> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/contact_us_validation.js"></script> </div> <!-- content bg #end --> <div class="content_bottom"></div> </div> <!-- content end --> <?php get_sidebar(); ?> <?php get_footer(); ?>
vapvarun/MicrocerptBIZ
wp-content/plugins/PlusOnett/tpl_contact.php
PHP
gpl-2.0
3,853
<?php /** Croatian (Hrvatski) * * See MessagesQqq.php for message documentation incl. usage of parameters * To improve a translation please visit http://translatewiki.net * * @ingroup Language * @file * * @author Anton008 * @author Brest * @author Bugoslav * @author Dalibor Bosits * @author Demicx * @author Dnik * @author Ex13 * @author Excaliboor * @author Herr Mlinka * @author Luka Krstulovic * @author MayaSimFan * @author Meno25 * @author Mvrban * @author Roberta F. * @author SpeedyGonsales * @author Tivek * @author Treecko * @author לערי ריינהארט */ $namespaceNames = array( NS_MEDIA => 'Mediji', NS_SPECIAL => 'Posebno', NS_TALK => 'Razgovor', NS_USER => 'Suradnik', NS_USER_TALK => 'Razgovor_sa_suradnikom', NS_PROJECT_TALK => 'Razgovor_$1', NS_FILE => 'Datoteka', NS_FILE_TALK => 'Razgovor_o_datoteci', NS_MEDIAWIKI => 'MediaWiki', NS_MEDIAWIKI_TALK => 'MediaWiki_razgovor', NS_TEMPLATE => 'Predložak', NS_TEMPLATE_TALK => 'Razgovor_o_predlošku', NS_HELP => 'Pomoć', NS_HELP_TALK => 'Razgovor_o_pomoći', NS_CATEGORY => 'Kategorija', NS_CATEGORY_TALK => 'Razgovor_o_kategoriji', ); $namespaceAliases = array( 'Slika' => NS_FILE, 'Razgovor_o_slici' => NS_FILE_TALK, ); $specialPageAliases = array( 'Activeusers' => array( 'Aktivni_suradnici' ), 'Allmessages' => array( 'Sve_poruke' ), 'Allpages' => array( 'Sve_stranice' ), 'Ancientpages' => array( 'Stare_stranice' ), 'Blankpage' => array( 'Prazna_stranica' ), 'Block' => array( 'Blokiraj' ), 'Blockme' => array( 'Blokiraj_me' ), 'Booksources' => array( 'Traži_ISBN' ), 'BrokenRedirects' => array( 'Kriva_preusmjeravanja' ), 'Categories' => array( 'Kategorije' ), 'ChangePassword' => array( 'Izmijeni_lozinku' ), 'Confirmemail' => array( 'E-mail_potvrda' ), 'Contributions' => array( 'Doprinosi' ), 'CreateAccount' => array( 'Stvori_račun' ), 'Deadendpages' => array( 'Slijepe_ulice' ), 'DeletedContributions' => array( 'Obrisani_doprinosi' ), 'Disambiguations' => array( 'Razdvojbe' ), 'DoubleRedirects' => array( 'Dvostruka_preusmjeravanja' ), 'Emailuser' => array( 'Elektronička_pošta', 'E-mail' ), 'Export' => array( 'Izvezi' ), 'Fewestrevisions' => array( 'Najmanje_uređivane_stranice' ), 'FileDuplicateSearch' => array( 'Traži_kopije_datoteka' ), 'Filepath' => array( 'Putanja_datoteke' ), 'Import' => array( 'Uvezi' ), 'Invalidateemail' => array( 'Nevaljana_elektronička_pošta' ), 'BlockList' => array( 'Blokirane_adrese' ), 'LinkSearch' => array( 'Traži_poveznice', 'Traži_linkove' ), 'Listadmins' => array( 'Administratori', 'Admini' ), 'Listbots' => array( 'Botovi' ), 'Listfiles' => array( 'Datoteke', 'Slike' ), 'Listgrouprights' => array( 'Suradničke_skupine' ), 'Listredirects' => array( 'Preusmjeravanja' ), 'Listusers' => array( 'Suradnici', 'Popis_suradnika' ), 'Lockdb' => array( 'Zaključaj_bazu' ), 'Log' => array( 'Evidencije' ), 'Lonelypages' => array( 'Siročad' ), 'Longpages' => array( 'Duge_stranice' ), 'MergeHistory' => array( 'Spoji_povijest' ), 'MIMEsearch' => array( 'MIME_tražilica' ), 'Mostcategories' => array( 'Najviše_kategorija' ), 'Mostimages' => array( 'Najviše_povezane_datoteke', 'Najviše_povezane_slike' ), 'Mostlinked' => array( 'Najviše_povezane_stranice' ), 'Mostlinkedcategories' => array( 'Najviše_povezane_kategorije' ), 'Mostlinkedtemplates' => array( 'Najviše_povezani_predlošci' ), 'Mostrevisions' => array( 'Najviše_uređivane_stranice' ), 'Movepage' => array( 'Premjesti_stranicu' ), 'Mycontributions' => array( 'Moji_doprinosi' ), 'Mypage' => array( 'Moja_stranica' ), 'Mytalk' => array( 'Moj_razgovor' ), 'Newimages' => array( 'Nove_datoteke', 'Nove_slike' ), 'Newpages' => array( 'Nove_stranice' ), 'Popularpages' => array( 'Popularne_stranice' ), 'Preferences' => array( 'Postavke' ), 'Prefixindex' => array( 'Prefiks_indeks', 'Stranice_po_prefiksu' ), 'Protectedpages' => array( 'Zaštićene_stranice' ), 'Protectedtitles' => array( 'Zaštićeni_naslovi' ), 'Randompage' => array( 'Slučajna_stranica' ), 'Randomredirect' => array( 'Slučajno_preusmjeravanje' ), 'Recentchanges' => array( 'Nedavne_promjene' ), 'Recentchangeslinked' => array( 'Povezane_promjene' ), 'Revisiondelete' => array( 'Brisanje_izmjene' ), 'Search' => array( 'Traži' ), 'Shortpages' => array( 'Kratke_stranice' ), 'Specialpages' => array( 'Posebne_stranice' ), 'Statistics' => array( 'Statistika' ), 'Tags' => array( 'Oznake' ), 'Unblock' => array( 'Odblokiraj' ), 'Uncategorizedcategories' => array( 'Nekategorizirane_kategorije' ), 'Uncategorizedimages' => array( 'Nekategorizirane_slike' ), 'Uncategorizedpages' => array( 'Nekategorizirane_stranice' ), 'Uncategorizedtemplates' => array( 'Nekategorizirani_predlošci' ), 'Undelete' => array( 'Vrati' ), 'Unlockdb' => array( 'Otključaj_bazu' ), 'Unusedcategories' => array( 'Nekorištene_kategorije' ), 'Unusedimages' => array( 'Nekorištene_datoteke', 'Nekorištene_slike' ), 'Unusedtemplates' => array( 'Nekorišteni_predlošci' ), 'Unwatchedpages' => array( 'Negledane_stranice' ), 'Upload' => array( 'Postavi_datoteku' ), 'Userlogin' => array( 'Prijava' ), 'Userlogout' => array( 'Odjava' ), 'Userrights' => array( 'Suradnička_prava' ), 'Version' => array( 'Verzija' ), 'Wantedcategories' => array( 'Tražene_kategorije' ), 'Wantedfiles' => array( 'Tražene_datoteke' ), 'Wantedpages' => array( 'Tražene_stranice' ), 'Wantedtemplates' => array( 'Traženi_predlošci' ), 'Watchlist' => array( 'Praćene_stranice' ), 'Whatlinkshere' => array( 'Što_vodi_ovamo' ), 'Withoutinterwiki' => array( 'Bez_međuwikipoveznica', 'Bez_interwikija' ), ); $magicWords = array( 'redirect' => array( '0', '#PREUSMJERI', '#REDIRECT' ), 'notoc' => array( '0', '__BEZSADRŽAJA__', '__NOTOC__' ), 'nogallery' => array( '0', '__BEZGALERIJE__', '__NOGALLERY__' ), 'forcetoc' => array( '0', '__UKLJUČISADRŽAJ__', '__FORCETOC__' ), 'toc' => array( '0', '__SADRŽAJ__', '__TOC__' ), 'noeditsection' => array( '0', '__BEZUREĐIVANJAODLOMAKA__', '__NOEDITSECTION__' ), 'noheader' => array( '0', '__BEZZAGLAVLJA__', '__NOHEADER__' ), 'currentmonth' => array( '1', 'TRENUTAČNIMJESEC', 'CURRENTMONTH', 'CURRENTMONTH2' ), 'currentmonth1' => array( '1', 'TRENUTAČNIMJESEC1', 'CURRENTMONTH1' ), 'currentmonthname' => array( '1', 'TRENUTAČNIMJESECIME', 'CURRENTMONTHNAME' ), 'currentmonthnamegen' => array( '1', 'TRENUTAČNIMJESECIMEGEN', 'CURRENTMONTHNAMEGEN' ), 'currentmonthabbrev' => array( '1', 'TRENUTAČNIMJESECKRAT', 'CURRENTMONTHABBREV' ), 'currentday' => array( '1', 'TRENUTAČNIDAN', 'CURRENTDAY' ), 'currentday2' => array( '1', 'TRENUTAČNIDAN2', 'CURRENTDAY2' ), 'currentdayname' => array( '1', 'TRENUTAČNIDANIME', 'CURRENTDAYNAME' ), 'currentyear' => array( '1', 'TRENUTAČNAGODINA', 'CURRENTYEAR' ), 'currenttime' => array( '1', 'TRENUTAČNOVRIJEME', 'CURRENTTIME' ), 'currenthour' => array( '1', 'TRENUTAČNISAT', 'CURRENTHOUR' ), 'localmonth' => array( '1', 'MJESNIMJESEC', 'LOCALMONTH', 'LOCALMONTH2' ), 'localmonth1' => array( '1', 'MJESNIMJESEC1', 'LOCALMONTH1' ), 'localmonthname' => array( '1', 'MJESNIMJESECIME', 'LOCALMONTHNAME' ), 'localmonthnamegen' => array( '1', 'MJESNIMJESECIMEGEN', 'LOCALMONTHNAMEGEN' ), 'localmonthabbrev' => array( '1', 'MJESNIMJESECKRAT', 'LOCALMONTHABBREV' ), 'localday' => array( '1', 'MJESNIDAN', 'LOCALDAY' ), 'localday2' => array( '1', 'MJESNIDAN2', 'LOCALDAY2' ), 'localdayname' => array( '1', 'MJESNIDANIME', 'LOCALDAYNAME' ), 'localyear' => array( '1', 'MJESNAGODINA', 'LOCALYEAR' ), 'localtime' => array( '1', 'MJESNOVRIJEME', 'LOCALTIME' ), 'localhour' => array( '1', 'MJESNISAT', 'LOCALHOUR' ), 'numberofpages' => array( '1', 'BROJSTRANICA', 'NUMBEROFPAGES' ), 'numberofarticles' => array( '1', 'BROJČLANAKA', 'NUMBEROFARTICLES' ), 'numberoffiles' => array( '1', 'BROJDATOTEKA', 'NUMBEROFFILES' ), 'numberofusers' => array( '1', 'BROJSURADNIKA', 'NUMBEROFUSERS' ), 'numberofactiveusers' => array( '1', 'BROJAKTIVNIHSURADNIKA', 'NUMBEROFACTIVEUSERS' ), 'numberofedits' => array( '1', 'BROJUREĐIVANJA', 'NUMBEROFEDITS' ), 'numberofviews' => array( '1', 'BROJPREGLEDA', 'NUMBEROFVIEWS' ), 'pagename' => array( '1', 'IMESTRANICE', 'PAGENAME' ), 'pagenamee' => array( '1', 'IMESTRANICEE', 'PAGENAMEE' ), 'namespace' => array( '1', 'IMENSKIPROSTOR', 'NAMESPACE' ), 'namespacee' => array( '1', 'IMENSKIPROSTORE', 'NAMESPACEE' ), 'talkspace' => array( '1', 'RAZGOVOR', 'TALKSPACE' ), 'talkspacee' => array( '1', 'RAZGOVORE', 'TALKSPACEE' ), 'subjectspace' => array( '1', 'PROSTORSTRANICE', 'IMPSTRANICE', 'SUBJECTSPACE', 'ARTICLESPACE' ), 'subjectspacee' => array( '1', 'PROSTORSTRANICEE', 'IMPSTRANICEE', 'SUBJECTSPACEE', 'ARTICLESPACEE' ), 'fullpagename' => array( '1', 'PUNOIMESTRANICE', 'FULLPAGENAME' ), 'fullpagenamee' => array( '1', 'PUNOIMESTRANICEE', 'FULLPAGENAMEE' ), 'subpagename' => array( '1', 'IMEPODSTRANICE', 'SUBPAGENAME' ), 'subpagenamee' => array( '1', 'IMEPODSTRANICEE', 'SUBPAGENAMEE' ), 'basepagename' => array( '1', 'IMEOSNOVNESTRANICE', 'BASEPAGENAME' ), 'basepagenamee' => array( '1', 'IMEOSNOVNESTRANICEE', 'BASEPAGENAMEE' ), 'talkpagename' => array( '1', 'IMERAZGOVORASTRANICE', 'TALKPAGENAME' ), 'talkpagenamee' => array( '1', 'IMERAZGOVORASTRANICEE', 'TALKPAGENAMEE' ), 'subjectpagename' => array( '1', 'IMEGLAVNESTRANICE', 'SUBJECTPAGENAME', 'ARTICLEPAGENAME' ), 'subjectpagenamee' => array( '1', 'IMEGLAVNESTRANICEE', 'SUBJECTPAGENAMEE', 'ARTICLEPAGENAMEE' ), 'subst' => array( '0', 'ZAMJENA:', 'SUBST:' ), 'img_thumbnail' => array( '1', 'minijatura', 'mini', 'thumbnail', 'thumb' ), 'img_manualthumb' => array( '1', 'minijatura=$1', 'thumbnail=$1', 'thumb=$1' ), 'img_right' => array( '1', 'desno', 'right' ), 'img_left' => array( '1', 'lijevo', 'left' ), 'img_none' => array( '1', 'ništa', 'none' ), 'img_center' => array( '1', 'središte', 'center', 'centre' ), 'img_framed' => array( '1', 'okvir', 'framed', 'enframed', 'frame' ), 'img_frameless' => array( '1', 'bezokvira', 'frameless' ), 'img_page' => array( '1', 'stranica=$1', 'stranica $1', 'page=$1', 'page $1' ), 'img_upright' => array( '1', 'uspravno=$1', 'uspravno $1', 'upright', 'upright=$1', 'upright $1' ), 'img_border' => array( '1', 'obrub', 'border' ), 'img_baseline' => array( '1', 'osnovnacrta', 'baseline' ), 'img_sub' => array( '1', 'potpis', 'ind', 'sub' ), 'img_super' => array( '1', 'natpis', 'eks', 'super', 'sup' ), 'img_top' => array( '1', 'vrh', 'top' ), 'img_text_top' => array( '1', 'tekst-vrh', 'text-top' ), 'img_middle' => array( '1', 'pola', 'middle' ), 'img_bottom' => array( '1', 'dno', 'bottom' ), 'img_text_bottom' => array( '1', 'tekst-dno', 'text-bottom' ), 'sitename' => array( '1', 'IMEPROJEKTA', 'SITENAME' ), 'ns' => array( '0', 'IMP:', 'NS:' ), 'localurl' => array( '0', 'MJESNIURL:', 'LOCALURL:' ), 'localurle' => array( '0', 'MJESNIURLE:', 'LOCALURLE:' ), 'servername' => array( '0', 'IMESERVERA', 'SERVERNAME' ), 'scriptpath' => array( '0', 'PUTANJASKRIPTE', 'SCRIPTPATH' ), 'grammar' => array( '0', 'GRAMATIKA:', 'GRAMMAR:' ), 'notitleconvert' => array( '0', '__BEZPRETVARANJANASLOVA__', '__BPN__', '__NOTITLECONVERT__', '__NOTC__' ), 'nocontentconvert' => array( '0', '__BEZPRETVARANJASADRŽAJA__', '__BPS__', '__NOCONTENTCONVERT__', '__NOCC__' ), 'currentweek' => array( '1', 'TRENUTAČNITJEDAN', 'CURRENTWEEK' ), 'currentdow' => array( '1', 'TRENUTAČNIDANTJEDNA', 'CURRENTDOW' ), 'localweek' => array( '1', 'MJESNITJEDAN', 'LOCALWEEK' ), 'localdow' => array( '1', 'MJESNIDANTJEDNA', 'LOCALDOW' ), 'revisionid' => array( '1', 'IDIZMJENE', 'REVISIONID' ), 'revisionday' => array( '1', 'DANIZMJENE', 'REVISIONDAY' ), 'revisionday2' => array( '1', 'DANIZMJENE2', 'REVISIONDAY2' ), 'revisionmonth' => array( '1', 'MJESECIZMJENE', 'REVISIONMONTH' ), 'revisionyear' => array( '1', 'GODINAIZMJENE', 'REVISIONYEAR' ), 'revisiontimestamp' => array( '1', 'VREMENSKAOZNAKAIZMJENE', 'REVISIONTIMESTAMP' ), 'plural' => array( '0', 'MNOŽINA:', 'PLURAL:' ), 'fullurl' => array( '0', 'PUNIURL:', 'FULLURL:' ), 'fullurle' => array( '0', 'PUNIURLE:', 'FULLURLE:' ), 'lcfirst' => array( '0', 'MSPRVO:', 'LCFIRST:' ), 'ucfirst' => array( '0', 'VSPRVO:', 'UCFIRST:' ), 'lc' => array( '0', 'MS:', 'LC:' ), 'uc' => array( '0', 'VS:', 'UC:' ), 'raw' => array( '0', 'NEOBRAĐENO:', 'RAW:' ), 'displaytitle' => array( '1', 'POKAŽINASLOV', 'DISPLAYTITLE' ), 'rawsuffix' => array( '1', 'NEO', 'R' ), 'newsectionlink' => array( '1', '__NOVIODLOMAKPOVEZNICA__', '__NEWSECTIONLINK__' ), 'currentversion' => array( '1', 'TRENUTAČNAIZMJENA', 'CURRENTVERSION' ), 'urlencode' => array( '0', 'URLKODIRANJE:', 'URLENCODE:' ), 'anchorencode' => array( '0', 'SIDROKODIRANJE', 'ANCHORENCODE' ), 'currenttimestamp' => array( '1', 'TRENUTAČNAOZNAKAVREMENA', 'CURRENTTIMESTAMP' ), 'localtimestamp' => array( '1', 'MJESNAOZNAKAVREMENA', 'LOCALTIMESTAMP' ), 'language' => array( '0', '#JEZIK:', '#LANGUAGE:' ), 'contentlanguage' => array( '1', 'JEZIKPROJEKTA', 'CONTENTLANGUAGE', 'CONTENTLANG' ), 'pagesinnamespace' => array( '1', 'STRANICEPOPROSTORU:', 'STRANICEUIMP', 'PAGESINNAMESPACE:', 'PAGESINNS:' ), 'numberofadmins' => array( '1', 'BROJADMINA', 'NUMBEROFADMINS' ), 'formatnum' => array( '0', 'OBLIKBROJA', 'FORMATNUM' ), 'padleft' => array( '0', 'POSTAVALIJEVO', 'PADLEFT' ), 'padright' => array( '0', 'POSTAVADESNO', 'PADRIGHT' ), 'special' => array( '0', 'posebno', 'special' ), 'defaultsort' => array( '1', 'GLAVNIRASPORED:', 'DEFAULTSORT:', 'DEFAULTSORTKEY:', 'DEFAULTCATEGORYSORT:' ), 'filepath' => array( '0', 'PUTANJADATOTEKE:', 'FILEPATH:' ), 'tag' => array( '0', 'oznaka', 'tag' ), 'hiddencat' => array( '1', '__SKRIVENAKAT__', '__HIDDENCAT__' ), 'pagesincategory' => array( '1', 'STRANICEPOKATEGORIJI', 'STRANICEUKAT', 'PAGESINCATEGORY', 'PAGESINCAT' ), 'pagesize' => array( '1', 'VELIČINASTRANICE', 'PAGESIZE' ), 'index' => array( '1', '__KAZALO__', '__INDEX__' ), 'noindex' => array( '1', '__BEZKAZALA__', '__NOINDEX__' ), 'staticredirect' => array( '1', '__NEPOMIČNOPREUSMJERAVANJE__', '__STATICREDIRECT__' ), ); $datePreferences = array( 'default', 'dmy hr', 'mdy', 'ymd', 'ISO 8601', ); $defaultDateFormat = 'dmy hr'; $dateFormats = array( 'dmy hr time' => 'H:i', 'dmy hr date' => 'j. F Y.', 'dmy hr both' => 'H:i, j. F Y.', 'mdy time' => 'H:i', 'mdy date' => 'F j, Y', 'mdy both' => 'H:i, F j, Y', 'ymd time' => 'H:i', 'ymd date' => 'Y F j', 'ymd both' => 'H:i, Y F j', 'ISO 8601 time' => 'xnH:xni:xns', 'ISO 8601 date' => 'xnY-xnm-xnd', 'ISO 8601 both' => 'xnY-xnm-xnd"T"xnH:xni:xns', ); $separatorTransformTable = array( ',' => '.', '.' => ',' ); $fallback8bitEncoding = 'iso-8859-2'; $linkTrail = '/^([čšžćđßa-z]+)(.*)$/sDu'; $messages = array( # User preference toggles 'tog-underline' => 'Podcrtane poveznice', 'tog-highlightbroken' => 'Istakni prazne poveznice <a href="" class="new">ovako</a> (inače, ovako<a href="" class="internal">?</a>).', 'tog-justify' => 'Poravnaj odlomke i zdesna', 'tog-hideminor' => 'Sakrij manje izmjene na stranici Nedavnih promjena', 'tog-hidepatrolled' => 'Sakrij pregledane izmjene u nedavnim promjenama', 'tog-newpageshidepatrolled' => 'Sakrij pregledane stranice iz popisa novih stranica', 'tog-extendwatchlist' => 'Proširi popis praćenih stranica tako da prikaže sve promjene, ne samo najnovije', 'tog-usenewrc' => 'Koristi poboljšan izgled nedavnih promjena (zahtjeva JavaScripte)', 'tog-numberheadings' => 'Automatski označi naslove brojevima', 'tog-showtoolbar' => 'Prikaži traku s alatima za uređivanje', 'tog-editondblclick' => 'Dvoklik otvara uređivanje stranice (JavaScript)', 'tog-editsection' => 'Prikaži poveznice za uređivanje pojedinih odlomaka', 'tog-editsectiononrightclick' => 'Pritiskom na desnu tipku miša otvori uređivanje pojedinih odlomaka (JavaScript)', 'tog-showtoc' => 'U člancima s više od tri odlomka prikaži tablicu sadržaja.', 'tog-rememberpassword' => 'Zapamti moju lozinku u ovom pregledniku (najduže $1 {{PLURAL:$1|dan|dana|dana}})', 'tog-watchcreations' => 'Dodaj članke koje kreiram na moj popis praćenja', 'tog-watchdefault' => 'Dodaj sve nove i izmijenjene stranice u popis praćenja', 'tog-watchmoves' => 'Dodaj sve stranice koje premjestim na popis praćenja', 'tog-watchdeletion' => 'Dodaj sve stranice koje izbrišem na popis praćenja', 'tog-minordefault' => 'Normalno označavaj sve moje izmjene kao manje', 'tog-previewontop' => 'Prikaži kako će stranica izgledati iznad okvira za uređivanje', 'tog-previewonfirst' => 'Prikaži kako će stranica izgledati čim otvorim uređivanje', 'tog-nocache' => 'Isključi međuspremnik (cache) stranica u pregledniku', 'tog-enotifwatchlistpages' => 'Pošalji mi e-mail kod izmjene stranice u popisu praćenja', 'tog-enotifusertalkpages' => 'Pošalji mi e-mail kod izmjene moje stranice za razgovor', 'tog-enotifminoredits' => 'Pošalji mi e-mail i kod manjih izmjena', 'tog-enotifrevealaddr' => 'Prikaži moju e-mail adresu u obavijestima o izmjeni', 'tog-shownumberswatching' => 'Prikaži broj suradnika koji prate stranicu (u nedavnim izmjenama, popisu praćenja i samim člancima)', 'tog-oldsig' => 'Pregled postojećeg potpisa:', 'tog-fancysig' => 'Običan potpis kao wikitekst (bez automatske poveznice)', 'tog-externaleditor' => 'Uvijek koristi vanjski program za uređivanje (samo za napredne, potrebne su posebne postavke na računalu. [//www.mediawiki.org/wiki/Manual:External_editors Dodatne informacije.])', 'tog-externaldiff' => 'Uvijek koristi vanjski program za usporedbu (samo za napredne, potrebne su posebne postavke na računalu. [//www.mediawiki.org/wiki/Manual:External_editors Dodatne informacije.])', 'tog-showjumplinks' => 'Uključi pomoćne poveznice "Skoči na"', 'tog-uselivepreview' => 'Uključi trenutačni pretpregled (JavaScript) (eksperimentalno)', 'tog-forceeditsummary' => 'Podsjeti me ako sažetak uređivanja ostavljam praznim', 'tog-watchlisthideown' => 'Sakrij moja uređivanja s popisa praćenja', 'tog-watchlisthidebots' => 'Sakrij uređivanja botova s popisa praćenja', 'tog-watchlisthideminor' => 'Sakrij manje promjene s popisa praćenja', 'tog-watchlisthideliu' => 'Sakrij uređivanja prijavljenih s popisa praćenja', 'tog-watchlisthideanons' => 'Sakrij uređivanja neprijavljenih s popisa praćenja', 'tog-watchlisthidepatrolled' => 'Sakrij pregledane izmjene u popisu praćenja', 'tog-nolangconversion' => 'Isključi pretvaranje pisma (latinica-ćirilica, kineske varijante itd.) ako to wiki podržava', 'tog-ccmeonemails' => 'Pošalji mi kopiju e-maila kojeg pošaljem drugim suradnicima', 'tog-diffonly' => 'Ne prikazuj sadržaj stranice prilikom usporedbe inačica', 'tog-showhiddencats' => 'Prikaži skrivene kategorije', 'tog-norollbackdiff' => 'Izostavi razliku nakon upotrebe ukloni', 'underline-always' => 'Uvijek', 'underline-never' => 'Nikad', 'underline-default' => 'Prema postavkama preglednika', # Font style option in Special:Preferences 'editfont-style' => 'Uredi područje font stila:', 'editfont-default' => 'Prema postavkama preglednika', 'editfont-monospace' => 'Font s jednakim razmakom', 'editfont-sansserif' => 'Font Sans-serif', 'editfont-serif' => 'Font Serif', # Dates 'sunday' => 'nedjelja', 'monday' => 'ponedjeljak', 'tuesday' => 'utorak', 'wednesday' => 'srijeda', 'thursday' => 'četvrtak', 'friday' => 'petak', 'saturday' => 'subota', 'sun' => 'Ned', 'mon' => 'Pon', 'tue' => 'Uto', 'wed' => 'Sri', 'thu' => 'Čet', 'fri' => 'Pet', 'sat' => 'Sub', 'january' => 'siječnja', 'february' => 'veljače', 'march' => 'ožujka', 'april' => 'travnja', 'may_long' => 'svibnja', 'june' => 'lipnja', 'july' => 'srpnja', 'august' => 'kolovoza', 'september' => 'rujna', 'october' => 'listopada', 'november' => 'studenoga', 'december' => 'prosinca', 'january-gen' => 'siječnja', 'february-gen' => 'veljače', 'march-gen' => 'ožujka', 'april-gen' => 'travnja', 'may-gen' => 'svibnja', 'june-gen' => 'lipnja', 'july-gen' => 'srpnja', 'august-gen' => 'kolovoza', 'september-gen' => 'rujna', 'october-gen' => 'listopada', 'november-gen' => 'studenoga', 'december-gen' => 'prosinca', 'jan' => 'sij', 'feb' => 'velj', 'mar' => 'ožu', 'apr' => 'tra', 'may' => 'svi', 'jun' => 'lip', 'jul' => 'srp', 'aug' => 'kol', 'sep' => 'ruj', 'oct' => 'lis', 'nov' => 'stu', 'dec' => 'pro', # Categories related messages 'pagecategories' => '{{PLURAL:$1|Kategorija|Kategorije}}', 'category_header' => 'Članci u kategoriji "$1"', 'subcategories' => 'Potkategorije', 'category-media-header' => 'Mediji u kategoriji "$1":', 'category-empty' => "''U ovoj kategoriji trenutačno nema članaka ni medija.''", 'hidden-categories' => '{{PLURAL:$1|Skrivena kategorija|Skrivene kategorije|Skrivenih kategorija}}', 'hidden-category-category' => 'Skrivene kategorije', 'category-subcat-count' => '{{PLURAL:$2|Ova kategorija ima samo sljedeću podkategoriju.|Ova kategorija ima {{PLURAL:$1|podkategoriju|$1 podkategorije|$1 podkategorija}}, od njih $2 ukupno.}}', 'category-subcat-count-limited' => 'Ova kategorija ima {{PLURAL:$1|podkategoriju|$1 podkategorije|$1 podkategorija}}.', 'category-article-count' => '{{PLURAL:$2|Ova kategorija sadrži $2 članak.|{{PLURAL:$1|Prikazano je $1 članak|Prikazana su $1 članka|Prikazano je $1 članaka}} od njih $2 ukupno.}}', 'category-article-count-limited' => '{{PLURAL:$1|stranica je|$1 stranice su|$1 stranica je}} u ovoj kategoriji.', 'category-file-count' => '{{PLURAL:$2|Ova kategorija sadrži samo sljedeću datoteku.|{{PLURAL:$1|datoteka je|$1 datoteke su|$1 datoteka je}} u ovoj kategoriji, od njih $2 ukupno.}}', 'category-file-count-limited' => '{{PLURAL:$1|datoteka je|$1 datoteke su|$1 datoteka su}} u ovoj kategoriji.', 'listingcontinuesabbrev' => 'nast.', 'index-category' => 'Indeksirane stranice', 'noindex-category' => 'Neindeksirane stranice', 'broken-file-category' => 'Stranice s neispravnim poveznicama datoteka', 'about' => 'O', 'article' => 'Članak', 'newwindow' => '(otvara se u novom prozoru)', 'cancel' => 'Odustani', 'moredotdotdot' => 'Više...', 'mypage' => 'Moja stranica', 'mytalk' => 'Moj razgovor', 'anontalk' => 'Razgovor za ovu IP adresu', 'navigation' => 'Orijentacija', 'and' => '&#32;i', # Cologne Blue skin 'qbfind' => 'Nađi', 'qbbrowse' => 'Pregledaj', 'qbedit' => 'Uredi', 'qbpageoptions' => 'Postavke stranice', 'qbpageinfo' => 'O stranici', 'qbmyoptions' => 'Moje stranice', 'qbspecialpages' => 'Posebne stranice', 'faq' => 'Najčešća pitanja', 'faqpage' => 'Project:FAQ', # Vector skin 'vector-action-addsection' => 'Dodaj temu', 'vector-action-delete' => 'Izbriši', 'vector-action-move' => 'Premjesti', 'vector-action-protect' => 'Zaštiti', 'vector-action-undelete' => 'Vrati', 'vector-action-unprotect' => 'Promijeni zaštitu', 'vector-simplesearch-preference' => 'Omogući poboljšane prijedloge za pretraživanje (samo izgled Vector)', 'vector-view-create' => 'Započni', 'vector-view-edit' => 'Uredi', 'vector-view-history' => 'Vidi stare izmjene', 'vector-view-view' => 'Čitaj', 'vector-view-viewsource' => 'Vidi izvor', 'actions' => 'Radnje', 'namespaces' => 'Imenski prostori', 'variants' => 'Inačice', 'errorpagetitle' => 'Pogreška', 'returnto' => 'Vrati se na $1.', 'tagline' => 'Izvor: {{SITENAME}}', 'help' => 'Pomoć', 'search' => 'Traži', 'searchbutton' => 'Traži', 'go' => 'Kreni', 'searcharticle' => 'Kreni', 'history' => 'Stare izmjene', 'history_short' => 'Stare izmjene', 'updatedmarker' => 'obnovljeno od zadnjeg posjeta', 'printableversion' => 'Verzija za ispis', 'permalink' => 'Trajna poveznica', 'print' => 'Ispiši', 'view' => 'Vidi', 'edit' => 'Uredi', 'create' => 'Započni', 'editthispage' => 'Uredi ovu stranicu', 'create-this-page' => 'Započni ovu stranicu', 'delete' => 'Izbriši', 'deletethispage' => 'Izbriši ovu stranicu', 'undelete_short' => 'Vrati {{PLURAL:$1|$1 uređivanje|$1 uređivanja}}', 'viewdeleted_short' => 'Prikaži $1 {{plural: $1|izbrisano uređivanje|izbrisana uređivanja|izbrisanih uređivanja}}', 'protect' => 'Zaštiti', 'protect_change' => 'promijeni', 'protectthispage' => 'Zaštiti ovu stranicu', 'unprotect' => 'Promijeni zaštitu', 'unprotectthispage' => 'Promijeni zaštitu ove stranice', 'newpage' => 'Nova stranica', 'talkpage' => 'Razgovor o ovoj stranici', 'talkpagelinktext' => 'Razgovor', 'specialpage' => 'Posebna stranica', 'personaltools' => 'Osobni alati', 'postcomment' => 'Novi odlomak', 'articlepage' => 'Vidi članak', 'talk' => 'Razgovor', 'views' => 'Pogledi', 'toolbox' => 'Traka s alatima', 'userpage' => 'Vidi suradnikovu stranicu', 'projectpage' => 'Vidi stranicu o projektu', 'imagepage' => 'Vidi stranicu datoteke', 'mediawikipage' => 'Vidi stranicu za razgovor', 'templatepage' => 'Vidi ovaj predložak', 'viewhelppage' => 'Vidi stranicu pomoći', 'categorypage' => 'Vidi stranicu s kategorijama', 'viewtalkpage' => 'Vidi razgovor', 'otherlanguages' => 'Drugi jezici', 'redirectedfrom' => '(Preusmjereno s $1)', 'redirectpagesub' => 'Preusmjeravanje', 'lastmodifiedat' => 'Datum zadnje promjene na ovoj stranici: $2, $1', 'viewcount' => 'Ova stranica je pogledana {{PLURAL:$1|$1 put|$1 puta}}.', 'protectedpage' => 'Zaštićena stranica', 'jumpto' => 'Skoči na:', 'jumptonavigation' => 'orijentacija', 'jumptosearch' => 'traži', 'view-pool-error' => 'Ispričavamo se, poslužitelji su trenutačno preopterećeni. Previše suradnika pokušava vidjeti ovu stranicu. Molimo malo pričekajte prije nego što opet pokušate pristupiti ovoj stranici. $1', 'pool-timeout' => "Istek vremena (''timeout'') čekajući zaključavanje", 'pool-queuefull' => 'Red čekanja je pun', 'pool-errorunknown' => 'Nepoznata pogreška', # All link text and link target definitions of links into project namespace that get used by other message strings, with the exception of user group pages (see grouppage) and the disambiguation template definition (see disambiguations). 'aboutsite' => 'O projektu {{SITENAME}}', 'aboutpage' => 'Project:O_projektu_{{SITENAME}}', 'copyright' => 'Sadržaji se koriste u skladu s $1.', 'copyrightpage' => '{{ns:project}}:Autorska prava', 'currentevents' => 'Aktualno', 'currentevents-url' => 'Project:Novosti', 'disclaimers' => 'Odricanje od odgovornosti', 'disclaimerpage' => 'Project:General_disclaimer', 'edithelp' => 'Kako uređivati stranicu', 'edithelppage' => 'Help:Kako_uređivati_stranicu', 'helppage' => 'Help:Pomoć', 'mainpage' => 'Glavna stranica', 'mainpage-description' => 'Glavna stranica', 'policy-url' => 'Project:Pravila', 'portal' => 'Portal zajednice', 'portal-url' => 'Project:Portal zajednice', 'privacy' => 'Zaštita privatnosti', 'privacypage' => 'Project:Zaštita privatnosti', 'badaccess' => 'Pogreška u ovlaštenjima', 'badaccess-group0' => 'Nije Vam dopušteno izvršiti ovaj zahvat.', 'badaccess-groups' => 'Ovaj zahvat mogu izvršiti samo suradnici iz {{PLURAL:$2|skupine|jedne od skupina}}: $1.', 'versionrequired' => 'Potrebna inačica $1 MediaWikija', 'versionrequiredtext' => 'Za korištenje ove stranice potrebna je inačica $1 MediaWiki softvera. Pogledaj [[Special:Version|inačice]]', 'ok' => 'U redu', 'retrievedfrom' => 'Dobavljeno iz "$1"', 'youhavenewmessages' => 'Imate $1 ($2).', 'newmessageslink' => 'nove poruke', 'newmessagesdifflink' => 'zadnja promjena na stranici za razgovor', 'youhavenewmessagesmulti' => 'Imate nove poruke na $1', 'editsection' => 'uredi', 'editold' => 'uredi', 'viewsourceold' => 'vidi izvor', 'editlink' => 'uredi', 'viewsourcelink' => 'vidi izvornik', 'editsectionhint' => 'Uređivanje odlomka: $1', 'toc' => 'Sadržaj', 'showtoc' => 'prikaži', 'hidetoc' => 'sakrij', 'collapsible-collapse' => 'sklopi stablo', 'collapsible-expand' => 'raširi stablo', 'thisisdeleted' => 'Vidi ili vrati $1?', 'viewdeleted' => 'Vidi $1?', 'restorelink' => '{{PLURAL:$1|$1 pobrisanu izmjenu|$1 pobrisane izmjene|$1 pobrisanih izmjena}}', 'feedlinks' => 'Izvor:', 'feed-invalid' => 'Tip izvora nije valjan.', 'feed-unavailable' => 'RSS izvori nisu dostupni', 'site-rss-feed' => '$1 RSS izvor', 'site-atom-feed' => '$1 Atom izvor', 'page-rss-feed' => '"$1" RSS izvor', 'page-atom-feed' => '"$1" Atom izvor', 'red-link-title' => '$1 (stranica ne postoji)', 'sort-descending' => 'Sortiraj silazno', 'sort-ascending' => 'Sortiraj uzlazno', # Short words for each namespace, by default used in the namespace tab in monobook 'nstab-main' => 'Članak', 'nstab-user' => '{{GENDER:{{BASEPAGENAME}}|Stranica suradnika|Stranica suradnice}}', 'nstab-media' => 'Mediji', 'nstab-special' => 'Posebna stranica', 'nstab-project' => 'Stranica o projektu', 'nstab-image' => 'Slika', 'nstab-mediawiki' => 'Poruka', 'nstab-template' => 'Predložak', 'nstab-help' => 'Pomoć', 'nstab-category' => 'Kategorija', # Main script and global functions 'nosuchaction' => 'Nema takve naredbe', 'nosuchactiontext' => 'Navedeni URL označava nepostojeću naredbu. Možda se pogrešno upisali URL ili slijedili pogrešnu poveznicu. Ovo također može ukazivati na grešku u softveru kojeg koristi {{SITENAME}}.', 'nosuchspecialpage' => 'Posebna stranica ne postoji', 'nospecialpagetext' => '<strong>Takva posebna stranica ne postoji.</strong> Za popis svih posebnih stranica posjetite [[Special:SpecialPages|ovdje]].', # General errors 'error' => 'Pogreška', 'databaseerror' => 'Pogreška baze podataka', 'dberrortext' => 'Došlo je do sintaksne pogreške u upitu bazi. Možda se radi o grešci u softveru. Posljednji pokušaj upita je glasio: <blockquote><tt>$1</tt></blockquote> iz funkcije "<tt>$2</tt>". Baza je vratila pogrešku "<tt>$3: $4</tt>".', 'dberrortextcl' => 'Došlo je do sintaksne pogreške s upitom bazi. Posljednji pokušaj upita je glasio: "$1" iz funkcije "$2". Baza je vratila pogrešku "$3: $4"', 'laggedslavemode' => 'Upozorenje: na stranici se možda ne nalaze najnovije promjene.', 'readonly' => 'Baza podataka je zaključana', 'enterlockreason' => 'Upiši razlog zaključavanja i procjenu vremena otključavanja', 'readonlytext' => 'Baza podataka je trenutačno zaključana, nije ju moguće uređivati ili mijenjati. Ovo je obično pokazatelj tekućeg redovitog održavanja. Nakon što se potonja privremena radnja završi, baza podataka će se vratiti u uobičajeno stanje. Administrator koji je izvršio zaključavanje naveo je ovaj razlog: $1', 'missing-article' => 'U bazi podataka nije pronađen tekst stranice koji je trebao biti pronađen, nazvane "$1" $2. Ovo se najčešće događa zbog poveznice na zastarjelu usporedbu ili staru promjenu stranice koja je u međuvremenu izbrisana. Ako to nije slučaj, možda se radi o softverskoj grešci. Molimo da u tom slučaju pošaljete poruku [[Special:ListUsers/sysop|administratoru]] navodeći URL.', 'missingarticle-rev' => '(izmjena#: $1)', 'missingarticle-diff' => '(razlika: $1, $2)', 'readonly_lag' => 'Baza podataka je automatski zaključana dok se sekundarni bazni poslužitelji ne usklade s glavnim', 'internalerror' => 'Pogreška sustava', 'internalerror_info' => 'Interna pogreška: $1', 'fileappenderrorread' => 'Nije se moglo pročitati "$1" tijekom dodavanja.', 'fileappenderror' => 'Nije bilo moguće dodati "$1" u "$2".', 'filecopyerror' => 'Ne mogu kopirati datoteku "$1" u "$2".', 'filerenameerror' => 'Ne mogu preimenovati datoteku "$1" u "$2".', 'filedeleteerror' => 'Ne mogu obrisati datoteku "$1".', 'directorycreateerror' => 'Nije moguće kreirati direktorij "$1".', 'filenotfound' => 'Datoteka "$1" nije nađena.', 'fileexistserror' => 'Ne mogu stvoriti datoteku "$1": datoteka s tim imenom već postoji', 'unexpected' => 'Neočekivana vrijednost: "$1"="$2".', 'formerror' => 'Pogreška: Ne mogu poslati podatke', 'badarticleerror' => 'Ovu radnju nije moguće izvesti s tom stranicom.', 'cannotdelete' => 'Ne može se obrisati stranica ili datoteka "$1". Moguće je da ju je netko drugi već obrisao.', 'cannotdelete-title' => 'Brisanje stranice "$1" nije moguće', 'badtitle' => 'Loš naslov', 'badtitletext' => 'Navedeni naslov stranice nepravilan ili loše formirana interwiki poveznica.', 'perfcached' => 'Sljedeći podaci su iz međuspremnika i možda nisu najsvježiji:', 'perfcachedts' => 'Sljedeći podaci su iz međuspremnika i zadnji puta su ažurirani u $1.', 'querypage-no-updates' => 'Osvježavanje ove stranice je trenutačno onemogućeno. Nove promjene neće biti vidljive.', 'wrong_wfQuery_params' => 'Neispravni parametri poslani u wfQuery()<br /> Funkcija: $1<br /> Upit: $2', 'viewsource' => 'Vidi izvornik', 'actionthrottled' => 'Uređivanje je usporeno', 'actionthrottledtext' => 'Kao anti-spam mjeru, ograničeni ste u broju ovih radnji u određenom vremenu, i trenutačno ste dosegli to ograničenje. Pokušajte opet za koju minutu.', 'protectedpagetext' => 'Ova stranica je zaključana da bi se onemogućile izmjene.', 'viewsourcetext' => 'Možete pogledati i kopirati izvorni sadržaj ove stranice:', 'protectedinterface' => 'Ova stranica je zaštićena od izmjena jer sadrži tekst MediaWiki softvera.', 'editinginterface' => "'''Upozorenje:''' Uređujete stranicu koja se rabi za prikaz teksta u sučelju softvera. Promjene učinjene na ovoj stranici će se odraziti na izgled korisničkog sučelja kod drugih suradnika. Za prijevod, razmotrite korištenje [//translatewiki.net/wiki/Main_Page?setlang=hr translatewiki.net], projekta lokalizacije MedijeWiki.", 'sqlhidden' => '(SQL upit sakriven)', 'cascadeprotected' => 'Ova je stranica zaključana za uređivanja jer je uključena u {{PLURAL:$1|slijedeću stranicu|slijedeće stranice}}, koje su zaštićene "prenosivom zaštitom": $2', 'namespaceprotected' => "Ne možete uređivati stranice u imenskom prostoru '''$1'''.", 'customcssprotected' => 'Ne možete uređivati ovu CSS stranicu zato što ona sadrži osobne postavke drugog suradnika.', 'customjsprotected' => 'Ne možete uređivati ovu JavaScript stranicu zato što ona sadrži osobne postavke drugog suradnika.', 'ns-specialprotected' => "Stranice u imenskom prostoru ''{{ns:special}}'' ne mogu se uređivati.", 'titleprotected' => "Ovaj naslov je od kreiranja zaštitio suradnik [[User:$1|$1]], uz razlog: ''$2''.", # Virus scanner 'virus-badscanner' => "Loša konfiguracija: nepoznati skener za viruse: ''$1''", 'virus-scanfailed' => 'skeniranje neuspješno (kod $1)', 'virus-unknownscanner' => 'nepoznati antivirus:', # Login and logout pages 'logouttext' => "'''Odjavili ste se.''' Možete nastaviti s korištenjem {{SITENAME}} neprijavljeni, ili se možete ponovo [[Special:UserLogin|prijaviti]] pod istim ili drugim imenom. Neke se stranice mogu prikazivati kao da ste još uvijek prijavljeni, sve dok ne očistite međuspremnik svog preglednika.", 'welcomecreation' => '== Dobrodošli, $1! == Vaš je suradnički račun otvoren. Ne zaboravite prilagoditi [[Special:Preferences|{{SITENAME}} postavke]].', 'yourname' => 'Suradničko ime', 'yourpassword' => 'Lozinka:', 'yourpasswordagain' => 'Ponovno upišite lozinku', 'remembermypassword' => 'Zapamti moju lozinku na ovom računalu (najduže $1 {{PLURAL:$1|dan|dana}})', 'securelogin-stick-https' => 'Ostani spojen na HTTPS nakon prijave', 'yourdomainname' => 'Vaša domena', 'externaldberror' => 'Došlo je do pogreške s vanjskom autorizacijom ili Vam nije dopušteno osvježavanje vanjskog suradničkog računa.', 'login' => 'Prijavi se', 'nav-login-createaccount' => 'Prijavi se', 'loginprompt' => 'Za prijavu na sustav {{SITENAME}} morate u pregledniku uključiti kolačiće (cookies).', 'userlogin' => 'Prijavi se / stvori račun', 'userloginnocreate' => 'Prijavi se', 'logout' => 'Odjavi se', 'userlogout' => 'Odjavi se', 'notloggedin' => 'Niste prijavljeni', 'nologin' => "Nemate suradnički račun? '''$1'''.", 'nologinlink' => 'Otvorite račun', 'createaccount' => 'Otvori novi suradnički račun', 'gotaccount' => "Već imate suradnički račun? '''$1'''.", 'gotaccountlink' => 'Prijavite se', 'userlogin-resetlink' => 'Zaboravili ste detalje vaše prijave?', 'createaccountmail' => 'poštom', 'createaccountreason' => 'Razlog:', 'badretype' => 'Unesene lozinke nisu istovjetne.', 'userexists' => 'Uneseno suradničko ime već je u upotrebi. Unesite neko drugo ime.', 'loginerror' => 'Pogreška u prijavi', 'createaccounterror' => 'Ne može se stvoriti račun: $1', 'nocookiesnew' => "Suradnički račun je otvoren, ali niste uspješno prijavljeni. Naime, {{SITENAME}} koristi kolačiće (''cookies'') u procesu prijave. Isključili ste kolačiće. Molim uključite ih i pokušajte ponovo s Vašim novim imenom i lozinkom.", 'nocookieslogin' => "{{SITENAME}} koristi kolačiće (''cookies'') u procesu prijave. Isključili ste kolačiće. Molim uključite ih i pokušajte ponovo.", 'nocookiesfornew' => "Suradnički račun nije napravljen, jer nismo mogli potvrditi njegov izvor. Provjerite jesu li kolačići (''cookies'') omogućeni, ponovo učitajte ovu stranicu i pokušajte opet.", 'noname' => 'Niste unijeli valjano suradničko ime.', 'loginsuccesstitle' => 'Prijava uspješna', 'loginsuccess' => 'Prijavili ste se na wiki kao "$1".', 'nosuchuser' => 'Ne postoji suradnik s imenom "$1". Suradnička imena su osjetljiva na veličinu slova. Provjerite jeste li točno upisali, ili [[Special:UserLogin/signup|otvorite novi suradnički račun]].', 'nosuchusershort' => 'Ne postoji suradnik s imenom "$1". Provjerite Vaš unos.', 'nouserspecified' => 'Molimo navedite suradničko ime.', 'login-userblocked' => 'Ovaj suradnik je blokiran. Prijava nije dozvoljena.', 'wrongpassword' => 'Lozinka koju ste unijeli nije ispravna. Pokušajte ponovno.', 'wrongpasswordempty' => 'Niste unijeli lozinku. Pokušajte ponovno.', 'passwordtooshort' => 'Lozinka mora sadržavati najmanje {{PLURAL:$1|1 znak|$1 znaka|$1 znakova}}.', 'password-name-match' => 'Vaša lozinka mora biti različita od Vašeg suradničkog imena.', 'password-login-forbidden' => 'Uporaba ovog suradničkog imena i lozinke nije dozvoljena.', 'mailmypassword' => 'Pošalji mi novu lozinku', 'passwordremindertitle' => '{{SITENAME}}: nova lozinka.', 'passwordremindertext' => 'Netko je (vjerojatno Vi, s IP adrese $1) zatražio novu lozinku za projekt {{SITENAME}} ($4). Privremena lozinka za suradnika "$2" je postavljena na "$3". Ukoliko ste to Vi učinili, molimo Vas da se prijavite i promijenite lozinku. Privremena lozinka vrijedi još {{PLURAL:$5|$5 dan|$5 dana}}. Ukoliko niste zatražili novu lozinku, ili ste se sjetili stare lozinke i više ju ne želite promijeniti, slobodno zanemarite ovu poruku i nastavite koristiti staru lozinku.', 'noemail' => 'Suradnik "$1" nema zapisanu e-mail adresu.', 'noemailcreate' => 'Morate navesti važeću e-mail adresu', 'passwordsent' => 'Nova je lozinka poslana na e-mail adresu suradnika "$1"', 'blocked-mailpassword' => 'Vašoj IP adresi je blokirano uređivanje stranica, a da bi se spriječila nedopuštena radnja, mogućnost zahtijevanja nove lozinke je također onemogućena.', 'eauthentsent' => 'Na navedenu adresu poslan je e-mail s potvrdom. Prije nego što pošaljemo daljnje poruke, molimo Vas da otvorite e-mail i slijedite u njemu sadržana uputstva kako biste potvrdili da je e-mail adresa zaista Vaša.', 'throttled-mailpassword' => 'Već Vam je poslan e-mail za promjenu lozinke, u {{PLURAL:$1|zadnjih sat vremena|zadnja $1 sata|zadnjih $1 sati}}. Da bi spriječili zloupotrebu, moguće je poslati samo jedan e-mail za promjenu lozinke {{PLURAL:$1|svakih sat vremena|svaka $1 sata|svakih $1 sati}}.', 'mailerror' => 'Pogreška pri slanju e-maila: $1', 'acct_creation_throttle_hit' => 'Posjetitelji ovog wikija koji rabe Vašu IP adresu napravili su {{PLURAL:$1|1 račun|$1 računa}} u posljednjem danu, što je najveći dopušteni broj u tom vremenskom razdoblju. Zbog toga posjetitelji s ove IP adrese trenutačno ne mogu otvoriti nove suradničke račune.', 'emailauthenticated' => 'Vaša e-mail adresa je ovjerena $2 u $3.', 'emailnotauthenticated' => 'Vaša e-mail adresa još nije ovjerena. Ne možemo poslati e-mail ni u jednoj od sljedećih naredbi.', 'noemailprefs' => 'Nije navedena e-mail adresa, stoga sljedeće naredbe neće raditi.', 'emailconfirmlink' => 'Potvrdite svoju e-mail adresu', 'invalidemailaddress' => 'Ne mogu prihvatiti e-mail adresu jer nije valjano oblikovana. Molim unesite ispravno oblikovanu adresu ili ostavite polje praznim.', 'accountcreated' => 'Suradnički račun otvoren', 'accountcreatedtext' => 'Suradnički račun za $1 je otvoren.', 'createaccount-title' => 'Otvaranje suradničkog računa za {{SITENAME}}', 'createaccount-text' => 'Netko je stvorio suradnički račun s Vašom adresom elektronske pošte na {{SITENAME}} ($4) nazvan "$2", s lozinkom "$3". Trebali biste se prijaviti i odmah promijeniti lozinku. Možete zanemariti ovu poruku ako je suradnički račun stvoren nenamjerno.', 'usernamehasherror' => 'Suradničko ime ne može sadržavati znakove #', 'login-throttled' => 'Nedavno ste se previše puta pokušali prijaviti. Molimo Vas da pričekate prije nego što pokušate ponovo.', 'login-abort-generic' => 'Vaša prijava je bila neuspješna - Prekinuto', 'loginlanguagelabel' => 'Jezik: $1', 'suspicious-userlogout' => 'Vaš zahtjev za odjavu je odbijen jer to izgleda kao da je poslan preko pokvarenog preglednika ili keširanog posrednika (proxyja).', # E-mail sending 'php-mail-error-unknown' => 'Nepoznata pogreška u PHP-mail() funkciji', 'user-mail-no-addy' => 'Pokušaj slanja e-maila bez e-mail adrese.', # Change password dialog 'resetpass' => 'Promijeni lozinku', 'resetpass_announce' => 'Prijavljeni ste s privremenom lozinkom. Da završite proces mijenjanja lozinke, upišite ovdje novu lozinku:', 'resetpass_header' => 'Promijeni lozinku računa', 'oldpassword' => 'Stara lozinka', 'newpassword' => 'Nova lozinka', 'retypenew' => 'Ponovno unesite lozinku', 'resetpass_submit' => 'Postavite lozinku i prijavite se', 'resetpass_success' => 'Lozinka uspješno postavljena! Prijava u tijeku...', 'resetpass_forbidden' => 'Lozinka ne može biti promijenjena', 'resetpass-no-info' => 'Morate biti prijavljeni da biste izravno pristupili ovoj stranici.', 'resetpass-submit-loggedin' => 'Promijeni lozinku', 'resetpass-submit-cancel' => 'Odustani', 'resetpass-wrong-oldpass' => 'Pogrešna privremena ili trenutačna lozinka. Možda ste već uspješno promijenili Vašu lozinku ili ste zatražili novu privremenu lozinku.', 'resetpass-temp-password' => 'Privremena lozinka:', # Special:PasswordReset 'passwordreset' => 'Ponovno postavi lozinku', 'passwordreset-text' => 'Ispunite ovaj obrazac da biste dobili e-mail podsjetnik o vašim detaljima računa.', 'passwordreset-legend' => 'Poništi lozinku', 'passwordreset-disabled' => 'Poništavanje lozinke je onemogućeno na ovom wikiju.', 'passwordreset-pretext' => '{{PLURAL:$1||Unesite jedan od dijelova podataka u nastavku}}', 'passwordreset-username' => 'Suradničko ime:', 'passwordreset-email' => 'E-mail adresa:', 'passwordreset-emailtitle' => 'Pojedinosti o računu na {{SITENAME}}', 'passwordreset-emailtext-ip' => 'Netko (vjerojatno Vi, s IP adrese $1) zatražio je podsjetnik za Vaše detalje računa za {{SITENAME}} ($4). Sljedeći {{PLURAL:$3|račun suradnika je|računi suradnika su}} povezani s ovom e-mail adresom: $2 {{PLURAL:$3|Ova privremena lozinka|Ove privremene lozinke}} će isteći u {{PLURAL:$5|jedan dan|$5 dana}}. Trebate se prijaviti i odabrati novu lozinku. Ukoliko je netko drugi napravio ovaj zahtjev, ili ako ste sjeti Vaše izvorne lozinke, a vi je više ne želite promijeniti, možete zanemariti ovu poruku i nastavite koristiti staru lozinku.', 'passwordreset-emailtext-user' => 'Suradnik $1 na {{SITENAME}} zatražio podsjetnik o pojedinostima vašeg računa za {{SITENAME}} ($4). Sljedeći {{PLURAL:$3|račun suradnika je|računi suradnika su}} povezani s ovom e-mail adresom: $2 {{PLURAL:$3|Ova privremena lozinka|Ove privremene lozinke}} će isteći u {{PLURAL:$5|jedan dan|$5 dana}}. Trebate se prijaviti i odabrati novu lozinku. Ukoliko je netko drugi napravio ovaj zahtjev, ili ako ste sjeti Vaše izvorne lozinke, a vi je više ne želite promijeniti, možete zanemariti ovu poruku i nastavite koristiti staru lozinku.', 'passwordreset-emailelement' => 'Suradničko ime: $1 Privremena lozinka: $2', 'passwordreset-emailsent' => 'E-mail podsjetnik je poslan.', # Special:ChangeEmail 'changeemail' => 'Promijeni e-mail adresu', 'changeemail-header' => 'Promijeni e-mail adresu računa', 'changeemail-text' => 'Za promjenu e-mail adrese popunite ovaj obrazac. Morat ćete unijeti svoju lozinku da potvrdite ovu promjenu.', 'changeemail-no-info' => 'Morate biti prijavljeni da biste izravno pristupili ovoj stranici.', 'changeemail-oldemail' => 'Trenutna E-mail adresa:', 'changeemail-newemail' => 'Nova E-mail adresa:', 'changeemail-none' => '(ništa)', 'changeemail-submit' => 'Promijeni E-mail', 'changeemail-cancel' => 'Odustani', # Edit page toolbar 'bold_sample' => 'Podebljani tekst', 'bold_tip' => 'Podebljani tekst', 'italic_sample' => 'Kurzivni tekst', 'italic_tip' => 'Kurzivni tekst', 'link_sample' => 'Tekst poveznice', 'link_tip' => 'Unutarnja poveznica', 'extlink_sample' => 'http://www.example.com Tekst poveznice', 'extlink_tip' => 'Vanjska poveznica (pazi, nužan je prefiks http://)', 'headline_sample' => 'Tekst naslova', 'headline_tip' => 'Podnaslov', 'nowiki_sample' => 'Ovdje unesite neoblikovani tekst', 'nowiki_tip' => 'Neoblikovani tekst', 'image_sample' => 'Primjer.jpg', 'image_tip' => 'Uložena slika', 'media_sample' => 'Primjer.ogg', 'media_tip' => 'Uloženi medij', 'sig_tip' => 'Vaš potpis s datumom', 'hr_tip' => 'Vodoravna crta (koristiti rijetko)', # Edit pages 'summary' => 'Sažetak:', 'subject' => 'Predmet:', 'minoredit' => 'Ovo je manja promjena', 'watchthis' => 'Prati ovaj članak', 'savearticle' => 'Sačuvaj stranicu', 'preview' => 'Pregled kako će stranica izgledati', 'showpreview' => 'Prikaži kako će izgledati', 'showlivepreview' => 'Pregled kako će izgledati, uživo', 'showdiff' => 'Prikaži promjene', 'anoneditwarning' => "'''Upozorenje:''' Niste prijavljeni pod suradničkim imenom. Vaša IP adresa bit će zabilježena u popisu izmjena ove stranice.", 'anonpreviewwarning' => "''Niste prijavljeni. Spremanjem će Vaše IP adrese ostati zabilježene u starim izmjenama ove stranice.''", 'missingsummary' => "'''Podsjetnik:''' Niste unijeli sažetak promjena. Ako ponovno kliknete na \"Sačuvaj stranicu\", Vaše će promjene biti snimljene bez sažetka.", 'missingcommenttext' => 'Molim unesite sažetak.', 'missingcommentheader' => "'''Podsjetnik:''' Niste napisali sažetak ovog komentara. Ako ponovno kliknete \"{{int:savearticle}}\", Vaš će komentar biti snimljen bez sažetka.", 'summary-preview' => 'Pregled sažetka:', 'subject-preview' => 'Pregled predmeta:', 'blockedtitle' => 'Suradnik je blokiran', 'blockedtext' => '\'\'\'Vaše suradničko ime ili IP adresa je blokirana\'\'\' Blokirao Vas je $1. Razlog blokiranja je sljedeći: \'\'$2\'\'. * Početak blokade: $8 * Istek blokade: $6 * Ime blokiranog suradnika: $7 Možete kontaktirati $1 ili jednog od [[{{MediaWiki:Grouppage-sysop}}|administratora]] kako bi Vam pojasnili razlog blokiranja. Primijetite da ne možete koristiti opciju "Pošalji mu e-mail" ukoliko niste upisali valjanu e-mail adresu u Vašim [[Special:Preferences|suradničkim postavkama]] i ako niste u tome onemogućeni prilikom blokiranja. Vaša trenutačna IP adresa je $3, a oznaka bloka #$5. Molimo navedite ovaj broj kod svakog upita vezano za razlog blokiranja.', 'autoblockedtext' => 'Vaša IP adresa automatski je blokirana zbog toga što ju je koristio drugi suradnik, kojeg je blokirao $1. Razlog blokiranja je sljedeći: :\'\'$2\'\' * Početak blokade: $8 * Blokada istječe: $6 * Ime blokiranog suradnika: $7 Možete kontaktirati $1 ili jednog od [[{{MediaWiki:Grouppage-sysop}}|administratora]] kako bi Vam pojasnili razlog blokiranja. Primijetite da ne možete koristiti opciju "Pošalji mu e-mail" ukoliko niste upisali valjanu e-mail adresu u Vašim [[Special:Preferences|suradničkim postavkama]] i ako niste u tome onemogućeni prilikom blokiranja. Vaša trenutačna IP adresa je $3, a oznaka bloka #$5. Molimo navedite ovaj broj kod svakog upita vezano za razlog blokiranja.', 'blockednoreason' => 'bez obrazloženja', 'whitelistedittext' => 'Za uređivanje stranice morate se $1.', 'confirmedittext' => 'Morate potvrditi Vašu e-mail adresu prije nego što Vam bude omogućeno uređivanje. Molim unesite i ovjerite Vašu e-mail adresu u [[Special:Preferences|suradničkim postavkama]].', 'nosuchsectiontitle' => 'Ne mogu pronaći odlomak', 'nosuchsectiontext' => 'Pokušali ste uređivati odlomak koji ne postoji. Možda je premješten ili izbrisan dok ste pregledavali stranicu.', 'loginreqtitle' => 'Nužna prijava', 'loginreqlink' => 'prijavite se', 'loginreqpagetext' => 'Morate se $1 da biste vidjeli ostale stranice.', 'accmailtitle' => 'Lozinka poslana.', 'accmailtext' => "Nova lozinka za [[User talk:$1|$1]] je poslana na $2. Nakon prijave, lozinka za ovaj novi račun može biti promijenjena na stranici ''[[Special:ChangePassword|promijeni lozinku]]''", 'newarticle' => '(Novo)', 'newarticletext' => "Došli ste na stranicu koja još ne postoji. Ako želite stvoriti tu stranicu, počnite tipkati u prozor ispod ovog teksta (pogledajte [[{{MediaWiki:Helppage}}|stranicu za pomoć]]). Ako ste ovamo dospjeli slučajno, kliknite gumb '''natrag''' (back) u svom pregledniku.", 'anontalkpagetext' => "----''Ovo je stranica za razgovor s neprijavljenim suradnikom koji još nije otvorio suradnički račun ili se njime ne koristi. Zbog toga se moramo služiti brojčanom IP adresom kako bismo ga identificirali. Takvu adresu često može dijeliti više ljudi. Ako ste neprijavljeni suradnik i smatrate da su Vam upućeni irelevantni komentari, molimo Vas da [[Special:UserLogin/signup|otvorite suradnički račun]] ili [[Special:UserLogin|se prijavite]] te tako u budućnosti izbjegnete zamjenu s drugim neprijavljenim suradnicima.''", 'noarticletext' => 'Na ovoj stranici trenutačno nema sadržaja. Možete [[Special:Search/{{PAGENAME}}|potražiti ovaj naslov]] na drugim stranicama, <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} pretražiti povezane evidencije] ili [{{fullurl:{{FULLPAGENAME}}|action=edit}} urediti ovu stranicu]</span>.', 'noarticletext-nopermission' => 'Možete [[Special:Search/{{PAGENAME}}|tražiti naslov ove stranice]] na drugim stranicama ili <span class="plainlinks">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} pretražiti povezane evidencije]</span>.', 'userpage-userdoesnotexist' => 'Suradničko ime "<nowiki>$1</nowiki>" nije prijavljeno. Jeste li sigurni da želite stvoriti/uređivati ovu stranicu?', 'userpage-userdoesnotexist-view' => 'Suradnički račun "$1" nije registriran.', 'blocked-notice-logextract' => 'Ovaj suradnik je trenutačno blokiran. Posljednja stavka evidencije blokiranja navedena je niže kao napomena:', 'clearyourcache' => "'''Napomena:''' Nakon snimanja možda ćete trebate očistiti međuspremnik svog preglednika kako biste vidjeli promjene. * '''Firefox / Safari:''' držite ''Shift'' i kliknite ''Reload'', ili pritisnite bilo ''Ctrl-F5'' ili ''Ctrl-R'' (''Command-R'' na Macu) * '''Google Chrome:''' pritisnite ''Ctrl-Shift-R'' (''Command-Shift-R'' na Macu) * '''Internet Explorer:''' držite ''Ctrl'' i kliknite ''Refresh'', ili pritisnite ''Ctrl-F5'' * '''Konqueror:''' kliknite ''Reload'' ili pritisnite ''F5'' * '''Opera:''' očistite međuspremnik u ''Tools → Preferences''", 'usercssyoucanpreview' => "'''Savjet:''' Rabite dugme \"{{int:showpreview}}\" za testiranje svog CSS prije snimanja.", 'userjsyoucanpreview' => "'''Savjet:''' Rabite dugme \"{{int:showpreview}}\" za testiranje svog novog JavaScripta prije snimanja.", 'usercsspreview' => "'''Ne zaboravite: samo isprobavate/pregledavate svoj suradnički CSS. Još nije snimljen!'''", 'userjspreview' => "'''Ne zaboravite: samo isprobavate/pregledavate svoj suradnički JavaScript, i da još nije snimljen!'''", 'sitecsspreview' => "'''Ne zaboravite ovo je samo pregled ovog CSS-a.''' '''Još uvijek nije sačuvan!'''", 'sitejspreview' => "'''Ne zaboravite ovo je samo pregled JavaScript kôda.''' '''Još uvijek nije sačuvan!'''", 'userinvalidcssjstitle' => "'''Upozorenje:''' Nema sučelja pod imenom \"\$1\". Ne zaboravite da imena stranica s .css and .js kodom počinju malim slovom, npr. {{ns:user}}:Mate/vector.css, a ne {{ns:user}}:Mate/Vector.css.", 'updated' => '(Ažurirano)', 'note' => "'''Napomena:'''", 'previewnote' => "'''Ne zaboravite da je ovo samo pregled kako će stranica izgledati i da stranica još nije snimljena!'''", 'previewconflict' => 'Ovaj pregled odražava stanje u gornjem polju za unos koje će biti sačuvano ako pritisnete "Sačuvaj stranicu".', 'session_fail_preview' => "'''Ispričavamo se! Nismo mogli obraditi Vašu izmjenu zbog gubitka podataka o prijavi. Molimo pokušajte ponovno. Ako i dalje ne bude uspijevalo, pokušajte se [[Special:UserLogout|odjaviti]] i ponovno prijaviti.'''", 'session_fail_preview_html' => "'''Oprostite! Pretpregled nije moguć jer je ''session'' istekao.''' ''Budući da je na ovom wikiju ({{SITENAME}}) omogućen unos HTML oznaka (tagova), pretpregled je skriven kao mjera predostrožnosti protiv napada pomoću JavaScripta.'' '''Ako ste pokušali vidjeti kako stranica izgleda, molimo probajte opet. Ako ne uspije, [[Special:UserLogout|odjavite se]] i prijavite se ponovo.'''", 'token_suffix_mismatch' => "'''Vaše uređivanje je odbačeno jer je Vaš web preglednik ubacio znak/znakove interpunkcije u token uređivanja.''' Stoga je uređivanje odbačeno da se spriječi uništavanje teksta stranice. To se ponekad događa kad rabite neispravan web-baziran anonimni posrednik (proxy).", 'edit_form_incomplete' => "'''Neki dijelovi obrasca za uređivanja nisu dostigli do poslužitelja; provjerite jesu li izmjene netaknute i pokušajte ponovno.'''", 'editing' => 'Uređujete $1', 'editingsection' => 'Uređujete $1 (odlomak)', 'editingcomment' => 'Uređujete $1 (novi odlomak)', 'editconflict' => 'Istovremeno uređivanje: $1', 'explainconflict' => "Netko je u međuvremenu promijenio stranicu. Gornje polje sadrži sadašnji tekst stranice. U donjem polju prikazane su Vaše promjene. Morat ćete unijeti Vaše promjene u sadašnji tekst. '''Samo''' će tekst u gornjem polju biti sačuvan kad pritisnete \"{{int:savearticle}}\".", 'yourtext' => 'Vaš tekst', 'storedversion' => 'Pohranjena inačica', 'nonunicodebrowser' => "'''UPOZORENJE: Vaš preglednik ne podržava Unicode zapis znakova, molimo promijenite ga prije sljedećeg uređivanja članaka.'''", 'editingold' => "'''UPOZORENJE: Uređujete stariju inačicu ove stranice. Ako je sačuvate, sve će promjene učinjene nakon ove inačice biti izgubljene.'''", 'yourdiff' => 'Razlike', 'copyrightwarning' => "Molimo uočite da se svi doprinosi {{SITENAME}} smatraju objavljenima pod uvjetima $2 (vidi $1 za detalje). Ako ne želite da se Vaše pisanje nemilosrdno uređuje i slobodno raspačava, nemojte ga ovamo slati.<br /> Također nam obećavate da ste ovo sami napisali, ili da ste to prepisali iz nečeg što je u javnom vlasništvu ili pod sličnom slobodnom licencijom. '''NE POSTAVLJAJTE RADOVE ZAŠTIĆENE AUTORSKIM PRAVIMA BEZ DOPUŠTENJA!'''", 'copyrightwarning2' => "Molimo uočite da svi suradnici mogu mijenjati sve doprinose na {{SITENAME}}. Ako ne želite da se Vaše pisanje nemilosrdno uređuje, nemojte ga slati ovdje.<br /> Također nam obećavate da ste ovo sami napisali, ili da ste to prepisali iz nečeg što je u javnom vlasništvu ili pod sličnom slobodnom licencijom (vidi $1 za detalje). '''NE POSTAVLJAJTE RADOVE ZAŠTIĆENE AUTORSKIM PRAVIMA BEZ DOPUŠTENJA!'''", 'longpageerror' => "'''GREŠKA: Tekst koji ste unijeli dug je $1 kilobajta, što je više od maksimalnih $2 kilobajta. Nije ga moguće snimiti.'''", 'readonlywarning' => "'''UPOZORENJE: Baza podataka je zaključana zbog održavanja, pa trenutačno ne možete sačuvati svoje promjene. Najbolje je da kopirate i zaljepite tekst u tekstualnu datoteku te je snimite za kasnije.''' Administrator je zaključao bazu iz razloga: $1", 'protectedpagewarning' => "'''UPOZORENJE: Ova stranica je zaključana i mogu je uređivati samo suradnici s administratorskim pravima.''' Posljednja stavka u evidenciji navedena je niže kao napomena:", 'semiprotectedpagewarning' => "'''Napomena:''' Ova stranica je zaključana tako da je mogu uređivati samo prijavljeni suradnici. Posljednja stavka u evidenciji navedena je niže kao napomena:", 'cascadeprotectedwarning' => "'''UPOZORENJE:''' Ova stranica je zaključana i mogu je uređivati samo suradnici s administratorskim pravima, jer je uključena u {{PLURAL:\$1|slijedeću stranicu|slijedeće stranice}} koje su zaštićene \"prenosivom\" zaštitom:", 'titleprotectedwarning' => "'''UPOZORENJE: Ova stranica je zaključana i samo je suradnici s [[Special:ListGroupRights|dodatnim pravima]] mogu stvoriti.''' Posljednja stavka u evidenciji navedena je niže kao napomena:", 'templatesused' => '{{PLURAL:$1|Predložak koji se rabi|Predlošci koji se rabe}} na ovoj stranici:', 'templatesusedpreview' => '{{PLURAL:$1|Predložak koji se rabi|Predlošci koji se rabe}} u ovom predpregledu:', 'templatesusedsection' => '{{PLURAL:$1|Predložak koji se rabi|Predlošci koji se rabe}} u ovom odjeljku:', 'template-protected' => '(zaštićen)', 'template-semiprotected' => '(djelomično zaštićen)', 'hiddencategories' => 'Ova stranica je član {{PLURAL:$1|1 skrivene kategorija|$1 skrivene kategorije|$1 skrivenih kategorija}}:', 'nocreatetitle' => 'Otvaranje novih stranica ograničeno', 'nocreatetext' => 'Na ovom je projektu ograničeno otvaranje novih stranica. Možete se vratiti i uređivati već postojeće stranice ili se [[Special:UserLogin|prijaviti ili otvoriti suradnički račun]].', 'nocreate-loggedin' => 'Nemate ovlasti za stvaranje novih stranica.', 'sectioneditnotsupported-title' => 'Uređivanje odjeljka nije podržano', 'sectioneditnotsupported-text' => 'Uređivanje odjeljka nije podržano na ovoj stranici', 'permissionserrors' => 'Pogreška u pravima', 'permissionserrorstext' => 'Nemate ovlasti za tu radnju iz sljedećih {{PLURAL:$1|razlog|razloga}}:', 'permissionserrorstext-withaction' => 'Nemate dopuštenje za $2, iz {{PLURAL:$1|razloga|razloga}}:', 'recreate-moveddeleted-warn' => "'''Upozorenje: Ponovno stvarate stranicu koja je prethodno bila izbrisana.''' Razmotrite je li prikladno nastaviti s uređivanje ove stranice. Za Vašu informaciju slijedi evidencija brisanja i premještanja ove stranice:", 'moveddeleted-notice' => 'Ova stranica je bila izbrisana. Evidencija brisanja i evidencija premještanja za ovu stranicu je prikazana niže.', 'log-fulllog' => 'Prikaži cijelu evidenciju', 'edit-hook-aborted' => 'Uređivanje prekinuto kukom. Razlog nije ponuđen.', 'edit-gone-missing' => 'Stranica nije spremljena. Čini se kako je obrisana.', 'edit-conflict' => 'Sukob uređivanja.', 'edit-no-change' => 'Vaše uređivanje je zanemareno, jer nikakva promjena sadržaja nije napravljena.', 'edit-already-exists' => 'Neuspješno stvaranje nove stranice. Stranica već postoji.', # Parser/template warnings 'expensive-parserfunction-warning' => 'Upozorenje: Ova stranica sadrži previše opterećujućih poziva parserskih funkcija Trebala bi imati manje od $2 {{PLURAL:$2|poziva|poziva}}, sada ima {{PLURAL:$1|$1 poziv|$1 poziva}}.', 'expensive-parserfunction-category' => 'Stranice s previše poziva opterećujućih parserskih funkcija', 'post-expand-template-inclusion-warning' => 'Upozorenje: Veličina uključenih predložaka je prevelika. Neki predlošci neće biti uključeni.', 'post-expand-template-inclusion-category' => 'Stranice gdje su uključeni predlošci preveliki', 'post-expand-template-argument-warning' => 'Upozorenje: Ova stranica sadrži najmanje jedan argument predložaka koji ima preveliko proširenje. Ovi su argumenti izostavljeni.', 'post-expand-template-argument-category' => 'Stranice koje sadrže izostavljene argumente za predloške', 'parser-template-loop-warning' => 'Otkrivena petlja predloška: [[$1]]', 'parser-template-recursion-depth-warning' => 'Dubina rekurzije predloška je izvan granice ($1)', 'language-converter-depth-warning' => 'Prekoračena granica dubine jezičnog pretvarača ($1)', # "Undo" feature 'undo-success' => 'Izmjena je uklonjena (tekst u okviru ispod ne sadrži zadnju izmjenu). Molim sačuvajte stranicu (provjerite sažetak).', 'undo-failure' => 'Ova izmjena ne može biti uklonjena zbog postojanja međuinačica.', 'undo-norev' => 'Izmjena nije mogla biti uklonjena jer ne postoji ili je obrisana.', 'undo-summary' => 'Uklanjanje izmjene $1 što ju je unio/unijela [[Special:Contributions/$2|$2]] ([[User talk:$2|razgovor]])', # Account creation failure 'cantcreateaccounttitle' => 'Nije moguće stvoriti suradnički račun', 'cantcreateaccount-text' => "Otvaranje suradničkog računa ove IP adrese ('''$1''') blokirao/la je [[User:$3|$3]]. Razlog koji je dao/la $3 je ''$2''", # History pages 'viewpagelogs' => 'Vidi evidencije za ovu stranicu', 'nohistory' => 'Ova stranica nema starijih izmjena.', 'currentrev' => 'Trenutačna inačica', 'currentrev-asof' => 'Trenutačna izmjena od $1', 'revisionasof' => 'Inačica od $1', 'revision-info' => 'Inačica od $1 koju je unio/unijela $2', 'previousrevision' => '←Starija inačica', 'nextrevision' => 'Novija inačica→', 'currentrevisionlink' => 'vidi trenutačnu inačicu', 'cur' => 'sad', 'next' => 'sljed', 'last' => 'pret', 'page_first' => 'prva', 'page_last' => 'zadnja', 'histlegend' => 'Uputa: (sad) = razlika od trenutačne inačice, (pret) = razlika od prethodne inačice, m = manja promjena', 'history-fieldset-title' => 'Pretraži povijest', 'history-show-deleted' => 'Samo izbrisane', 'histfirst' => 'Najstarije', 'histlast' => 'Najnovije', 'historysize' => '({{PLURAL:$1|$1 bajt|$1 bajta|$1 bajtova}})', 'historyempty' => '(prazna stranica)', # Revision feed 'history-feed-title' => 'Povijest promjena', 'history-feed-description' => 'Povijest promjena ove stranice na wikiju', 'history-feed-item-nocomment' => '$1 u (test) $2', 'history-feed-empty' => 'Tražena stranica ne postoji. Stranica je vjerojatno prethodno izbrisana s wikija, ili preimenovana. Pokušajte [[Special:Search|pretražiti]] važnije nove stranice na wikiju.', # Revision deletion 'rev-deleted-comment' => '(komentar uklonjen)', 'rev-deleted-user' => '(suradničko ime uklonjeno)', 'rev-deleted-event' => '(zapis uklonjen)', 'rev-deleted-user-contribs' => '[suradničko ime ili IP adresa uklonjeni - izmjena skrivena u doprinosima]', 'rev-deleted-text-permission' => "Ova izmjena je '''izbrisana'''. Detalji se vjerojatno nalaze u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} evidenciji brisanja].", 'rev-deleted-text-unhide' => "Ova izmjena je '''izbrisana.''' Detalji se vjerojatno nalaze u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} evidenciji brisanja]. Kao administrator, možete i dalje [$1 vidjeti ovu izmjenu] ukoliko želite nastaviti.", 'rev-suppressed-text-unhide' => "Ova izmjena stranice je '''skrivena'''. Vjerojatno postoji više podataka u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} evidenciji skrivanja]. Kao administrator možete [$1 vidjeti ovu izmjenu] ukoliko želite nastaviti.", 'rev-deleted-text-view' => "Ova izmjena je '''izbrisana'''. Kao administrator na ovom projektu možete ju vidjeti; detalji se vjerojatno nalaze u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} evidenciji brisanja].", 'rev-suppressed-text-view' => "Ova izmjena stranice je '''skrivena'''. Kao administrator možete ju pregledati; vjerojatno postoji više podataka u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} evidenciji skrivanja].", 'rev-deleted-no-diff' => "Ne možete vidjeti ovu inačicu zbog toga što je jedna od izmjena '''izbrisana'''. Možda postoji više informacija u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} evidenciji brisanja].", 'rev-suppressed-no-diff' => "Ne možete vidjeti ove razlike jer je jedna od revizija '''obrisana'''.", 'rev-deleted-unhide-diff' => "Jedna od inačica ove izmjene je '''izbrisana'''. Detalji se vjerojatno nalaze u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} evidenciji brisanja]. Kao administrator, možete i dalje [$1 vidjeti ovu izmjenu] ukoliko želite nastaviti.", 'rev-suppressed-unhide-diff' => "Jedna od revizija ove razlike je '''uklonjena'''. Postoji mnogo detalja u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} zapisniku uklanjanja]. Kao administrator i dalje možete [$1 vidjeti ove razlike] ako želite da nastavite.", 'rev-deleted-diff-view' => "Jedna od izmjena je '''izbrisana'''. Kao administrator možete ju vidjeti; detalji se vjerojatno nalaze u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} evidenciji brisanja].", 'rev-suppressed-diff-view' => "Jedna od izmjena stranice je '''skrivena'''. Kao administrator možete ju pregledati; vjerojatno postoji više podataka u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} evidenciji skrivanja].", 'rev-delundel' => 'pokaži/skrij', 'rev-showdeleted' => 'prikaži', 'revisiondelete' => 'Izbriši/vrati izmjene', 'revdelete-nooldid-title' => 'Nema tražene izmjene', 'revdelete-nooldid-text' => 'Niste naveli željenu izmjenu (izmjene), željena izmjena ne postoji, ili pokušavate sakriti trenutačnu izmjenu.', 'revdelete-nologtype-title' => 'Nije zadana vrsta evidencije', 'revdelete-nologtype-text' => 'Niste izabrali vrstu evidencije nad kojom se vrši ova radnja.', 'revdelete-nologid-title' => 'Nevaljani zapis u evidenciji', 'revdelete-nologid-text' => 'Niste naveli ciljnu evidenciju ili navedeni zapis ne postoji.', 'revdelete-no-file' => 'Navedena datoteka ne postoji.', 'revdelete-show-file-confirm' => 'Jeste li sigurni da želite pregledati izbrisanu inačicu datoteke "<nowiki>$1</nowiki>" od $2 u $3?', 'revdelete-show-file-submit' => 'Da', 'revdelete-selected' => "'''{{PLURAL:$2|Odabrana izmjena|Odabrane izmjene|Odabrane izmjene}} stranice [[$1]]:'''", 'logdelete-selected' => "'''{{PLURAL:$1|Odabrani zapis u evidenciji|Odabrani zapisi u evidenciji}}:'''", 'revdelete-text' => "'''Obrisane će se izmjene i dalje nalaziti u javnom popisu izmjena, ali njihov sadržaj neće biti dostupan javnosti.''' Drugi administratori ovoga projekta ({{SITENAME}}) moći će i dalje pristupiti skrivenom sadržaju i vratiti ga u javni pristup putem ovog sučelja, osim ako operateri na projektu nisu postavili dodatna ograničenja.", 'revdelete-confirm' => 'Molimo potvrdite da namjeravate ovo učiniti, da razumijete posljedice i da to činite u skladu s [[{{MediaWiki:Policy-url}}|pravilima]].', 'revdelete-suppress-text' => "Sklanjanje uređivanja treba raditi '''iznimno''' u slijedećih par slučajeva: * Privatne informacije neprilične javnom mediju tipa *: ''kućna adresa i broj telefona, JMBG ili OIB, itd.''", 'revdelete-legend' => 'Postavi ograničenja na izmjenu:', 'revdelete-hide-text' => 'Sakrij tekst izmjene', 'revdelete-hide-image' => 'Sakrij sadržaj datoteke (sakrij sliku)', 'revdelete-hide-name' => 'Sakrij uređivanje i njegov predmet', 'revdelete-hide-comment' => 'Sakrij komentar (sažetak)', 'revdelete-hide-user' => 'Sakrij suradnikovo ime/IP adresu', 'revdelete-hide-restricted' => 'Postavi ograničenja i za administratore kao i za ostale suradnike', 'revdelete-radio-same' => '(ne mijenjaj)', 'revdelete-radio-set' => 'Da', 'revdelete-radio-unset' => 'Ne', 'revdelete-suppress' => 'Sakrij podatke od administratora i ostalih suradnika', 'revdelete-unsuppress' => 'Ukloni ograničenja na vraćenim izmjenama', 'revdelete-log' => 'Razlog:', 'revdelete-submit' => 'Primijeni na {{PLURAL:$1|odabranu inačicu|odabrane inačice}}', 'revdelete-success' => "'''Vidljivost izmjene uspješno ažurirana.'''", 'revdelete-failure' => "'''Vidljivost inačice nije mogla biti ažurirana:''' $1", 'logdelete-success' => "'''Vidljivost uređivanja uspješno postavljena.'''", 'logdelete-failure' => "'''Vidljivost evidencije ne može biti postavljena:''' $1", 'revdel-restore' => 'Promijeni dostupnost', 'revdel-restore-deleted' => 'izbrisane izmjene', 'revdel-restore-visible' => 'vidljive izmjene', 'pagehist' => 'Povijest stranice', 'deletedhist' => 'Obrisana povijest', 'revdelete-hide-current' => 'Greška u skrivanju stavke datirane $2, $1: ovo je trenutačna inačica. Ne može biti skrivena.', 'revdelete-show-no-access' => 'Greška u prikazivanju stavke od $2, $1: ova stavka je označena kao "ograničeno". Nemate pristup do nje.', 'revdelete-modify-no-access' => 'Greška pri izmjeni stavke od $2, $1: ova stavka je označena kao "ograničeno". Nemate pristup do nje.', 'revdelete-modify-missing' => 'Greška pri izmjeni izmjene broj $1: nedostaje u bazi!', 'revdelete-no-change' => "'''Upozorenje:''' stavka od $2, $1 već ima tražene postavke vidljivosti.", 'revdelete-concurrent-change' => 'Greška pri izmjeni stavke od $2, $1: izgleda da je njen status promijenio netko drugi dok ste ju pokušavali mijenjati. Provjerite evidencije.', 'revdelete-only-restricted' => 'Greška pri skrivanju stavke od dana $2, $1: ne možete ukloniti stavke od pregledavanja administratora bez da odaberete neku od drugih mogućnosti vidljivosti.', 'revdelete-reason-dropdown' => '*Uobičajeni razlozi brisanja ** Kršenje autorskih prava ** Neprimjereni osobni podaci', 'revdelete-otherreason' => 'Drugi/dodatni razlog:', 'revdelete-reasonotherlist' => 'Drugi razlog', 'revdelete-edit-reasonlist' => 'Uredi razloge za brisanje', 'revdelete-offender' => 'Autor revizije:', # Suppression log 'suppressionlog' => 'Evidencije sakrivanja', 'suppressionlogtext' => 'Slijedi popis brisanja i blokiranja koji uključuje sadržaj skriven za administratore.<br /> Vidi [[Special:IPBlockList|Popis blokiranih IP adresa]] za popis trenutačno aktivnih blokiranih adresa.', # History merging 'mergehistory' => 'Spoji povijesti starih izmjena stranice', 'mergehistory-header' => 'Na ovoj stranici spajate povijest jedne stranice u drugu (noviju) stranicu. Budite sigurni da ta promjena čuva kontinuitet stranice.', 'mergehistory-box' => 'Spoji povijesti starih izmjena dvije stranice:', 'mergehistory-from' => 'Izvorna stranica:', 'mergehistory-into' => 'Ciljna stranica:', 'mergehistory-list' => 'Spojiva povijest uređivanja', 'mergehistory-merge' => 'Sljedeće promjene stranice [[:$1|$1]] mogu biti spojene u [[:$2|$2]]. Rabite stupac s radio gumbima za spajanje samo određenih promjena. Primijetite da uporaba navigacijskih poveznica resetira Vaše izbore u stupcu.', 'mergehistory-go' => 'Pokaži spojivu povijest uređivanja', 'mergehistory-submit' => 'Spoji povijesti uređivanja stranica', 'mergehistory-empty' => 'Nema spojivih promjena (spajanje nije moguće).', 'mergehistory-success' => '$3 {{PLURAL:$3|izmjena|izmjene}} stranice [[:$1|$1]] uspješno {{PLURAL:$3|spojena|spojene}} u povijest stranice [[:$2|$2]].', 'mergehistory-fail' => 'Nemoguće spojiti povijest stranica, molimo provjerite stranice i vremenske parametre.', 'mergehistory-no-source' => 'Izvorna stranica $1 ne postoji.', 'mergehistory-no-destination' => 'Ciljna stranica $1 ne postoji.', 'mergehistory-invalid-source' => 'Izvorna stranica mora imati valjani naziv.', 'mergehistory-invalid-destination' => 'Ciljna stranica mora imati valjani naziv.', 'mergehistory-autocomment' => 'Stranica [[:$1]] je spojena u [[:$2]]', 'mergehistory-comment' => 'Stranica [[:$1]] je spojena u [[:$2]]: $3', 'mergehistory-same-destination' => 'Izvorna i ciljana stranica ne mogu biti iste', 'mergehistory-reason' => 'Razlog:', # Merge log 'mergelog' => 'Evidencija spajanja povijesti stranica', 'pagemerge-logentry' => 'spojeno [[$1]] u [[$2]] (promjene do $3)', 'revertmerge' => 'Razdvoji', 'mergelogpagetext' => 'Slijedi popis posljednjih spajanja povijesti stranica.', # Diffs 'history-title' => 'Povijest izmjena stranice "$1"', 'difference' => '(Usporedba među inačicama)', 'difference-multipage' => '(Razlika između stranica)', 'lineno' => 'Redak $1:', 'compareselectedversions' => 'Usporedi odabrane inačice', 'showhideselectedversions' => 'Otkrij/sakrij odabrane izmjene', 'editundo' => 'ukloni ovu izmjenu', 'diff-multi' => '({{PLURAL:$1|Nije prikazana jedna međuinačica|Nisu prikazane $1 međuinačice|Nije prikazano $1 međuinačica}} {{PLURAL:$2|jednog|$2|$2}} suradnika)', 'diff-multi-manyusers' => '({{PLURAL:$1|Nije prikazana jedna međuinačica|Nisu prikazane $1 međuinačice|Nije prikazano $1 međuinačica}} više od {{PLURAL:$2|jednog|$2|$2}} suradnika)', # Search results 'searchresults' => 'Rezultati pretrage', 'searchresults-title' => 'Rezultati traženja za "$1"', 'searchresulttext' => 'Za više obavijesti o pretraživanju projekta {{SITENAME}} vidi [[{{MediaWiki:Helppage}}|{{int:help}}]].', 'searchsubtitle' => 'Tražili ste \'\'\'[[:$1]]\'\'\' ([[Special:Prefixindex/$1|sve stranice koje počinju sa "$1"]]{{int:pipe-separator}}[[Special:WhatLinksHere/$1|sve stranice koje povezuju na "$1"]])', 'searchsubtitleinvalid' => 'Za upit "$1"', 'toomanymatches' => 'Preveliki broj rezultata, molimo probajte drukčiji upit', 'titlematches' => 'Pronađene stranice prema naslovu', 'notitlematches' => 'Nema pronađenih stranica prema naslovu', 'textmatches' => 'Pronađene stranice prema tekstu članka', 'notextmatches' => 'Nema pronađenih stranica prema tekstu članka', 'prevn' => 'prethodnih {{PLURAL:$1|$1}}', 'nextn' => 'sljedećih {{PLURAL:$1|$1}}', 'prevn-title' => '$1 {{PLURAL:$1|prethodni rezultat|prethodna rezultata|prethodnih rezultata}}', 'nextn-title' => '$1 {{PLURAL:$1|sljedeći rezultat|sljedeća rezultata|sljedećih rezultata}}', 'shown-title' => 'Prikaži $1 {{PLURAL:$1|rezultat|rezultata|rezultata}} po stranici', 'viewprevnext' => 'Vidi ($1 {{int:pipe-separator}} $2) ($3).', 'searchmenu-legend' => 'Mogućnosti pretraživanja', 'searchmenu-exists' => "* Stranica '''[[$1]]'''", 'searchmenu-new' => "'''Stvori stranicu \"[[:\$1]]\" na ovoj wiki!'''", 'searchhelp-url' => 'Help:Pomoć', 'searchmenu-prefix' => '[[Special:PrefixIndex/$1|Pretraži stranice s ovim prefiksom]]', 'searchprofile-articles' => 'Stranice sa sadržajem', 'searchprofile-project' => 'Pomoć i stranice projekta', 'searchprofile-images' => 'Multimedija', 'searchprofile-everything' => 'Sve', 'searchprofile-advanced' => 'Napredno', 'searchprofile-articles-tooltip' => 'Traži u $1', 'searchprofile-project-tooltip' => 'Traži u $1', 'searchprofile-images-tooltip' => 'Traži datoteke', 'searchprofile-everything-tooltip' => 'Pretraži sav sadržaj (uključujući i stranice za razgovor)', 'searchprofile-advanced-tooltip' => 'Traži u zadanom imenskom prostoru', 'search-result-size' => '$1 ({{PLURAL:$2|1 riječ|$2 riječi}})', 'search-result-category-size' => '{{PLURAL:$1|1 član|$1 člana|$1 članova}} ({{PLURAL:$2|1 potkategorija|$2 potkategorije|$2 potkategorija}}, {{PLURAL:$3|1 datoteka|$3 datoteke|$3 datoteka}})', 'search-result-score' => 'Povezanost: $1%', 'search-redirect' => '(preusmjeravanje $1)', 'search-section' => '(odlomak $1)', 'search-suggest' => 'Mislili ste: $1', 'search-interwiki-caption' => 'Sestrinski projekti', 'search-interwiki-default' => '$1 rezultati:', 'search-interwiki-more' => '(više)', 'search-mwsuggest-enabled' => 's prijedlozima', 'search-mwsuggest-disabled' => 'nema prijedloga', 'search-relatedarticle' => 'Povezano', 'mwsuggest-disable' => 'Isključi AJAX prijedloge', 'searcheverything-enable' => 'Traži u svim imenskim prostorima', 'searchrelated' => 'povezano', 'searchall' => 'sve', 'showingresults' => "Dolje {{PLURAL:$1|je prikazan '''$1''' rezultat|su prikazana '''$1''' rezultata|je prikazano '''$1''' rezultata}}, počevši od '''$2'''.", 'showingresultsnum' => "Dolje {{PLURAL:$3|je prikazan '''$3''' rezultat|su prikazana '''$3''' rezultata|je prikazano '''$3''' rezultata}}, počevši s brojem '''$2'''.", 'showingresultsheader' => "{{PLURAL:$5|Rezultat '''$1''' od '''$3'''|Rezultati '''$1 - $2''' od '''$3'''}} za '''$4'''", 'nonefound' => "'''Napomena''': Glavne postavke pretražuju samo određene imenske prostore. Ako želite pretraživati sve, dodajte prefiks '''all:''' ispred traženog sadržaja (ovo uključuje stranice za razgovor, predloške i sl.), ili koristite prefiks željenog imenskog prostora.", 'search-nonefound' => 'Ne postoje rezultati koji se podudaraju s upitom.', 'powersearch' => 'Traženje', 'powersearch-legend' => 'Napredno pretraživanje', 'powersearch-ns' => 'Traži u imenskom prostoru:', 'powersearch-redir' => 'Prikaži preusmjerenja', 'powersearch-field' => 'Traži za', 'powersearch-togglelabel' => 'Uključi:', 'powersearch-toggleall' => 'Sve', 'powersearch-togglenone' => 'Ništa', 'search-external' => 'Vanjski pretraživač', 'searchdisabled' => '<p>Oprostite! Pretraga po cjelokupnoj bazi je zbog bržeg rada projekta {{SITENAME}} trenutačno onemogućena. Možete se poslužiti tražilicom Google.</p>', # Quickbar 'qbsettings' => 'Traka', 'qbsettings-none' => 'Bez', 'qbsettings-fixedleft' => 'Lijevo nepomično', 'qbsettings-fixedright' => 'Desno nepomično', 'qbsettings-floatingleft' => 'Lijevo leteće', 'qbsettings-floatingright' => 'Desno leteće', 'qbsettings-directionality' => 'Fiksno, ovisno o smjeru pisma Vašeg jezika', # Preferences page 'preferences' => 'Postavke', 'mypreferences' => 'Moje postavke', 'prefs-edits' => 'Broj uređivanja:', 'prefsnologin' => 'Niste prijavljeni', 'prefsnologintext' => 'Morate biti <span class="plainlinks">[{{fullurl:{{#Special:UserLogin}}|returnto=$1}} prijavljeni]</span> za podešavanje suradničkih postavki.', 'changepassword' => 'Promjena lozinke', 'prefs-skin' => 'Izgled', 'skin-preview' => 'Pregled', 'datedefault' => 'Nemoj postaviti', 'prefs-beta' => 'Beta mogućnosti', 'prefs-datetime' => 'Datum i vrijeme', 'prefs-labs' => 'Labs mogućnosti', 'prefs-personal' => 'Podaci o suradniku', 'prefs-rc' => 'Nedavne promjene i kratki članci', 'prefs-watchlist' => 'Praćene stranice', 'prefs-watchlist-days' => 'Broj dana koji će se prikazati na popisu praćenja:', 'prefs-watchlist-days-max' => 'Maksimalno 7 dana', 'prefs-watchlist-edits' => 'Broj uređivanja koji će se prikazati na proširenom popisu praćenja:', 'prefs-watchlist-edits-max' => 'Maksimalni broj: 1000', 'prefs-watchlist-token' => 'Token popisa praćenja:', 'prefs-misc' => 'Razno', 'prefs-resetpass' => 'Promijeni lozinku', 'prefs-changeemail' => 'Promijeni E-mail', 'prefs-setemail' => 'Postavite E-mail adresu', 'prefs-email' => 'Mogućnosti e-maila', 'prefs-rendering' => 'Izgled', 'saveprefs' => 'Spremi', 'resetprefs' => 'Vrati na prvotne postavke', 'restoreprefs' => 'Vrati sve postavke na prvotno zadane', 'prefs-editing' => 'Širina okvira za uređivanje', 'prefs-edit-boxsize' => 'Veličina prozora za uređivanje.', 'rows' => 'Redova', 'columns' => 'Stupaca', 'searchresultshead' => 'Prikaz rezultata pretrage', 'resultsperpage' => 'Koliko pogodaka na jednoj stranici', 'stub-threshold' => 'Prag za formatiranje poput <a href="#" class="stub">poveznice mrve</a>:', 'stub-threshold-disabled' => 'Onemogućeno', 'recentchangesdays' => 'Broj dana prikazanih u nedavnim promjenama:', 'recentchangesdays-max' => '(maksimalno $1 {{PLURAL:$1|dan|dana}})', 'recentchangescount' => 'Broj izmjena za prikaz kao zadano:', 'prefs-help-recentchangescount' => 'Ovo uključuje nedavne promjene, stare izmjene, i evidencije.', 'prefs-help-watchlist-token' => 'Popunjavanjem ovog polja tajnim ključem generirat će se RSS redak za Vaš popis praćenja. Svatko tko zna ključ moći će čitati Vaš popis praćenih stranica, slijedom toga odaberite sigurnu vrijednost. Ovdje su nasumično generirane vrijednosti koje možete rabiti: $1', 'savedprefs' => 'Vaše postavke su sačuvane.', 'timezonelegend' => 'Vremenska zona:', 'localtime' => 'Lokalno vrijeme:', 'timezoneuseserverdefault' => 'Koristi postavke wikija ($1)', 'timezoneuseoffset' => 'Drugo (odredite razliku)', 'timezoneoffset' => 'Razlika¹:', 'servertime' => 'Vrijeme na poslužitelju:', 'guesstimezone' => 'Vrijeme dobiveno od preglednika', 'timezoneregion-africa' => 'Afrika', 'timezoneregion-america' => 'Amerika', 'timezoneregion-antarctica' => 'Antarktika', 'timezoneregion-arctic' => 'Arktik', 'timezoneregion-asia' => 'Azija', 'timezoneregion-atlantic' => 'Atlantski ocean', 'timezoneregion-australia' => 'Australija', 'timezoneregion-europe' => 'Europa', 'timezoneregion-indian' => 'Indijski ocean', 'timezoneregion-pacific' => 'Tihi ocean', 'allowemail' => 'Omogući primanje e-maila od drugih suradnika', 'prefs-searchoptions' => 'Način traženja', 'prefs-namespaces' => 'Imenski prostori', 'defaultns' => 'Ako nije navedeno drugačije, traži u ovim prostorima:', 'default' => 'prvotno', 'prefs-files' => 'Datoteke', 'prefs-custom-css' => 'Prilagođen CSS', 'prefs-custom-js' => 'Prilagođen JS', 'prefs-common-css-js' => 'Dijeljeni CSS/JS za sve izglede:', 'prefs-reset-intro' => 'Možete koristiti ovu stranicu za povrat Vaših postavki na prvotne postavke. Ovo se ne može poništiti.', 'prefs-emailconfirm-label' => 'Potvrda e-mail adrese:', 'prefs-textboxsize' => 'Veličina prozora za uređivanje', 'youremail' => 'Vaša elektronska pošta *', 'username' => 'Suradničko ime:', 'uid' => 'Suradnički ID-broj:', 'prefs-memberingroups' => 'Član {{PLURAL:$1|skupine|skupina}}:', 'prefs-registration' => 'Vrijeme prijave:', 'yourrealname' => 'Pravo ime (nije obvezno)*', 'yourlanguage' => 'Jezik:', 'yourvariant' => 'Inačica:', 'yournick' => 'Vaš nadimak (za potpisivanje)', 'prefs-help-signature' => 'Komentari na stranicama za razgovor trebali bi biti potpisani s "<nowiki>~~~~</nowiki>" što će biti pretvoreno u Vaš potpis i datum.', 'badsig' => 'Kôd Vašeg potpisa nije valjan; provjerite HTML tagove.', 'badsiglength' => 'Vaš potpis je predugačak. Ne smije biti duži od $1 {{PLURAL:$1|znaka|znaka|znakova}}.', 'yourgender' => 'Spol:', 'gender-unknown' => 'Neodređeno', 'gender-male' => 'Muški', 'gender-female' => 'Ženski', 'prefs-help-gender' => 'Mogućnost: softver koristi za ispravno oslovljavanje razlikujući spol. Ovaj podatak bit će javan.', 'email' => 'Adresa elektroničke pošte *', 'prefs-help-realname' => 'Pravo ime nije obvezno. Ako ga navedete, bit će korišteno za pravnu atribuciju Vaših doprinosa.', 'prefs-help-email' => 'E-mail adresa nije obvezna, ali je potrebna za obnovu lozinke u slučaju da ju zaboravite.', 'prefs-help-email-others' => 'Također možete odabrati da vas ostali kontaktiraju preko vaše suradničke ili stranice za razgovor bez javnog otkrivanja vašeg identiteta.', 'prefs-help-email-required' => 'Potrebno je navesti adresu e-pošte (e-mail).', 'prefs-info' => 'Osnovni podaci', 'prefs-i18n' => 'Internacionalizacija', 'prefs-signature' => 'Potpis', 'prefs-dateformat' => 'Format datuma', 'prefs-timeoffset' => 'Vremensko poravnavanje', 'prefs-advancedediting' => 'Napredne opcije', 'prefs-advancedrc' => 'Napredne opcije', 'prefs-advancedrendering' => 'Napredne opcije', 'prefs-advancedsearchoptions' => 'Napredne opcije', 'prefs-advancedwatchlist' => 'Napredne opcije', 'prefs-displayrc' => 'Prikaži opcije', 'prefs-displaysearchoptions' => 'Opcije prikaza', 'prefs-displaywatchlist' => 'Opcije prikaza', 'prefs-diffs' => 'razl', # User preference: e-mail validation using jQuery 'email-address-validity-valid' => 'E-mail adresa se pokazuje ispravnom', 'email-address-validity-invalid' => 'Unesite valjanu e-mail adresu', # User rights 'userrights' => 'Upravljanje suradničkim pravima', 'userrights-lookup-user' => 'Upravljaj suradničkim skupinama', 'userrights-user-editname' => 'Unesite suradničko ime:', 'editusergroup' => 'Uredi suradničke skupine', 'editinguser' => "Promjena suradničkih prava za suradnika '''[[User:$1|$1]]''' ([[User talk:$1|{{int:talkpagelinktext}}]]{{int:pipe-separator}}[[Special:Contributions/$1|{{int:contribslink}}]])", 'userrights-editusergroup' => 'Uredi suradničke skupine', 'saveusergroups' => 'Snimi suradničke skupine', 'userrights-groupsmember' => 'Član:', 'userrights-groupsmember-auto' => 'Uključeni član:', 'userrights-groups-help' => 'Možete promijeniti skupine za ovog suradnika: * Označena kućica pokazuje skupinu kojoj suradnik pripada. * Neoznačena kućica pokazuje skupinu kojoj suradnik ne pripada. * Zvjezdica * označava skupinu koju ne možete ukloniti kad ju jednom dodate, ili obratno.', 'userrights-reason' => 'Razlog:', 'userrights-no-interwiki' => 'Nemate dopuštenje za uređivanje suradničkih prava na drugim wikijima.', 'userrights-nodatabase' => 'Baza podataka $1 ne postoji ili nije lokalno dostupna.', 'userrights-nologin' => 'Morate se [[Special:UserLogin|prijaviti]] s administratorskim računom da bi mogli dodijeliti suradnička prava.', 'userrights-notallowed' => 'Vaš trenutačni suradnički račun nema ovlasti mijenjanja suradničkih prava.', 'userrights-changeable-col' => 'Skupine koje možete promijeniti', 'userrights-unchangeable-col' => 'Skupine koje ne možete promijeniti', # Groups 'group' => 'Skupina:', 'group-user' => 'Suradnici', 'group-autoconfirmed' => 'Automatski potvrđeni suradnici', 'group-bot' => 'Botovi', 'group-sysop' => 'Administratori', 'group-bureaucrat' => 'Birokrati', 'group-suppress' => 'Nadzornici', 'group-all' => '(svi)', 'group-user-member' => 'Suradnik', 'group-autoconfirmed-member' => 'Automatski potvrđen suradnik', 'group-bot-member' => 'Bot', 'group-sysop-member' => 'Administrator', 'group-bureaucrat-member' => 'Birokrat', 'group-suppress-member' => 'Nadzornik', 'grouppage-user' => '{{ns:project}}:Suradnici', 'grouppage-autoconfirmed' => '{{ns:project}}:Automatski potvrđeni suradnici', 'grouppage-bot' => '{{ns:project}}:Botovi', 'grouppage-sysop' => '{{ns:project}}:Administratori', 'grouppage-bureaucrat' => '{{ns:project}}:Birokrati', 'grouppage-suppress' => '{{ns:project}}:Nadzor', # Rights 'right-read' => 'Čitanje stranica', 'right-edit' => 'Uređivanje stranica', 'right-createpage' => 'Stvaranje stranica (stranica koje nisu razgovor)', 'right-createtalk' => 'Stvaranje stranica za razgovor', 'right-createaccount' => 'Stvaranje novog suradničkog računa', 'right-minoredit' => 'Označavanje izmjene manjom', 'right-move' => 'Premještanje stranica', 'right-move-subpages' => 'Premještanje stranica s njihovim podstranicama', 'right-move-rootuserpages' => 'Premještanje osnovne stranice suradnika', 'right-movefile' => 'Premještanje datoteka', 'right-suppressredirect' => 'Ne raditi preusmjeravanje od starog imena prilikom premještanja stranice', 'right-upload' => 'Postavljanje datoteka', 'right-reupload' => 'Postavljanje nove inačice datoteke', 'right-reupload-own' => 'Postavljanje nove inačice vlastite datoteke', 'right-reupload-shared' => 'Lokalno postavljanje novih inačica datoteka na zajedničkom poslužitelju', 'right-upload_by_url' => 'Postavljanje datoteke s URL adrese', 'right-purge' => 'Čišćenje priručne memorije stranice bez stranice za potvrdu', 'right-autoconfirmed' => 'Uređivanje stranica zaštićenih za neprijavljene suradnike', 'right-bot' => 'Izmjene su tretirane kao automatski proces (bot)', 'right-nominornewtalk' => 'Bez manjih izmjena na novim stranicama za razgovor', 'right-apihighlimits' => 'Korištenje viših granica kod API upita', 'right-writeapi' => 'Mogućnost pisanja API', 'right-delete' => 'Brisanje stranica', 'right-bigdelete' => 'Brisanje stranica koje imaju veliku povijest', 'right-deleterevision' => 'Brisanje i vraćanje određene izmjene na stranici', 'right-deletedhistory' => 'Gledanje povijesti izmjena izbrisane stranice', 'right-deletedtext' => 'Pregled izbrisanog teksta i izmjena između izbrisanih izmjena', 'right-browsearchive' => 'Traženje obrisanih stranica', 'right-undelete' => 'Vraćanje stranica', 'right-suppressrevision' => 'Pregledavanje i vraćanje izmjena skrivenih od administratora', 'right-suppressionlog' => 'Gledanje privatnih evidencija', 'right-block' => 'Blokiranje suradnika u uređivanju', 'right-blockemail' => 'Blokiranje suradnika u slanju elektroničke pošte', 'right-hideuser' => 'Blokiranje suradničkog imena, skrivajući ga od javnosti', 'right-ipblock-exempt' => 'Imunitet na IP blokiranje, auto-blok i blokiranje opsega', 'right-proxyunbannable' => 'Imunitet na automatska blokiranja posrednika (proxya)', 'right-unblockself' => 'Odblokirati se', 'right-protect' => 'Mijenjanje razina zaštićivanja i uređivanje zaštićenih stranica', 'right-editprotected' => 'Uređivanje zaštićenih stranica (s prenosivom zaštitom)', 'right-editinterface' => 'Uređivanje suradničkog sučelja', 'right-editusercssjs' => 'Uređivanje CSS i JS stranica drugih suradnika', 'right-editusercss' => 'Uređivanje CSS stranica drugih suradnika', 'right-edituserjs' => 'Uređivanje JS stranica drugih suradnika', 'right-rollback' => 'Brzo uklanjanje izmjena zadnjeg suradnika na određenoj stranici', 'right-markbotedits' => 'Označavanje uklonjenih izmjena kao izmjenu bota', 'right-noratelimit' => 'Bez vremenskog ograničenja uređivanja', 'right-import' => 'Uvoženje stranica s drugih wikija', 'right-importupload' => 'Uvoženje stranica kao datoteke', 'right-patrol' => 'Označavanje izmjena pregledanim', 'right-autopatrol' => 'Izmjene su automatski označene kao pregledane', 'right-patrolmarks' => 'Vidljive oznake pregledavanja u nedavnim promjenama', 'right-unwatchedpages' => 'Vidljiv popis nepraćenih stranica', 'right-mergehistory' => 'Spajanje povijesti stranica', 'right-userrights' => 'Uređivanje svih suradničkih prava', 'right-userrights-interwiki' => 'Uređivanje suradničkih prava na drugim Wikijima', 'right-siteadmin' => 'Zaključavanje i otključavanje baze podataka', 'right-override-export-depth' => 'Izvezi stranice uključujući i povezane stranice do dubine od 5', 'right-sendemail' => 'Slanje e-maila drugim korisnicima', 'right-passwordreset' => 'Ponovno postavljanje lozinke za suradnika ([[Special:PasswordReset|posebna stranica]])', # User rights log 'rightslog' => 'Evidencija suradničkih prava', 'rightslogtext' => 'Ovo je evidencija promjena suradničkih prava.', 'rightslogentry' => 'promijenjena suradnička prava za $1 iz $2 u $3', 'rightslogentry-autopromote' => 'je automatski unaprijeđen s $2 na $3', 'rightsnone' => '(suradnik)', # Associated actions - in the sentence "You do not have permission to X" 'action-read' => 'čitanje ove stranice', 'action-edit' => 'uređivanje ove stranice', 'action-createpage' => 'stvaranje stranica', 'action-createtalk' => 'stvaranje stranica za razgovor', 'action-createaccount' => 'stvaranje ovog suradničkog računa', 'action-minoredit' => 'označavanje ove izmjene kao manju', 'action-move' => 'premještanje ove stranice', 'action-move-subpages' => 'premještanje ove stranice, i njenih podstranica', 'action-move-rootuserpages' => 'premještanje osnovne stranice suradnika', 'action-movefile' => 'premjesti ovu datoteku', 'action-upload' => 'postavljanje ove datoteke', 'action-reupload' => 'postavljanje nove inačice ove datoteke', 'action-reupload-shared' => 'postavljanje nove inačice ove datoteke na zajedničkom poslužitelju', 'action-upload_by_url' => 'postavljanje ove datoteke preko URL adrese', 'action-writeapi' => 'za korištenje pisanja API', 'action-delete' => 'brisanje ove stranice', 'action-deleterevision' => 'brisanje ove izmjene', 'action-deletedhistory' => 'gledanje obrisane povijesti ove stranice', 'action-browsearchive' => 'pretraživanje izbrisanih stranica', 'action-undelete' => 'vraćanje ove stranice', 'action-suppressrevision' => 'pregledavanje i vraćanje ove sakrivene izmjene', 'action-suppressionlog' => 'gledanje ove privatne evidencije', 'action-block' => 'blokiranje ovog suradnika', 'action-protect' => 'promjenu stupnja zaštite ove stranice', 'action-import' => 'uvoženje ove stranice s drugog wikija', 'action-importupload' => 'uvoženje ove stranice postavljanjem datoteke', 'action-patrol' => 'označavanje tuđih izmjena pregledanim', 'action-autopatrol' => 'automatsko označavanje pregledanim za svoje izmjene', 'action-unwatchedpages' => 'gledanje popisa stranica koje nisu praćene', 'action-mergehistory' => 'spajanje povijesti ove stranice', 'action-userrights' => 'uređivanje svih suradničkih prava', 'action-userrights-interwiki' => 'uređivanje suradničkih prava suradnika na drugim wikijima', 'action-siteadmin' => 'zaključavanje ili otključavanje baze podataka', # Recent changes 'nchanges' => '{{PLURAL:$1|$1 promjena|$1 promjene|$1 promjena}}', 'recentchanges' => 'Nedavne promjene', 'recentchanges-legend' => 'Izbornik nedavnih promjena', 'recentchangestext' => 'Na ovoj stranici možete pratiti nedavne promjene u wikiju.', 'recentchanges-feed-description' => 'Na ovoj stranici možete pratiti nedavne promjene u wikiju.', 'recentchanges-label-newpage' => 'Ova izmjena stvorila je novu stranicu', 'recentchanges-label-minor' => 'Ovo je manja izmjena', 'recentchanges-label-bot' => 'Ovu izmjenu napravio je bot', 'recentchanges-label-unpatrolled' => 'Ova izmjena još nije pregledana', 'rcnote' => "{{PLURAL:$1|Slijedi zadnja '''$1''' promjena|Slijede zadnje '''$1''' promjene|Slijedi zadnjih '''$1''' promjena}} u {{PLURAL:$2|zadnjem '''$2''' danu|zadnja '''$2''' dana|zadnjih '''$2''' dana}}, od $5, $4.", 'rcnotefrom' => 'Slijede promjene od <b>$2</b> (prikazano ih je do <b>$1</b>).', 'rclistfrom' => 'Prikaži nove promjene počevši od $1', 'rcshowhideminor' => '$1 manje promjene', 'rcshowhidebots' => '$1 botove', 'rcshowhideliu' => '$1 prijavljene suradnike', 'rcshowhideanons' => '$1 neprijavljene suradnike', 'rcshowhidepatr' => '$1 provjerene promjene', 'rcshowhidemine' => '$1 moje promjene', 'rclinks' => 'Prikaži zadnjih $1 promjena u zadnjih $2 dana; $3', 'diff' => 'razl', 'hist' => 'pov', 'hide' => 'sakrij', 'show' => 'prikaži', 'minoreditletter' => 'm', 'newpageletter' => 'N', 'boteditletter' => 'b', 'number_of_watching_users_pageview' => '[$1 {{PLURAL:$1|suradnik|suradnika|suradnika}} prati ovu stranicu]', 'rc_categories' => 'Ograniči na kategorije (odvojene znakom "|")', 'rc_categories_any' => 'Sve', 'newsectionsummary' => '/* $1 */ Novi odlomak', 'rc-enhanced-expand' => 'Pokaži detalje (potreban JavaScript)', 'rc-enhanced-hide' => 'Sakrij detalje', # Recent changes linked 'recentchangeslinked' => 'Povezane stranice', 'recentchangeslinked-feed' => 'Povezane stranice', 'recentchangeslinked-toolbox' => 'Povezane stranice', 'recentchangeslinked-title' => 'Povezane promjene sa "$1"', 'recentchangeslinked-noresult' => 'Nema promjena na povezanim stranicama u zadanom periodu.', 'recentchangeslinked-summary' => "Ova posebna stranica pokazuje nedavne promjene na povezanim stranicama (ili stranicama određene kategorije). Stranice koje su na [[Special:Watchlist|Vašem popisu praćenja]] su '''podebljane'''.", 'recentchangeslinked-page' => 'Naslov stranice:', 'recentchangeslinked-to' => 'Pokaži promjene na stranicama s poveznicom na ovu stranicu', # Upload 'upload' => 'Postavi datoteku', 'uploadbtn' => 'Postavi datoteku', 'reuploaddesc' => 'Vratite se u obrazac za postavljanje.', 'upload-tryagain' => 'Pošalji izmijenjeni opis datoteke', 'uploadnologin' => 'Niste prijavljeni', 'uploadnologintext' => 'Za postavljanje datoteka morate biti [[Special:UserLogin|prijavljeni]].', 'upload_directory_missing' => 'Mapa za datoteke ($1) nedostaje i webserver ju ne može napraviti.', 'upload_directory_read_only' => 'Server ne može pisati u direktorij za postavljanje ($1).', 'uploaderror' => 'Pogreška kod postavljanja', 'upload-recreate-warning' => "'''Upozorenje: datoteka s tim imenom je izbrisana ili premještena.''' Evidencije brisanja i premještanja prikazane su ovdje:", 'uploadtext' => "Ovaj obrazac služi za postavljanje datoteka. Za pregledavanje i pretraživanje već postavljenih datoteka vidi [[Special:FileList|popis postavljenih datoteka]], (ponovljena) postavljanja su također u [[Special:Log/upload|popisu postavljanja]], a brisanja u [[Special:Log/delete|popisu brisanja]]. Da biste na stranicu stavili datoteku, koristite poveznice tipa * '''<tt><nowiki>[[</nowiki>{{ns:file}}<nowiki>:Datoteka.jpg]]</nowiki></tt>''' za punu verziju datoteke * '''<tt><nowiki>[[</nowiki>{{ns:file}}<nowiki>:Datoteka.png|200px|mini|left|popratni tekst]]</nowiki></tt>''' za datoteku širine 200 px u okviru s 'popratnim tekstom' kao opisom * '''<tt><nowiki>[[</nowiki>{{ns:media}}<nowiki>:Datoteka.ogg]]</nowiki></tt>''' za direktno povezivanje na datoteku bez njenog prikazivanja", 'upload-permitted' => 'Dopušteni tipovi datoteka: $1.', 'upload-preferred' => 'Poželjni tipovi datoteka: $1.', 'upload-prohibited' => 'Zabranjeni tipovi datoteka: $1.', 'uploadlog' => 'evidencija postavljanja', 'uploadlogpage' => 'Evidencija_postavljanja', 'uploadlogpagetext' => 'Dolje je popis nedavno postavljenih slika.', 'filename' => 'Ime datoteke', 'filedesc' => 'Sažetak', 'fileuploadsummary' => 'Sažetak:', 'filereuploadsummary' => 'Izmjene datoteke:', 'filestatus' => 'Status autorskih prava:', 'filesource' => 'Izvor:', 'uploadedfiles' => 'Postavljene datoteke', 'ignorewarning' => 'Zanemari upozorenja i snimi datoteku.', 'ignorewarnings' => 'Zanemari sva upozorenja', 'minlength1' => 'Ime datoteke mora imati barem jedno slovo.', 'illegalfilename' => 'Ime datoteke "$1" sadrži znakove koji nisu dopušteni u imenima stranica. Preimenujte datoteku i ponovno je postavite.', 'badfilename' => 'Ime slike automatski je promijenjeno u "$1".', 'filetype-mime-mismatch' => 'Ekstenzija datoteke ".$1" ne odgovara MIME tipu datoteke ($2).', 'filetype-badmime' => 'Datoteke MIME tipa "$1" ne mogu se snimati.', 'filetype-bad-ie-mime' => 'Ne mogu postaviti ovu datoteku jer je Internet Explorer prepoznaje kao "$1", koji nije dopušten i potencijalno je opasan tip datoteke.', 'filetype-unwanted-type' => "'''\".\$1\"''' je neželjena vrsta datoteke. {{PLURAL:\$3|Preporučena vrsta je|Preporučene vrste su}} \$2.", 'filetype-banned-type' => '\'\'\'".$1"\'\'\' {{PLURAL:$4|je nedopušteni tip datoteke|su nedopušteni tipovi datoteke}}. Dopušteni {{PLURAL:$3|tip datoteke je|tipovi datoteke su}} $2.', 'filetype-missing' => 'Datoteka nema nastavak koji određuje tip (poput ".jpg").', 'empty-file' => 'Datoteka koju ste poslali je prazna.', 'file-too-large' => 'Datoteka koju ste poslali bila je prevelika.', 'filename-tooshort' => 'Ime datoteke je prekratko.', 'filetype-banned' => 'Ova vrsta datoteke je zabranjena.', 'verification-error' => 'Ova datoteka nije prošla provjeru datoteke.', 'hookaborted' => 'Izmjena koju ste pokušali napraviti prekinuta je od strane ekstenzije.', 'illegal-filename' => 'Ime datoteke nije dopušteno.', 'overwrite' => 'Postaviti preko postojeće datoteke nije dozvoljeno.', 'unknown-error' => 'Nepoznata pogreška.', 'tmp-create-error' => 'Ne mogu stvoriti privremenu datoteku.', 'tmp-write-error' => 'Pogreška prilikom pisanja privremene datoteke.', 'large-file' => 'Preporučljivo je da datoteke ne prelaze $1; Ova datoteka je $2.', 'largefileserver' => 'Veličina ove datoteke veća je od one dopuštene postavkama poslužitelja.', 'emptyfile' => 'Datoteka koju ste postavili je prazna. Možda se radi o krivo utipkanom imenu datoteke. Provjerite želite li zaista postaviti ovu datoteku.', 'windows-nonascii-filename' => 'Ovaj wiki ne podržava imena datoteka s posebnim znakovima.', 'fileexists' => "Datoteka s ovim imenom već postoji, pogledajte '''<tt>[[:$1]]</tt>''' ako niste sigurni želite li je uistinu promijeniti. [[$1|thumb]]", 'filepageexists' => "Opis stranice za ovu datoteku je već napravljen ovdje '''<tt>[[:$1]]</tt>''', ali datoteka sa ovim nazivom trenutno ne postoji. Sažetak koji ste naveli neće se pojaviti na stranici opisa. Da bi se Vaš opis ovdje našao, potrebno je da ga ručno uredite. [[$1|thumb]]", 'fileexists-extension' => "Već postoji datoteka sa sličnim imenom: [[$2|thumb]] * Ime datoteke koju postavljate: '''<tt>[[:$1]]</tt>''' * Ime postojeće datoteke: '''<tt>[[:$2]]</tt>''' Molimo da izaberete drugo ime.", 'fileexists-thumbnail-yes' => "Datoteka je najvjerojatnije slika u smanjenoj veličini ''(thumbnail)''. [[$1|thumb]] Molimo provjerite datoteku '''<tt>[[:$1]]</tt>'''. Ukoliko je ta datoteka ista kao i ova koju ste upravo pokušali snimiti, samo u višoj rezoluciji, nije nužno snimanje smanjenje slike ''(thumbnaila)'', prikazivanje smanjene slike iz izvornika radi se softverski.", 'file-thumbnail-no' => "Ime datoteke počinje s '''<tt>$1</tt>'''. Čini se da je to slika smanjene veličine ''(minijatura)''. Ukoliko imate ovu sliku u punoj razlučljivosti (rezoluciji) postavite tu sliku, u protivnom, molimo promijenite ime datoteke.", 'fileexists-forbidden' => 'Datoteka s ovim imenom već postoji i nemože biti presnimljena. Ako i dalje želite postaviti svoju datoteku, molimo vratite se i odaberite novo ime. [[File:$1|thumb|center|$1]]', 'fileexists-shared-forbidden' => 'Datoteka s ovim imenom već postoji u središnjem poslužitelju datoteka. Ako još uvijek želite postaviti svoju datoteku, idite nazad i postavite ju pod drugim imenom. [[File:$1|thumb|center|$1]]', 'file-exists-duplicate' => 'Ova datoteka je duplikat {{PLURAL:$1|sljedeće datoteke|sljedećih datoteka}}:', 'file-deleted-duplicate' => 'Datoteka istovjetna ovoj datoteci ([[:$1]]) prethodno je obrisana. Provjerite evidenciju brisanja za tu datoteke datoteku prije nego što nastavite s ponovnim postavljanjem.', 'uploadwarning' => 'Upozorenje kod postavljanja', 'uploadwarning-text' => 'Molimo izmijenite opis datoteke ispod i pokušajte kasnije.', 'savefile' => 'Sačuvaj datoteku', 'uploadedimage' => 'postavljeno "$1"', 'overwroteimage' => 'postavljena nova inačica od "[[$1]]"', 'uploaddisabled' => 'Postavljanje je onemogućeno', 'copyuploaddisabled' => 'Postavljanje URL-om onemogućeno.', 'uploadfromurl-queued' => 'Vaše postavljanje je na čekanju.', 'uploaddisabledtext' => 'Postavljanje datoteka je onemogućeno.', 'php-uploaddisabledtext' => 'Postavljanja datoteka su onemogućena u PHP-u. Molimo provjerite postavke za postavljanje datoteka.', 'uploadscripted' => 'Ova datoteka sadrži HTML ili skriptu, što može dovesti do grešaka u web pregledniku.', 'uploadvirus' => 'Datoteka sadrži virus! Podrobnije: $1', 'uploadjava' => 'Datoteka je ZIP koja sadrži Java .class datotoeku. Postavljanje Java datoteka nije dopušteno, jer mogu izazvati zaobilazak sigurnosnih ograničenja.', 'upload-source' => 'Izvorna datoteka', 'sourcefilename' => 'Ime datoteke na Vašem računalu:', 'sourceurl' => 'URL izvora:', 'destfilename' => 'Ime datoteke na wikiju:', 'upload-maxfilesize' => 'Maksimalna veličina datoteke: $1', 'upload-description' => 'Opis datoteke', 'upload-options' => 'Mogućnosti postavljanja', 'watchthisupload' => 'Prati ovu datoteku', 'filewasdeleted' => 'Datoteka istog imena već je bila postavljena, a kasnije i obrisana. Trebali bi provjeriti $1 prije nego što ponovno postavite datoteku.', 'filename-bad-prefix' => "Ime datoteke koju snimate počinje s '''\"\$1\"''', što je ime koje slikama tipično dodjeljuju digitalni fotoaparati. Molimo izaberite bolje ime (neko koje bolje opisuje sliku nego \$1).", 'upload-success-subj' => 'Postavljanje uspješno.', 'upload-success-msg' => 'Vaša datoteka iz [$2] je uspješno postavljena. Dostupna je ovdje: [[:{{ns:file}}:$1]]', 'upload-failure-subj' => 'Greška pri postavljanju', 'upload-failure-msg' => 'Došlo je do problema s Vašim postavljanjem datoteke [$2]: $1', 'upload-warning-subj' => 'Upozorenje kod postavljanja', 'upload-warning-msg' => 'Došlo je do problema s Vašim postavljanjem datoteke iz [$2]. Možete se vratiti u [[Special:Upload/stash/$1|obrazac za postavljanje]] i ispraviti problem.', 'upload-proto-error' => 'Protokol nije valjan', 'upload-proto-error-text' => 'Udaljeno snimanje zahtijeva URL-ove koji počinju sa <code>http://</code> ili <code>ftp://</code>.', 'upload-file-error' => 'Interna pogreška', 'upload-file-error-text' => 'Interna pogreška se dogodila pri pokušaju stvaranja privremene datoteke na poslužitelju. Molimo javite se [[Special:ListUsers/sysop|administratoru]].', 'upload-misc-error' => 'Nepoznata pogreška pri snimanju', 'upload-misc-error-text' => 'Dogodila se nepoznata pogrješka pri snimanju. Provjerite valjanost i dostupnost URL-a i pokušajte opet. Ako se problem ponovi, javite to [[Special:ListUsers/sysop|administratoru]].', 'upload-too-many-redirects' => 'URL je sadržavao previše preusmjeravanja', 'upload-unknown-size' => 'Nepoznata veličina', 'upload-http-error' => 'HTTP pogreška: $1', # ZipDirectoryReader 'zip-file-open-error' => 'Došlo je do pogreške pri otvaranju datoteke za ZIP provjeru.', 'zip-wrong-format' => 'Navedena datoteka nije ZIP datoteka.', 'zip-bad' => 'Datoteka je oštećena ili je na drugi način nečitljiva ZIP datoteka. Ne može biti ispravno sigurnosno označena.', 'zip-unsupported' => 'Datoteka je ZIP vrsta datoteka koji koristi ZIP značajke koje ne podržava MediaWiki. Ne može biti ispravno sigurnosno označena.', # Special:UploadStash 'uploadstash' => 'Snimi niz datoteka', 'uploadstash-summary' => 'Ova stranica pruža pristup datotekama koje su snimljene na wiki (ili u procesu snimanja), ali još nisu objavljeni na wiki. Ove datoteke nisu vidljive nikome, osim suradniku koji ih je snimio.', 'uploadstash-clear' => 'Očisti niz datoteka', 'uploadstash-nofiles' => 'Nemate neobjavljenih datoteka', 'uploadstash-badtoken' => 'Obavljanje akcije je bilo neuspješano, možda jer je vaša prijava istekla. Pokušajte ponovno.', 'uploadstash-errclear' => 'Brisanje neobjavljenih datoteka nije uspjelo.', 'uploadstash-refresh' => 'Osvježi popis datoteka', # img_auth script messages 'img-auth-accessdenied' => 'Pristup onemogućen', 'img-auth-nopathinfo' => 'Nedostaje PATH_INFO. Vaš poslužitelj nije postavljen da prosljeđuje ovu informaciju. Možda se temelji na CGI i ne može podržavati img_auth. Pogledajte http://www.mediawiki.org/wiki/Manual:Image_Authorization.', 'img-auth-notindir' => 'Zahtjevana putanja nije u direktoriju podešenom za postavljanje.', 'img-auth-badtitle' => 'Ne mogu stvoriti valjani naslov iz "$1".', 'img-auth-nologinnWL' => 'Niste prijavljeni i "$1" nije na popisu dozvoljenih.', 'img-auth-nofile' => 'Datoteka "$1" ne postoji.', 'img-auth-isdir' => 'Pokušavate pristupiti direktoriju "$1". Dozvoljen je samo pristup datotekama.', 'img-auth-streaming' => 'Tok "$1".', 'img-auth-public' => 'Funkcija img_auth.php služi za izlaz datoteka s privatnih wikija. Ovaj wiki je postavljena kao javni wiki. Za optimalnu sigurnost, img_auth.php je onemogućena.', 'img-auth-noread' => 'Suradnik nema pristup za čitanje "$1".', 'img-auth-bad-query-string' => 'URL ima nevažeći izraz upita.', # HTTP errors 'http-invalid-url' => 'Nevaljan URL: $1', 'http-invalid-scheme' => 'URL-ovi s prefiksom "$1" nisu podržani.', 'http-request-error' => 'HTTP zahtjev nije uspio zbog nepoznate pogreške.', 'http-read-error' => 'Greška pri čitanju HTTP.', 'http-timed-out' => 'HTTP zahtjev je istekao.', 'http-curl-error' => 'Greška pri otvaranju URL-a: $1', 'http-host-unreachable' => 'URL nije dostupan.', 'http-bad-status' => 'Došlo je do problema tijekom HTTP zahtjeva: $1 $2', # Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html> 'upload-curl-error6' => 'URL nije dostupan', 'upload-curl-error6-text' => 'Dani URL nije dostupan. Provjerite da li je URL ispravno upisan i da li su web stranice dostupne.', 'upload-curl-error28' => "Istek vremena snimanja (''timeout'')", 'upload-curl-error28-text' => 'Poslužitelj ne odgovara na upit. Provjerite jesu li web stranice dostupne, pričekajte i pokušajte ponovo. Možete pokušati kasnije, kad bude manja gužva.', 'license' => 'Licencija:', 'license-header' => 'Licencija', 'nolicense' => 'Ništa nije odabrano', 'license-nopreview' => '(Prikaz nije moguć)', 'upload_source_url' => ' (valjani, javno dostupni URL)', 'upload_source_file' => '(datoteka na Vašem računalu)', # Special:ListFiles 'listfiles-summary' => 'Ova posebna stranica pokazuje sve postavljene datoteke. Kad je filtriran po korisniku, popis prikazuje samo one datoteke čiju posljednju inačicu je postavio taj korisnik.', 'listfiles_search_for' => 'Traži ime slike:', 'imgfile' => 'datoteka', 'listfiles' => 'Popis slika', 'listfiles_thumb' => 'Smanjeni pregled', 'listfiles_date' => 'Datum', 'listfiles_name' => 'Naziv slike', 'listfiles_user' => 'Suradnik', 'listfiles_size' => 'Veličina (u bajtovima)', 'listfiles_description' => 'Opis', 'listfiles_count' => 'Inačice', # File description page 'file-anchor-link' => 'Slika', 'filehist' => 'Povijest datoteke', 'filehist-help' => 'Kliknite na datum/vrijeme kako biste vidjeli datoteku kakva je tada bila.', 'filehist-deleteall' => 'izbriši sve', 'filehist-deleteone' => 'izbriši', 'filehist-revert' => 'vrati', 'filehist-current' => 'sadašnja', 'filehist-datetime' => 'Datum/Vrijeme', 'filehist-thumb' => 'Minijatura', 'filehist-thumbtext' => 'Minijatura za inačicu od $1', 'filehist-nothumb' => 'Nema minijature', 'filehist-user' => 'Suradnik', 'filehist-dimensions' => 'Dimenzije', 'filehist-filesize' => 'Veličina datoteke', 'filehist-comment' => 'Komentar', 'filehist-missing' => 'Nedostaje datoteka', 'imagelinks' => 'Poveznice datoteke', 'linkstoimage' => '{{PLURAL:$1|Sljedeća stranica povezuje|$1 sljedećih stranice povezuju}} na ovu datoteku:', 'linkstoimage-more' => 'Više od $1 {{PLURAL:$1|stranice povezuje|stranica povezuje}} na ovu datoteku. Slijedeći popis prikazuje {{PLURAL:$1|stranice koje|prvih $1 stranica koje}} vode na ovu datoteku. [[Special:WhatLinksHere/$2|Ovdje se nalazi]] potpuni popis.', 'nolinkstoimage' => 'Nijedna stranica ne povezuje na ovu sliku.', 'morelinkstoimage' => 'Pogledaj [[Special:WhatLinksHere/$1|više poveznica]] za ovu datoteku.', 'linkstoimage-redirect' => '$1 (preusmjeravanje datoteke) $2', 'duplicatesoffile' => '{{PLURAL:$1|Sljedeća datoteka je kopija|$1 sljedeće datoteke su kopije|$1 sljedećih datoteka su kopije}} ove datoteke ([[Special:FileDuplicateSearch/$2|više detalja]]):', 'sharedupload' => 'Ova je datoteka postavljena na $1 i mogu je koristiti ostali projekti.', 'sharedupload-desc-there' => 'Ova datoteka je s $1 i mogu je koristiti drugi projekti. Pogledajte [$2 stranicu s opisom datoteke] za dodatne informacije.', 'sharedupload-desc-here' => 'Ova datoteka je sa $1 i mogu je koristiti drugi projekti. Opis s njezine [$2 stranice s opisom datoteke] prikazan je ispod.', 'filepage-nofile' => 'Ne postoji datoteka s ovim imenom.', 'filepage-nofile-link' => 'Ne postoji datoteka s ovim imenom, ali možete je [$1 postaviti].', 'uploadnewversion-linktext' => 'Postavi novu inačicu datoteke', 'shared-repo-from' => 's projekta $1', 'shared-repo' => 'zajednički poslužitelj', # File reversion 'filerevert' => 'Ukloni ← $1', 'filerevert-legend' => 'Vrati datoteku', 'filerevert-intro' => "Vraćate '''[[Media:$1|$1]]''' na [$4 promjenu od $3, $2].", 'filerevert-comment' => 'Razlog:', 'filerevert-defaultcomment' => 'Vraćeno na inačicu od $2, $1', 'filerevert-submit' => 'Vrati', 'filerevert-success' => "'''[[Media:$1|$1]]''' je vraćena na [$4 promjenu od $3, $2].", 'filerevert-badversion' => 'Nema prethodne lokalne inačice datoteke s zadanim datumom i vremenom.', # File deletion 'filedelete' => 'Izbriši $1', 'filedelete-legend' => 'Izbriši datoteku', 'filedelete-intro' => "Brišete datoteku '''[[Media:$1|$1]]''' uključujući i sve njezine stare izmjene.", 'filedelete-intro-old' => "Brišete inačicu '''[[Media:$1|$1]]''' od [$4 $3, $2].", 'filedelete-comment' => 'Razlog:', 'filedelete-submit' => 'Izbriši', 'filedelete-success' => "Datoteka '''$1''' je izbrisana.", 'filedelete-success-old' => "Inačica datoteke '''[[Media:$1|$1]]''' od $3, $2 je obrisana.", 'filedelete-nofile' => "'''$1''' ne postoji.", 'filedelete-nofile-old' => "Nema arhivirane verzije datoteke '''$1''' s zadanim parametrima.", 'filedelete-otherreason' => 'Drugi/dodatni razlog:', 'filedelete-reason-otherlist' => 'Drugi razlog', 'filedelete-reason-dropdown' => '*Česti razlozi brisanja ** Kršenje autorskih prava ** Dupla datoteka ** Nekorištena datoteka', 'filedelete-edit-reasonlist' => 'Uredi razloge za brisanje', 'filedelete-maintenance' => 'Brisanje i vraćanje datoteka privremeno je onemogućeno zbog održavanja.', # MIME search 'mimesearch' => 'MIME tražilica', 'mimesearch-summary' => 'Ova stranica omogućuje pretraživanje datoteka prema njihovim MIME zaglavljima. Ulazni parametar: tip_datoteke/podtip, npr. <tt>image/jpeg</tt>.', 'mimetype' => 'MIME tip datoteke:', 'download' => 'skidanje', # Unwatched pages 'unwatchedpages' => 'Nepraćene stranice', # List redirects 'listredirects' => 'Popis preusmjeravanja', # Unused templates 'unusedtemplates' => 'Nekorišteni predlošci', 'unusedtemplatestext' => 'Slijedi popis svih stranica imenskog prostora {{ns:template}}, koje nisu umetnute na drugim stranicama. Pripazite da prije brisanja provjerite druge poveznice koje vode na te predloške.', 'unusedtemplateswlh' => 'druge poveznice', # Random page 'randompage' => 'Slučajna stranica', 'randompage-nopages' => 'Nema stranica u {{PLURAL:$2|imenskom prostoru|imenskim prostorima}}: $1.', # Random redirect 'randomredirect' => 'Slučajno preusmjeravanje', 'randomredirect-nopages' => 'Nema preusmjeravanja u imenskom prostoru "$1".', # Statistics 'statistics' => 'Statistika', 'statistics-header-pages' => 'Statistika stranica', 'statistics-header-edits' => 'Statistika uređivanja', 'statistics-header-views' => 'Statistika posjećivanja', 'statistics-header-users' => 'Statistika suradnika', 'statistics-header-hooks' => 'Ostale statistike', 'statistics-articles' => 'Stranice sa sadržajem', 'statistics-pages' => 'Stranice', 'statistics-pages-desc' => 'Sve stranice na wikiju, uključujući stranice za razgovor, preusmjeravanja i dr.', 'statistics-files' => 'Postavljene datoteke', 'statistics-edits' => 'Broj uređivanja od nastanka projekta {{SITENAME}}', 'statistics-edits-average' => 'Prosječan broj uređivanja po stranici', 'statistics-views-total' => 'Posjeta ukupno', 'statistics-views-total-desc' => 'Posjeti nepostojećim i posebnim stranicama nisu uključeni', 'statistics-views-peredit' => 'Posjeta po uređivanju', 'statistics-users' => 'Prijavljeni [[Special:ListUsers|suradnici]]', 'statistics-users-active' => 'Aktivni suradnici', 'statistics-users-active-desc' => 'Suradnici koji su napravili neku od radnji u posljednjih {{PLURAL:$1|dan|$1 dana}}', 'statistics-mostpopular' => 'Najposjećenije stranice', 'disambiguations' => 'Razdvojbene stranice', 'disambiguationspage' => 'Template:Razdvojba', 'disambiguations-text' => "Sljedeće stranice povezuju na '''razdvojbenu stranicu'''. Umjesto toga bi trebale povezivati na prikladnu temu.<br /> Stranica se tretira kao razdvojbena stranica ako koristi predložak na kojega vodi [[MediaWiki:Disambiguationspage]]", 'doubleredirects' => 'Dvostruka preusmjeravanja', 'doubleredirectstext' => 'Ova stranica sadrži popis stranica koje preusmjeravju na druge stranice za preusmjeravanje. Svaki redak sadrži poveznice na prvo i drugo preusmjeravanje, kao i odredište drugog preusmjeravanja koja obično ukazuje na "pravu" odredišnu stranicu, na koju bi trebalo pokazivati prvo preusmjeravanje. <del>Precrtane</del> stavke su riješene.', 'double-redirect-fixed-move' => '[[$1]] je premješten, sada je preusmjeravanje na [[$2]]', 'double-redirect-fixed-maintenance' => 'Ispravljanje dvostrukih preusmjeravanja s [[$1]] na [[$2]].', 'double-redirect-fixer' => 'Popravljač preusmjeravanja', 'brokenredirects' => 'Kriva preusmjeravanja', 'brokenredirectstext' => 'Sljedeća preusmjeravanja povezuju na nepostojeće stranice:', 'brokenredirects-edit' => 'uredi', 'brokenredirects-delete' => 'izbriši', 'withoutinterwiki' => 'Stranice bez međuwiki poveznica', 'withoutinterwiki-summary' => 'Sljedeće stranice nemaju poveznice na projekte na drugim jezicima:', 'withoutinterwiki-legend' => 'Prefiks', 'withoutinterwiki-submit' => 'Prikaži', 'fewestrevisions' => 'Članci s najmanje izmjena', # Miscellaneous special pages 'nbytes' => '$1 {{PLURAL:$1|bajt|bajta|bajtova}}', 'ncategories' => '$1 {{PLURAL:$1|kategorija|kategorije|kategorija}}', 'nlinks' => '$1 {{PLURAL:$1|poveznica|poveznice|poveznica}}', 'nmembers' => '$1 {{PLURAL:$1|član|članova}}', 'nrevisions' => '$1 {{PLURAL:$1|inačica|inačice|inačica}}', 'nviews' => '$1 {{PLURAL:$1|put pogledano|puta pogledano|puta pogledano}}', 'nimagelinks' => 'Koristi se na $1 {{PLURAL:$1|stranici|stranice|stranica}}', 'ntransclusions' => 'koristi se na $1 {{PLURAL:$1|stranici|stranice|stranica}}', 'specialpage-empty' => 'Nema rezultata za traženi izvještaj.', 'lonelypages' => 'Stranice siročad', 'lonelypagestext' => 'Sljedeće stranice nemaju poveznicu na druge stranice niti su uključene transkluzijom u druge stranice projekta {{SITENAME}}.', 'uncategorizedpages' => 'Nekategorizirane stranice', 'uncategorizedcategories' => 'Nekategorizirane kategorije', 'uncategorizedimages' => 'Nekategorizirane datoteke', 'uncategorizedtemplates' => 'Nekategorizirani predlošci', 'unusedcategories' => 'Nekorištene kategorije', 'unusedimages' => 'Nekorištene slike', 'popularpages' => 'Popularne stranice', 'wantedcategories' => 'Tražene kategorije', 'wantedpages' => 'Tražene stranice', 'wantedpages-badtitle' => 'Nevaljani naslov kao rezultat: $1', 'wantedfiles' => 'Tražene datoteke', 'wantedtemplates' => 'Traženi predlošci', 'mostlinked' => 'Stranice na koje vodi najviše poveznica', 'mostlinkedcategories' => 'Kategorije na koje vodi najviše poveznica', 'mostlinkedtemplates' => 'Predlošci na koje vodi najviše poveznica', 'mostcategories' => 'Popis članaka po broju kategorija', 'mostimages' => 'Slike na koje vodi najviše poveznica', 'mostrevisions' => 'Popis članaka po broju uređivanja', 'prefixindex' => 'Sve stranice prema početku naslova', 'shortpages' => 'Kratke stranice', 'longpages' => 'Duge stranice', 'deadendpages' => 'Slijepe ulice', 'deadendpagestext' => 'Slijedeće stranice nemaju poveznice na druge stranice na ovom wikiju ({{SITENAME}}).', 'protectedpages' => 'Zaštićene stranice', 'protectedpages-indef' => 'Samo neograničene zaštite', 'protectedpages-cascade' => 'Samo prenosiva zaštita', 'protectedpagestext' => 'Slijedeće stranice su zaštićene od premještanja ili uređivanja', 'protectedpagesempty' => 'Nema zaštićenih stranica koje ispunjavaju uvjete koje ste postavili.', 'protectedtitles' => 'Zaštićeni naslovi', 'protectedtitlestext' => 'Sljedeći naslovi su zaštićeni od kreiranja', 'protectedtitlesempty' => 'Nijedan naslov nije trenutačno zaštićen s tim parametrima.', 'listusers' => 'Popis suradnika', 'listusers-editsonly' => 'Pokaži samo suradnike s uređivanjem', 'listusers-creationsort' => 'Razvrstaj po datumu stvaranja', 'usereditcount' => '$1 {{PLURAL:$1|uređivanje|uređivanja|uređivanja}}', 'usercreated' => 'Otvoren $1 u $2', 'newpages' => 'Nove stranice', 'newpages-username' => 'Suradničko ime:', 'ancientpages' => 'Najstarije stranice', 'move' => 'Premjesti', 'movethispage' => 'Premjesti ovu stranicu', 'unusedimagestext' => 'Sljedeće datoteke postoje, ali nisu uključene ni u jednu stranicu. Molimo obratite pozornost da druge web stranice mogu povezivati sliku izravnim URL-om, i tako mogu još uvijek biti prikazani ovdje unatoč činjenici da više nisu u aktivnoj uporabi.', 'unusedcategoriestext' => 'Na navedenim stranicama kategorija nema ni jednog članka ili potkategorije.', 'notargettitle' => 'Nema odredišta', 'notargettext' => 'Niste naveli ciljnu stranicu ili suradnika za izvršavanje ove funkcije.', 'nopagetitle' => 'Nema ciljane stranice', 'nopagetext' => 'Ciljana stranica koju ste odabrali ne postoji.', 'pager-newer-n' => '{{PLURAL:$1|novija $1|novije $1|novijih $1}}', 'pager-older-n' => '{{PLURAL:$1|starija $1|starije $1|starijih $1}}', 'suppress' => 'Nadzor', 'querypage-disabled' => 'Ova posebna stranica onemogućena je jer bi usporila funkcioniranje projekta.', # Book sources 'booksources' => 'Pretraživanje po ISBN-u', 'booksources-search-legend' => 'Traženje izvora za knjigu', 'booksources-go' => 'Kreni', 'booksources-text' => 'Ovdje je popis vanjskih poveznica na internetskim stranicama koje prodaju nove i rabljene knjige, ali mogu sadržavati i ostale podatke o knjigama koje tražite:', 'booksources-invalid-isbn' => 'Čini se da dani ISBN nije valjan; provjerite greške kopirajući iz izvornika.', # Special:Log 'specialloguserlabel' => 'Suradnik:', 'speciallogtitlelabel' => 'Naslov:', 'log' => 'Evidencije', 'all-logs-page' => 'Sve javne evidencije', 'alllogstext' => 'Skupni prikaz svih dostupnih evidencija za {{SITENAME}}. Možete suziti prikaz odabirući tip evidencije, suradničko ime ili stranicu u upitu.', 'logempty' => 'Nema pronađenih stavki.', 'log-title-wildcard' => 'Traži stranice koje počinju s navedenim izrazom', # Special:AllPages 'allpages' => 'Sve stranice', 'alphaindexline' => '$1 do $2', 'nextpage' => 'Sljedeća stranica ($1)', 'prevpage' => 'Prethodna stranica ($1)', 'allpagesfrom' => 'Pokaži stranice počevši od:', 'allpagesto' => 'Pokaži stranice koje završavaju na:', 'allarticles' => 'Svi članci', 'allinnamespace' => 'Svi članci (prostor $1)', 'allnotinnamespace' => 'Sve stranice koje nisu u prostoru $1', 'allpagesprev' => 'Prijašnje', 'allpagesnext' => 'Sljedeće', 'allpagessubmit' => 'Kreni', 'allpagesprefix' => 'Stranice čiji naslov počinje s:', 'allpagesbadtitle' => 'Zadana stranica nije valjana, ili je imala međuwiki predmetak. Možda sadrži jedan ili više znakova koji ne mogu biti uporabljeni u nazivu stranice.', 'allpages-bad-ns' => '{{SITENAME}} nema imenski prostor "$1".', # Special:Categories 'categories' => 'Kategorije', 'categoriespagetext' => 'Sljedeće {{PLURAL:$1|kategorija sadrži|kategorije sadrže}} stranice ili datoteke. [[Special:UnusedCategories|Nekorištene kategorije]] ovdje nisu prikazane. Također pogledajte [[Special:WantedCategories|tražene kategorije]].', 'categoriesfrom' => 'Prikaži kategorije počevši od:', 'special-categories-sort-count' => 'razvrstavanje po broju', 'special-categories-sort-abc' => 'abecedno razvrstavanje', # Special:DeletedContributions 'deletedcontributions' => 'Obrisani suradnički doprinosi', 'deletedcontributions-title' => 'Obrisani suradnički doprinosi', 'sp-deletedcontributions-contribs' => 'doprinosi', # Special:LinkSearch 'linksearch' => 'Vanjske poveznice', 'linksearch-pat' => 'Uzorak traženja:', 'linksearch-ns' => 'Imenski prostor:', 'linksearch-ok' => 'Traži', 'linksearch-text' => 'Možete koristiti džoker znakove poput "*.wikipedia.org".<br />Podržani su protokoli: <tt>$1</tt>', 'linksearch-line' => '$1 poveznica s članka $2', 'linksearch-error' => 'Džoker znakovi se mogu rabiti samo na početku imena poslužitelja.', # Special:ListUsers 'listusersfrom' => 'Prikaži suradnike počevši od:', 'listusers-submit' => 'Prikaži', 'listusers-noresult' => 'Nema takvih suradnika.', 'listusers-blocked' => '(blokiran)', # Special:ActiveUsers 'activeusers' => 'Popis aktivnih suradnika', 'activeusers-intro' => 'Ovo je popis suradnika koji su napravili neku aktivnost u {{PLURAL:$1|zadnji $1 dan|zadnja $1 dana|zadnjih $1 dana}}.', 'activeusers-count' => '{{PLURAL:$1|nedavna $1 izmjena|nedavne $1 izmjene|nedavnih $1 izmjena}} u {{PLURAL:$3|posljednji $3 dan|posljednja $3 dana|posljednjih $3 dana}}', 'activeusers-from' => 'Prikaži suradnike počevši od:', 'activeusers-hidebots' => 'Sakrij botove', 'activeusers-hidesysops' => 'Sakrij administratore', 'activeusers-noresult' => 'Niti jedan suradnik nije nađen.', # Special:Log/newusers 'newuserlogpage' => 'Evidencija novih suradnika', 'newuserlogpagetext' => 'Ispod je popis nedavno otvorenih suradničkih imena.', # Special:ListGroupRights 'listgrouprights' => 'Prava suradničkih skupina', 'listgrouprights-summary' => 'Ovo je popis suradničkih skupina određenih na ovoj wiki, s njihovim pripadajućim pravima. Dodatne informacije o pojedinim pravim se mogu pronaći [[{{MediaWiki:Listgrouprights-helppage}}|ovdje]].', 'listgrouprights-key' => '* <span class="listgrouprights-granted">Dodijeljeno pravo</span> * <span class="listgrouprights-revoked">Ukinuto pravo</span>', 'listgrouprights-group' => 'Skupina', 'listgrouprights-rights' => 'Prava', 'listgrouprights-helppage' => 'Help:Suradničke skupine', 'listgrouprights-members' => '(popis članova)', 'listgrouprights-addgroup' => 'Moguće dodati {{PLURAL:$2|skupinu|skupine}}: $1', 'listgrouprights-removegroup' => 'Moguće ukloniti {{PLURAL:$2|skupinu|skupine}}: $1', 'listgrouprights-addgroup-all' => 'Moguće dodati sve skupine', 'listgrouprights-removegroup-all' => 'Moguće ukloniti sve skupine', 'listgrouprights-addgroup-self' => 'Dodaj {{PLURAL:$2|skupinu|skupine}} vlastitom računu: $1', 'listgrouprights-removegroup-self' => 'Ukloni {{PLURAL:$2|skupinu|skupine}} iz vlastitog računa: $1', 'listgrouprights-addgroup-self-all' => 'Dodaj sve skupine vlastitom računu', 'listgrouprights-removegroup-self-all' => 'Uklonite sve skupine iz vlastitog računa', # E-mail user 'mailnologin' => 'Nema adrese pošiljaoca', 'mailnologintext' => 'Morate biti [[Special:UserLogin|prijavljeni]] i imati valjanu adresu e-pošte u svojim [[Special:Preferences|postavkama]] da bi mogli slati poštu drugim suradnicima.', 'emailuser' => 'Pošalji e-poštu ovom suradniku', 'emailpage' => 'Pošalji e-poštu suradniku', 'emailpagetext' => 'Možete koristiti ovaj obrazac za slanje elektroničke pošte ovom suradniku. E-mail adresa iz Vaših [[Special:Preferences|postavki]] nalazit će se u "From" polju poruke i primatelj će Vam moći izravno odgovoriti.', 'usermailererror' => 'Sustav pošte javio je pogrešku:', 'defemailsubject' => '{{SITENAME}} e-mail od suradnika "$1"', 'usermaildisabled' => 'Suradnička e-pošta je onemogućena', 'usermaildisabledtext' => 'Ne možete slati e-poštu drugim suradnicima na ovom wikiju', 'noemailtitle' => 'Nema adrese primaoca', 'noemailtext' => 'Ovaj suradnik nije odredio valjanu e-mail adresu.', 'nowikiemailtitle' => 'E-mail nije dozvoljen', 'nowikiemailtext' => 'Ovaj suradnik je odlučio ne primati e-mail od drugih suradnika.', 'emailnotarget' => 'Nepostojeće ili nevažeće suradničko ime za primatelja.', 'emailtarget' => 'Unesite suradničko ime primatelja', 'emailusername' => 'Suradničko ime:', 'emailusernamesubmit' => 'Pošalji', 'email-legend' => 'Pošalji elektroničku poštu drugom suradniku projekta {{SITENAME}}', 'emailfrom' => 'Od:', 'emailto' => 'Za:', 'emailsubject' => 'Tema:', 'emailmessage' => 'Poruka:', 'emailsend' => 'Pošalji', 'emailccme' => 'Pošalji mi e-mailom kopiju moje poruke.', 'emailccsubject' => 'Kopija Vaše poruke suradniku $1: $2', 'emailsent' => 'E-mail poslan', 'emailsenttext' => 'Vaša poruka je poslana.', 'emailuserfooter' => 'Ovaj e-mail je poslan od $1 za $2 korištenjem "elektroničke pošte" s projekta {{SITENAME}}.', # User Messenger 'usermessage-summary' => 'Ostavljanje poruke sustava.', 'usermessage-editor' => 'Uređivač sistemskih poruka', # Watchlist 'watchlist' => 'Moj popis praćenja', 'mywatchlist' => 'Moj popis praćenja', 'watchlistfor2' => 'Za $1 $2', 'nowatchlist' => 'Na Vašem popisu praćenja nema nijednog članka.', 'watchlistanontext' => 'Molimo Vas $1 kako biste mogli vidjeti ili uređivati Vaš popis praćenih stranica.', 'watchnologin' => 'Niste prijavljeni', 'watchnologintext' => 'Morate biti [[Special:UserLogin|prijavljeni]] za promjene u popisu praćenja.', 'addwatch' => 'Dodaj u popis praćenja', 'addedwatchtext' => "Stranica \"[[:\$1]]\" je dodana na Vaš [[Special:Watchlist|popis praćenja]]. Promjene na toj stranici i njenoj stranici za razgovor bit će prikazane na popisu praćenja, a stranica će biti ispisana '''podebljano''' u [[Special:RecentChanges|popisu nedavnih promjena]] kako biste je lakše primijetili. Ako poželite ukloniti stranicu s popisa praćenja, pritisnite \"Prekini praćenje\" u traci s naredbama.", 'removewatch' => 'Ukloni s popisa praćenja', 'removedwatchtext' => 'Stranica "[[:$1]]" je uklonjena s [[Special:Watchlist|Vašeg popisa praćenja]].', 'watch' => 'Prati', 'watchthispage' => 'Prati ovu stranicu', 'unwatch' => 'Prekini praćenje', 'unwatchthispage' => 'Prekini praćenje', 'notanarticle' => 'Nije članak', 'notvisiblerev' => 'Izmjena je obrisana', 'watchnochange' => 'Niti jedna od praćenih stranica nije promijenjena od Vašeg zadnjeg posjeta.', 'watchlist-details' => '{{PLURAL:$1|$1 stranica|$1 stranice|$1 stranica}} se nalazi na popisu praćenja, ne brojeći stranice za razgovor.', 'wlheader-enotif' => '* Uključeno je izvješćivanje e-mailom.', 'wlheader-showupdated' => "* Stranice koje su promijenjene od Vašeg zadnjeg posjeta prikazane su '''podebljano'''", 'watchmethod-recent' => 'provjera nedavnih promjena praćenih stranica', 'watchmethod-list' => 'provjera praćanih stranica za nedavne promjene', 'watchlistcontains' => 'Vaš popis praćenja sadrži $1 {{PLURAL:$1|stranicu|stranice|stranica}}.', 'iteminvalidname' => "Problem s izborom '$1', ime nije valjano...", 'wlnote' => "Ovdje {{PLURAL:$1|je posljednja $1 promjena|su posljednje $1 promjene|je posljednjih $1 promjena}} u {{PLURAL:$2|posljednjem '''$2''' satu|posljednja '''$2''' sata|posljednjih '''$2''' sati}}.", 'wlshowlast' => 'Prikaži zadnjih $1 sati $2 dana $3', 'watchlist-options' => 'Izbornik popisa praćenja', # Displayed when you click the "watch" button and it is in the process of watching 'watching' => 'Pratim...', 'unwatching' => 'Prestajem pratiti...', 'watcherrortext' => 'Došlo je do pogreške kod izmjene Vašeg popisa praćenja za "$1".', 'enotif_mailer' => '{{SITENAME}} - izvješća o promjenama', 'enotif_reset' => 'Označi sve stranice kao već posjećene', 'enotif_newpagetext' => 'Ovo je nova stranica.', 'enotif_impersonal_salutation' => '{{SITENAME}} suradnik', 'changed' => 'promijenio', 'created' => 'stvorio', 'enotif_subject' => '{{SITENAME}}: Stranicu $PAGETITLE je $CHANGEDORCREATED suradnik $PAGEEDITOR', 'enotif_lastvisited' => 'Pogledaj $1 za promjene od zadnjeg posjeta.', 'enotif_lastdiff' => 'Pogledajte $1 kako biste mogli vidjeti tu izmjenu.', 'enotif_anon_editor' => 'neprijavljeni suradnik $1', 'enotif_body' => 'Poštovani $WATCHINGUSERNAME, stranicu na projektu {{SITENAME}} s naslovom $PAGETITLE je dana $PAGEEDITDATE $CHANGEDORCREATED suradnik $PAGEEDITOR, pogledajte $PAGETITLE_URL za trenutačnu inačicu. $NEWPAGE Sažetak urednika: $PAGESUMMARY $PAGEMINOREDIT Možete se javiti uredniku: mail: $PAGEEDITOR_EMAIL wiki: $PAGEEDITOR_WIKI Do Vašeg ponovnog posjeta stranici nećete dobivati daljnje obavijesti. Postavke za izvješćivanje možete resetirati za sve praćene stranice svog popisa praćenja. Vaš sustav izvješćivanja {{SITENAME}}. -- Za promjene svog popisa praćenja, posjetite {{canonicalurl:{{#special:EditWatchlist}}}} Za brisanje stranica iz svog popisa praćenja, posjetite $UNWATCHURL Za povratne informacije i pomoć posjetite: {{canonicalurl:{{MediaWiki:Helppage}}}}', # Delete 'deletepage' => 'Izbriši stranicu', 'confirm' => 'Potvrdi', 'excontent' => "sadržaj je bio: '$1'", 'excontentauthor' => "sadržaj je bio: '$1' (a jedini urednik '$2')", 'exbeforeblank' => "sadržaj prije brisanja je bio: '$1'", 'exblank' => 'stranica je bila prazna', 'delete-confirm' => 'Obriši "$1"', 'delete-legend' => 'Izbriši', 'historywarning' => "'''Upozorenje''': Stranica koju želite obrisati ima starije izmjene s približno $1 {{PLURAL:$1|inačicom|inačice|inačica}}:", 'confirmdeletetext' => 'Zauvijek ćete izbrisati stranicu ili sliku zajedno s prijašnjim inačicama. Molim potvrdite svoju namjeru, da razumijete posljedice i da ovo radite u skladu s [[{{MediaWiki:Policy-url}}|pravilima]].', 'actioncomplete' => 'Zahvat završen', 'actionfailed' => 'Radnja nije uspjela', 'deletedtext' => '"$1" je izbrisana. Vidi $2 za evidenciju nedavnih brisanja.', 'dellogpage' => 'Evidencija_brisanja', 'dellogpagetext' => 'Dolje je popis nedavnih brisanja. Sva vremena su prema poslužiteljevom vremenu.', 'deletionlog' => 'evidencija brisanja', 'reverted' => 'Vraćeno na prijašnju inačicu', 'deletecomment' => 'Razlog:', 'deleteotherreason' => 'Drugi/dodatni razlog:', 'deletereasonotherlist' => 'Drugi razlog', 'deletereason-dropdown' => '*Razlozi brisanja stranica ** Zahtjev autora ** Kršenje autorskih prava ** Vandalizam', 'delete-edit-reasonlist' => 'Uredi razloge brisanja', 'delete-toobig' => 'Ova stranica ima veliku povijest uređivanja, preko $1 {{PLURAL:$1|promjene|promjena}}. Brisanje takvih stranica je ograničeno da se onemoguće slučajni problemi u radu {{SITENAME}}.', 'delete-warning-toobig' => 'Ova stranica ima veliku povijest uređivanja, preko $1 {{PLURAL:$1|promjene|promjena}}. Brisanje može poremetiti bazu podataka {{SITENAME}}; postupajte s oprezom.', # Rollback 'rollback' => 'Ukloni posljednju promjenu', 'rollback_short' => 'Ukloni', 'rollbacklink' => 'ukloni', 'rollbackfailed' => 'Uklanjanje neuspješno', 'cantrollback' => 'Ne mogu ukloniti posljednju promjenu, postoji samo jedna promjena.', 'alreadyrolled' => 'Ne mogu ukloniti posljednju promjenu članka [[:$1]] koju je napravio [[User:$2|$2]] ([[User talk:$2|Razgovor]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]); netko je već promijenio stranicu ili uklonio promjenu. Posljednju promjenu napravio je [[User:$3|$3]] ([[User talk:$3|Razgovor]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).', 'editcomment' => "Sažetak promjene je bio: \"''\$1''\".", 'revertpage' => 'Uklonjena promjena suradnika $2, vraćeno na zadnju inačicu suradnika $1', 'revertpage-nouser' => 'Vraćene izmjene suradnika (suradničko ime uklonjeno) na posljednju inačicu suradnika [[User:$1|$1]]', 'rollback-success' => 'Uklonjeno uređivanje suradnika $1; vraćeno na zadnju inačicu suradnika $2.', # Edit tokens 'sessionfailure-title' => 'Prekid sesije', 'sessionfailure' => 'Uočili smo problem s Vašom prijavom. Zadnja naredba nije izvršena kako bi se izbjegla zloupotreba. Molimo Vas da se u pregledniku vratite natrag na prethodnu stranicu, ponovno je učitate i zatim pokušate opet.', # Protect 'protectlogpage' => 'Evidencija zaštićivanja', 'protectlogtext' => 'Ispod je evidencija zaštićivanja i uklanjanja zaštite pojedinih stranica. Pogledajte [[Special:ProtectedPages|zaštićene stranice]] za popis trenutačno zaštićenih stranica.', 'protectedarticle' => 'članak "[[$1]]" je zaštićen', 'modifiedarticleprotection' => 'promijenjen stupanj zaštite za "[[$1]]"', 'unprotectedarticle' => 'uklonjena zaštita članka "[[$1]]"', 'movedarticleprotection' => 'premještene postavke zaštite s "[[$2]]" na "[[$1]]"', 'protect-title' => 'Zaštićujem "$1"', 'prot_1movedto2' => '$1 premješteno na $2', 'protect-legend' => 'Potvrda zaštite', 'protectcomment' => 'Razlog:', 'protectexpiry' => 'Trajanje zaštite:', 'protect_expiry_invalid' => 'Upisani vremenski rok nije valjan.', 'protect_expiry_old' => 'Vrijeme isteka je u prošlosti.', 'protect-unchain-permissions' => 'Otključaj daljnje mogućnosti zaštićivanja', 'protect-text' => "Ovdje možete pregledati i promijeniti razinu zaštite za stranicu '''$1'''.", 'protect-locked-blocked' => "Ne možete mijenjati nivo zaštite dok ste blokirani. Slijede postavke stranice '''$1''':", 'protect-locked-dblock' => "Razina zaštite ne može biti promijenjena jer je baza zaključana. Slijede postavke stranice '''$1''':", 'protect-locked-access' => "Nemate ovlasti za mijenjanje razine zaštite. Slijede trenutačne postavke stranice '''$1''':", 'protect-cascadeon' => 'Ova stranica je zaštićena jer je uključena u {{PLURAL:$1|stranicu, koja ima|stranice, koje imaju|stranice, koje imaju}} uključenu prenosivu zaštitu. Možete promijeniti stupanj zaštite ove stranice, no to neće utjecati na prenosivu zaštitu.', 'protect-default' => 'Omogući svim suradnicima', 'protect-fallback' => 'Potrebno je imati "$1" ovlasti', 'protect-level-autoconfirmed' => 'Blokiraj nove i neprijavljene suradnike', 'protect-level-sysop' => 'Samo administratori', 'protect-summary-cascade' => 'prenosiva zaštita', 'protect-expiring' => 'istječe $1 (UTC)', 'protect-expiry-indefinite' => 'neograničeno', 'protect-cascade' => 'Prenosiva zaštita - zaštiti sve stranice koje su uključene u ovu.', 'protect-cantedit' => 'Ne možete mijenjati razinu zaštite ove stranice, jer nemate prava uređivati ju.', 'protect-othertime' => 'Drugo vrijeme:', 'protect-othertime-op' => 'drugo vrijeme', 'protect-existing-expiry' => 'Postojeće vrijeme zaštite: $3, $2', 'protect-otherreason' => 'Drugi/dodatni razlog:', 'protect-otherreason-op' => 'drugi/dodatni razlog', 'protect-dropdown' => '*Najčešći razlozi zaštićivanja ** Učestalo vandaliziranje ** Učestalo spamiranje ** Neproduktivni uređivački rat ** Zatrpavanje nedavnih promjena', 'protect-edit-reasonlist' => 'Uredi razloge zaštićivanja', 'protect-expiry-options' => '1 sat:1 hour,1 dan:1 day,1 tjedan:1 week,2 tjedna:2 weeks,1 mjesec:1 month,3 mjeseca:3 months,6 mjeseci:6 months,1 godina:1 year,neograničeno:infinite', 'restriction-type' => 'Dopuštenje:', 'restriction-level' => 'Stupanj ograničenja:', 'minimum-size' => 'Najmanja veličina', 'maximum-size' => 'Najveća veličina:', 'pagesize' => '(bajtova)', # Restrictions (nouns) 'restriction-edit' => 'Uređivanje', 'restriction-move' => 'Premještanje', 'restriction-create' => 'Stvori', 'restriction-upload' => 'Postavi', # Restriction levels 'restriction-level-sysop' => 'samo administratori', 'restriction-level-autoconfirmed' => 'samo prijavljeni suradnici', 'restriction-level-all' => 'sve razine', # Undelete 'undelete' => 'Vrati izbrisanu stranicu', 'undeletepage' => 'Vidi i/ili vrati izbrisane stranice', 'undeletepagetitle' => "'''Sljedeći sadržaj se sastoji od izbrisanih izmjena [[:$1]]'''.", 'viewdeletedpage' => 'Pogledaj izbrisanu stranicu', 'undeletepagetext' => '{{PLURAL:$1|Sljedeća stranica je obrisana, ali se još uvijek nalazi|Sljedećih $1 stranica su obrisane, ali se još uvijek nalaze}} u bazi i mogu se obnoviti. Baza se povremeno čisti od ovakvih stranica.', 'undelete-fieldset-title' => 'Vrati izmjene', 'undeleteextrahelp' => "Da biste vratili cijelu stranicu, ostavite sve ''kućice'' neoznačene i kliknite '''Vrati!'''. Ako želite vratiti određene izmjene, označite ih i kliknite '''Vrati!'''. Klik na gumb '''Očisti''' će odznačiti sve ''kućice'' i obrisati polje za komentar.", 'undeleterevisions' => '$1 {{PLURAL:$1|inačica je arhivirana|inačice su arhivirane|inačica je arhivirano}}', 'undeletehistory' => 'Ako vratite izbrisanu stranicu, bit će vraćene i sve prijašnje promjene. Ako je u međuvremenu stvorena nova stranica s istim imenom, vraćena stranica bit će upisana kao prijašnja promjena sadašnje.', 'undeleterevdel' => 'Vraćanje stranice neće biti izvršeno ako je rezultat toga djelomično brisanje zadnjeg uređivanja. U takvim slučajevima morate isključiti ili otkriti najnovije obrisane promjene.', 'undeletehistorynoadmin' => 'Ovaj je članak izbrisan. Razlog za brisanje prikazan je u donjem sažetku, zajedno s detaljima o suradnicima koji su uređivali ovu stranicu prije brisanja. Tekst izbrisanih inačica dostupan je samo administratorima.', 'undelete-revision' => 'Izbrisana inačica članka $1 (od $4, $5) izbrisao $3:', 'undeleterevision-missing' => 'Nevaljana ili nepostojeća promjena. Poveznica je nevaljana, ili je promjena vraćena ili uklonjena iz arhive.', 'undelete-nodiff' => 'Prethodne promjene nisu nađene.', 'undeletebtn' => 'Vrati!', 'undeletelink' => 'vidi/vrati', 'undeleteviewlink' => 'pregled', 'undeletereset' => 'Očisti', 'undeleteinvert' => 'Obrni odabir', 'undeletecomment' => 'Razlog:', 'undeletedrevisions' => '{{PLURAL:$1|$1 inačica vraćena|$1 inačice vraćene|$1 inačica vraćeno}}', 'undeletedrevisions-files' => '{{PLURAL:$1|$1 promjena|$1 promjene|$1 promjena}} i {{PLURAL:$2|$2 datoteka vraćena|$2 datototeke vraćene|$2 datoteka vraćeno}}', 'undeletedfiles' => '{{PLURAL:$1|$1 datoteka vraćena|$1 datoteke vraćene|$1 datoteka vraćeno}}', 'cannotundelete' => 'Vraćanje obrisane inačice nije uspjelo; netko drugi je stranicu već vratio.', 'undeletedpage' => "'''$1 je vraćena''' Pogledajte [[Special:Log/delete|evidenciju brisanja]] za zapise nedavnih brisanja i vraćanja.", 'undelete-header' => 'Pogledaj [[Special:Log/delete|evidenciju brisanja]] za nedavno obrisane stranice.', 'undelete-search-title' => 'Pretraži obrisane stranice', 'undelete-search-box' => 'Pretraži obrisane stranice', 'undelete-search-prefix' => 'Pretraži stranice koje počinju s:', 'undelete-search-submit' => 'Pretraži', 'undelete-no-results' => 'Nije pronađena odgovarajuća stranica u arhivu brisanja.', 'undelete-filename-mismatch' => "Ne mogu vratiti inačicu datoteke s vremenom i datumom $1: imena se ne slažu (''filename mismatch'')", 'undelete-bad-store-key' => 'Ne mogu vratiti inačicu datoteke s vremenom i datumom $1: datoteka ne postoji (obrisana je) prije Vašeg pokušaja brisanja.', 'undelete-cleanup-error' => 'Pogreška pri brisanju nekorištene arhivske datoteke "$1".', 'undelete-missing-filearchive' => 'Vraćanje arhivske datoteke s oznakom $1 nije moguće jer ne postoji u bazi podataka. Moguće je već vraćena.', 'undelete-error-short' => 'Pogreška pri vraćanju datoteke: $1', 'undelete-error-long' => 'Dogodila se pogreška pri vraćanju datoteke: $1', 'undelete-show-file-confirm' => 'Jeste li sigurni da želite vidjeti izbrisanu inačicu datoteke "<nowiki>$1</nowiki>" od $2 u $3?', 'undelete-show-file-submit' => 'Da', # Namespace form on various pages 'namespace' => 'Imenski prostor:', 'invert' => 'Sve osim odabranog', 'namespace_association' => 'Povezani imenski prostor', 'blanknamespace' => '(Glavni)', # Contributions 'contributions' => 'Doprinosi suradnika', 'contributions-title' => 'Suradnički doprinosi za $1', 'mycontris' => 'Moji doprinosi', 'contribsub2' => 'Za $1 ($2)', 'nocontribs' => 'Nema promjena koje udovoljavaju ovim kriterijima.', 'uctop' => ' (vrh)', 'month' => 'Od mjeseca (i ranije):', 'year' => 'Od godine (i ranije):', 'sp-contributions-newbies' => 'Prikaži samo doprinose novih suradnika', 'sp-contributions-newbies-sub' => 'Za nove suradnike', 'sp-contributions-newbies-title' => 'Doprinosi novih suradnika', 'sp-contributions-blocklog' => 'Evidencija blokiranja', 'sp-contributions-deleted' => 'obrisani suradnički doprinosi', 'sp-contributions-uploads' => 'postavljene datoteke', 'sp-contributions-logs' => 'evidencije', 'sp-contributions-talk' => 'razgovor', 'sp-contributions-userrights' => 'upravljanje suradničkim pravima', 'sp-contributions-blocked-notice' => 'Ovaj suradnik je trenutačno blokiran. Posljednja stavka evidencije blokiranja navedena je niže kao napomena:', 'sp-contributions-blocked-notice-anon' => 'Ova IP adresa je trenutačno blokirana. Posljednja stavka evidencije blokiranja navedena je niže kao napomena:', 'sp-contributions-search' => 'Pretraži doprinose', 'sp-contributions-username' => 'IP adresa ili suradnik:', 'sp-contributions-toponly' => 'Prikaži samo najnovije izmjene', 'sp-contributions-submit' => 'Traži', # What links here 'whatlinkshere' => 'Što vodi ovamo', 'whatlinkshere-title' => 'Stranice koje vode na "$1"', 'whatlinkshere-page' => 'Stranica:', 'linkshere' => 'Sljedeće stranice povezuju ovamo ([[:$1]]):', 'nolinkshere' => 'Nijedna stranica ne vodi ovamo (tj. nema poveznica na stranicu [[:$1]]).', 'nolinkshere-ns' => "Nijedna stranica ne vodi na '''[[:$1]]''' u odabranom imenskom prostoru.", 'isredirect' => 'stranica za preusmjeravanje', 'istemplate' => 'kao predložak', 'isimage' => 'poveznica slike', 'whatlinkshere-prev' => '{{PLURAL:$1|prethodna|prethodne|prethodnih}} $1', 'whatlinkshere-next' => '{{PLURAL:$1|slijedeća|slijedeće|slijedećih}} $1', 'whatlinkshere-links' => '← poveznice', 'whatlinkshere-hideredirs' => '$1 preusmjeravanja', 'whatlinkshere-hidetrans' => '$1 transkluzije', 'whatlinkshere-hidelinks' => '$1 poveznice', 'whatlinkshere-hideimages' => '$1 poveznice slike', 'whatlinkshere-filters' => 'Filteri', # Block/unblock 'autoblockid' => 'Automatsko blokiranje #$1', 'block' => 'Blokiraj suradnika', 'unblock' => 'Deblokiraj suradnika', 'blockip' => 'Blokiraj suradnika', 'blockip-title' => 'Blokiraj suradnika', 'blockip-legend' => 'Blokiraj suradnika', 'blockiptext' => 'Koristite donji obrazac za blokiranje pisanja pojedinih suradnika ili IP adresa . To biste trebali raditi samo zbog sprječavanja vandalizma i u skladu sa [[{{MediaWiki:Policy-url}}|smjernicama]]. Upišite i razlog za ovo blokiranje (npr. stranice koje su vandalizirane).', 'ipadressorusername' => 'IP adresa ili suradničko ime', 'ipbexpiry' => 'Rok (na engleskom)', 'ipbreason' => 'Razlog:', 'ipbreasonotherlist' => 'Drugi razlog', 'ipbreason-dropdown' => "*Najčešći razlozi za blokiranje ** Netočne informacije ** Uklanjanje sadržaja stranica ** Postavljanje ''spam'' vanjskih poveznica ** Grafiti ** Osobni napadi (ili napadačko ponašanje) ** Čarapare (zloporaba više suradničkih računa) ** Neprihvatljivo suradničko ime", 'ipb-hardblock' => 'Onemogući prijavljene suradnike uređivati s ove IP adrese', 'ipbcreateaccount' => 'Spriječi otvaranje suradničkih računa', 'ipbemailban' => 'Onemogući blokiranom suradniku slanje e-mailova', 'ipbenableautoblock' => 'Automatski blokiraj IP adrese koje koristi ovaj suradnik', 'ipbsubmit' => 'Blokiraj ovog suradnika', 'ipbother' => 'Neki drugi rok (na engleskom, npr. 6 days):', 'ipboptions' => '2 sata:2 hours,1 dan:1 day,3 dana:3 days,1 tjedan:1 week,2 tjedna:2 weeks,1 mjesec:1 month,3 mjeseca:3 months,6 mjeseci:6 months,1 godine:1 year,neograničeno:infinite', 'ipbotheroption' => 'drugo', 'ipbotherreason' => 'Drugi/dodatni razlog:', 'ipbhidename' => 'Sakrij suradničko ime iz uređivanja i popisa', 'ipbwatchuser' => 'Prati suradničku stranicu i stranicu za razgovor ovog suradnika', 'ipb-disableusertalk' => 'Onemogući ovog suradnika da uređuje svoju stranicu za razgovor dok je blokiran', 'ipb-change-block' => 'Ponovno blokiraj suradnika s ovim postavkama', 'ipb-confirm' => 'Potvrdi blokiranje', 'badipaddress' => 'Nevaljana IP adresa.', 'blockipsuccesssub' => 'Uspješno blokirano', 'blockipsuccesstext' => 'Suradnik [[Special:Contributions/$1|$1]] je blokiran.<br /> Pogledaj [[Special:IPBlockList|popis blokiranih IP adresa]] za pregled.', 'ipb-blockingself' => 'Blokirat ćete se! Jeste li sigurni da to želite?', 'ipb-confirmhideuser' => 'Upravo ćete blokirati suradnika koji ima mogućnost "sakrij suradnika" omogućenu. To će sakriti suradničko ime na svim popisima i evidencijama. Jeste li sigurni da želite to učiniti?', 'ipb-edit-dropdown' => 'Uredi razloge blokiranja', 'ipb-unblock-addr' => 'Odblokiraj $1', 'ipb-unblock' => 'Odblokiraj suradničko ime ili IP adresu', 'ipb-blocklist' => 'Vidi postojeća blokiranja', 'ipb-blocklist-contribs' => 'Doprinosi za $1', 'unblockip' => 'Deblokiraj suradnika', 'unblockiptext' => 'Ovaj se obrazac koristi za vraćanje prava na pisanje prethodno blokiranoj IP adresi.', 'ipusubmit' => 'Ukloni ovaj blok', 'unblocked' => '[[User:$1|$1]] je deblokiran', 'unblocked-range' => '$1 je deblokiran', 'unblocked-id' => 'Blok $1 je uklonjen', 'blocklist' => 'Blokirani suradnici', 'ipblocklist' => 'Blokirani suradnici', 'ipblocklist-legend' => 'Pronađi blokiranog suradnika', 'blocklist-userblocks' => 'Sakrij blokiranja računa', 'blocklist-tempblocks' => 'Sakrij privremena blokiranja', 'blocklist-addressblocks' => 'Sakrij pojedinačna IP blokiranja', 'blocklist-timestamp' => 'Vremenska oznaka', 'blocklist-target' => 'Cilj', 'blocklist-expiry' => 'Istječe', 'blocklist-by' => 'Administrator koji je blokirao', 'blocklist-params' => 'Parametri blokiranja', 'blocklist-reason' => 'Razlog', 'ipblocklist-submit' => 'Traži', 'ipblocklist-localblock' => 'Lokalno blokiranje', 'ipblocklist-otherblocks' => '{{PLURAL:$1|Ostalo blokiranje|Ostala blokiranja}}', 'infiniteblock' => 'neograničeno', 'expiringblock' => 'istječe $1 u $2', 'anononlyblock' => 'samo IP adrese', 'noautoblockblock' => 'blokiranje samoga sebe je onemogućeno', 'createaccountblock' => 'blokirano stvaranje suradničkog računa', 'emailblock' => 'e-mail je blokiran', 'blocklist-nousertalk' => 'bez uređivanja vlastite stranice za razgovor', 'ipblocklist-empty' => 'Popis blokiranja je prazan.', 'ipblocklist-no-results' => 'Tražena IP adresa ili suradničko ime nije blokirano.', 'blocklink' => 'blokiraj', 'unblocklink' => 'deblokiraj', 'change-blocklink' => 'promijeni blokiranje', 'contribslink' => 'doprinosi', 'emaillink' => 'pošalji e-mail', 'autoblocker' => 'Automatski ste blokirani jer je Vašu IP adresu nedavno koristio "[[User:$1|$1]]" koji je blokiran zbog: "$2".', 'blocklogpage' => 'Evidencija blokiranja', 'blocklog-showlog' => 'Ovaj suradnik je ranije blokiran. Evidencija blokiranja je prikazan ispod kao napomena:', 'blocklog-showsuppresslog' => 'Ovaj suradnik je ranije blokiran i skriven. Zapisnik skrivanja je prikazan ispod kao napomena:', 'blocklogentry' => 'Blokiran je "[[$1]]" na rok $2 $3', 'reblock-logentry' => 'promijenjene postavke blokiranja za [[$1]] na rok od $2 $3', 'blocklogtext' => 'Ovo je evidencija blokiranja i deblokiranja. Na popisu nema automatski blokiranih IP adresa. Za popis trenutačnih zabrana i blokiranja vidi [[Special:BlockList|popis IP blokiranja]].', 'unblocklogentry' => 'Deblokiran "$1"', 'block-log-flags-anononly' => 'samo za neprijavljene suradnike', 'block-log-flags-nocreate' => 'otvaranje novih suradničkih imena nije moguće', 'block-log-flags-noautoblock' => 'autoblok je onemogućen', 'block-log-flags-noemail' => 'e-mail je blokiran', 'block-log-flags-nousertalk' => 'bez uređivanja vlastite stranice za razgovor', 'block-log-flags-angry-autoblock' => 'Poboljšan autoblok uključen', 'block-log-flags-hiddenname' => 'suradničko ime skriveno', 'range_block_disabled' => 'Isključena je administratorska naredba za blokiranje raspona IP adresa.', 'ipb_expiry_invalid' => 'Vremenski rok nije valjan.', 'ipb_expiry_temp' => 'Sakriveni računi bi trebali biti trajno blokirani.', 'ipb_hide_invalid' => 'Ne može se sakriti ovaj račun, možda ima previše uređivanja.', 'ipb_already_blocked' => '"$1" je već blokiran', 'ipb-needreblock' => '$1 je već blokiran. Želite promijeniti postavke blokiranja?', 'ipb-otherblocks-header' => '{{PLURAL:$1|Ostalo blokiranje|Ostala blokiranja}}', 'unblock-hideuser' => 'Ne možete deblokirati ovog suradnika, jer je njegovo suradničko ime skriveno.', 'ipb_cant_unblock' => 'Pogreška: blok ID $1 nije nađen. Moguće je da je suradnik već odblokiran.', 'ipb_blocked_as_range' => 'Pogreška: IP adresa $1 nije blokirana direktno te stoga ne može biti odblokirana. Blokirana je kao dio opsega $2, koji može biti odblokiran.', 'ip_range_invalid' => 'Raspon IP adresa nije valjan.', 'ip_range_toolarge' => 'Opsezi blokiranja veći od /$1 nisu dozvoljeni.', 'blockme' => 'Blokiraj me', 'proxyblocker' => 'Zaštita od otvorenih posrednika (proxyja)', 'proxyblocker-disabled' => 'Ova funkcija je onemogućena.', 'proxyblockreason' => 'Vaša je IP adresa blokirana jer se radi o otvorenom posredniku (proxyju). Molimo stupite u vezu s Vašim davateljem internetskih usluga (ISP-om) ili službom tehničke podrške i obavijestite ih o ovom ozbiljnom sigurnosnom problemu.', 'proxyblocksuccess' => 'Napravljeno.', 'sorbsreason' => 'Vaša IP adresa je na popisu otvorenih posrednika na poslužitelju DNSBL.', 'sorbs_create_account_reason' => 'Vaša IP adresa je na popisu otvorenih posrednika na poslužitelju DNSBL. Ne možete otvoriti račun.', 'cant-block-while-blocked' => 'Ne možete blokirati druge suradnike dok ste blokirani.', 'cant-see-hidden-user' => 'Korisnik kojeg pokušavate blokirati je već blokiran i sakriven. Pošto nemate prava hideuser (sakrivanje korisnika), ne možete vidjeti ni urediti korisnikovu blokadu.', 'ipbblocked' => 'Ne možete blokirati ili odblokirati druge suradnike, jer ste blokirani', 'ipbnounblockself' => 'Nije Vam dopušteno odblokirati se', # Developer tools 'lockdb' => 'Zaključaj bazu podataka', 'unlockdb' => 'Otključaj bazu podataka', 'lockdbtext' => 'Zaključavanjem baze će se suradnicima onemogućiti uređivanje stranica, mijenjanje postavki i popisa praćenja, i sve drugo što zahtijeva promjene u bazi podataka. Molim potvrdite svoju namjeru zaključavanja, te da ćete otključati bazu čim završite s održavanjem.', 'unlockdbtext' => 'Otključavanjem baze omogućit ćete suradnicima uređivanje stranica, mijenjanje postavki, uređivanje popisa praćenja i druge stvari koje zahtijevaju promjene u bazi. Molim potvrdite svoju namjeru.', 'lockconfirm' => 'Da, sigurno želim zaključati bazu.', 'unlockconfirm' => 'Da, sigurno želim otključati bazu.', 'lockbtn' => 'Zaključaj bazu podataka', 'unlockbtn' => 'Otključaj bazu podataka', 'locknoconfirm' => 'Niste potvrdili svoje namjere.', 'lockdbsuccesssub' => 'Zaključavanje baze podataka uspjelo', 'unlockdbsuccesssub' => 'Otključavanje baze podataka uspjelo', 'lockdbsuccesstext' => 'Baza podataka je zaključana. <br />Ne zaboravite otključati po završetku održavanja.', 'unlockdbsuccesstext' => 'Baza podataka je otključana.', 'lockfilenotwritable' => "Web poslužitelj ne može pisati u ''lock'' datoteku. Za zaključavanje ili otključavanje baze podataka, web poslužitelj mora moći pisati u ovu datoteku.", 'databasenotlocked' => 'Baza podataka nije zaključana.', # Move page 'move-page' => 'Premjesti $1', 'move-page-legend' => 'Premjesti stranicu', 'movepagetext' => "Korištenjem ovog obrasca ćete preimenovati stranicu i premjestiti sve stare izmjene na novo ime. Stari će se naslov pretvoriti u stranicu koja automatski preusmjerava na novi naslov. Možete odabrati automatsko ažuriranje preusmjeravanja na originalni naslov. Ako se ne odlučite na to, provjerite [[Special:DoubleRedirects|dvostruka]] ili [[Special:BrokenRedirects|neispravna preusmjeravanja]]. Dužni ste provjeriti da sve poveznice i dalje nastave voditi na prave stranice. Stranica se '''neće''' premjestiti ako već postoji stranica s novim naslovom, osim u slučaju prazne stranice ili stranice za preusmjeravanje koja nema nikakvih starih izmjena. To znači: 1. ako pogriješite, možete opet preimenovati stranicu na stari naslov, 2. ne može se dogoditi da izbrišete neku postojeću stranicu. '''Upozorenje!''' Ovo može biti drastična i neočekivana promjena kad su u pitanju popularne stranice. Molimo dobro razmislite prije nego što preimenujete stranicu.", 'movepagetext-noredirectfixer' => "Pomoću donjeg obrasca ćete preimenovati stranicu i premjestiti sve stare izmjene na novo ime. Stari će se naslov pretvoriti u stranicu koja automatski preusmjerava na novi naslov. Budite sigurni da ste provjerili [[Special:DoubleRedirects|dvostruka]] ili [[Special:BrokenRedirects|nevaljana preusmjeravanja]]. Vi ste odgovorni za to da poveznice i dalje povezuju tamo gdje treba. Imajte na umu da stranica '''neće''' biti premještena ako već postoji stranica s novim naslovom, osim u slučaju prazne stranice ili stranice za preusmjeravanje koja nema nikakvih starih izmjena. To znači da stranicu možete preimenovati u prethodno ime ukoliko ste pogriješili te ne možete pisati preko postojeće stranice. '''Upozorenje!''' Ovo može biti drastična i neočekivana promjena kad su u pitanju popularne stranice; budite sigurni da razumijete posljedice ove akcije prije nastavka.", 'movepagetalktext' => "Stranica za razgovor, ako postoji, automatski će se premjestiti zajedno sa stranicom koju premještate. '''Stranica za razgovor neće se premjestiti ako:''' *premještate stranicu iz jednog prostora u drugi, *pod novim imenom već postoji stranica za razgovor s nekim sadržajem, ili *maknete kvačicu u kućici na dnu ove stranice. U tim slučajevima ćete morati sami premjestiti ili iskopirati stranicu za razgovor, ako to želite.", 'movearticle' => 'Premjesti stranicu', 'moveuserpage-warning' => "'''Upozorenje:''' Premještate suradničku stranicu. Imajte na umu da će stranica biti premještena, ali suradnik ''neće'' biti preimenovan.", 'movenologin' => 'Niste prijavljeni', 'movenologintext' => 'Ako želite premjestiti stranicu morate biti [[Special:UserLogin|prijavljeni]].', 'movenotallowed' => 'Nemate pravo premještanja stranica.', 'movenotallowedfile' => 'Nemate ovlasti za premještanje datoteka.', 'cant-move-user-page' => 'Nemate dopuštenja za premještanje root suradničkih stranica.', 'cant-move-to-user-page' => 'Nemate dopuštenje za premještanje stranice na suradničku stranicu (osim kao podstranicu)', 'newtitle' => 'Na novi naslov', 'move-watch' => 'Prati ovu stranicu', 'movepagebtn' => 'Premjesti stranicu', 'pagemovedsub' => 'Premještanje uspjelo', 'movepage-moved' => '\'\'\'"$1" je premješteno na "$2"\'\'\'', 'movepage-moved-redirect' => 'Napravljeno je preusmjeravanje.', 'movepage-moved-noredirect' => 'Stvaranje preusmjeravanja je izostavljeno.', 'articleexists' => 'Stranica pod tim imenom već postoji ili ime koje ste odabrali nije u skladu s pravilima. Molimo odaberite drugo ime.', 'cantmove-titleprotected' => 'Ne možete premjestiti ovu stranicu na ovo mjesto, jer je novi naslov zaštićen od kreiranja', 'talkexists' => "'''Sama stranica je uspješno prenesena, ali stranicu za razgovor nije bilo moguće prenijeti jer na odredištu već postoji stranica za razgovor. Molimo da ih ručno spojite.'''", 'movedto' => 'premješteno na', 'movetalk' => 'Premjesti i njezinu stranicu za razgovor ako je moguće.', 'move-subpages' => 'Premjesti podstranice (na $1)', 'move-talk-subpages' => 'Premjesti podstranice od stranice za razgovor (na $1)', 'movepage-page-exists' => 'Stranica $1 već postoji i ne može biti automatski prepisana', 'movepage-page-moved' => 'Stranica $1 je premještena na $2.', 'movepage-page-unmoved' => 'Stranica $1 nije mogla biti premještena na $2.', 'movepage-max-pages' => 'Najveća količina od $1 {{PLURAL:$1|stranice|stranica}} je premještena i više od toga neće biti automatski premješteno.', 'movelogpage' => 'Evidencija premještanja', 'movelogpagetext' => 'Ispod je popis premještenih stranica.', 'movesubpage' => '{{PLURAL:$1|Podstranica|Podstranice}}', 'movesubpagetext' => 'Ova stranica ima $1 {{PLURAL:$1|podstarnicu|podstranice}} koje su prikazane ispod.', 'movenosubpage' => 'Ova stranica nema podstranica.', 'movereason' => 'Razlog:', 'revertmove' => 'vrati', 'delete_and_move' => 'Izbriši i premjesti', 'delete_and_move_text' => '==Nužno brisanje== Odredišni članak "[[:$1]]" već postoji. Želite li ga obrisati da biste napravili mjesto za premještaj?', 'delete_and_move_confirm' => 'Da, izbriši stranicu', 'delete_and_move_reason' => 'Obrisano kako bi se napravilo mjesta za premještaj.', 'selfmove' => 'Izvorni i odredišni naslov su isti; ne mogu premjestiti stranicu na nju samu.', 'immobile-source-namespace' => 'Ne mogu premjestiti stranice u imenski prostor "$1"', 'immobile-target-namespace' => 'Ne mogu premjestiti stranice u imenski prostor "$1"', 'immobile-target-namespace-iw' => 'Međuwiki poveznica nije valjano odredište za premještanje stranice.', 'immobile-source-page' => 'Ova stranica je se ne može premjestiti.', 'immobile-target-page' => 'Ne mogu premjestiti na željeni naslov.', 'imagenocrossnamespace' => 'Datoteka ne može biti premještena u imenski prostor koji nije za datoteke', 'nonfile-cannot-move-to-file' => 'Ne mogu premjestiti nešto što nije datoteka u imenski prostor za datoteke', 'imagetypemismatch' => 'Ekstenzija nove datoteke se ne poklapa sa svojim tipom.', 'imageinvalidfilename' => 'Ciljano ime datoteke je nevaljano', 'fix-double-redirects' => 'Ažuriraj sva preusmjeravanja koja vode na originalni naslov', 'move-leave-redirect' => 'Ostavi preusmjeravanje', 'protectedpagemovewarning' => "'''Upozorenje:''' Ova je stranica zaključana tako da je mogu premjestiti samo suradnici s administratorskim pravima. Posljednja stavka u evidenciji navedena je niže kao napomena:", 'semiprotectedpagemovewarning' => "'''Napomena:''' Ova je stranica zaključana tako da je samo prijavljeni suradnici mogu premjestiti. Posljednja stavka u evidenciji navedena je niže kao napomena:", 'move-over-sharedrepo' => '== Datoteka postoji == [[:$1]] postoji na zajednički korištenom repozitoriju. Premještanje datoteke na ovaj naslov će prepisati zajednički korištenu datoteku.', 'file-exists-sharedrepo' => 'Naziv datoteke koje ste odabrali već se rabi na zajednički korištenom repozitoriju. Molimo odaberite drugo ime.', # Export 'export' => 'Izvezi stranice', 'exporttext' => 'Možete izvesti tekst i prijašnje promjene jedne ili više stranica uklopljene u XML kod. U budućim verzijama MediaWiki softvera bit će moguće uvesti ovakvu stranicu u neki drugi wiki. Trenutačna verzija to još ne podržava. Za izvoz stranica unesite njihove naslove u polje ispod, jedan naslov po retku, i označite želite li trenutačnu inačicu zajedno sa svim prijašnjima, ili samo trenutačnu inačicu s informacijom o zadnjoj promjeni. U potonjem slučaju možete koristiti i poveznicu, npr. [[{{#Special:Export}}/{{MediaWiki:Mainpage}}]] za članak [[{{MediaWiki:Mainpage}}]].', 'exportcuronly' => 'Uključi samo trenutačnu inačicu, ne i sve prijašnje', 'exportnohistory' => "---- '''Napomena:''' izvoz cjelokupne stranice sa svim prethodnim izmjenama onemogućen je zbog opterećenja poslužitelja.", 'export-submit' => 'Izvezi', 'export-addcattext' => 'Dodaj stranice iz kategorije:', 'export-addcat' => 'Dodaj', 'export-addnstext' => 'Dodaj stranice iz imenskog prostora:', 'export-addns' => 'Dodaj', 'export-download' => 'Ponudi opciju snimanja u datoteku', 'export-templates' => 'Uključi predloške', 'export-pagelinks' => 'Uključi povezane stranice do dubine od:', # Namespace 8 related 'allmessages' => 'Sve sistemske poruke', 'allmessagesname' => 'Ime', 'allmessagesdefault' => 'Prvotni tekst', 'allmessagescurrent' => 'Trenutačni tekst', 'allmessagestext' => 'Ovo je popis svih sistemskih poruka u imenskom prostoru MediaWiki. Molimo posjetite [//www.mediawiki.org/wiki/Localisation lokalizaciju MediaWikija] i [//translatewiki.net translatewiki.net] ako želite doprinijeti lokalizaciji MediaWiki softvera.', 'allmessagesnotsupportedDB' => "Ova stranica ne može biti korištena jer je isključen parametar '''\$wgUseDatabaseMessages'''.", 'allmessages-filter-legend' => 'Filtriraj', 'allmessages-filter' => 'Filtriraj prema prilagođenom obliku:', 'allmessages-filter-unmodified' => 'Nepreinačeno', 'allmessages-filter-all' => 'Sve', 'allmessages-filter-modified' => 'Preinačeno', 'allmessages-prefix' => 'Filtriraj prema prefiksu:', 'allmessages-language' => 'Jezik:', 'allmessages-filter-submit' => 'Idi', # Thumbnails 'thumbnail-more' => 'Povećaj', 'filemissing' => 'Nedostaje datoteka', 'thumbnail_error' => 'Pogreška pri izradbi sličice: $1', 'djvu_page_error' => "DjVu stranica nije dohvatljiva (''out of range'')", 'djvu_no_xml' => 'Ne mogu dohvatiti XML za DjVu datoteku', 'thumbnail_invalid_params' => "Nevaljani parametri za smanjenu sliku (''thumbnail'')", 'thumbnail_dest_directory' => 'Ne mogu stvoriti ciljni direktorij', 'thumbnail_image-type' => 'Tip slike nije podržan', 'thumbnail_gd-library' => 'Nepotpune konfiguracija GD knjižnice: nedostaje funkcija $1', 'thumbnail_image-missing' => 'Čini se da datoteka nedostaje: $1', # Special:Import 'import' => 'Uvezi stranice', 'importinterwiki' => 'Transwiki uvoz', 'import-interwiki-text' => 'Izaberite wiki i ime stranice za uvoz. Povijest stranice i imena suradnika će biti sačuvani. Transwiki uvoz stranica je zabilježen u [[Special:Log/import|evidenciji uvoza stranica]].', 'import-interwiki-source' => 'Izvor wiki/stranica:', 'import-interwiki-history' => 'Prenesi sve inačice ove stranice', 'import-interwiki-templates' => 'Uključi sve predloške', 'import-interwiki-submit' => 'Uvezi', 'import-interwiki-namespace' => 'Odredišni imenski prostor:', 'import-upload-filename' => 'Ime datoteke:', 'import-comment' => 'Komentar:', 'importtext' => 'Molimo izvezite datoteku iz izvorišnog wikija koristeći [[Special:Export|izvozno pomagalo]]. Snimite je na svoje računalo i postavite je ovdje.', 'importstart' => 'Uvozim stranice...', 'import-revision-count' => '$1 {{PLURAL:$1|izmjena|izmjene|izmjena}}', 'importnopages' => 'Nema stranica za uvoz.', 'imported-log-entries' => '{{PLURAL:$1|Uvezen $1 unos u evidenciju|Uvezena $1 unosa u evidenciju|Uvezeno $1 unosa u evidenciju}}.', 'importfailed' => 'Uvoz nije uspio: $1', 'importunknownsource' => 'Nepoznat tip stranica za uvoz', 'importcantopen' => 'Ne mogu otvoriti datoteku za uvoz', 'importbadinterwiki' => 'Neispravna međuwiki poveznica', 'importnotext' => 'Prazno ili bez teksta', 'importsuccess' => 'Uvoz je uspio!', 'importhistoryconflict' => 'Došlo je do konflikta među prijašnjim inačicama (ova je stranica možda već uvezena)', 'importnosources' => 'Nije unesen nijedan izvor za transwiki uvoz i neposredno postavljanje povijesti je onemogućeno.', 'importnofile' => 'Nije postavljena uvozna datoteka.', 'importuploaderrorsize' => 'Uvoz datoteke nije uspio. Datoteka je veća od dopuštene veličine.', 'importuploaderrorpartial' => 'Uvoz datoteke nije uspio. Datoteka je djelomično uvezena/snimljena.', 'importuploaderrortemp' => 'Uvoz datoteke nije uspio. Nema privremenog direktorija.', 'import-parse-failure' => 'Pogreška u parsiranju kod uvoza XML-a', 'import-noarticle' => 'Nema stranice za uvoz!', 'import-nonewrevisions' => 'Sve inačice su bile prethodno uvezene.', 'xml-error-string' => '$1 u retku $2, stupac $3 (bajt $4): $5', 'import-upload' => 'Postavljanje XML datoteka', 'import-token-mismatch' => 'Izgubljeni su podaci o sesiji. Molimo pokušajte ponovno.', 'import-invalid-interwiki' => 'Ne mogu uvesti iz navedene wiki.', # Import log 'importlogpage' => 'Evidencija uvoza članaka', 'importlogpagetext' => 'Administrativni uvoz stranica s poviješću uređivanja s drugih wikija.', 'import-logentry-upload' => 'uvezeno [[$1]] uvozom datoteke', 'import-logentry-upload-detail' => '$1 {{PLURAL:$1|izmjena|izmjene|izmjena}}', 'import-logentry-interwiki' => 'transwiki uvezeno $1', 'import-logentry-interwiki-detail' => '$1 {{PLURAL:$1|promjena|promjene|promjena}} od $2', # Tooltip help for the actions 'tooltip-pt-userpage' => 'Moja suradnička stranica', 'tooltip-pt-anonuserpage' => 'Suradnička stranica za IP adresu pod kojom uređujete', 'tooltip-pt-mytalk' => 'Moja stranica za razgovor', 'tooltip-pt-anontalk' => 'Razgovor o suradnicima s ove IP adrese', 'tooltip-pt-preferences' => 'Moje postavke', 'tooltip-pt-watchlist' => 'Popis stranica koje pratite.', 'tooltip-pt-mycontris' => 'Popis mojih doprinosa', 'tooltip-pt-login' => 'Predlažemo Vam da se prijavite, ali nije obvezno.', 'tooltip-pt-anonlogin' => 'Predlažemo Vam da se prijavite, ali nije obvezno.', 'tooltip-pt-logout' => 'Odjavi se', 'tooltip-ca-talk' => 'Razgovor o stranici', 'tooltip-ca-edit' => 'Možete uređivati ovu stranicu. Koristite Pregled kako će izgledati prije nego što snimite.', 'tooltip-ca-addsection' => 'Dodaj novi odlomak', 'tooltip-ca-viewsource' => 'Ova stranica je zaštićena. Možete pogledati izvorni kod.', 'tooltip-ca-history' => 'Ranije izmjene na ovoj stranici.', 'tooltip-ca-protect' => 'Zaštiti ovu stranicu', 'tooltip-ca-unprotect' => 'Ukloni zaštitu s ove stranice', 'tooltip-ca-delete' => 'Izbriši ovu stranicu', 'tooltip-ca-undelete' => 'Vrati uređivanja na ovoj stranici prije nego što je izbrisana', 'tooltip-ca-move' => 'Premjesti ovu stranicu', 'tooltip-ca-watch' => 'Dodaj ovu stranicu na svoj popis praćenja', 'tooltip-ca-unwatch' => 'Ukloni ovu stranicu s popisa praćenja', 'tooltip-search' => 'Pretraži ovaj wiki', 'tooltip-search-go' => 'Idi na stranicu s ovim imenom ako ona postoji', 'tooltip-search-fulltext' => 'Traži ovaj tekst na svim stranicama', 'tooltip-p-logo' => 'Glavna stranica', 'tooltip-n-mainpage' => 'Posjeti glavnu stranicu', 'tooltip-n-mainpage-description' => 'Posjeti glavnu stranicu', 'tooltip-n-portal' => 'O projektu, što možete učiniti, gdje je što', 'tooltip-n-currentevents' => 'O trenutačnim događajima', 'tooltip-n-recentchanges' => 'Popis nedavnih promjena u wikiju.', 'tooltip-n-randompage' => 'Učitaj slučajnu stranicu', 'tooltip-n-help' => 'Mjesto za pomoć suradnicima.', 'tooltip-t-whatlinkshere' => 'Popis svih stranica koje sadrže poveznice ovamo', 'tooltip-t-recentchangeslinked' => 'Nedavne promjene na stranicama na koje vode ovdašnje poveznice', 'tooltip-feed-rss' => 'RSS feed za ovu stranicu', 'tooltip-feed-atom' => 'Atom feed za ovu stranicu', 'tooltip-t-contributions' => 'Pogledaj popis suradnikovih doprinosa', 'tooltip-t-emailuser' => 'Pošalji suradniku e-mail', 'tooltip-t-upload' => 'Postavi slike i druge medije', 'tooltip-t-specialpages' => 'Popis posebnih stranica', 'tooltip-t-print' => 'Verzija za ispis ove stranice', 'tooltip-t-permalink' => 'Trajna poveznica na ovu verziju stranice', 'tooltip-ca-nstab-main' => 'Pogledaj sadržaj', 'tooltip-ca-nstab-user' => 'Pogledaj suradničku stranicu', 'tooltip-ca-nstab-media' => 'Pogledaj stranicu s opisom medija', 'tooltip-ca-nstab-special' => 'Ovo je posebna stranica koju nije moguće izravno uređivati.', 'tooltip-ca-nstab-project' => 'Pogledaj stranicu o projektu', 'tooltip-ca-nstab-image' => 'Pogledaj stranicu o slici', 'tooltip-ca-nstab-mediawiki' => 'Pogledaj sistemske poruke', 'tooltip-ca-nstab-template' => 'Pogledaj predložak', 'tooltip-ca-nstab-help' => 'Pogledaj stranicu za pomoć', 'tooltip-ca-nstab-category' => 'Pogledaj stranicu kategorije', 'tooltip-minoredit' => 'Označi kao manju promjenu', 'tooltip-save' => 'Sačuvaj promjene', 'tooltip-preview' => 'Prikaži kako će izgledati, molimo koristite prije snimanja!', 'tooltip-diff' => 'Prikaži promjene učinjene u tekstu.', 'tooltip-compareselectedversions' => 'Prikaži usporedbu izabranih inačica ove stranice.', 'tooltip-watch' => 'Dodaj na popis praćenja', 'tooltip-recreate' => 'Vrati stranicu unatoč tome što je obrisana', 'tooltip-upload' => "Pokreni snimanje (''upload'')", 'tooltip-rollback' => '"Ukloni" uklanja uređivanja zadnjeg suradnika na ovoj stranici.', 'tooltip-undo' => '"Ukloni ovu izmjenu" uklanja ovu izmjenu i otvara okvir za uređivanje. Omogućava unošenje razloga u sažetak.', 'tooltip-preferences-save' => 'Spremi postavke', 'tooltip-summary' => 'Unesite kratki sažetak', # Stylesheets 'common.css' => '/** Uređivanje ove CSS datoteke će se odraziti na sve skinove */', 'monobook.css' => '/** Ovdje idu izmjene monobook stylesheeta */', # Scripts 'common.js' => '/* JavaScript kod na ovoj stranici će biti izvršen kod svakog suradnika pri svakom učitavanju svake stranice wikija. */', 'monobook.js' => '/* Ne rabi se više; molimo rabite [[MediaWiki:common.js]] */', # Metadata 'notacceptable' => 'Wiki server ne može dobaviti podatke u obliku kojega Vaš preglednik može pročitati.', # Attribution 'anonymous' => 'Neprijavljeni {{PLURAL:$1|suradnik|suradnici}} projekta {{SITENAME}}', 'siteuser' => 'Suradnik $1 na projektu {{SITENAME}}', 'anonuser' => '{{SITENAME}} anonimni suradnik $1', 'lastmodifiedatby' => 'Ovu je stranicu zadnji put mijenjao dana $2, $1 suradnik $3.', 'othercontribs' => 'Temelji se na doprinosu suradnika $1.', 'others' => 'drugih', 'siteusers' => '{{SITENAME}} {{PLURAL:$2|suradnik|suradnici}} $1', 'anonusers' => '{{SITENAME}} {{PLURAL:$2|anonimni suradnik|anonimni suradnici}} $1', 'creditspage' => 'Autori stranice', 'nocredits' => 'Za ovu stranicu nema podataka o autorima.', # Spam protection 'spamprotectiontitle' => 'Zaštita od spama', 'spamprotectiontext' => 'Stranicu koju ste željeli snimiti blokirao je filter spama. Razlog je vjerojatno vanjska poveznica koja se nalazi na crnom popisu.', 'spamprotectionmatch' => 'Naš filter spama reagirao je na sljedeći tekst: $1', 'spambot_username' => 'MediaWiki zaštita od spama', 'spam_reverting' => 'Vraćam na zadnju inačicu koja ne sadrži poveznice na $1', 'spam_blanking' => 'Sve inačice sadrže poveznice na $1, brišem cjelokupni sadržaj', # Skin names 'skinname-standard' => 'Standardna', 'skinname-nostalgia' => 'Nostalgija', 'skinname-cologneblue' => 'Kölnska plava', 'skinname-monobook' => 'MonoBook', 'skinname-myskin' => 'MySkin', 'skinname-chick' => 'Chick', # Patrolling 'markaspatrolleddiff' => 'Označi za pregledano', 'markaspatrolledtext' => 'Označi ovaj članak pregledanim', 'markedaspatrolled' => 'Pregledano', 'markedaspatrolledtext' => 'Odabrana promjena [[:$1]] označena je pregledanom.', 'rcpatroldisabled' => 'Nadzor nedavnih promjena isključen', 'rcpatroldisabledtext' => 'Naredba "Nadziri nedavne promjene" trenutačno je isključena.', 'markedaspatrollederror' => 'Ne mogu označiti za pregledano', 'markedaspatrollederrortext' => 'Morate odabrati inačicu koju treba označiti za pregledanu.', 'markedaspatrollederror-noautopatrol' => 'Ne možete vlastite promjene označiti patroliranima.', # Patrol log 'patrol-log-page' => 'Evidencija pregledavanja promjena', 'patrol-log-header' => 'Ovo su evidencije patroliranih izmjena.', 'log-show-hide-patrol' => '$1 evidenciju patroliranja', # Image deletion 'deletedrevision' => 'Izbrisana stara inačica $1', 'filedeleteerror-short' => 'Pogreška u brisanju datoteke: $1', 'filedeleteerror-long' => 'Dogodila se pogreška prilikom brisanja datoteke: $1', 'filedelete-missing' => 'Datoteka "$1" ne može biti obrisana, jer ne postoji.', 'filedelete-old-unregistered' => 'Navedena promjena datoteke "$1" ne postoji u bazi podataka.', 'filedelete-current-unregistered' => 'Navedene datoteke "$1" nema u bazi podataka.', 'filedelete-archive-read-only' => 'Web poslužitelj nema pravo pisanja u direktorij "$1".', # Browsing diffs 'previousdiff' => '← Starija izmjena', 'nextdiff' => 'Novija izmjena →', # Media information 'mediawarning' => "'''Upozorenje''': Ova datoteka možda sadrži štetan kod. Njegovim izvršavanjem mogli biste oštetiti svoj sustav.", 'imagemaxsize' => "Ograniči veličinu slike:<br />''(za stranicu s opisom datoteke)''", 'thumbsize' => 'Veličina sličice (umanjene inačice slike):', 'widthheightpage' => '$1×$2, $3 {{PLURAL:$3|stranica|stranice}}', 'file-info' => 'veličina datoteke: $1, MIME tip: $2', 'file-info-size' => '$1 × $2 piksela, veličina datoteke: $3, MIME tip: $4', 'file-nohires' => 'Viša rezolucija nije dostupna.', 'svg-long-desc' => 'SVG datoteka, nominalno $1 × $2 piksela, veličina datoteke: $3', 'show-big-image' => 'Vidi sliku u punoj veličini (rezoluciji)', 'show-big-image-preview' => 'Veličina ovog prikaza: $1.', 'show-big-image-other' => 'Ostale rezolucije: $1.', 'show-big-image-size' => '$1 × $2 piksela', 'file-info-gif-looped' => 'animacija se ponavlja', 'file-info-gif-frames' => '$1 {{PLURAL:$1|okvir|okvira}}', 'file-info-png-looped' => 'animacija se ponavlja', 'file-info-png-repeat' => 'prikazano $1 {{PLURAL:$1|puta|puta|puta}}', 'file-info-png-frames' => '$1 {{PLURAL:$1|okvir|okvira}}', # Special:NewFiles 'newimages' => 'Galerija novih datoteka', 'imagelisttext' => 'Ispod je popis {{PLURAL:$1|$1 slike|$1 slike|$1 slika}} složen $2.', 'newimages-summary' => 'Ova posebna stranica pokazuje zadnje nedavno postavljene datoteke.', 'newimages-legend' => 'Filter', 'newimages-label' => 'Naziv datoteke (ili njen dio):', 'showhidebots' => '($1 botova)', 'noimages' => 'Nema slika.', 'ilsubmit' => 'Traži', 'bydate' => 'po datumu', 'sp-newimages-showfrom' => 'Prikaži nove slike počevši od $2, $1', # Bad image list 'bad_image_list' => "Rabi se sljedeći format: Samo retci koji počinju sa zvjezdicom su prikazani. Prva poveznica u retku mora biti poveznica na nevaljanu sliku. Svaka sljedeća poveznica u istom retku je izuzetak, npr. kod stranica gdje se slike pojavljuju ''inline''.", # Variants for Serbian language 'variantname-sr-ec' => 'ћирилица', 'variantname-sr-el' => 'latinica', # Metadata 'metadata' => 'Metapodaci', 'metadata-help' => 'Ova datoteka sadržava dodatne podatke koje je vjerojatno dodala digitalna kamera ili skener u procesu snimanja odnosno digitalizacije. Ako je datoteka mijenjana, podatci možda nisu u skladu sa stvarnim stanjem.', 'metadata-expand' => 'Pokaži sve podatke', 'metadata-collapse' => 'Sakrij dodatne podatke', 'metadata-fields' => 'EXIF polja metapodataka pobrojana u ovoj poruci bit će prikazani na stranici s prikazom slike kada je tablica s metapodacima sakrivena. Ostali će biti uobičajeno sakriveni. * make * model * datetimeoriginal * exposuretime * fnumber * isospeedratings * focallength * artist * copyright * imagedescription * gpslatitude * gpslongitude * gpsaltitude', # EXIF tags 'exif-imagewidth' => 'Širina', 'exif-imagelength' => 'Visina', 'exif-bitspersample' => 'Dubina boje', 'exif-compression' => 'Način sažimanja', 'exif-photometricinterpretation' => 'Kolor model', 'exif-orientation' => 'Orijentacija kadra', 'exif-samplesperpixel' => 'Broj kolor komponenata', 'exif-planarconfiguration' => 'Princip rasporeda podataka', 'exif-ycbcrsubsampling' => 'Omjer komponente Y prema C', 'exif-ycbcrpositioning' => 'Razmještaj komponenata Y i C', 'exif-xresolution' => 'Vodoravna razlučivost', 'exif-yresolution' => 'Okomita razlučivost', 'exif-stripoffsets' => 'Položaj bloka podataka', 'exif-rowsperstrip' => 'Broj redova u bloku', 'exif-stripbytecounts' => 'Veličina komprimiranog bloka', 'exif-jpeginterchangeformat' => 'Udaljenost JPEG previewa od početka datoteke', 'exif-jpeginterchangeformatlength' => 'Količina bajtova JPEG previewa', 'exif-whitepoint' => 'Kromaticitet bijele točke', 'exif-primarychromaticities' => 'Kromaticitet primarnih boja', 'exif-ycbcrcoefficients' => 'Matrični koeficijenti preobrazbe kolor prostora', 'exif-referenceblackwhite' => 'Mjesto bijele i crne točke', 'exif-datetime' => 'Datum zadnje promjene datoteke', 'exif-imagedescription' => 'Ime slike', 'exif-make' => 'Proizvođač kamere', 'exif-model' => 'Model kamere', 'exif-software' => 'Korišteni softver', 'exif-artist' => 'Autor', 'exif-copyright' => 'Nositelj prava', 'exif-exifversion' => 'Exif verzija', 'exif-flashpixversion' => 'Podržana verzija Flashpixa', 'exif-colorspace' => 'Kolor prostor', 'exif-componentsconfiguration' => 'Značenje pojedinih komponenti', 'exif-compressedbitsperpixel' => 'Dubina boje poslije sažimanja', 'exif-pixelydimension' => 'Važeća širina slike', 'exif-pixelxdimension' => 'Važeća visina slike', 'exif-usercomment' => 'Suradnički komentar', 'exif-relatedsoundfile' => 'Povezani zvučni zapis', 'exif-datetimeoriginal' => 'Datum i vrijeme slikanja', 'exif-datetimedigitized' => 'Datum i vrijeme digitalizacije', 'exif-subsectime' => 'Dio sekunde u kojem je slikano', 'exif-subsectimeoriginal' => 'Dio sekunde u kojem je fotografirano', 'exif-subsectimedigitized' => 'Dio sekunde u kojem je digitalizirano', 'exif-exposuretime' => 'Ekspozicija', 'exif-exposuretime-format' => '$1 sekunda ($2)', 'exif-fnumber' => 'F broj dijafragme', 'exif-exposureprogram' => 'Program ekspozicije', 'exif-spectralsensitivity' => 'Spektralna osjetljivost', 'exif-isospeedratings' => 'ISO vrijednost', 'exif-shutterspeedvalue' => 'Brzina zatvarača', 'exif-aperturevalue' => 'Otvor', 'exif-brightnessvalue' => 'Osvijetljenost', 'exif-exposurebiasvalue' => 'Kompenzacija ekspozicije', 'exif-maxaperturevalue' => 'Minimalni broj dijafragme', 'exif-subjectdistance' => 'Udaljenost do objekta', 'exif-meteringmode' => 'Režim mjerača vremena', 'exif-lightsource' => 'Izvor svjetlosti', 'exif-flash' => 'Bljeskalica', 'exif-focallength' => 'Žarišna duljina leće', 'exif-subjectarea' => 'Položaj i površina objekta snimke', 'exif-flashenergy' => 'Energija bljeskalice', 'exif-focalplanexresolution' => 'Vodoravna razlučivost žarišne ravnine', 'exif-focalplaneyresolution' => 'Okomita razlučivost žarišne ravnine', 'exif-focalplaneresolutionunit' => 'Jedinica razlučivosti žarišne ravnine', 'exif-subjectlocation' => 'Položaj subjekta', 'exif-exposureindex' => 'Indeks ekspozicije', 'exif-sensingmethod' => 'Tip senzora', 'exif-filesource' => 'Izvorna datoteka', 'exif-scenetype' => 'Tip scene', 'exif-customrendered' => 'Dodatna obrada slike', 'exif-exposuremode' => 'Režim izbora ekspozicije', 'exif-whitebalance' => 'Balans bijele', 'exif-digitalzoomratio' => 'Razmjer digitalnog zooma', 'exif-focallengthin35mmfilm' => 'Ekvivalent žarišne daljine za 35 mm film', 'exif-scenecapturetype' => 'Tip scene na snimci', 'exif-gaincontrol' => 'Kontrola osvijetljenosti', 'exif-contrast' => 'Kontrast', 'exif-saturation' => 'Zasićenje', 'exif-sharpness' => 'Oštrina', 'exif-devicesettingdescription' => 'Opis postavki uređaja', 'exif-subjectdistancerange' => 'Raspon udaljenosti subjekata', 'exif-imageuniqueid' => 'Jedinstveni identifikator slike', 'exif-gpsversionid' => 'Verzija bloka GPS-informacije', 'exif-gpslatituderef' => 'Sjeverna ili južna širina', 'exif-gpslatitude' => 'Širina', 'exif-gpslongituderef' => 'Istočna ili zapadna dužina', 'exif-gpslongitude' => 'Dužina', 'exif-gpsaltituderef' => 'Visina ispod ili iznad mora', 'exif-gpsaltitude' => 'Visina', 'exif-gpstimestamp' => 'Vrijeme po GPS-u (atomski sat)', 'exif-gpssatellites' => 'Korišteni sateliti', 'exif-gpsstatus' => 'Status prijemnika', 'exif-gpsmeasuremode' => 'Režim mjerenja', 'exif-gpsdop' => 'Preciznost mjerenja', 'exif-gpsspeedref' => 'Jedinica brzine', 'exif-gpsspeed' => 'Brzina GPS prijemnika', 'exif-gpstrackref' => 'Tip azimuta prijemnika (pravi ili magnetni)', 'exif-gpstrack' => 'Azimut prijemnika', 'exif-gpsimgdirectionref' => 'Tip azimuta slike (pravi ili magnetni)', 'exif-gpsimgdirection' => 'Azimut slike', 'exif-gpsmapdatum' => 'Korišteni geodetski koordinatni sustav', 'exif-gpsdestlatituderef' => 'Indeks zemlj. širine objekta', 'exif-gpsdestlatitude' => 'Zemlj. širina objekta', 'exif-gpsdestlongituderef' => 'Indeks zemlj. dužine objekta', 'exif-gpsdestlongitude' => 'Zemljopisna dužina objekta', 'exif-gpsdestbearingref' => 'Indeks pelenga objekta', 'exif-gpsdestbearing' => 'Peleng objekta', 'exif-gpsdestdistanceref' => 'Mjerne jedinice udaljenosti objekta', 'exif-gpsdestdistance' => 'Udaljenost objekta', 'exif-gpsprocessingmethod' => 'Ime metode obrade GPS podataka', 'exif-gpsareainformation' => 'Ime GPS područja', 'exif-gpsdatestamp' => 'GPS datum', 'exif-gpsdifferential' => 'GPS diferencijalna korekcija', 'exif-jpegfilecomment' => 'JPEG komentar datoteke', 'exif-keywords' => 'Ključne riječi', 'exif-worldregioncreated' => 'Regija svijeta u kojoj je slika snimljena', 'exif-countrycreated' => 'Zemlja u kojoj je slika snimljena', 'exif-countrycodecreated' => 'Kôd za zemlju u kojoj je slika snimljena', 'exif-provinceorstatecreated' => 'Provincija ili država u kojoj je slika snimljena', 'exif-citycreated' => 'Grad u kojem je slika snimljena', 'exif-sublocationcreated' => 'Podlokacija grada gdje je slika snimljena', 'exif-worldregiondest' => 'Prikazana regija svijeta', 'exif-countrydest' => 'Prikazana zemlja', 'exif-countrycodedest' => 'Kôd za prikazanu zemlju', 'exif-provinceorstatedest' => 'Prikazana provincija ili država', 'exif-citydest' => 'Prikazani grad', 'exif-sublocationdest' => 'Prikazana podlokacija grada', 'exif-objectname' => 'Kratki naslov', 'exif-specialinstructions' => 'Posebne upute', 'exif-headline' => 'Naslov', 'exif-credit' => 'Pripisivanje/Pružatelj', 'exif-source' => 'Izvor', 'exif-editstatus' => 'Urednički status slike', 'exif-urgency' => 'Žurnost', 'exif-fixtureidentifier' => 'Naziv rubrike', 'exif-locationdest' => 'Prikazana lokacija', 'exif-locationdestcode' => 'Kôd prikazane lokacije', 'exif-objectcycle' => 'Doba dana za koji je medij namijenjen', 'exif-contact' => 'Podaci za kontakt', 'exif-writer' => 'Pisac', 'exif-languagecode' => 'Jezik', 'exif-iimversion' => 'IIM inačica', 'exif-iimcategory' => 'Kategorija', 'exif-iimsupplementalcategory' => 'Dopunske kategorije', 'exif-datetimeexpires' => 'Nemojte rabiti nakon', 'exif-datetimereleased' => 'Objavljeno', 'exif-originaltransmissionref' => 'Izvorni prijenos kôda lokacije', 'exif-identifier' => 'Oznaka', 'exif-lens' => 'Korišteni objektiv', 'exif-serialnumber' => 'Serijski broj kamere', 'exif-cameraownername' => 'Vlasnik kamere', 'exif-label' => 'Oznaka', 'exif-datetimemetadata' => 'Datum zadnje promjene metapodataka', 'exif-nickname' => 'Neformalni naziv slike', 'exif-rating' => 'Ocjena (od 5)', 'exif-rightscertificate' => 'Certifikat za upravljanje pravima', 'exif-copyrighted' => 'Status autorskog prava', 'exif-copyrightowner' => 'Nositelj autorskog prava', 'exif-usageterms' => 'Uporaba pojmova', 'exif-webstatement' => 'Online izjava o autorskom pravu', 'exif-originaldocumentid' => 'Jedinstveni ID izvornog dokumenta', 'exif-licenseurl' => 'URL za licenciju o autorskom pravu', 'exif-morepermissionsurl' => 'Informacije o alternativnom licenciranju', 'exif-attributionurl' => 'Kada ponovno rabite ovo djelo, molim povežite ga s', 'exif-preferredattributionname' => 'Kada ponovno rabite ovo djelo, molim naslovite ga', 'exif-pngfilecomment' => 'PNG komentar datoteke', 'exif-disclaimer' => 'Odricanje od odgovornosti', 'exif-contentwarning' => 'Upozorenje o sadržaju', 'exif-giffilecomment' => 'GIF komentar datoteke', 'exif-intellectualgenre' => 'Vrsta stavke', 'exif-subjectnewscode' => 'Kôd predmeta', 'exif-scenecode' => 'IPTC kôd scene', 'exif-event' => 'Prikazani događaj', 'exif-organisationinimage' => 'Prikazana organizacija', 'exif-personinimage' => 'Prikazana osoba', 'exif-originalimageheight' => 'Visina slike prije nego što je obrezana', 'exif-originalimagewidth' => 'Širina slike prije nego što je obrezana', # EXIF attributes 'exif-compression-1' => 'Nesažeto', 'exif-copyrighted-true' => 'Zaštićeno autorskim pravom', 'exif-copyrighted-false' => 'Javno dobro', 'exif-unknowndate' => 'Datum nepoznat', 'exif-orientation-1' => 'Normalno', 'exif-orientation-2' => 'Zrcaljeno po horizontali', 'exif-orientation-3' => 'Zaokrenuto 180°', 'exif-orientation-4' => 'Zrcaljeno po vertikali', 'exif-orientation-5' => 'Zaokrenuto 90° suprotno od sata i zrcaljeno po vertikali', 'exif-orientation-6' => 'Zaokrenuto 90° u smjeru sata', 'exif-orientation-7' => 'Zaokrenuto 90° u smjeru sata i zrcaljeno po vertikali', 'exif-orientation-8' => 'Zaokrenuto 90° suprotno od sata', 'exif-planarconfiguration-1' => 'zrnasti format', 'exif-planarconfiguration-2' => 'planarni format', 'exif-colorspace-65535' => 'Nekalibrirano', 'exif-componentsconfiguration-0' => 'ne postoji', 'exif-exposureprogram-0' => 'Nepoznato', 'exif-exposureprogram-1' => 'Ručno', 'exif-exposureprogram-2' => 'Normalni program', 'exif-exposureprogram-3' => 'Prioritet dijafragme', 'exif-exposureprogram-4' => 'Prioritet zatvarača', 'exif-exposureprogram-5' => 'Umjetnički program (na temelju nužne dubine polja)', 'exif-exposureprogram-6' => 'Sportski program (na temelju što bržeg zatvarača)', 'exif-exposureprogram-7' => 'Portretni režim (za krupne planove s neoštrom pozadinom)', 'exif-exposureprogram-8' => 'Režim krajolika (za slike krajolika s oštrom pozadinom)', 'exif-subjectdistance-value' => '$1 metara', 'exif-meteringmode-0' => 'Nepoznato', 'exif-meteringmode-1' => 'Prosjek', 'exif-meteringmode-2' => 'Prosjek s težištem na sredini', 'exif-meteringmode-3' => 'Točka', 'exif-meteringmode-4' => 'Više točaka', 'exif-meteringmode-5' => 'Matrični', 'exif-meteringmode-6' => 'Djelomični', 'exif-meteringmode-255' => 'Drugo', 'exif-lightsource-0' => 'Nepoznato', 'exif-lightsource-1' => 'Dnevna svjetlost', 'exif-lightsource-2' => 'Fluorescentno', 'exif-lightsource-3' => 'Volframska žarulja', 'exif-lightsource-4' => 'Bljeskalica', 'exif-lightsource-9' => 'Lijepo vrijeme', 'exif-lightsource-10' => 'Oblačno vrijeme', 'exif-lightsource-11' => 'Sjena', 'exif-lightsource-12' => 'Fluorescentna svjetlost (D 5700 – 7100K)', 'exif-lightsource-13' => 'Fluorescentna svjetlost (N 4600 – 5400K)', 'exif-lightsource-14' => 'Fluorescentna svjetlost (W 3900 – 4500K)', 'exif-lightsource-15' => 'Bijela fluorescencija (WW 3200 – 3700K)', 'exif-lightsource-17' => 'Standardno svjetlo A', 'exif-lightsource-18' => 'Standardno svjetlo B', 'exif-lightsource-19' => 'Standardno svjetlo C', 'exif-lightsource-24' => 'ISO studijska svjetiljka', 'exif-lightsource-255' => 'Drugi izvor svjetla', # Flash modes 'exif-flash-fired-0' => 'Bez upotrebe bljeskalice', 'exif-flash-fired-1' => 'S upotrebom bljeskalice', 'exif-flash-return-0' => 'bez upotrebe funkcije stroboskopa', 'exif-flash-return-2' => 'stroboskop nije opazio svjetlo', 'exif-flash-return-3' => 'stroboskop je opazio svjetlo', 'exif-flash-mode-1' => 'bljeskalica ručno uključena', 'exif-flash-mode-2' => 'bljeskalica ručno isključena', 'exif-flash-mode-3' => 'automatski način rada', 'exif-flash-function-1' => 'Nema funkcije bljeskalice', 'exif-flash-redeye-1' => 'način rada za smanjenje crvenih očiju', 'exif-focalplaneresolutionunit-2' => 'inči', 'exif-sensingmethod-1' => 'Nedefinirano', 'exif-sensingmethod-2' => 'Jednokristalni matrični senzor', 'exif-sensingmethod-3' => 'Dvokristalni matrični senzor', 'exif-sensingmethod-4' => 'Trokristalni matrični senzor', 'exif-sensingmethod-5' => 'Sekvencijalni matrični senzor', 'exif-sensingmethod-7' => 'Trobojni linearni senzor', 'exif-sensingmethod-8' => 'Sekvencijalni linearni senzor', 'exif-filesource-3' => 'Digitalni fotoaparat', 'exif-scenetype-1' => 'Izravno fotografirana slika', 'exif-customrendered-0' => 'Normalni proces', 'exif-customrendered-1' => 'Nestadardni proces', 'exif-exposuremode-0' => 'Automatski', 'exif-exposuremode-1' => 'Ručno', 'exif-exposuremode-2' => 'Automatski sa zadanim rasponom', 'exif-whitebalance-0' => 'Automatski', 'exif-whitebalance-1' => 'Ručno', 'exif-scenecapturetype-0' => 'Standardno', 'exif-scenecapturetype-1' => 'Pejzaž', 'exif-scenecapturetype-2' => 'Portret', 'exif-scenecapturetype-3' => 'Noćno', 'exif-gaincontrol-0' => 'Nema', 'exif-gaincontrol-1' => 'Malo povećanje', 'exif-gaincontrol-2' => 'Veliko povećanje', 'exif-gaincontrol-3' => 'Malo smanjenje', 'exif-gaincontrol-4' => 'Veliko smanjenje', 'exif-contrast-0' => 'Normalno', 'exif-contrast-1' => 'Meko', 'exif-contrast-2' => 'Tvrdo', 'exif-saturation-0' => 'Normalno', 'exif-saturation-1' => 'Niska saturacija', 'exif-saturation-2' => 'Visoka saturacija', 'exif-sharpness-0' => 'Normalno', 'exif-sharpness-1' => 'Meko', 'exif-sharpness-2' => 'Tvrdo', 'exif-subjectdistancerange-0' => 'Nepoznato', 'exif-subjectdistancerange-1' => 'Krupni plan', 'exif-subjectdistancerange-2' => 'Bliski plan', 'exif-subjectdistancerange-3' => 'Udaljeno', # Pseudotags used for GPSLatitudeRef and GPSDestLatitudeRef 'exif-gpslatitude-n' => 'Sjever', 'exif-gpslatitude-s' => 'Jug', # Pseudotags used for GPSLongitudeRef and GPSDestLongitudeRef 'exif-gpslongitude-e' => 'Istok', 'exif-gpslongitude-w' => 'Zapad', # Pseudotags used for GPSAltitudeRef 'exif-gpsaltitude-above-sealevel' => '$1 {{PLURAL:$1|metar|metra|metara}} nadmorske visine', 'exif-gpsaltitude-below-sealevel' => '$1 {{PLURAL:$1|metar|metra|metara}} ispod razine mora', 'exif-gpsstatus-a' => 'Mjerenje u tijeku', 'exif-gpsstatus-v' => 'Spreman za prijenos', 'exif-gpsmeasuremode-2' => 'Dvodimenzionalno mjerenje', 'exif-gpsmeasuremode-3' => 'Trodimenzionalno mjerenje', # Pseudotags used for GPSSpeedRef 'exif-gpsspeed-k' => 'kmh', 'exif-gpsspeed-m' => 'mph', 'exif-gpsspeed-n' => 'čv', # Pseudotags used for GPSDestDistanceRef 'exif-gpsdestdistance-k' => 'Kilometara', 'exif-gpsdestdistance-m' => 'Milja', 'exif-gpsdestdistance-n' => 'Nautičkih milja', 'exif-gpsdop-excellent' => 'Odlično ($1)', 'exif-gpsdop-good' => 'Dobro ($1)', 'exif-gpsdop-moderate' => 'Umjereno ($1)', 'exif-gpsdop-fair' => 'U redu ($1)', 'exif-gpsdop-poor' => 'Loše ($1)', 'exif-objectcycle-a' => 'Samo jutro', 'exif-objectcycle-p' => 'Samo večer', 'exif-objectcycle-b' => 'Oba jutro i večer', # Pseudotags used for GPSTrackRef, GPSImgDirectionRef and GPSDestBearingRef 'exif-gpsdirection-t' => 'Pravi sjever', 'exif-gpsdirection-m' => 'Magnetni sjever', 'exif-ycbcrpositioning-1' => 'Centrirano', 'exif-ycbcrpositioning-2' => 'Susmještene', 'exif-dc-contributor' => 'Doprinositelji', 'exif-dc-coverage' => 'Prostorni i vremenski opseg medija', 'exif-dc-date' => 'Datum(i)', 'exif-dc-publisher' => 'Izdavač', 'exif-dc-relation' => 'Povezani mediji', 'exif-dc-rights' => 'Prava', 'exif-dc-source' => 'Izvor medija', 'exif-dc-type' => 'Vrsta medija', 'exif-rating-rejected' => 'Odbijeno', 'exif-isospeedratings-overflow' => 'Veći od 65535', 'exif-iimcategory-ace' => 'Umjetnost, kultura i zabava', 'exif-iimcategory-clj' => 'Kriminal i zakon', 'exif-iimcategory-dis' => 'Katastrofe i nesreće', 'exif-iimcategory-fin' => 'Gospodarstvo i poslovanje', 'exif-iimcategory-edu' => 'Obrazovanje', 'exif-iimcategory-evn' => 'Okoliš', 'exif-iimcategory-hth' => 'Zdravlje', 'exif-iimcategory-hum' => 'Čovjekov interes', 'exif-iimcategory-lab' => 'Rad', 'exif-iimcategory-lif' => 'Životni stil i slobodno vrijeme', 'exif-iimcategory-pol' => 'Politika', 'exif-iimcategory-rel' => 'Religija i vjerovanje', 'exif-iimcategory-sci' => 'Znanost i tehnologija', 'exif-iimcategory-soi' => 'Socijalna pitanja', 'exif-iimcategory-spo' => 'Šport', 'exif-iimcategory-war' => 'Rat, sukob i nemiri', 'exif-iimcategory-wea' => 'Vrijeme', 'exif-urgency-normal' => 'Normalno ($1)', 'exif-urgency-low' => 'Nisko ( $1 )', 'exif-urgency-high' => 'Visoko ($1)', 'exif-urgency-other' => 'Suradnički definiran prioritet ($1)', # External editor support 'edit-externally' => 'Uredi koristeći se vanjskom aplikacijom', 'edit-externally-help' => '(Vidi [//www.mediawiki.org/wiki/Manual:External_editors setup upute] za više informacija)', # 'all' in various places, this might be different for inflected languages 'watchlistall2' => 'sve', 'namespacesall' => 'sve', 'monthsall' => 'sve', 'limitall' => 'sve', # E-mail address confirmation 'confirmemail' => 'Potvrda e-mail adrese', 'confirmemail_noemail' => 'Niste unijeli važeću e-mail adresu u Vaše [[Special:Preferences|suradničke postavke]].', 'confirmemail_text' => 'U ovom wikiju morate prije korištenja e-mail naredbi potvrditi svoju e-mail adresu. Kliknite na gumb ispod kako biste poslali poruku s potvrdom na Vašu adresu. U poruci će biti poveznica koju morate otvoriti u svom web pregledniku i time potvrditi svoju e-mail adresu.', 'confirmemail_pending' => 'Već Vam je e-mailom poslan potvrdni kôd; ako ste upravo otvorili suradnički račun, molimo pričekajte još nekoliko minuta da e-mail stigne prije nego što zatražite novi kôd.', 'confirmemail_send' => 'Pošalji kôd za potvrdu e-mail adrese', 'confirmemail_sent' => 'Poruka s potvrdom je poslana.', 'confirmemail_oncreate' => 'Potvrdni kôd poslan je na Vašu e-mail adresu. Ovaj kôd nije potreban za prijavljivanje, no bit će Vam potreban kako biste osposobili neke od postavki na Wikipediji koje uključuju elektroničku poštu.', 'confirmemail_sendfailed' => 'Projekt {{SITENAME}} nije uspio poslati Vaš potvrdni e-mail. Provjerite sadrži li adresa nedopuštene znakove. Poruka o pogrešci e-mail poslužitelja: $1', 'confirmemail_invalid' => 'Pogrešna potvrda. Kôd je možda istekao.', 'confirmemail_needlogin' => 'Molimo $1 kako biste potvrdili Vašu e-mail adresu.', 'confirmemail_success' => 'Vaša je e-mail adresa potvrđena. Možete se prijaviti i uživati u wikiju.', 'confirmemail_loggedin' => 'Vaša je e-mail adresa potvrđena.', 'confirmemail_error' => 'Došlo je do greške kod snimanja Vaše potvrde.', 'confirmemail_subject' => '{{SITENAME}}: potvrda e-mail adrese', 'confirmemail_body' => 'Netko, vjerojatno Vi, s IP adrese $1 je otvorio suradnički račun pod imenom "$2" s ovom e-mail adresom na {{SITENAME}}. Kako biste potvrdili da je ovaj suradnički račun uistinu Vaš i omogućili e-mail funkcije na {{SITENAME}}, otvorite u Vašem pregledniku sljedeću poveznicu: $3 Ako to *niste* Vi, slijedite ovaj link za poništavanje potvrde: $5 Valjanost ovog potvrdnog koda istječe na $4.', 'confirmemail_body_changed' => 'Netko, vjerojatno Vi, s IP adrese $1, promijenio je adresu e-pošte suradničkog računa "$2" u ovu adresu na {{SITENAME}}. Kako biste potvrdili da je ovaj suradnički račun uistinu Vaš te uključili mogućnosti e-pošte na {{SITENAME}}, otvorite u Vašem pregledniku sljedeću poveznicu: $3 Ukoliko suradnički račun *ne* pripada Vama, slijedite ovu poveznicu za poništavanje potvrde adrese e-pošte: $5 Valjanost ovog potvrdnog koda istječe $4.', 'confirmemail_body_set' => 'Netko, najvjerojatnije vi, s IP adrese $1, otvorio je suradnički račun pod imenom "$2" s ovom e-mail adresom na {{SITENAME}}. Kako biste potvrdili da je ovaj suradnički račun uistinu vaš i uključili e-mail naredbe na {{SITENAME}}, otvorite u vašem pregledniku sljedeću poveznicu: $3 Ako ovaj suradnički račun *ne* pripada vama, slijedite ovaj link kako biste poništili potvrdu e-mail adrese: $5 Valjanost ovog potvrdnog koda istječe u $4', 'confirmemail_invalidated' => 'Potvrda E-mail adrese je otkazana', 'invalidateemail' => 'Poništi potvrđivanje elektroničke pošte', # Scary transclusion 'scarytranscludedisabled' => '[Interwiki transkluzija isključena]', 'scarytranscludefailed' => '[Dobava predloška nije uspjela za $1]', 'scarytranscludetoolong' => '[URL je predug]', # Delete conflict 'deletedwhileediting' => "'''Upozorenje''': Ova stranica je obrisana nakon što ste počeli uređivati!", 'confirmrecreate' => "Suradnik [[User:$1|$1]] ([[User talk:$1|talk]]) izbrisao je ovaj članak nakon što ste ga počeli uređivati. Razlog brisanja : ''$2'' Potvrdite namjeru vraćanja ovog članka.", 'confirmrecreate-noreason' => 'Suradnik [[User:$1|$1]] ([[User talk:$1|razgovor]]) je obrisao ovaj članak nakon što ste ga počeli uređivati. Molimo potvrdite da stvarno želite ponovo započeti ovaj članak.', 'recreate' => 'Vrati', # action=purge 'confirm_purge_button' => 'U redu', 'confirm-purge-top' => 'Isprazniti međuspremnik stranice?', 'confirm-purge-bottom' => 'Čišćenje stranice čisti priručnu memoriju i prikazuje trenutačnu inačicu stranice.', # Multipage image navigation 'imgmultipageprev' => '← prethodna slika', 'imgmultipagenext' => 'slijedeća slika →', 'imgmultigo' => 'Kreni!', 'imgmultigoto' => 'Idi na stranicu $1', # Table pager 'ascending_abbrev' => 'rast', 'descending_abbrev' => 'pad', 'table_pager_next' => 'Sljedeća stranica', 'table_pager_prev' => 'Prethodna stranica', 'table_pager_first' => 'Prva stranica', 'table_pager_last' => 'Zadnja stranica', 'table_pager_limit' => 'Prikaži $1 slika po stranici', 'table_pager_limit_label' => 'Stavke po stranici:', 'table_pager_limit_submit' => 'Idi', 'table_pager_empty' => 'Nema rezultata', # Auto-summaries 'autosumm-blank' => 'Uklonjen cjelokupni sadržaj stranice', 'autosumm-replace' => "Tekst stranice se zamjenjuje s '$1'", 'autoredircomment' => 'Preusmjeravanje na [[$1]]', 'autosumm-new' => 'Nova stranica: $1', # Live preview 'livepreview-loading' => 'Učitavam…', 'livepreview-ready' => 'Učitavam… gotovo!', 'livepreview-failed' => 'Lokalni (JavaScript) pretpregled nije uspio! Pokušajte normalni pretpregled.', 'livepreview-error' => 'Spajanje nije uspjelo: $1 "$2". Pokušajte normalni pretpregled.', # Friendlier slave lag warnings 'lag-warn-normal' => 'Moguće je da izmjene nastale zadnjih $1 {{PLURAL:$1|sekundu|sekundi}} neće biti vidljive na ovom popisu.', 'lag-warn-high' => 'Zbog kašnjenja baze podataka, moguće je da promjene napravljene u zadnjih $1 {{PLURAL:$1|sekundu|sekunde|sekundi}} nisu prikazane u popisu.', # Watchlist editor 'watchlistedit-numitems' => 'Vaš popis praćenja sadrži {{PLURAL:$1|1 stranicu|$1 stranica}}, bez stranica za razgovor.', 'watchlistedit-noitems' => 'Vaš popis praćenja je prazan.', 'watchlistedit-normal-title' => 'Uredi popis praćenja', 'watchlistedit-normal-legend' => 'Ukloni stranice iz popisa praćenja', 'watchlistedit-normal-explain' => 'Prikazane su stranice na Vašem popisu praćenja. Da uklonite stranicu s popisa praćenja, označite kućicu kraj nje i kliknite gumb "{{int:Watchlistedit-normal-submit}}". Možete također [[Special:EditWatchlist/raw|uređivati ovaj popis u okviru za uređivanje]].', 'watchlistedit-normal-submit' => 'Ukloni stranice', 'watchlistedit-normal-done' => '{{PLURAL:$1|1 stranica je uklonjena|$1 stranice su uklonjene|$1 stranica je uklonjeno}} iz Vašeg popisa praćenja:', 'watchlistedit-raw-title' => 'Uredi praćene stranice u okviru za uređivanje', 'watchlistedit-raw-legend' => 'Uredi praćene stranice', 'watchlistedit-raw-explain' => 'Stranice na Vašem popisu praćenja su prikazane ispod, možete uređivati taj popis dodavanjem novih stranica ili brisanjem postojećih; u jednom retku je ime jedne stranice. Kad završite s uređivanjem, kliknite na "{{int:Watchlistedit-raw-submit}}". Također možete koristiti [[Special:EditWatchlist|standardni editor]].', 'watchlistedit-raw-titles' => 'Imena stranica:', 'watchlistedit-raw-submit' => 'Snimi promjene', 'watchlistedit-raw-done' => 'Vaš popis praćenja je snimljen.', 'watchlistedit-raw-added' => '{{PLURAL:$1|1 stranica je dodana|$1 stranice su dodane}}:', 'watchlistedit-raw-removed' => '{{PLURAL:$1|1 stranica je uklonjena|$1 stranice su ukonjene}}:', # Watchlist editing tools 'watchlisttools-view' => 'Pregled promjena praćenih stranica', 'watchlisttools-edit' => 'Pregled i uređivanje praćenih stranica', 'watchlisttools-raw' => 'Uređivanje praćenih stranica u okviru za uređivanje', # Hijri month names 'hijri-calendar-m1' => 'muhàrem', 'hijri-calendar-m2' => 'sàfer', 'hijri-calendar-m3' => 'rebiulèvel', 'hijri-calendar-m4' => 'rebiuláhir', 'hijri-calendar-m5' => 'džumadelula', 'hijri-calendar-m6' => 'džumadelahire', 'hijri-calendar-m7' => 'rèdžeb', 'hijri-calendar-m8' => 'šàbān', 'hijri-calendar-m9' => 'ramàzān', 'hijri-calendar-m10' => 'šèvāl', 'hijri-calendar-m11' => 'zulkáde', 'hijri-calendar-m12' => 'zulhidže', # Hebrew month names 'hebrew-calendar-m1' => 'tišri', 'hebrew-calendar-m2' => 'hešvan', 'hebrew-calendar-m3' => 'kislev', 'hebrew-calendar-m4' => 'tevet', 'hebrew-calendar-m5' => 'ševat', 'hebrew-calendar-m6' => 'adar', 'hebrew-calendar-m6a' => 'adar I.', 'hebrew-calendar-m6b' => 'adar II.', 'hebrew-calendar-m7' => 'nisan', 'hebrew-calendar-m8' => 'ijar', 'hebrew-calendar-m9' => 'sivan', 'hebrew-calendar-m10' => 'tamuz', 'hebrew-calendar-m11' => 'av', 'hebrew-calendar-m12' => 'elul', 'hebrew-calendar-m1-gen' => 'tišrija', 'hebrew-calendar-m2-gen' => 'hešvana', 'hebrew-calendar-m3-gen' => 'kisleva', 'hebrew-calendar-m4-gen' => 'teveta', 'hebrew-calendar-m5-gen' => 'ševata', 'hebrew-calendar-m6-gen' => 'adara', 'hebrew-calendar-m6a-gen' => 'adara I.', 'hebrew-calendar-m6b-gen' => 'adara II.', 'hebrew-calendar-m7-gen' => 'nisana', 'hebrew-calendar-m8-gen' => 'ijara', 'hebrew-calendar-m9-gen' => 'sivana', 'hebrew-calendar-m10-gen' => 'tamuza', 'hebrew-calendar-m11-gen' => 'ava', 'hebrew-calendar-m12-gen' => 'elula', # Core parser functions 'unknown_extension_tag' => "Nepoznat ''tag'' ekstenzije \"\$1\"", 'duplicate-defaultsort' => '\'\'\'Upozorenje:\'\'\' Razvrstavanje po "$2" poništava ranije razvrstavanje po "$1".', # Special:Version 'version' => 'Inačica softvera', 'version-extensions' => 'Instalirana proširenja', 'version-specialpages' => 'Posebne stranice', 'version-parserhooks' => 'Kuke parsera', 'version-variables' => 'Varijable', 'version-antispam' => 'Sprječavanje spama', 'version-skins' => 'Izgledi', 'version-other' => 'Ostalo', 'version-mediahandlers' => 'Rukovatelji medijima', 'version-hooks' => 'Kuke', 'version-extension-functions' => 'Funkcije proširenja', 'version-parser-extensiontags' => 'Oznake proširenja parsera', 'version-parser-function-hooks' => 'Kuke funkcija parsera', 'version-hook-name' => 'Ime kuke', 'version-hook-subscribedby' => 'Pretplaćeno od', 'version-version' => '(Inačica $1)', 'version-license' => 'Licencija', 'version-poweredby-credits' => "Ovaj wiki pogoni '''[//www.mediawiki.org/ MediaWiki]''', autorska prava © 2001-$1 $2.", 'version-poweredby-others' => 'ostali', 'version-license-info' => 'MediaWiki je slobodni softver; možete ga distribuirati i/ili mijenjati pod uvjetima GNU opće javne licencije u obliku u kojem ju je objavila Free Software Foundation; bilo verzije 2 licencije, ili (Vama na izbor) bilo koje kasnije verzije. MediaWiki je distribuiran u nadi da će biti koristan, no BEZ IKAKVOG JAMSTVA; čak i bez impliciranog jamstva MOGUĆNOSTI PRODAJE ili PRIKLADNOSTI ZA ODREĐENU NAMJENU. Pogledajte GNU opću javnu licenciju za više detalja. Trebali ste primiti [{{SERVER}}{{SCRIPTPATH}}/COPYING kopiju GNU opće javne licencije] uz ovaj program; ako ne, pišite na Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA, ili je [//www.gnu.org/licenses/old-licenses/gpl-2.0.html pročitajte online].', 'version-software' => 'Instalirani softver', 'version-software-product' => 'Proizvod', 'version-software-version' => 'Verzija', # Special:FilePath 'filepath' => 'Putanja datoteke', 'filepath-page' => 'Datoteka:', 'filepath-submit' => 'Idi', 'filepath-summary' => 'Ova posebna stranica daje Vam kompletnu putanju do neke datoteke. Slike se na taj način prikazuju u punoj rezoluciji, a drugi tipovi datoteka se otvaraju na klik (kako je već namješteno u Vašem operacijskom sustavu).', # Special:FileDuplicateSearch 'fileduplicatesearch' => 'Traži kopije datoteka', 'fileduplicatesearch-summary' => 'Traži kopije datoteka na temelju njihove hash vrijednosti.', 'fileduplicatesearch-legend' => 'Traži kopije datoteka', 'fileduplicatesearch-filename' => 'Ime datoteke:', 'fileduplicatesearch-submit' => 'Traži', 'fileduplicatesearch-info' => '$1 × $2 piksela<br />Veličina datoteke: $3<br />MIME tip: $4', 'fileduplicatesearch-result-1' => 'Datoteka "$1" nema identičnih kopija.', 'fileduplicatesearch-result-n' => 'Datoteka "$1" ima {{PLURAL:$2|1 identičnu kopiju|$2 identične kopije}}.', 'fileduplicatesearch-noresults' => 'Nije pronađena datoteka s imenom "$1".', # Special:SpecialPages 'specialpages' => 'Posebne stranice', 'specialpages-note' => '---- * Normalne posebne stranice * <strong class="mw-specialpagerestricted">Posebne stranice s ograničenim pristupom.</strong>', 'specialpages-group-maintenance' => 'Izvještaji za održavanje', 'specialpages-group-other' => 'Ostale posebne stranice', 'specialpages-group-login' => 'Prijava / Otvaranje računa', 'specialpages-group-changes' => 'Nedavne promjene i evidencije', 'specialpages-group-media' => 'Izvještaji i postavljanje datoteka', 'specialpages-group-users' => 'Suradnici i suradnička prava', 'specialpages-group-highuse' => 'Najčešće korištene stranice', 'specialpages-group-pages' => 'Popisi stranica', 'specialpages-group-pagetools' => 'Alati za stranice', 'specialpages-group-wiki' => 'Wiki podaci i alati', 'specialpages-group-redirects' => 'Preusmjeravajuće posebne stranice', 'specialpages-group-spam' => 'Spam alati', # Special:BlankPage 'blankpage' => 'Prazna stranica', 'intentionallyblankpage' => 'Ova stranica je namjerno ostavljena praznom', # External image whitelist 'external_image_whitelist' => '#Ovaj redak ostavite točno ovakvim kakav je<pre> #Stavite ulomke s regularnim izrazom (samo dio koji ide između //) ispod #Ovo će biti usklađeno s URL-ovima vanjskih slika (hotlink) #Oni koji se poklapaju će biti prikazani kao slike, u suprotnom će biti prikazana samo poveznica do slike #Redovi koji počinju sa # smatraju se komentarom #Ovo je osjetljivo na velika slova #Stavite sve regularne izraze iznad ovog reda. Ostavite ovaj redak točno ovakvim kakav je</pre>', # Special:Tags 'tags' => 'Valjane oznake izmjena', 'tag-filter' => 'Filter [[Special:Tags|oznaka]]:', 'tag-filter-submit' => 'Filter', 'tags-title' => 'Oznake', 'tags-intro' => 'Ova je stranica popis oznaka s kojima softver može označiti promjenu te njihovo značenje.', 'tags-tag' => 'Naziv oznake', 'tags-display-header' => 'Izgled na popisima izmjena', 'tags-description-header' => 'Puni opis značenja', 'tags-hitcount-header' => 'Označene izmjene', 'tags-edit' => 'uredi', 'tags-hitcount' => '$1 {{PLURAL:$1|promjena|promjene|promjena}}', # Special:ComparePages 'comparepages' => 'Usporedite stranice', 'compare-selector' => 'Usporedite inačice stranice', 'compare-page1' => 'Stranica 1', 'compare-page2' => 'Stranica 2', 'compare-rev1' => 'Izmjena 1', 'compare-rev2' => 'Izmjena 2', 'compare-submit' => 'Usporedite', # Database error messages 'dberr-header' => 'Ovaj wiki ima problem', 'dberr-problems' => 'Ispričavamo se! Ova stranica ima tehničkih poteškoća.', 'dberr-again' => 'Pričekajte nekoliko minuta i ponovno učitajte.', 'dberr-info' => '(Ne mogu se spojiti na poslužitelj baze: $1)', 'dberr-usegoogle' => 'U međuvremenu pokušajte tražiti putem Googlea.', 'dberr-outofdate' => 'Imajte na umu da su njihova kazala našeg sadržaja možda zastarjela.', 'dberr-cachederror' => 'Sljedeće je dohvaćena kopija tražene stranice, te možda nije ažurirana.', # HTML forms 'htmlform-invalid-input' => 'Postoje problemi s dijelom Vašeg unosa', 'htmlform-select-badoption' => 'Vrijednost koju ste naveli nije ispravan izbor.', 'htmlform-int-invalid' => 'Vrijednost koju ste naveli nije cijeli broj.', 'htmlform-float-invalid' => 'Vrijednost koju ste naveli nije broj.', 'htmlform-int-toolow' => 'Vrijednost koju ste naveli je ispod minimuma od $1', 'htmlform-int-toohigh' => 'Vrijednost koju ste naveli je iznad maksimuma od $1', 'htmlform-required' => 'Ova vrijednost je potrebna', 'htmlform-submit' => 'Pošalji', 'htmlform-reset' => 'Poništi izmjene', 'htmlform-selectorother-other' => 'Drugi', # SQLite database support 'sqlite-has-fts' => '$1 s podrškom pretraživanja cijelog teksta', 'sqlite-no-fts' => '$1 bez podrške pretraživanja cijelog teksta', # New logging system 'revdelete-restricted' => 'primijenjeno ograničenje za administratore', 'revdelete-unrestricted' => 'uklonjeno ograničenje za administratore', 'newuserlog-byemail' => 'lozinka poslana e-poštom', );
wiki-data/wiki-data
languages/messages/MessagesHr.php
PHP
gpl-2.0
235,744
/* * Copyright (C) 2004-2011 See the AUTHORS file for details. * * 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. */ #include "User.h" class CNickServ : public CModule { public: MODCONSTRUCTOR(CNickServ) { } virtual ~CNickServ() { } virtual bool OnLoad(const CString& sArgs, CString& sMessage) { if (sArgs.empty()) m_sPass = GetNV("Password"); else { m_sPass = sArgs; SetNV("Password", m_sPass); SetArgs(""); } return true; } virtual void OnModCommand(const CString& sCommand) { CString sCmdName = sCommand.Token(0).AsLower(); if (sCmdName == "set") { CString sPass = sCommand.Token(1, true); m_sPass = sPass; SetNV("Password", m_sPass); PutModule("Password set"); } else if (sCmdName == "clear") { m_sPass = ""; DelNV("Password"); } else { PutModule("Commands: set <password>, clear"); } } void HandleMessage(CNick& Nick, const CString& sMessage) { if (!m_sPass.empty() && Nick.GetNick().Equals("NickServ") && (sMessage.find("msg") != CString::npos || sMessage.find("authenticate") != CString::npos) && sMessage.AsUpper().find("IDENTIFY") != CString::npos && sMessage.find("help") == CString::npos) { PutIRC("PRIVMSG NickServ :IDENTIFY " + m_sPass); } } virtual EModRet OnPrivMsg(CNick& Nick, CString& sMessage) { HandleMessage(Nick, sMessage); return CONTINUE; } virtual EModRet OnPrivNotice(CNick& Nick, CString& sMessage) { HandleMessage(Nick, sMessage); return CONTINUE; } private: CString m_sPass; }; MODULEDEFS(CNickServ, "Auths you with NickServ")
rwaldron/znc
modules/nickserv.cpp
C++
gpl-2.0
1,718
<?php /** * Manager Log English lexicon topic * * @language en * @package modx * @subpackage lexicon */ $_lang['action'] = 'Akce'; $_lang['date_end'] = 'Datum do'; $_lang['date_start'] = 'Datum od'; $_lang['filter_clear'] = 'Vymazat filtr'; $_lang['manager_log'] = 'Události správce obsahu'; $_lang['mgrlog_clear'] = 'Odstranit události správce obsahu'; $_lang['mgrlog_clear_confirm'] = 'Opravdu chcete odstranit všechny události ze správce obsahu? Tato akce je nevratná.'; $_lang['mgrlog_query_msg'] = 'Proveďte výběr pro zobrazení událostí. Můžete zvolit datum událostí, ale pozor zvolená data NEJSOU včetně - pro výpis událostí pro 1. 1. 2004, nastavte "Datum od" na "01/01/2004" a "Datum do" na "02/01/2004".<br /><br />.'; $_lang['mgrlog_query'] = 'Zobrazení událostí dotazem'; $_lang['mgrlog_view'] = 'Zobrazit události správce obsahu'; $_lang['object'] = 'Objekt'; $_lang['occurred'] = 'Došlo k'; $_lang['user'] = 'Uživatel';
svyatoslavteterin/belton.by
core/lexicon/cs/manager_log.inc.php
PHP
gpl-2.0
969
module Rake module DSL def matrix Matrix end def story @story ||= Matrix::Story.new end def mkcloud @mkcloud ||= Matrix::MkcloudRunner.new end def virsetup @virsetup ||= Matrix::VirsetupRunner.new end def gate @gate ||= Matrix::GateRunner.new end def qa_crowbarsetup @qa_crowbar ||= Matrix::QaCrowbarSetupRunner.new end def crowbar @crowbar ||= Matrix::CrowbarRunner.new end def void @void ||= Matrix::Void.new end def config_runner @config_runner ||= Matrix::ConfigRunner.new end def admin_vm @admin_vm ||= Matrix::AdminVmRunner.new end def tempest @tempest ||= Matrix::TempestRunner.new end def command Matrix.command end def targets Matrix.targets end def log Matrix.logger end def wait_for event, options period, period_units = options[:max].split sleep_period, sleep_units = options[:sleep].split if options[:sleep] timeout_time = convert_to_seconds(period, period_units) sleep_time = convert_to_seconds(sleep_period, sleep_units) log.info("Setting timeout to '#{event}' to max #{options[:max]}") timeout(timeout_time) do (timeout_time / sleep_time).times do yield if options[:sleep] log.info("Waiting for '#{event}', sleeping for more #{options[:sleep]}") sleep(sleep_time) end end end rescue Timeout::Error message = "Failed to make #{event}, tiemout after #{options[:max]}" log.error(message) raise message end def convert_to_seconds period, units case units when /minute/ period.to_i * 60 when /second/ period.to_i when nil 0 else raise "Only minutes or seconds are allowed" end end end end
vmoravec/matrix
lib/matrix/rake/dsl.rb
Ruby
gpl-2.0
1,934
/******************************************************************************* * Copyright (c) 2006-2007 Nicolas Richeton. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors : * Nicolas Richeton (nicolas.richeton@gmail.com) - initial API and implementation *******************************************************************************/ package org.eclipse.nebula.widgets.gallery; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; /** * <p> * Base class used to implement a custom gallery item renderer. * </p> * <p> * NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT. * </p> * * @author Nicolas Richeton (nicolas.richeton@gmail.com) */ public abstract class AbstractGalleryItemRenderer { /** * Id for decorators located at the bottom right of the item image * * Example : item.setData( AbstractGalleryItemRenderer.OVERLAY_BOTTOM_RIGHT * , <Image or Image[]> ); */ public final static String OVERLAY_BOTTOM_RIGHT = "org.eclipse.nebula.widget.gallery.bottomRightOverlay"; //$NON-NLS-1$ /** * Id for decorators located at the bottom left of the item image * * Example : item.setData( AbstractGalleryItemRenderer.OVERLAY_BOTTOM_RIGHT * , <Image or Image[]> ); */ public final static String OVERLAY_BOTTOM_LEFT = "org.eclipse.nebula.widget.gallery.bottomLeftOverlay"; //$NON-NLS-1$ /** * Id for decorators located at the top right of the item image * * Example : item.setData( AbstractGalleryItemRenderer.OVERLAY_BOTTOM_RIGHT * , <Image or Image[]> ); */ public final static String OVERLAY_TOP_RIGHT = "org.eclipse.nebula.widget.gallery.topRightOverlay"; //$NON-NLS-1$ /** * Id for decorators located at the top left of the item image * * Example : item.setData( AbstractGalleryItemRenderer.OVERLAY_BOTTOM_RIGHT * , <Image or Image[]> ); */ public final static String OVERLAY_TOP_LEFT = "org.eclipse.nebula.widget.gallery.topLeftOverlay"; //$NON-NLS-1$ protected static final String EMPTY_STRING = ""; //$NON-NLS-1$ protected Gallery gallery; Color galleryBackgroundColor, galleryForegroundColor; protected boolean selected; /** * true is the current item is selected * * @return */ public boolean isSelected() { return selected; } public void setSelected(boolean selected) { this.selected = selected; } /** * Draws an item. * * @param gc * @param item * @param index * @param x * @param y * @param width * @param height */ public abstract void draw(GC gc, GalleryItem item, int index, int x, int y, int width, int height); public abstract void dispose(); /** * This method is called before drawing the first item. It may be used to * calculate some values (like font metrics) that will be used for each * item. * * @param gc */ public void preDraw(GC gc) { // Cache gallery color since this method is resource intensive. galleryForegroundColor = gallery.getForeground(); galleryBackgroundColor = gallery.getBackground(); } /** * This method is called after drawing the last item. It may be used to * cleanup and release resources created in preDraw(). * * @param gc */ public void postDraw(GC gc) { galleryForegroundColor = null; galleryBackgroundColor = null; } /** * Get current gallery. * * @return */ public Gallery getGallery() { return gallery; } /** * Set the current gallery. This method is automatically called by * {@link Gallery#setItemRenderer(AbstractGalleryItemRenderer)}. There is * not need to call it from user code. * * @param gallery */ public void setGallery(Gallery gallery) { this.gallery = gallery; } /** * Returns the best size ratio for overlay images. This ensure that all * images can fit without being drawn on top of others. * * @param imageSize * @param overlaySizeTopLeft * @param overlaySizeTopRight * @param overlaySizeBottomLeft * @param overlaySizeBottomRight * @return */ protected double getOverlayRatio(Point imageSize, Point overlaySizeTopLeft, Point overlaySizeTopRight, Point overlaySizeBottomLeft, Point overlaySizeBottomRight) { double ratio = 1; if (overlaySizeTopLeft.x + overlaySizeTopRight.x > imageSize.x) { ratio = Math.min(ratio, (double) imageSize.x / (overlaySizeTopLeft.x + overlaySizeTopRight.x)); } if (overlaySizeBottomLeft.x + overlaySizeBottomRight.x > imageSize.x) { ratio = Math.min(ratio, (double) imageSize.x / (overlaySizeBottomLeft.x + overlaySizeBottomRight.x)); } if (overlaySizeTopLeft.y + overlaySizeBottomLeft.y > imageSize.y) { ratio = Math.min(ratio, (double) imageSize.y / (overlaySizeTopLeft.y + overlaySizeBottomLeft.y)); } if (overlaySizeTopRight.y + overlaySizeBottomRight.y > imageSize.y) { ratio = Math.min(ratio, (double) imageSize.y / (overlaySizeTopRight.y + overlaySizeBottomRight.y)); } return ratio; } /** * Draw image overlays. Overlays are defined with image.setData using the * following keys : * <ul> * <li>org.eclipse.nebula.widget.gallery.bottomLeftOverlay</li> * <li>org.eclipse.nebula.widget.gallery.bottomRightOverlay</li> * <li>org.eclipse.nebula.widget.gallery.topLeftOverlay</li> * <li>org.eclipse.nebula.widget.gallery.topRightOverlay</li> *</ul> * */ protected void drawAllOverlays(GC gc, GalleryItem item, int x, int y, Point imageSize, int xShift, int yShift) { Image[] imagesBottomLeft = getImageOverlay(item, OVERLAY_BOTTOM_LEFT); Image[] imagesBottomRight = getImageOverlay(item, OVERLAY_BOTTOM_RIGHT); Image[] imagesTopLeft = getImageOverlay(item, OVERLAY_TOP_LEFT); Image[] imagesTopRight = getImageOverlay(item, OVERLAY_TOP_RIGHT); Point overlaySizeBottomLeft = getOverlaySize(imagesBottomLeft); Point overlaySizeBottomRight = getOverlaySize(imagesBottomRight); Point overlaySizeTopLeft = getOverlaySize(imagesTopLeft); Point overlaySizeTopRight = getOverlaySize(imagesTopRight); double ratio = getOverlayRatio(imageSize, overlaySizeTopLeft, overlaySizeTopRight, overlaySizeBottomLeft, overlaySizeBottomRight); drawOverlayImages(gc, x + xShift, y + yShift, ratio, imagesTopLeft); drawOverlayImages( gc, (int) (x + xShift + imageSize.x - overlaySizeTopRight.x * ratio), y + yShift, ratio, imagesTopRight); drawOverlayImages(gc, x + xShift, (int) (y + yShift + imageSize.y - overlaySizeBottomLeft.y * ratio), ratio, imagesBottomLeft); drawOverlayImages(gc, (int) (x + xShift + imageSize.x - overlaySizeBottomRight.x * ratio), (int) (y + yShift + imageSize.y - overlaySizeBottomRight.y * ratio), ratio, imagesBottomRight); } /** * Draw overlay images for one corner. * * @param gc * @param x * @param y * @param ratio * @param images */ protected void drawOverlayImages(GC gc, int x, int y, double ratio, Image[] images) { if (images == null) return; int position = 0; for (int i = 0; i < images.length; i++) { Image img = images[i]; gc.drawImage(img, 0, 0, img.getBounds().width, img.getBounds().height, x + position, y, (int) (img .getBounds().width * ratio), (int) (img.getBounds().height * ratio)); position += img.getBounds().width * ratio; } } /** * Return overlay size, summing all images sizes * * @param images * @return */ protected Point getOverlaySize(Image[] images) { if (images == null) return new Point(0, 0); Point result = new Point(0, 0); for (int i = 0; i < images.length; i++) { result.x += images[i].getBounds().width; result.y = Math.max(result.y, images[i].getBounds().height); } return result; } /** * Returns an array of images or null of no overlay was defined for this * image. * * @param item * @param id * @return Image[] or null */ protected Image[] getImageOverlay(GalleryItem item, String id) { Object data = item.getData(id); if (data == null) { return null; } Image[] result = null; if (data instanceof Image) { result = new Image[1]; result[0] = (Image) data; } if (data instanceof Image[]) { result = (Image[]) data; } return result; } /** * Check the GalleryItem, Gallery, and Display in order for the active * background color for the given GalleryItem. * * @param item * @return the background Color to use for this item */ protected Color getBackground(GalleryItem item) { Color backgroundColor = item.background; if (backgroundColor == null) { backgroundColor = item.getParent().getBackground(); } return backgroundColor; } /** * Check the GalleryItem, Gallery, and Display in order for the active * foreground color for the given GalleryItem. * * @param item * @return the foreground Color to use for this item */ protected Color getForeground(GalleryItem item) { Color foregroundColor = item.getForeground(true); if (foregroundColor == null) { foregroundColor = item.getParent().getForeground(); } return foregroundColor; } /** * Check the GalleryItem, Gallery, and Display in order for the active font * for the given GalleryItem. * * @param item * @return the Font to use for this item */ protected Font getFont(GalleryItem item) { Font font = item.getFont(true); if (font == null) { font = item.getParent().getFont(); } return font; } }
bdaum/zoraPD
org.eclipse.nebula.widgets.gallery/src/org/eclipse/nebula/widgets/gallery/AbstractGalleryItemRenderer.java
Java
gpl-2.0
9,697
package cmucoref.mention.extractor; import cmucoref.document.Document; import cmucoref.document.Lexicon; import cmucoref.document.Sentence; import cmucoref.exception.MentionException; import cmucoref.mention.Mention; import cmucoref.mention.eventextractor.EventExtractor; import cmucoref.mention.extractor.relationextractor.*; import cmucoref.model.Options; import cmucoref.util.Pair; import cmucoref.mention.SpeakerInfo; import cmucoref.mention.WordNet; import cmucoref.mention.Dictionaries; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintStream; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.Properties; public abstract class MentionExtractor { protected Dictionaries dict; protected WordNet wordNet; protected EventExtractor eventExtractor; public MentionExtractor(){} public void createDict(String propfile) throws FileNotFoundException, IOException { Properties props = new Properties(); InputStream in = MentionExtractor.class.getClassLoader().getResourceAsStream(propfile); props.load(new InputStreamReader(in)); this.dict = new Dictionaries(props); } public void createWordNet(String wnDir) throws IOException { wordNet = new WordNet(wnDir); } public void closeWordNet() { wordNet.close(); } public void setEventExtractor(EventExtractor eventExtractor) { this.eventExtractor = eventExtractor; } public Dictionaries getDict() { return dict; } public WordNet getWordNet() { return wordNet; } public int sizeOfEvent() { return eventExtractor.sizeOfEvent(); } public static MentionExtractor createExtractor(String extractorClassName) throws InstantiationException, IllegalAccessException, ClassNotFoundException { return (MentionExtractor) Class.forName(extractorClassName).newInstance(); } public abstract List<List<Mention>> extractPredictedMentions(Document doc, Options options) throws IOException; protected void deleteDuplicatedMentions(List<Mention> mentions, Sentence sent) { //remove duplicated mentions Set<Mention> remove = new HashSet<Mention>(); for(int i = 0; i < mentions.size(); ++i) { Mention mention1 = mentions.get(i); for(int j = i + 1; j < mentions.size(); ++j) { Mention mention2 = mentions.get(j); if(mention1.equals(mention2)) { remove.add(mention2); } } } mentions.removeAll(remove); } protected void deleteSpuriousNamedEntityMentions(List<Mention> mentions, Sentence sent) { //remove overlap mentions Set<Mention> remove = new HashSet<Mention>(); for(Mention mention1 : mentions) { if(mention1.isPureNerMention(sent, dict)) { for(Mention mention2 : mentions) { if(mention1.overlap(mention2)) { remove.add(mention1); } } } } mentions.removeAll(remove); //remove single number named entity mentions remove.clear(); String[] NUMBERS = {"NUMBER", "ORDINAL", "CARDINAL", "MONEY", "QUANTITY"}; HashSet<String> numberNER = new HashSet<String>(Arrays.asList(NUMBERS)); for(Mention mention : mentions) { if(mention.endIndex - mention.startIndex == 1) { if(numberNER.contains(mention.headword.ner)) { remove.add(mention); } } } mentions.removeAll(remove); //remove NORP mentions as modifiers remove.clear(); for(Mention mention : mentions) { if((dict.isAdjectivalDemonym(mention.getSpan(sent)) || mention.headword.ner.equals("NORP")) && (mention.headword.postag.equals("JJ") || !dict.rolesofNoun.contains(mention.headword.basic_deprel))) { remove.add(mention); } } mentions.removeAll(remove); //remove mentions with non-noun head //TODO } protected void deleteSpuriousPronominalMentions(List<Mention> mentions, Sentence sent) { //remove "you know" mentions Set<Mention> remove = new HashSet<Mention>(); for(Mention mention : mentions) { if(mention.isPronominal() && (mention.endIndex - mention.startIndex == 1) && mention.headString.equals("you")) { if(mention.headIndex + 1 < sent.length()) { Lexicon lex = sent.getLexicon(mention.headIndex + 1); if(lex.form.equals("know")) { remove.add(mention); } } } } mentions.removeAll(remove); //remove "you know" part in a mention remove.clear(); for(Mention mention : mentions) { if(mention.endIndex - mention.startIndex > 2) { if(sent.getLexicon(mention.endIndex - 2).form.toLowerCase().equals("you") && sent.getLexicon(mention.endIndex - 1).form.toLowerCase().equals("know")) { mention.endIndex = mention.endIndex - 2; boolean duplicated = false; for(Mention m2 : mentions) { if(mention == m2) { continue; } if(mention.equals(m2)) { duplicated = true; break; } } if(duplicated) { remove.add(mention); } else { mention.process(sent, mentions, dict, wordNet, remove); } } } } mentions.removeAll(remove); } public List<Mention> getSingleMentionList(Document doc, List<List<Mention>> mentionList, Options options) throws InstantiationException, IllegalAccessException, ClassNotFoundException { List<Mention> allMentions = new ArrayList<Mention>(); for(List<Mention> mentions : mentionList) { allMentions.addAll(mentions); } //extract events for mentions if(options.useEventFeature()) { extractEvents(mentionList, doc, options); } //find speaker for each mention findSpeakers(doc, allMentions, mentionList); //Collections.sort(allMentions, Mention.syntacticOrderComparator); //re-assign mention ID; for(int i = 0; i < allMentions.size(); ++i) { Mention mention = allMentions.get(i); mention.mentionID = i; } if(options.usePreciseMatch()) { findPreciseMatchRelation(doc, allMentions); } return allMentions; } /** * * @param doc * @param allMentions */ protected void findSpeakers(Document doc, List<Mention> allMentions, List<List<Mention>> mentionList) { Map<String, SpeakerInfo> speakersMap = new HashMap<String, SpeakerInfo>(); speakersMap.put("<DEFAULT_SPEAKER>", new SpeakerInfo(0, "<DEFAULT_SPEAKER>", false)); // find default speakers from the speaker tags of document doc findDefaultSpeakers(doc, allMentions, speakersMap); //makr quotations markQuotaions(doc, false); findQuotationSpeakers(doc, allMentions, mentionList, dict, speakersMap); Collections.sort(allMentions, Mention.headIndexWithSpeakerOrderComparator); //find previous speakerinfo SpeakerInfo defaultSpeakerInfo = speakersMap.get("<DEFAULT_SPEAKER>"); SpeakerInfo preSpeakerInfo = defaultSpeakerInfo; Mention preMention = null; for(Mention mention : allMentions) { if(mention.speakerInfo.isQuotationSpeaker()) { continue; } if(preMention != null && !preMention.speakerInfo.equals(mention.speakerInfo)) { preSpeakerInfo = preMention.speakerInfo; } if(preSpeakerInfo.equals(defaultSpeakerInfo)) { mention.preSpeakerInfo = null; } else { mention.preSpeakerInfo = preSpeakerInfo; } preMention = mention; } } protected void findQuotationSpeakers(Document doc, List<Mention> allMentions, List<List<Mention>> mentionList, Dictionaries dict, Map<String, SpeakerInfo> speakersMap) { Pair<Integer, Integer> beginQuotation = new Pair<Integer, Integer>(); Pair<Integer, Integer> endQuotation = new Pair<Integer, Integer>(); boolean insideQuotation = false; int sizeOfDoc = doc.size(); for(int i = 0; i < sizeOfDoc; ++i) { Sentence sent = doc.getSentence(i); for(int j = 1; j < sent.length(); ++j) { int utterIndex = sent.getLexicon(j).utterance; if(utterIndex != 0 && !insideQuotation) { insideQuotation = true; beginQuotation.first = i; beginQuotation.second = j; } else if(utterIndex == 0 && insideQuotation) { insideQuotation = false; endQuotation.first = i; endQuotation.second = j; findQuotationSpeakers(doc, allMentions, mentionList, dict, speakersMap, beginQuotation, endQuotation); } } } if(insideQuotation) { endQuotation.first = sizeOfDoc - 1; endQuotation.second = doc.getSentence(endQuotation.first).length(); findQuotationSpeakers(doc, allMentions, mentionList, dict, speakersMap, beginQuotation, endQuotation); } } protected void findQuotationSpeakers(Document doc, List<Mention> allMentions, List<List<Mention>> mentionList, Dictionaries dict, Map<String, SpeakerInfo> speakersMap, Pair<Integer, Integer> beginQuotation, Pair<Integer, Integer> endQuotation) { Sentence sent = doc.getSentence(beginQuotation.first); List<Mention> mentions = mentionList.get(beginQuotation.first); SpeakerInfo speakerInfo = findQuotationSpeaker(sent, mentions, 1, beginQuotation.second, dict, speakersMap); if(speakerInfo != null) { assignUtterancetoSpeaker(doc, mentionList, dict, beginQuotation, endQuotation, speakerInfo); return; } sent = doc.getSentence(endQuotation.first); mentions = mentionList.get(endQuotation.first); speakerInfo = findQuotationSpeaker(sent, mentions, endQuotation.second, sent.length(), dict, speakersMap); if(speakerInfo != null) { assignUtterancetoSpeaker(doc, mentionList, dict, beginQuotation, endQuotation, speakerInfo); return; } if(beginQuotation.second <= 2 && beginQuotation.first > 0) { sent = doc.getSentence(beginQuotation.first - 1); mentions = mentionList.get(beginQuotation.first - 1); speakerInfo = findQuotationSpeaker(sent, mentions, 1, sent.length(), dict, speakersMap); if(speakerInfo != null) { assignUtterancetoSpeaker(doc, mentionList, dict, beginQuotation, endQuotation, speakerInfo); return; } } if(endQuotation.second == doc.getSentence(endQuotation.first).length() - 1 && doc.size() > endQuotation.first + 1) { sent = doc.getSentence(endQuotation.first + 1); mentions = mentionList.get(endQuotation.first + 1); speakerInfo = findQuotationSpeaker(sent, mentions, 1, sent.length(), dict, speakersMap); if(speakerInfo != null) { assignUtterancetoSpeaker(doc, mentionList, dict, beginQuotation, endQuotation, speakerInfo); return; } } } private void assignUtterancetoSpeaker(Document doc, List<List<Mention>> mentionList, Dictionaries dict, Pair<Integer, Integer> beginQuotation, Pair<Integer, Integer> endQuotation, SpeakerInfo speakerInfo) { for(int i = beginQuotation.first; i <= endQuotation.first; ++i) { Sentence sent = doc.getSentence(i); int start = i == beginQuotation.first ? beginQuotation.second : 1; int end = i == endQuotation.first ? endQuotation.second : sent.length() - 1; List<Mention> mentions = mentionList.get(i); for(Mention mention : mentions) { if(mention.startIndex >= start && mention.endIndex <= end) { mention.setSpeakerInfo(speakerInfo); } } } } protected SpeakerInfo findQuotationSpeaker(Sentence sent, List<Mention> mentions, int startIndex, int endIndex, Dictionaries dict, Map<String, SpeakerInfo> speakersMap) { for(int i = endIndex - 1; i >= startIndex; --i) { if(sent.getLexicon(i).utterance != 0) { continue; } String lemma = sent.getLexicon(i).lemma; if(dict.reportVerb.contains(lemma)) { int reportVerbPos = i; Lexicon reportVerb = sent.getLexicon(reportVerbPos); for(int j = startIndex; j < endIndex; ++j) { Lexicon lex = sent.getLexicon(j); if(lex.collapsed_head == reportVerbPos && (lex.collapsed_deprel.equals("nsubj") || lex.collapsed_deprel.equals("xsubj")) || reportVerb.collapsed_deprel.startsWith("conj_") && lex.collapsed_head == reportVerb.collapsed_head && (lex.collapsed_deprel.equals("nsubj") || lex.collapsed_deprel.equals("xsubj"))) { int speakerHeadIndex = j; for(Mention mention : mentions) { if(mention.getBelognTo() == null && mention.headIndex == speakerHeadIndex && mention.startIndex >= startIndex && mention.endIndex < endIndex) { if(mention.utteranceInfo == null) { String speakerName = mention.getSpan(sent); SpeakerInfo speakerInfo = new SpeakerInfo(speakersMap.size(), speakerName, true); speakersMap.put(speakerInfo.toString(), speakerInfo); speakerInfo.setSpeaker(mention); mention.utteranceInfo = speakerInfo; } return mention.utteranceInfo; } } String speakerName = sent.getLexicon(speakerHeadIndex).form; SpeakerInfo speakerInfo = new SpeakerInfo(speakersMap.size(), speakerName, true); speakersMap.put(speakerInfo.toString(), speakerInfo); return speakerInfo; } } } } return null; } /** * mark quotations for a document * @param doc * @param normalQuotationType */ private void markQuotaions(Document doc, boolean normalQuotationType) { int utteranceIndex = 0; boolean insideQuotation = false; boolean hasQuotation = false; for(Sentence sent : doc.getSentences()) { for(Lexicon lex : sent.getLexicons()) { lex.utterance = utteranceIndex; if(lex.form.equals("``") || (!insideQuotation && normalQuotationType && lex.form.equals("\""))) { utteranceIndex++; lex.utterance = utteranceIndex; insideQuotation = true; hasQuotation = true; } else if((utteranceIndex > 0 && lex.form.equals("''")) || (insideQuotation && normalQuotationType && lex.form.equals("\""))) { insideQuotation = false; utteranceIndex--; } } } if(!hasQuotation && !normalQuotationType) { markQuotaions(doc, true); } } /** * find default speakers from the speaker tags of document * @param doc * @param allMentions * @param speakersMap */ protected void findDefaultSpeakers(Document doc, List<Mention> allMentions, Map<String, SpeakerInfo> speakersMap) { for(Mention mention : allMentions) { Sentence sent = doc.getSentence(mention.sentID); String speaker = sent.getSpeaker().equals("-") ? "<DEFAULT_SPEAKER>" : sent.getSpeaker(); SpeakerInfo speakerInfo = speakersMap.get(speaker); if(speakerInfo == null) { speakerInfo = new SpeakerInfo(speakersMap.size(), speaker, false); speakersMap.put(speaker, speakerInfo); } mention.setSpeakerInfo(speakerInfo); } } protected void findPreciseMatchRelation(Document doc, List<Mention> allMentions) { for(int i = 1; i < allMentions.size(); ++i) { Mention anaph = allMentions.get(i); //find precise match for(int j = 0; j < i; ++j) { Mention antec = allMentions.get(j); if(anaph.preciseMatch(doc.getSentence(anaph.sentID), antec, doc.getSentence(antec.sentID), dict)) { anaph.addPreciseMatch(antec); } } //find string match for(int j = i - 1; j >= 0; --j) { Mention antec = allMentions.get(j); if(anaph.stringMatch(doc.getSentence(anaph.sentID), antec, doc.getSentence(antec.sentID), dict)) { anaph.addStringMatch(antec); } } } } protected void extractEvents(List<List<Mention>> mentionList, Document doc, Options options) throws InstantiationException, IllegalAccessException, ClassNotFoundException { eventExtractor.extractEvents(doc, mentionList, options); } protected void findSyntacticRelation(List<Mention> mentions, Sentence sent, Options options) throws InstantiationException, IllegalAccessException, ClassNotFoundException, MentionException{ markListMemberRelation(mentions, sent, RelationExtractor.createExtractor(options.getListMemberRelationExtractor())); deleteSpuriousListMentions(mentions, sent); correctHeadIndexforNERMentions(mentions, sent); markAppositionRelation(mentions, sent, RelationExtractor.createExtractor(options.getAppositionRelationExtractor())); markRoleAppositionRelation(mentions, sent, RelationExtractor.createExtractor(options.getRoleAppositionRelationExtractor())); markPredicateNominativeRelation(mentions, sent, RelationExtractor.createExtractor(options.getPredicateNominativeRelationExtractor())); deletePleonasticItwithTemproal(mentions, sent); //markRelativePronounRelation(mentions, sent, RelationExtractor.createExtractor(options.getRelativePronounRelationExtractor())); } /** * remove nested mention with shared headword (except enumeration/list): pick larger one * @param mentions * @param sent */ protected void deleteSpuriousListMentions(List<Mention> mentions, Sentence sent) { Set<Mention> remove = new HashSet<Mention>(); for(Mention mention1 : mentions) { for(Mention mention2 : mentions) { if(mention1.headIndex == mention2.headIndex && mention2.cover(mention1) && mention1.getBelognTo() == null) { remove.add(mention1); } } } mentions.removeAll(remove); } /** * remove pleonastic it with Temporal mentions (e.g. it is summer) * @param mentions * @param sent */ protected void deletePleonasticItwithTemproal(List<Mention> mentions, Sentence sent) { Set<Mention> remove = new HashSet<Mention>(); for(Mention mention : mentions) { if(mention.isPronominal() && mention.headString.equals("it") && mention.getPredicateNominatives() != null) { for(Mention predN : mention.getPredicateNominatives()) { if(!mentions.contains(predN)) { continue; } if(predN.isProper() && predN.headword.ner.equals("DATE") || predN.isNominative() && dict.temporals.contains(predN.headString)) { remove.add(mention); break; } } } else if(mention.isPronominal() && mention.headString.equals("it")) { Lexicon headword = sent.getLexicon(mention.originalHeadIndex); int head = headword.collapsed_head; if(sent.getLexicon(head).lemma.equals("be") && headword.collapsed_deprel.equals("nsubj")) { for(Mention mention2 : mentions) { Lexicon headword2 = sent.getLexicon(mention2.originalHeadIndex); if(headword2.id > head && headword2.collapsed_head == head && headword2.collapsed_deprel.startsWith("prep_") && (mention2.isProper() && mention2.headword.ner.equals("DATE") || mention2.isNominative() && dict.temporals.contains(mention2.headString))) { remove.add(mention); } } } } } mentions.removeAll(remove); } protected void correctHeadIndexforNERMentions(List<Mention> mentions, Sentence sent) { for(Mention mention : mentions) { mention.correctHeadIndex(sent, dict, wordNet); } } protected void markListMemberRelation(List<Mention> mentions, Sentence sent, RelationExtractor extractor) throws MentionException { Set<Pair<Integer, Integer>> foundPairs = extractor.extractRelation(sent, mentions); markMentionRelation(mentions, sent, foundPairs, "LISTMEMBER"); } protected void markAppositionRelation(List<Mention> mentions, Sentence sent, RelationExtractor extractor) throws MentionException { Set<Pair<Integer, Integer>> foundPairs = extractor.extractRelation(sent, mentions); markMentionRelation(mentions, sent, foundPairs, "APPOSITION"); } protected void markRoleAppositionRelation(List<Mention> mentions, Sentence sent, RelationExtractor extractor) throws MentionException { Set<Pair<Integer, Integer>> foundPairs = extractor.extractRelation(sent, mentions); markMentionRelation(mentions, sent, foundPairs, "ROLE_APPOSITION"); } protected void markPredicateNominativeRelation(List<Mention> mentions, Sentence sent, RelationExtractor extractor) throws MentionException { Set<Pair<Integer, Integer>> foundPairs = extractor.extractRelation(sent, mentions); markMentionRelation(mentions, sent, foundPairs, "PREDICATE_NOMINATIVE"); } protected void markRelativePronounRelation(List<Mention> mentions, Sentence sent, RelationExtractor extractor) throws MentionException { Set<Pair<Integer, Integer>> foundPairs = extractor.extractRelation(sent, mentions); markMentionRelation(mentions, sent, foundPairs, "RELATIVE_PRONOUN"); } protected void markMentionRelation(List<Mention> mentions, Sentence sent, Set<Pair<Integer, Integer>> foundPairs, String relation) throws MentionException { for(Mention mention1 : mentions) { for(Mention mention2 : mentions) { if(mention1.equals(mention2)) { continue; } if(relation.equals("LISTMEMBER")) { for(Pair<Integer, Integer> pair : foundPairs) { if(pair.first == mention1.mentionID && pair.second == mention2.mentionID) { mention2.addListMember(mention1, sent); } } } else if(relation.equals("PREDICATE_NOMINATIVE")) { for(Pair<Integer, Integer> pair : foundPairs) { if(pair.first == mention1.mentionID && pair.second == mention2.mentionID) { mention2.addPredicativeNominative(mention1, dict); } } } else if(relation.equals("ROLE_APPOSITION")) { for(Pair<Integer, Integer> pair : foundPairs) { if(pair.first == mention1.mentionID && pair.second == mention2.mentionID) { mention2.addRoleApposition(mention1, sent, dict); } } } else{ for(Pair<Integer, Integer> pair : foundPairs) { if(pair.first == mention1.originalHeadIndex && pair.second == mention2.originalHeadIndex) { if(relation.equals("APPOSITION")) { mention2.addApposition(mention1, dict); } else if(relation.equals("RELATIVE_PRONOUN")) { mention2.addRelativePronoun(mention1); } else { throw new MentionException("Unknown mention relation: " + relation); } } } } } } } public void displayMentions(Document doc, List<List<Mention>> mentionList, PrintStream printer){ printer.println("#begin document " + doc.getFileName() + " docId " + doc.getDocId()); int sentId = 0; for(List<Mention> mentions : mentionList){ printer.println("sent Id: " + sentId); for(Mention mention : mentions){ displayMention(doc.getSentence(sentId), mention, printer); } sentId++; printer.println("----------------------------------------"); } printer.println("end document"); printer.flush(); } public void displayMention(Sentence sent, Mention mention, PrintStream printer){ mention.display(sent, printer); } }
XuezheMax/cmucoref
src/cmucoref/mention/extractor/MentionExtractor.java
Java
gpl-2.0
27,355
#ifndef DCLIST_HPP #define DCLIST_HPP #include "celltype.hpp" #include <string> #include <sstream> #include <exception> class DCList { private: celltype* head, *last; bool swapped; int makeList(int*); public: DCList(); ~DCList(); void insert(int); int extract(void); void swap(void); void makenull(void); bool empty(void); bool isSwapped(void); std::string list(bool); void cut(int); celltype* getHead(void); celltype* getLast(void); celltype* locate(int); }; #endif // DCLIST_HPP
adrigames/dsAssignment2
DS_Practice2/DS_Practice2/DCList.hpp
C++
gpl-2.0
553
# kamene.contrib.description = Label Distribution Protocol (LDP) # kamene.contrib.status = loads # http://git.savannah.gnu.org/cgit/ldpscapy.git/snapshot/ldpscapy-5285b81d6e628043df2a83301b292f24a95f0ba1.tar.gz # 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/>. # Copyright (C) 2010 Florian Duraffourg import struct from kamene.packet import * from kamene.fields import * from kamene.ansmachine import * from kamene.layers.inet import UDP from kamene.layers.inet import TCP from kamene.base_classes import Net # Guess payload def guess_payload(p): LDPTypes = { 0x0001: LDPNotification, 0x0100: LDPHello, 0x0200: LDPInit, 0x0201: LDPKeepAlive, 0x0300: LDPAddress, 0x0301: LDPAddressWM, 0x0400: LDPLabelMM, 0x0401: LDPLabelReqM, 0x0404: LDPLabelARM, 0x0402: LDPLabelWM, 0x0403: LDPLabelRelM, } type = struct.unpack("!H",p[0:2])[0] type = type & 0x7fff if type == 0x0001 and struct.unpack("!H",p[2:4])[0] > 20: return LDP if type in LDPTypes: return LDPTypes[type] else: return conf.raw_layer ## Fields ## # 3.4.1. FEC TLV class FecTLVField(StrField): islist=1 def m2i(self, pkt, x): nbr = struct.unpack("!H",x[2:4])[0] used = 0 x=x[4:] list=[] while x: #if x[0] == 1: # list.append('Wildcard') #else: #mask=ord(x[8*i+3]) #add=inet_ntoa(x[8*i+4:8*i+8]) mask=ord(x[3]) nbroctets = mask / 8 if mask % 8: nbroctets += 1 add=inet_ntoa(x[4:4+nbroctets]+"\x00"*(4-nbroctets)) list.append( (add, mask) ) used += 4 + nbroctets x=x[4+nbroctets:] return list def i2m(self, pkt, x): if type(x) is str: return x s = "\x01\x00" l = 0 fec = "" for o in x: fec += "\x02\x00\x01" # mask length fec += struct.pack("!B",o[1]) # Prefix fec += inet_aton(o[0]) l += 8 s += struct.pack("!H",l) s += fec return s def size(self, s): """Get the size of this field""" l = 4 + struct.unpack("!H",s[2:4])[0] return l def getfield(self, pkt, s): l = self.size(s) return s[l:],self.m2i(pkt, s[:l]) # 3.4.2.1. Generic Label TLV class LabelTLVField(StrField): def m2i(self, pkt, x): return struct.unpack("!I",x[4:8])[0] def i2m(self, pkt, x): if type(x) is str: return x s = "\x02\x00\x00\x04" s += struct.pack("!I",x) return s def size(self, s): """Get the size of this field""" l = 4 + struct.unpack("!H",s[2:4])[0] return l def getfield(self, pkt, s): l = self.size(s) return s[l:],self.m2i(pkt, s[:l]) # 3.4.3. Address List TLV class AddressTLVField(StrField): islist=1 def m2i(self, pkt, x): nbr = struct.unpack("!H",x[2:4])[0] - 2 nbr /= 4 x=x[6:] list=[] for i in range(0,nbr): add = x[4*i:4*i+4] list.append(inet_ntoa(add)) return list def i2m(self, pkt, x): if type(x) is str: return x l=2+len(x)*4 s = "\x01\x01"+struct.pack("!H",l)+"\x00\x01" for o in x: s += inet_aton(o) return s def size(self, s): """Get the size of this field""" l = 4 + struct.unpack("!H",s[2:4])[0] return l def getfield(self, pkt, s): l = self.size(s) return s[l:],self.m2i(pkt, s[:l]) # 3.4.6. Status TLV class StatusTLVField(StrField): islist=1 def m2i(self, pkt, x): l = [] statuscode = struct.unpack("!I",x[4:8])[0] l.append( (statuscode & 2**31) >> 31) l.append( (statuscode & 2**30) >> 30) l.append( statuscode & 0x3FFFFFFF ) l.append( struct.unpack("!I", x[8:12])[0] ) l.append( struct.unpack("!H", x[12:14])[0] ) return l def i2m(self, pkt, x): if type(x) is str: return x s = "\x03\x00" + struct.pack("!H",10) statuscode = 0 if x[0] != 0: statuscode += 2**31 if x[1] != 0: statuscode += 2**30 statuscode += x[2] s += struct.pack("!I",statuscode) if len(x) > 3: s += struct.pack("!I",x[3]) else: s += "\x00\x00\x00\x00" if len(x) > 4: s += struct.pack("!H",x[4]) else: s += "\x00\x00" return s def getfield(self, pkt, s): l = 14 return s[l:],self.m2i(pkt, s[:l]) # 3.5.2 Common Hello Parameters TLV class CommonHelloTLVField(StrField): islist = 1 def m2i(self, pkt, x): list = [] v = struct.unpack("!H",x[4:6])[0] list.append(v) flags = struct.unpack("B",x[6])[0] v = ( flags & 0x80 ) >> 7 list.append(v) v = ( flags & 0x40 ) >> 7 list.append(v) return list def i2m(self, pkt, x): if type(x) is str: return x s = "\x04\x00\x00\x04" s += struct.pack("!H",x[0]) byte = 0 if x[1] == 1: byte += 0x80 if x[2] == 1: byte += 0x40 s += struct.pack("!B",byte) s += "\x00" return s def getfield(self, pkt, s): l = 8 return s[l:],self.m2i(pkt, s[:l]) # 3.5.3 Common Session Parameters TLV class CommonSessionTLVField(StrField): islist = 1 def m2i(self, pkt, x): l = [] l.append(struct.unpack("!H",x[6:8])[0]) octet = struct.unpack("B",x[8:9])[0] l.append( (octet & 2**7 ) >> 7 ) l.append( (octet & 2**6 ) >> 6 ) l.append( struct.unpack("B",x[9:10])[0] ) l.append( struct.unpack("!H",x[10:12])[0] ) l.append( inet_ntoa(x[12:16]) ) l.append( struct.unpack("!H",x[16:18])[0] ) return l def i2m(self, pkt, x): if type(x) is str: return x s = "\x05\x00\x00\x0E\x00\x01" s += struct.pack("!H",x[0]) octet = 0 if x[1] != 0: octet += 2**7 if x[2] != 0: octet += 2**6 s += struct.pack("!B",octet) s += struct.pack("!B",x[3]) s += struct.pack("!H",x[4]) s += inet_aton(x[5]) s += struct.pack("!H",x[6]) return s def getfield(self, pkt, s): l = 18 return s[l:],self.m2i(pkt, s[:l]) ## Messages ## # 3.5.1. Notification Message class LDPNotification(Packet): name = "LDPNotification" fields_desc = [ BitField("u",0,1), BitField("type", 0x0001, 15), ShortField("len", None), IntField("id", 0) , StatusTLVField("status",(0,0,0,0,0)) ] def post_build(self, p, pay): if self.len is None: l = len(p) - 4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) # 3.5.2. Hello Message class LDPHello(Packet): name = "LDPHello" fields_desc = [ BitField("u",0,1), BitField("type", 0x0100, 15), ShortField("len", None), IntField("id", 0) , CommonHelloTLVField("params",[180,0,0]) ] def post_build(self, p, pay): if self.len is None: l = len(p) - 4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) # 3.5.3. Initialization Message class LDPInit(Packet): name = "LDPInit" fields_desc = [ BitField("u",0,1), XBitField("type", 0x0200, 15), ShortField("len", None), IntField("id", 0), CommonSessionTLVField("params",None)] def post_build(self, p, pay): if self.len is None: l = len(p) - 4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) # 3.5.4. KeepAlive Message class LDPKeepAlive(Packet): name = "LDPKeepAlive" fields_desc = [ BitField("u",0,1), XBitField("type", 0x0201, 15), ShortField("len", None), IntField("id", 0)] def post_build(self, p, pay): if self.len is None: l = len(p) - 4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) # 3.5.5. Address Message class LDPAddress(Packet): name = "LDPAddress" fields_desc = [ BitField("u",0,1), XBitField("type", 0x0300, 15), ShortField("len", None), IntField("id", 0), AddressTLVField("address",None) ] def post_build(self, p, pay): if self.len is None: l = len(p) - 4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) # 3.5.6. Address Withdraw Message class LDPAddressWM(Packet): name = "LDPAddressWM" fields_desc = [ BitField("u",0,1), XBitField("type", 0x0301, 15), ShortField("len", None), IntField("id", 0), AddressTLVField("address",None) ] def post_build(self, p, pay): if self.len is None: l = len(p) - 4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) # 3.5.7. Label Mapping Message class LDPLabelMM(Packet): name = "LDPLabelMM" fields_desc = [ BitField("u",0,1), XBitField("type", 0x0400, 15), ShortField("len", None), IntField("id", 0), FecTLVField("fec",None), LabelTLVField("label",0)] def post_build(self, p, pay): if self.len is None: l = len(p) - 4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) # 3.5.8. Label Request Message class LDPLabelReqM(Packet): name = "LDPLabelReqM" fields_desc = [ BitField("u",0,1), XBitField("type", 0x0401, 15), ShortField("len", None), IntField("id", 0), FecTLVField("fec",None)] def post_build(self, p, pay): if self.len is None: l = len(p) - 4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) # 3.5.9. Label Abort Request Message class LDPLabelARM(Packet): name = "LDPLabelARM" fields_desc = [ BitField("u",0,1), XBitField("type", 0x0404, 15), ShortField("len", None), IntField("id", 0), FecTLVField("fec",None), IntField("labelRMid",0)] def post_build(self, p, pay): if self.len is None: l = len(p) - 4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) # 3.5.10. Label Withdraw Message class LDPLabelWM(Packet): name = "LDPLabelWM" fields_desc = [ BitField("u",0,1), XBitField("type", 0x0402, 15), ShortField("len", None), IntField("id", 0), FecTLVField("fec",None), LabelTLVField("label",0)] def post_build(self, p, pay): if self.len is None: l = len(p) - 4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) # 3.5.11. Label Release Message class LDPLabelRelM(Packet): name = "LDPLabelRelM" fields_desc = [ BitField("u",0,1), XBitField("type", 0x0403, 15), ShortField("len", None), IntField("id", 0), FecTLVField("fec",None), LabelTLVField("label",0)] def post_build(self, p, pay): if self.len is None: l = len(p) - 4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) # 3.1. LDP PDUs class LDP(Packet): name = "LDP" fields_desc = [ ShortField("version",1), ShortField("len", None), IPField("id","127.0.0.1"), ShortField("space",0) ] def post_build(self, p, pay): if self.len is None: l = len(p)+len(pay)-4 p = p[:2]+struct.pack("!H", l)+p[4:] return p+pay def guess_payload_class(self, p): return guess_payload(p) bind_layers( TCP, LDP, sport=646, dport=646 ) bind_layers( UDP, LDP, sport=646, dport=646 )
phaethon/scapy
kamene/contrib/ldp.py
Python
gpl-2.0
13,902
/* * Copyright (C) 2005-2008 Team XBMC * http://www.xbmc.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, 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 XBMC; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * http://www.gnu.org/copyleft/gpl.html * */ #include "DVDInputStreamHTSP.h" #include "URL.h" #include "FileItem.h" #include "utils/log.h" #include <limits.h> extern "C" { #include "lib/libhts/net.h" #include "lib/libhts/htsmsg.h" #include "lib/libhts/htsmsg_binary.h" #include "lib/libhts/sha1.h" } using namespace std; using namespace HTSP; htsmsg_t* CDVDInputStreamHTSP::ReadStream() { htsmsg_t* msg; /* after anything has started reading, * * we can guarantee a new stream */ m_startup = false; while((msg = m_session.ReadMessage(1000))) { const char* method; if((method = htsmsg_get_str(msg, "method")) == NULL) return msg; if (strstr(method, "channelAdd")) CHTSPSession::ParseChannelUpdate(msg, m_channels); else if(strstr(method, "channelUpdate")) CHTSPSession::ParseChannelUpdate(msg, m_channels); else if(strstr(method, "channelRemove")) CHTSPSession::ParseChannelRemove(msg, m_channels); uint32_t subs; if(htsmsg_get_u32(msg, "subscriptionId", &subs) || subs != m_subs) { htsmsg_destroy(msg); continue; } return msg; } return NULL; } CDVDInputStreamHTSP::CDVDInputStreamHTSP() : CDVDInputStream(DVDSTREAM_TYPE_HTSP) , m_subs(0) , m_startup(false) , m_channel(0) , m_tag(0) { } CDVDInputStreamHTSP::~CDVDInputStreamHTSP() { Close(); } bool CDVDInputStreamHTSP::Open(const char* file, const std::string& content) { if (!CDVDInputStream::Open(file, content)) return false; CURL url(file); if(sscanf(url.GetFileName().c_str(), "tags/%d/%d", &m_tag, &m_channel) != 2) { CLog::Log(LOGERROR, "CDVDInputStreamHTSP::Open - invalid url (%s)\n", url.GetFileName().c_str()); return false; } if(!m_session.Connect(url.GetHostName(), url.GetPort())) return false; if(!url.GetUserName().IsEmpty()) m_session.Auth(url.GetUserName(), url.GetPassWord()); m_session.SendEnableAsync(); if(!m_session.SendSubscribe(m_subs, m_channel)) return false; m_startup = true; return true; } bool CDVDInputStreamHTSP::IsEOF() { return false; } void CDVDInputStreamHTSP::Close() { CDVDInputStream::Close(); m_session.Close(); m_read.Clear(); } int CDVDInputStreamHTSP::Read(BYTE* buf, int buf_size) { size_t count = m_read.Size(); if(count == 0) { htsmsg_t* msg = ReadStream(); if(msg == NULL) return -1; uint8_t* p; if(htsmsg_binary_serialize(msg, (void**)&p, &count, INT_MAX) < 0) { htsmsg_destroy(msg); return -1; } htsmsg_destroy(msg); m_read.Clear(); m_read.buf = p; m_read.cur = p; m_read.end = p + count; } if(count == 0) return 0; if(count > (size_t)buf_size) count = buf_size; memcpy(buf, m_read.cur, count); m_read.cur += count; return count; } bool CDVDInputStreamHTSP::SetChannel(int channel) { CLog::Log(LOGDEBUG, "CDVDInputStreamHTSP::SetChannel - changing to channel %d", channel); if(!m_session.SendUnsubscribe(m_subs)) CLog::Log(LOGERROR, "CDVDInputStreamHTSP::SetChannel - failed to unsubscribe from previous channel"); if(!m_session.SendSubscribe(m_subs+1, channel)) { if(m_session.SendSubscribe(m_subs, m_channel)) CLog::Log(LOGERROR, "CDVDInputStreamHTSP::SetChannel - failed to set channel"); else CLog::Log(LOGERROR, "CDVDInputStreamHTSP::SetChannel - failed to set channel and restore old channel"); return false; } m_channel = channel; m_subs = m_subs+1; m_startup = true; return true; } bool CDVDInputStreamHTSP::GetChannels(SChannelV &channels, SChannelV::iterator &it) { for(SChannels::iterator it2 = m_channels.begin(); it2 != m_channels.end(); it2++) { if(m_tag == 0 || it2->second.MemberOf(m_tag)) channels.push_back(it2->second); } sort(channels.begin(), channels.end()); for(it = channels.begin(); it != channels.end(); it++) if(it->id == m_channel) return true; return false; } bool CDVDInputStreamHTSP::NextChannel() { SChannelV channels; SChannelV::iterator it; if(!GetChannels(channels, it)) return false; SChannelC circ(channels.begin(), channels.end(), it); if(++circ == it) return false; else return SetChannel(circ->id); } bool CDVDInputStreamHTSP::PrevChannel() { SChannelV channels; SChannelV::iterator it; if(!GetChannels(channels, it)) return false; SChannelC circ(channels.begin(), channels.end(), it); if(--circ == it) return false; else return SetChannel(circ->id); } bool CDVDInputStreamHTSP::SelectChannel(unsigned int channel) { return SetChannel(channel); } bool CDVDInputStreamHTSP::UpdateItem(CFileItem& item) { SChannels::iterator it = m_channels.find(m_channel); if(it == m_channels.end()) return false; SChannel& channel = it->second; if(channel.event != m_event.id) { if(!m_session.GetEvent(m_event, channel.event)) { m_event.Clear(); m_event.id = channel.event; } } CFileItem current(item); CHTSPSession::ParseItem(channel, m_tag, m_event, item); item.SetThumbnailImage(channel.icon); item.SetCachedVideoThumb(); return current.m_strPath != item.m_strPath || current.m_strTitle != item.m_strTitle; } int CDVDInputStreamHTSP::GetTotalTime() { if(m_event.id == 0) return 0; return (m_event.stop - m_event.start) * 1000; } int CDVDInputStreamHTSP::GetTime() { CDateTimeSpan time; time = CDateTime::GetUTCDateTime() - CDateTime((time_t)m_event.start); return time.GetDays() * 1000 * 60 * 60 * 24 + time.GetHours() * 1000 * 60 * 60 + time.GetMinutes() * 1000 * 60 + time.GetSeconds() * 1000; } void CDVDInputStreamHTSP::Abort() { m_session.Abort(); }
chris-magic/xbmc_dualaudio_pvr
xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamHTSP.cpp
C++
gpl-2.0
6,506