Polylang - Version 1.0.2

Version Description

(2013-02-26) =

  • Add Catalan translation contributed by Nria Martnez Berenguer
  • Add the possibility to query comments by language
  • Add the possibility not to set a cookie by defining PLL_COOKIE to false (Polylang may not work as expected on some pages)
  • Now a returning visitor is redirected to its preferred language when visiting the front page in the default language
  • Add compatibility with the plugin Custom field template (copy and synchronize custom fields)
  • Improve compatibility with plugins or themes which overwrite columns in posts list table
  • Add the filter 'pll_get_flag'
  • Add support of 'icl_unregister_string' function from the WPML API
  • Bug correction: synchronizing custom fields breaks the plugin Advanced Custom Fields
  • Bug correction: 'pll_default_language' broken
  • Bug correction: rewrite rules are not flushed when re-activating the plugin
  • Bug correction: feed urls are not correctly escaped when using default permalinks
  • Bug correction: notice Undefined index: media_support
  • Bug correction: custom post types and taxonomies set in wpml-config.xml are not hidden
  • Bug correction: get_terms cannot query multiple languages
  • Bug correction: 'icl_register_string' is now persistant as in WPML (fixes Nextgen gallery translations which were not working)
Download this release

Release Info

Developer Chouby
Plugin Icon 128x128 Polylang
Version 1.0.2
Comparing to
See all releases

Code changes from version 1.0.1 to 1.0.2

include/admin-filters.php CHANGED
@@ -30,9 +30,11 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
30
  return;
31
 
32
  // add the language and translations columns in 'All Posts', 'All Pages' and 'Media library' panels
33
- foreach ($this->options['media_support'] ? array('posts', 'pages', 'media') : array('posts', 'pages') as $type) {
34
- add_filter('manage_'.$type.'_columns', array(&$this, 'add_post_column'), 10, 2);
35
- add_action('manage_'.$type.'_custom_column', array(&$this, 'post_column'), 10, 2);
 
 
36
  }
37
 
38
  // quick edit and bulk edit
@@ -56,7 +58,7 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
56
  // adds actions and filters related to languages when creating, saving or deleting posts and pages
57
  add_filter('wp_insert_post_parent', array(&$this, 'wp_insert_post_parent'));
58
  add_action('dbx_post_advanced', array(&$this, 'dbx_post_advanced'));
59
- add_action('save_post', array(&$this, 'save_post'), 10, 2);
60
  add_action('before_delete_post', array(&$this, 'delete_post'));
61
 
62
  if ($this->options['media_support']) {
@@ -155,8 +157,8 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
155
  // test of $columns avoids to add columns (in screen options) in the edit media form which calls the filter too
156
  // see get_column_headers in wp-admin/screen.php
157
  // FIXME I have the same issue for terms but WP adds columns too
158
- function add_post_column($columns, $post_type = '') {
159
- return $columns && ($post_type == '' || in_array($post_type, $this->post_types)) ? $this->add_column($columns, 'comments') : $columns;
160
  }
161
 
162
  // fills the language and translations columns in the posts, pages and media library tables
@@ -247,7 +249,7 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
247
  // adds the Language box in the 'Edit Post' and 'Edit Page' panels (as well as in custom post types panels)
248
  function add_meta_boxes($post_type) {
249
  if (in_array($post_type, $this->post_types))
250
- add_meta_box('ml_box', __('Languages','polylang'), array(&$this,'post_language'), $post_type, 'side', 'high');
251
 
252
  // replace tag metabox by our own
253
  foreach (get_object_taxonomies($post_type) as $tax_name) {
@@ -1154,7 +1156,10 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
1154
 
1155
  // filters comments by language
1156
  function comments_clauses($clauses, $query) {
1157
- if (!empty($_GET['lang']) && $_GET['lang'] != 'all')
 
 
 
1158
  $lang = $this->get_language($_GET['lang']);
1159
 
1160
  elseif ($lg = get_user_meta(get_current_user_id(), 'pll_filter_content', true))
30
  return;
31
 
32
  // add the language and translations columns in 'All Posts', 'All Pages' and 'Media library' panels
33
+ foreach ($this->post_types as $type) {
34
+ // use the latest filter late as some plugins purely overwrite what's done by others :(
35
+ // specific case for media
36
+ add_filter('manage_'. ($type == 'attachment' ? 'upload' : 'edit-'. $type) .'_columns', array(&$this, 'add_post_column'), 100);
37
+ add_action('manage_'. ($type == 'attachment' ? 'media' : $type .'_posts') .'_custom_column', array(&$this, 'post_column'), 10, 2);
38
  }
39
 
40
  // quick edit and bulk edit
58
  // adds actions and filters related to languages when creating, saving or deleting posts and pages
59
  add_filter('wp_insert_post_parent', array(&$this, 'wp_insert_post_parent'));
60
  add_action('dbx_post_advanced', array(&$this, 'dbx_post_advanced'));
61
+ add_action('save_post', array(&$this, 'save_post'), 200, 2); // priority 200 to come after advanced custom fields (20) and custom fields template (100)
62
  add_action('before_delete_post', array(&$this, 'delete_post'));
63
 
64
  if ($this->options['media_support']) {
157
  // test of $columns avoids to add columns (in screen options) in the edit media form which calls the filter too
158
  // see get_column_headers in wp-admin/screen.php
159
  // FIXME I have the same issue for terms but WP adds columns too
160
+ function add_post_column($columns) {
161
+ return $this->add_column($columns, 'comments');
162
  }
163
 
164
  // fills the language and translations columns in the posts, pages and media library tables
249
  // adds the Language box in the 'Edit Post' and 'Edit Page' panels (as well as in custom post types panels)
250
  function add_meta_boxes($post_type) {
251
  if (in_array($post_type, $this->post_types))
252
+ add_meta_box('ml_box', __('Languages','polylang'), array(&$this, 'post_language'), $post_type, 'side', 'high');
253
 
254
  // replace tag metabox by our own
255
  foreach (get_object_taxonomies($post_type) as $tax_name) {
1156
 
1157
  // filters comments by language
1158
  function comments_clauses($clauses, $query) {
1159
+ if (!empty($query->query_vars['lang']))
1160
+ $lang = $query->query_vars['lang'];
1161
+
1162
+ elseif (!empty($_GET['lang']) && $_GET['lang'] != 'all')
1163
  $lang = $this->get_language($_GET['lang']);
1164
 
1165
  elseif ($lg = get_user_meta(get_current_user_id(), 'pll_filter_content', true))
include/admin.php CHANGED
@@ -399,7 +399,7 @@ class Polylang_Admin extends Polylang_Admin_Base {
399
  // validates data entered when creating or updating a language
400
  function validate_lang($lang = null) {
401
  // validate locale
402
- // FIXME no validation for WordPress local as it breaks de_DE_Sie
403
  /*
404
  $loc = $_POST['description'];
405
  if ( !preg_match('#^[a-z]{2,3}$#', $loc) && !preg_match('#^[a-z]{2,3}_[A-Z]{2,3}$#', $loc) )
@@ -472,6 +472,9 @@ class Polylang_Admin extends Polylang_Admin_Base {
472
  $this->register_string(__('Widget title', 'polylang'), $title);
473
  }
474
  }
 
 
 
475
  return $this->strings;
476
  }
477
 
399
  // validates data entered when creating or updating a language
400
  function validate_lang($lang = null) {
401
  // validate locale
402
+ // FIXME no validation for WordPress locale as it breaks de_DE_Sie
403
  /*
404
  $loc = $_POST['description'];
405
  if ( !preg_match('#^[a-z]{2,3}$#', $loc) && !preg_match('#^[a-z]{2,3}_[A-Z]{2,3}$#', $loc) )
472
  $this->register_string(__('Widget title', 'polylang'), $title);
473
  }
474
  }
475
+
476
+ // allow plugins to modify our list of strings, mainly for use by our Polylang_WPML_Compat class
477
+ $this->strings = apply_filters('pll_get_strings', $this->strings);
478
  return $this->strings;
479
  }
480
 
include/api.php CHANGED
@@ -22,9 +22,9 @@ function pll_current_language($args = 'slug') {
22
  /*
23
  * returns the default language
24
  */
25
- function pll_default_language($arg = 'slug') {
26
  global $polylang;
27
- return !(isset($polylang) && ($options = get_options('polylang')) && isset($options['default-lang']) && $lang = $polylang->get_language($options['default-lang'])) ? false :
28
  ($args == 'name' ? $lang->name :
29
  ($args == 'locale' ? $lang->description :
30
  $lang->slug));
@@ -59,7 +59,7 @@ function pll_home_url() {
59
  */
60
  function pll_register_string($name, $string, $multiline = false) {
61
  global $polylang;
62
- if (isset($polylang) && is_admin())
63
  $polylang->register_string($name, $string, $multiline);
64
  }
65
 
@@ -79,17 +79,19 @@ function pll_e($string) {
79
 
80
  /*
81
  * returns true if Polylang manages languages and translation for this post type
 
82
  */
83
  function pll_is_translated_post_type($post_type) {
84
  global $polylang;
85
- return isset($polylang) && in_array($post_type, $polylang->post_types);
86
  }
87
 
88
  /*
89
  * returns true if Polylang manages languages and translation for this taxonomy
 
90
  */
91
  function pll_is_translated_taxonomy($tax) {
92
  global $polylang;
93
- return isset($polylang) && in_array($tax, $polylang->taxonomies);
94
  }
95
 
22
  /*
23
  * returns the default language
24
  */
25
+ function pll_default_language($args = 'slug') {
26
  global $polylang;
27
+ return !(isset($polylang) && ($options = get_option('polylang')) && isset($options['default_lang']) && $lang = $polylang->get_language($options['default_lang'])) ? false :
28
  ($args == 'name' ? $lang->name :
29
  ($args == 'locale' ? $lang->description :
30
  $lang->slug));
59
  */
60
  function pll_register_string($name, $string, $multiline = false) {
61
  global $polylang;
62
+ if (class_exists('Polylang_Admin_Base') && $polylang instanceof Polylang_Admin_Base)
63
  $polylang->register_string($name, $string, $multiline);
64
  }
65
 
79
 
80
  /*
81
  * returns true if Polylang manages languages and translation for this post type
82
+ * won't work before the action 'wp_loaded' has been fired
83
  */
84
  function pll_is_translated_post_type($post_type) {
85
  global $polylang;
86
+ return isset($polylang) && is_array($polylang->post_types) && in_array($post_type, $polylang->post_types);
87
  }
88
 
89
  /*
90
  * returns true if Polylang manages languages and translation for this taxonomy
91
+ * won't work before the action 'wp_loaded' has been fired
92
  */
93
  function pll_is_translated_taxonomy($tax) {
94
  global $polylang;
95
+ return isset($polylang) && is_array($polylang->taxonomies) && in_array($tax, $polylang->taxonomies);
96
  }
97
 
include/base.php CHANGED
@@ -30,12 +30,12 @@ abstract class Polylang_Base {
30
  $post_types[] = 'attachment';
31
  if (!empty($this->options['post_types']))
32
  $post_types = array_merge($post_types, $this->options['post_types']);
33
- $this->post_types = apply_filters('pll_get_post_types', $post_types, false);
34
 
35
  $taxonomies = array('category', 'post_tag');
36
  if (!empty($this->options['taxonomies']))
37
  $taxonomies = array_merge($taxonomies, $this->options['taxonomies']);
38
- $this->taxonomies = apply_filters('pll_get_taxonomies', $taxonomies, false);
39
  }
40
 
41
  // returns the list of available languages
@@ -73,7 +73,7 @@ abstract class Polylang_Base {
73
 
74
  foreach ($this->get_languages_list($args) as $language) {
75
  $out .= sprintf(
76
- '<option value="%s"%s>%s</option>\n',
77
  esc_attr($language->$value),
78
  $language->$value == $selected ? ' selected="selected"' : '',
79
  esc_html($language->name)
@@ -141,7 +141,7 @@ abstract class Polylang_Base {
141
  function get_translations($type, $id) {
142
  $type = ($type == 'post' || in_array($type, $this->post_types)) ? 'post' : (($type == 'term' || in_array($type, $this->taxonomies)) ? 'term' : false);
143
  // maybe_unserialize due to useless serialization in versions < 0.9
144
- return $type ? maybe_unserialize(get_metadata($type, $id, '_translations', true)) : array();
145
  }
146
 
147
  // store the post language in the database
@@ -210,7 +210,7 @@ abstract class Polylang_Base {
210
 
211
  // special case for pages which do not accept adding the lang parameter
212
  elseif ('_get_page_link' != current_filter())
213
- return add_query_arg( 'lang', $lang->slug, $url );
214
 
215
  return $url;
216
  }
@@ -261,27 +261,45 @@ abstract class Polylang_Base {
261
  if (!is_admin() && ( file_exists(PLL_LOCAL_DIR.($file = '/'.$lang->description.'.png')) || file_exists(PLL_LOCAL_DIR.($file = '/'.$lang->description.'.jpg')) ))
262
  $url = PLL_LOCAL_URL.$file;
263
 
264
- return empty($url) ? '' :
265
  ($url_only ? $url :
266
  sprintf(
267
  '<img src="%s" title="%s" alt="%s" />',
268
  esc_url($url),
269
  esc_attr(apply_filters('pll_flag_title', $lang->name, $lang->slug, $lang->description)),
270
  esc_attr($lang->name)
271
- ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  }
273
 
274
  // adds clauses to comments query - used in both frontend and admin
275
  function _comments_clauses($clauses, $lang) {
276
  global $wpdb;
 
 
 
 
277
 
278
- // if this clause is not already added by WP
279
- if (!strpos($clauses['join'], '.ID'))
280
- $clauses['join'] .= " JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID";
281
-
282
- $clauses['join'] .= " INNER JOIN $wpdb->term_relationships AS pll_tr ON pll_tr.object_id = ID";
283
- $clauses['where'] .= $wpdb->prepare(" AND pll_tr.term_taxonomy_id = %d", $lang->term_taxonomy_id);
284
-
285
  return $clauses;
286
  }
287
 
@@ -289,25 +307,8 @@ abstract class Polylang_Base {
289
  function _terms_clauses($clauses, $lang) {
290
  global $wpdb;
291
  if (!empty($lang)) {
292
- // the query is coming from Polylang and the $lang is an object
293
- if (is_object($lang))
294
- $languages = $lang->term_id;
295
-
296
- // the query is coming from outside with 'lang' parameter and $lang is a comma separated list of slugs (or an array of slugs)
297
- else {
298
- $languages = is_array($lang) ? $lang : explode(',', $lang);
299
- $languages = "'" . implode("','", array_map( 'sanitize_title_for_query', $languages)) . "'";
300
- $languages = $wpdb->get_col($wpdb->prepare("
301
- SELECT $wpdb->term_taxonomy.term_id FROM $wpdb->term_taxonomy
302
- INNER JOIN $wpdb->terms USING (term_id)
303
- WHERE taxonomy = 'language' AND $wpdb->terms.slug IN (%s)",
304
- $languages
305
- )); // get ids from slugs
306
- $languages = implode(',', $languages);
307
- }
308
-
309
  $clauses['join'] .= " LEFT JOIN $wpdb->termmeta AS pll_tm ON t.term_id = pll_tm.term_id";
310
- $clauses['where'] .= $wpdb->prepare(" AND pll_tm.meta_key = '_language' AND pll_tm.meta_value IN (%s)", $languages);
311
  }
312
  return $clauses;
313
  }
30
  $post_types[] = 'attachment';
31
  if (!empty($this->options['post_types']))
32
  $post_types = array_merge($post_types, $this->options['post_types']);
33
+ $this->post_types = apply_filters('pll_get_post_types', array_combine($post_types, $post_types), false);
34
 
35
  $taxonomies = array('category', 'post_tag');
36
  if (!empty($this->options['taxonomies']))
37
  $taxonomies = array_merge($taxonomies, $this->options['taxonomies']);
38
+ $this->taxonomies = apply_filters('pll_get_taxonomies', array_combine($taxonomies, $taxonomies), false);
39
  }
40
 
41
  // returns the list of available languages
73
 
74
  foreach ($this->get_languages_list($args) as $language) {
75
  $out .= sprintf(
76
+ '<option value="%s"%s>%s</option>'."\n",
77
  esc_attr($language->$value),
78
  $language->$value == $selected ? ' selected="selected"' : '',
79
  esc_html($language->name)
141
  function get_translations($type, $id) {
142
  $type = ($type == 'post' || in_array($type, $this->post_types)) ? 'post' : (($type == 'term' || in_array($type, $this->taxonomies)) ? 'term' : false);
143
  // maybe_unserialize due to useless serialization in versions < 0.9
144
+ return $type && ($meta = get_metadata($type, $id, '_translations', true)) ? maybe_unserialize($meta) : array();
145
  }
146
 
147
  // store the post language in the database
210
 
211
  // special case for pages which do not accept adding the lang parameter
212
  elseif ('_get_page_link' != current_filter())
213
+ return esc_url(add_query_arg( 'lang', $lang->slug, $url ));
214
 
215
  return $url;
216
  }
261
  if (!is_admin() && ( file_exists(PLL_LOCAL_DIR.($file = '/'.$lang->description.'.png')) || file_exists(PLL_LOCAL_DIR.($file = '/'.$lang->description.'.jpg')) ))
262
  $url = PLL_LOCAL_URL.$file;
263
 
264
+ return apply_filters('pll_get_flag', empty($url) ? '' :
265
  ($url_only ? $url :
266
  sprintf(
267
  '<img src="%s" title="%s" alt="%s" />',
268
  esc_url($url),
269
  esc_attr(apply_filters('pll_flag_title', $lang->name, $lang->slug, $lang->description)),
270
  esc_attr($lang->name)
271
+ )));
272
+ }
273
+
274
+ // get languages term_ids or term_taxonomy_ids for use in sql queries
275
+ function _get_languages_for_sql($lang, $field) {
276
+ global $wpdb;
277
+ // the query is coming from Polylang and the $lang is an object
278
+ if (is_object($lang))
279
+ return $lang->$field;
280
+
281
+ // the query is coming from outside with 'lang' parameter and $lang is a comma separated list of slugs (or an array of slugs)
282
+ $languages = is_array($lang) ? $lang : explode(',', $lang);
283
+ $languages = "'" . implode("','", array_map( 'sanitize_title_for_query', $languages)) . "'";
284
+ $languages = $wpdb->get_col("
285
+ SELECT $wpdb->term_taxonomy.$field FROM $wpdb->term_taxonomy
286
+ INNER JOIN $wpdb->terms USING (term_id)
287
+ WHERE taxonomy = 'language' AND $wpdb->terms.slug IN ($languages)
288
+ "); // get ids from slugs
289
+ return implode(',', $languages);
290
  }
291
 
292
  // adds clauses to comments query - used in both frontend and admin
293
  function _comments_clauses($clauses, $lang) {
294
  global $wpdb;
295
+ if (!empty($lang)) {
296
+ // if this clause is not already added by WP
297
+ if (!strpos($clauses['join'], '.ID'))
298
+ $clauses['join'] .= " JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID";
299
 
300
+ $clauses['join'] .= " INNER JOIN $wpdb->term_relationships AS pll_tr ON pll_tr.object_id = ID";
301
+ $clauses['where'] .= " AND pll_tr.term_taxonomy_id IN (" . $this->_get_languages_for_sql($lang, 'term_taxonomy_id') . ")";
302
+ }
 
 
 
 
303
  return $clauses;
304
  }
305
 
307
  function _terms_clauses($clauses, $lang) {
308
  global $wpdb;
309
  if (!empty($lang)) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
  $clauses['join'] .= " LEFT JOIN $wpdb->termmeta AS pll_tm ON t.term_id = pll_tm.term_id";
311
+ $clauses['where'] .= " AND pll_tm.meta_key = '_language' AND pll_tm.meta_value IN (" . $this->_get_languages_for_sql($lang, 'term_id') . ")";
312
  }
313
  return $clauses;
314
  }
include/core.php CHANGED
@@ -345,7 +345,8 @@ class Polylang_Core extends Polylang_base {
345
  setcookie('wordpress_polylang', '', time() - 3600, COOKIEPATH, COOKIE_DOMAIN);
346
 
347
  // set a cookie to remember the language. check headers have not been sent to avoid ugly error
348
- if (!headers_sent() && (!isset($_COOKIE[PLL_COOKIE]) || $_COOKIE[PLL_COOKIE] != $this->curlang->slug))
 
349
  setcookie(PLL_COOKIE, $this->curlang->slug, time() + 31536000 /* 1 year */, COOKIEPATH, COOKIE_DOMAIN);
350
 
351
  if (!($this->options['force_lang'] && $GLOBALS['wp_rewrite']->using_permalinks())) {
@@ -395,9 +396,11 @@ class Polylang_Core extends Polylang_base {
395
  add_filter('_get_page_link', array(&$this, 'post_link'), 10, 2);
396
 
397
  // FIXME cookie wordpress_polylang removed since 1.0
398
- $this->curlang = $this->options['hide_default'] && (isset($_COOKIE['wordpress_polylang']) || isset($_COOKIE[PLL_COOKIE])) ?
 
 
399
  $this->get_language($this->options['default_lang']) :
400
- $this->curlang = $this->get_preferred_language(); // sets the language according to browser preference or default language
401
 
402
  // we are already on the right page
403
  if ($this->options['default_lang'] == $this->curlang->slug && $this->options['hide_default']) {
@@ -422,8 +425,8 @@ class Polylang_Core extends Polylang_base {
422
  function pre_get_posts($query) {
423
  // don't make anything if no language has been defined yet
424
  // $this->post_types & $this->taxonomies are defined only once the action 'wp_loaded' has been fired
425
- // honor suppress_filters
426
- if (!$this->get_languages_list() || !did_action('wp_loaded') || $query->get('suppress_filters'))
427
  return;
428
 
429
  $qv = $query->query_vars;
@@ -432,6 +435,12 @@ class Polylang_Core extends Polylang_base {
432
  if (!$this->first_query && $this->curlang && !empty($qv['lang']))
433
  return;
434
 
 
 
 
 
 
 
435
  global $wp_rewrite;
436
  $this->first_query = false;
437
 
@@ -707,8 +716,8 @@ class Polylang_Core extends Polylang_base {
707
  }
708
 
709
  // filters the comments according to the current language mainly for the recent comments widget
710
- function comments_clauses($clauses, $comment_query) {
711
- return $this->_comments_clauses($clauses, $this->curlang);
712
  }
713
 
714
  // modifies the sql request for wp_get_archives an get_adjacent_post to filter by the current language
@@ -964,7 +973,7 @@ class Polylang_Core extends Polylang_base {
964
 
965
  $url = isset($url) ? $url : $this->get_home_url($language); // if the page is not translated, link to the home page
966
 
967
- $class .= 'lang-item lang-item-'.esc_attr($language->term_id);
968
  $class .= $language->term_id == $this->curlang->term_id ? ' current-lang' : '';
969
  $class .= $menu ? ' menu-item' : '';
970
 
345
  setcookie('wordpress_polylang', '', time() - 3600, COOKIEPATH, COOKIE_DOMAIN);
346
 
347
  // set a cookie to remember the language. check headers have not been sent to avoid ugly error
348
+ // possibility to set PLL_COOKIE to false will disable cookie although it will break some functionalities
349
+ if (!headers_sent() && PLL_COOKIE !== false && (!isset($_COOKIE[PLL_COOKIE]) || $_COOKIE[PLL_COOKIE] != $this->curlang->slug))
350
  setcookie(PLL_COOKIE, $this->curlang->slug, time() + 31536000 /* 1 year */, COOKIEPATH, COOKIE_DOMAIN);
351
 
352
  if (!($this->options['force_lang'] && $GLOBALS['wp_rewrite']->using_permalinks())) {
396
  add_filter('_get_page_link', array(&$this, 'post_link'), 10, 2);
397
 
398
  // FIXME cookie wordpress_polylang removed since 1.0
399
+ // test referer in case PLL_COOKIE is set to false
400
+ // thanks to Ov3rfly http://wordpress.org/support/topic/enhance-feature-when-front-page-is-visited-set-language-according-to-browser
401
+ $this->curlang = $this->options['hide_default'] && ((isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], $this->home) !== false)) ?
402
  $this->get_language($this->options['default_lang']) :
403
+ $this->get_preferred_language(); // sets the language according to browser preference or default language
404
 
405
  // we are already on the right page
406
  if ($this->options['default_lang'] == $this->curlang->slug && $this->options['hide_default']) {
425
  function pre_get_posts($query) {
426
  // don't make anything if no language has been defined yet
427
  // $this->post_types & $this->taxonomies are defined only once the action 'wp_loaded' has been fired
428
+ // FIXME honoring suppress_filters breaks adjacent_image_link when post_parent == 0
429
+ if (!$this->get_languages_list() || !did_action('wp_loaded') /*|| $query->get('suppress_filters')*/)
430
  return;
431
 
432
  $qv = $query->query_vars;
435
  if (!$this->first_query && $this->curlang && !empty($qv['lang']))
436
  return;
437
 
438
+ // detect our exclude pages query and returns to avoid conflicts
439
+ // this test should be sufficient
440
+ if (isset($qv['tax_query'][0]['taxonomy']) && $qv['tax_query'][0]['taxonomy'] == 'language' &&
441
+ isset($qv['tax_query'][0]['operator']) && $qv['tax_query'][0]['operator'] == 'NOT IN')
442
+ return;
443
+
444
  global $wp_rewrite;
445
  $this->first_query = false;
446
 
716
  }
717
 
718
  // filters the comments according to the current language mainly for the recent comments widget
719
+ function comments_clauses($clauses, $query) {
720
+ return $this->_comments_clauses($clauses, !empty($query->query_vars['lang']) ? $query->query_vars['lang'] : $this->curlang);
721
  }
722
 
723
  // modifies the sql request for wp_get_archives an get_adjacent_post to filter by the current language
973
 
974
  $url = isset($url) ? $url : $this->get_home_url($language); // if the page is not translated, link to the home page
975
 
976
+ $class .= sprintf('lang-item lang-item-%d lang-item-%s', esc_attr($language->term_id), esc_attr($language->slug));
977
  $class .= $language->term_id == $this->curlang->term_id ? ' current-lang' : '';
978
  $class .= $menu ? ' menu-item' : '';
979
 
include/plugins-compat.php CHANGED
@@ -11,6 +11,10 @@ class Polylang_Plugins_Compat{
11
  if (is_admin())
12
  add_filter('override_load_textdomain', array(&$this, 'wp_seo_override_load_textdomain'), 10, 2);
13
 
 
 
 
 
14
  }
15
 
16
  function wp_seo_override_load_textdomain( $return, $domain ) {
@@ -21,6 +25,12 @@ class Polylang_Plugins_Compat{
21
  return $return;
22
  }
23
 
 
 
 
 
 
 
24
  }
25
 
26
  new Polylang_Plugins_Compat();
11
  if (is_admin())
12
  add_filter('override_load_textdomain', array(&$this, 'wp_seo_override_load_textdomain'), 10, 2);
13
 
14
+ // Custom field template
15
+ // This plugin does check $_REQUEST['post'] to populate the custom fields values
16
+ add_action('dbx_post_advanced', array(&$this, 'cft_copy'));
17
+
18
  }
19
 
20
  function wp_seo_override_load_textdomain( $return, $domain ) {
25
  return $return;
26
  }
27
 
28
+ function cft_copy() {
29
+ global $post, $custom_field_template;
30
+ if (isset($custom_field_template) && !empty($post) && isset($_REQUEST['from_post']) && isset($_REQUEST['new_lang']))
31
+ $_REQUEST['post'] = $post->ID;
32
+ }
33
+
34
  }
35
 
36
  new Polylang_Plugins_Compat();
include/wpml-compat.php CHANGED
@@ -118,7 +118,17 @@ if (!function_exists('icl_object_id')) {
118
  */
119
  if (!function_exists('icl_register_string')) {
120
  function icl_register_string($context, $name, $string) {
121
- pll_register_string($name, $string);
 
 
 
 
 
 
 
 
 
 
122
  }
123
  }
124
 
@@ -132,6 +142,73 @@ if (!function_exists('icl_t')) {
132
  }
133
  }
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  /*
136
  * reads and interprets the file wpml-config.xml
137
  * see http://wpml.org/documentation/support/language-configuration-files/
@@ -297,25 +374,26 @@ class Polylang_WPML_Config {
297
  return $metas;
298
  }
299
 
 
300
  function translate_types($types, $hide) {
301
- // the author decided to translate the post type so don't allow the user to change this
302
- if (!$hide) {
303
- foreach ($this->wpml_config['custom-types']['custom-type'] as $pt) {
304
- if ($pt['attributes']['translate'] == 1)
305
- $types[$pt['value']] = $pt['value'];
306
- }
307
  }
308
  return $types;
309
  }
310
 
 
311
  function translate_taxonomies($taxonomies, $hide) {
312
- // the author decided to translate the taxonomy so don't allow the user to change this
313
- if (!$hide) {
314
- foreach ($this->wpml_config['taxonomies']['taxonomy'] as $tax) {
315
- if ($tax['attributes']['translate'] == 1)
316
- $taxonomies[$tax['value']] = $tax['value'];
317
- }
318
  }
 
319
  return $taxonomies;
320
  }
321
 
118
  */
119
  if (!function_exists('icl_register_string')) {
120
  function icl_register_string($context, $name, $string) {
121
+ $GLOBALS['polylang_wpml_compat']->register_string($context, $name, $string);
122
+ }
123
+ }
124
+
125
+ /*
126
+ * removes a string from the "strings translation" panel
127
+ * the parameter $context is not used by Polylang
128
+ */
129
+ if (!function_exists('icl_unregister_string')) {
130
+ function icl_unregister_string($context, $name) {
131
+ $GLOBALS['polylang_wpml_compat']->unregister_string($context, $name);
132
  }
133
  }
134
 
142
  }
143
  }
144
 
145
+ /*
146
+ * undocumented function used by NextGen Gallery
147
+ * seems to be used to both register and translate a string
148
+ * the parameters $context and $bool are not used by Polylang
149
+ */
150
+ if (!function_exists('icl_translate')) {
151
+ function icl_translate($context, $name, $string, $bool) {
152
+ $GLOBALS['polylang_wpml_compat']->register_string($context, $name, $string);
153
+ return pll__($string);
154
+ }
155
+ }
156
+
157
+ /*
158
+ * registers strings in a persistant way as done by WPML
159
+ */
160
+ class Polylang_WPML_Compat {
161
+ private $strings; // used for cache
162
+
163
+ function __construct() {
164
+ add_action('pll_get_strings', array(&$this, 'get_strings'));
165
+ }
166
+
167
+ // the persistant register_string function
168
+ function register_string($context, $name, $string) {
169
+ if (empty($this->strings))
170
+ $this->strings = get_option('polylang_wpml_strings');
171
+
172
+ if (empty($this->strings))
173
+ $this->strings = array();
174
+
175
+ // registers the string if it does not exist yet
176
+ // $context not used today but save it just in case
177
+ $to_register = array('context' => $context, 'name'=> $name, 'string' => $string, 'multiline' => false);
178
+ if (!in_array($to_register, $this->strings) && $to_register['string']) {
179
+ $this->strings[] = $to_register;
180
+ update_option('polylang_wpml_strings', $this->strings);
181
+ }
182
+ }
183
+
184
+ // removes a string from the registered strings list
185
+ function unregister_string($context, $name) {
186
+ if (empty($this->strings))
187
+ $this->strings = get_option('polylang_wpml_strings');
188
+
189
+ if (empty($this->strings))
190
+ $this->strings = array();
191
+
192
+ foreach ($this->strings as $key=>$string) {
193
+ if ($string['context'] == $context && $string['name'] == $name) {
194
+ unset($this->strings[$key]);
195
+ update_option('polylang_wpml_strings', $this->strings);
196
+ }
197
+ }
198
+ }
199
+
200
+ // adds strings registered by icl_register_string to those registered by pll_register_string
201
+ function get_strings($strings) {
202
+ if (empty($this->strings))
203
+ $this->strings = get_option('polylang_wpml_strings');
204
+
205
+ return empty($this->strings) ? $strings : array_merge($strings, $this->strings);
206
+ }
207
+ }
208
+
209
+ global $polylang_wpml_compat;
210
+ $polylang_wpml_compat = new Polylang_WPML_Compat();
211
+
212
  /*
213
  * reads and interprets the file wpml-config.xml
214
  * see http://wpml.org/documentation/support/language-configuration-files/
374
  return $metas;
375
  }
376
 
377
+ // language and translation management for custom post types
378
  function translate_types($types, $hide) {
379
+ foreach ($this->wpml_config['custom-types']['custom-type'] as $pt) {
380
+ if ($pt['attributes']['translate'] == 1 && !$hide)
381
+ $types[$pt['value']] = $pt['value'];
382
+ elseif ($hide)
383
+ unset ($types[$pt['value']]); // the author decided what to do with the post type so don't allow the user to change this
 
384
  }
385
  return $types;
386
  }
387
 
388
+ // language and translation management for custom taxonomies
389
  function translate_taxonomies($taxonomies, $hide) {
390
+ foreach ($this->wpml_config['taxonomies']['taxonomy'] as $tax) {
391
+ if ($tax['attributes']['translate'] == 1 && !$hide)
392
+ $taxonomies[$tax['value']] = $tax['value'];
393
+ elseif ($hide)
394
+ unset ($types[$tax['value']]); // the author decided what to do with the taxonomy so don't allow the user to change this
 
395
  }
396
+
397
  return $taxonomies;
398
  }
399
 
languages/polylang-ru_RU.mo CHANGED
Binary file
languages/polylang-ru_RU.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: polylang\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: \n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: danalan <danalan@danalan.info>\n"
8
  "Language-Team: \n"
@@ -20,577 +20,641 @@ msgstr ""
20
  "X-Poedit-SearchPath-0: ..\n"
21
 
22
  # @ polylang
23
- #: include/about.php:3
24
  #, php-format
25
- msgid "Polylang is provided with an extensive %sdocumentation%s (in English only). It includes information on how to set up your multilingual site and use it on a daily basis, a FAQ, as well as a documentation for programmers to adapt their plugins and themes."
26
- msgstr "Polylang предоставляется с исчерпывающей %sдокументацией%s (только на английском), которая включает информацию по настройке и использованию вашего многоязычного сайта, ответы на частые вопросы, а также документацию для программистов для адаптации их собственных плагинов и тем."
 
 
 
 
 
 
 
 
27
 
28
  # @ polylang
29
- #: include/about.php:9
 
 
 
 
 
 
 
 
30
  #, php-format
31
- msgid "You will also find useful information in the %ssupport forum%s. However don't forget to make a search before posting a new topic."
32
- msgstr "Также вы можете найти полезную информацию на %sфоруме поддержки%s. Однако, не забывайте пользоваться поиском, прежде чем создавать новые темы."
 
 
 
 
 
 
 
 
33
 
34
  # @ polylang
35
- #: include/about.php:16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  #, php-format
37
- msgid "Polylang is free of charge and is released under the same license as WordPress, the %sGPL%s."
38
- msgstr "Polylang бесплатен и предоставляется на таких же, как и WordPress условиях, %sGPL%s."
 
 
 
 
 
 
 
 
39
 
40
  # @ polylang
41
- #: include/about.php:22
42
  #, php-format
43
- msgid "If you wonder how you can help the project, just %sread this%s."
44
- msgstr "Если вас интересует, как можно помочь проекту, просто %sпрочтите это%s."
 
 
 
 
45
 
46
  # @ polylang
47
- #: include/about.php:27
48
- msgid "Finally if you like this plugin or if it helps your business, donations to the author are greatly appreciated."
49
- msgstr "Если же вам понравился этот плагин, или он помогает вам в бизнесе, автор будет весьма признателен за любые добровольные пожертвования."
 
 
 
 
 
50
 
51
  # @ polylang
52
- #: include/admin-base.php:55
53
- #: include/admin-base.php:185
54
- #: include/admin-filters.php:250
55
- #: include/admin.php:23
56
- #: include/admin.php:318
57
- #: include/list-table.php:46
58
- #: polylang.php:270
59
- msgid "Languages"
60
- msgstr "Языки"
61
 
62
  # @ polylang
63
- #: include/admin-base.php:154
 
 
 
 
 
 
 
 
 
64
  msgid "Displays language names"
65
  msgstr "Показывать названия языков"
66
 
67
  # @ polylang
68
- #: include/admin-base.php:155
69
  msgid "Displays flags"
70
  msgstr "Показывать флаги"
71
 
72
  # @ polylang
73
- #: include/admin-base.php:156
74
  msgid "Forces link to front page"
75
  msgstr "Принудительно переходить на главную страницу при смене языка"
76
 
77
  # @ polylang
78
- #: include/admin-base.php:157
79
  msgid "Hides the current language"
80
  msgstr "Убрать текущий язык"
81
 
82
  # @ polylang
83
- #: include/admin-base.php:161
84
  msgid "Displays a language switcher at the end of the menu"
85
  msgstr "Показывает переключатель языков"
86
 
87
  # @ polylang
88
- #: include/admin-base.php:162
89
  msgid "Displays as dropdown"
90
  msgstr "Показывать как выпадающий список"
91
 
92
  # @ polylang
93
- #: include/admin-base.php:186
94
  msgid "Filters content by language"
95
  msgstr "Устанавливает язык"
96
 
97
  # @ polylang
98
- #: include/admin-base.php:193
99
  msgid "Show all languages"
100
  msgstr "Показать все языки"
101
 
102
  # @ polylang
103
- #: include/admin-filters.php:188
104
- #: include/admin-filters.php:884
105
  msgid "Add new translation"
106
  msgstr "Добавить новый перевод"
107
 
108
- # @ polylang
109
- #: include/admin-filters.php:216
110
- #: include/admin-filters.php:274
111
- #: include/admin-filters.php:608
112
- #: include/admin-filters.php:824
113
- #: include/admin-filters.php:842
114
- #: include/list-table.php:45
115
- #: include/media-translations.php:5
116
- #: include/media-translations.php:43
117
- #: include/post-translations.php:8
118
- #: include/term-translations.php:15
119
- #: polylang.php:271
120
- msgid "Language"
121
- msgstr "Язык"
122
 
123
  # @ polylang
124
- #: include/admin-filters.php:623
125
- #: include/admin-filters.php:658
126
- #: include/list-table.php:120
127
- #: include/media-translations.php:40
128
- #: include/term-translations.php:6
129
- #: include/term-translations.php:11
130
  msgid "Translations"
131
  msgstr "Переводы"
132
 
133
  # @ polylang
134
- #: include/admin-filters.php:826
135
- #: include/admin-filters.php:845
136
  msgid "Sets the language"
137
  msgstr "Устанавливает язык"
138
 
 
 
 
 
139
  # @ polylang
140
- #: include/admin-filters.php:1078
141
  msgid "Theme locations and languages"
142
  msgstr "Расположение темы и языков"
143
 
144
  # @ polylang
145
- #: include/admin-filters.php:1084
146
  #, php-format
147
- msgid "Please go to the %slanguages page%s to set theme locations and languages"
148
- msgstr "Перейдите на %slanguages page%s для указания расположения темы и языков"
 
 
149
 
150
  # @ polylang
151
- #: include/admin-filters.php:1102
152
  msgid "The widget is displayed for:"
153
  msgstr "Показывать виджет для"
154
 
155
  # @ polylang
156
- #: include/admin-filters.php:1106
157
- #: polylang.php:272
158
- msgid "All languages"
159
- msgstr "Все языки"
160
-
161
- # @ polylang
162
- #: include/admin-filters.php:1130
163
  msgid "Admin language"
164
  msgstr "Язык админ.панели"
165
 
166
- #: include/admin-filters.php:1135
167
  msgid "Wordpress default"
168
  msgstr "По умолчанию"
169
 
170
  # @ default
171
  # @ polylang
172
- #: include/admin-filters.php:1161
173
- #: include/admin.php:326
174
  msgid "Settings"
175
  msgstr "Настройки"
176
 
177
  # @ polylang
178
- #: include/admin-filters.php:1167
179
  msgid "Upgrading language files&#8230;"
180
  msgstr "Обновление языковых файлов&#8230;"
181
 
182
  # @ polylang
183
- #: include/admin.php:22
184
  msgid "About Polylang"
185
  msgstr "О Polylang"
186
 
187
  # @ polylang
188
- #: include/admin.php:27
189
- #: include/list-table.php:92
190
  msgid "Strings translations"
191
  msgstr "Переводы строк"
192
 
193
  # @ polylang
194
- #: include/admin.php:323
195
  msgid "Menus"
196
  msgstr "Меню"
197
 
198
  # @ polylang
199
- #: include/admin.php:325
200
- #: include/list-table.php:91
201
  msgid "Strings translation"
202
  msgstr "Перевод строк"
203
 
204
  # @ polylang
205
- #: include/admin.php:345
206
- msgid "Enter a valid WorPress locale"
207
- msgstr "Введите корректную WordPress локаль"
208
-
209
- # @ polylang
210
- #: include/admin.php:346
211
  msgid "The language code must be 2 characters long"
212
  msgstr "Код языка должен состоять из 2-х символов"
213
 
214
  # @ polylang
215
- #: include/admin.php:347
216
  msgid "The language code must be unique"
217
  msgstr "Код языка должен быть уникальным"
218
 
219
  # @ polylang
220
- #: include/admin.php:348
221
  msgid "The language must have a name"
222
  msgstr "У языка должно быть название"
223
 
224
  # @ polylang
225
- #: include/admin.php:349
226
- msgid "The language was created, but the WordPress language file was not downloaded. Please install it manually."
227
- msgstr "Язык был успешно создан, однако отсутствует языковой файл WordPress. Пожалуйста, установите его вручную."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
 
229
  # @ polylang
230
- #: include/admin.php:468
231
  msgid "Widget title"
232
  msgstr "Название виджета"
233
 
234
  # @ polylang
235
- #: include/base.php:339
236
  msgid "Taxonomies"
237
- msgstr ""
238
 
239
  # @ polylang
240
- #: include/base.php:340
241
  msgid "Custom fields"
242
- msgstr ""
243
 
244
  # @ polylang
245
- #: include/base.php:341
246
  msgid "Comment status"
247
- msgstr ""
248
 
249
  # @ polylang
250
- #: include/base.php:342
251
  msgid "Ping status"
252
- msgstr ""
253
 
254
  # @ polylang
255
- #: include/base.php:343
256
  msgid "Sticky posts"
257
- msgstr ""
258
 
259
  # @ polylang
260
- #: include/base.php:344
261
  msgid "Published date"
262
- msgstr ""
263
 
264
- #: include/base.php:345
265
  msgid "Post format"
266
- msgstr ""
267
 
268
  # @ default
269
- #: include/base.php:346
270
  msgid "Page parent"
271
- msgstr ""
272
 
273
  # @ polylang
274
- #: include/base.php:347
275
  msgid "Page template"
276
- msgstr ""
277
 
278
  # @ polylang
279
- #: include/base.php:348
280
  msgid "Page order"
281
- msgstr ""
282
 
283
  # @ polylang
284
- #: include/base.php:349
285
  msgid "Featured image"
286
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
 
288
  # @ polylang
289
- #: include/languages-form.php:43
290
  msgid "Edit language"
291
  msgstr "Редактировать язык"
292
 
293
  # @ polylang
294
- #: include/languages-form.php:43
295
- #: include/languages-form.php:124
296
  msgid "Add new language"
297
  msgstr "Добавить новый язык"
298
 
299
  # @ polylang
300
- #: include/languages-form.php:65
301
  msgid "Choose a language"
302
  msgstr "Показать все языки"
303
 
304
  # @ polylang
305
- #: include/languages-form.php:79
306
  msgid "You can choose a language in the list or directly edit it below."
307
  msgstr "Выберите язык из списка или укажите сами."
308
 
309
  # @ polylang
310
- #: include/languages-form.php:83
311
- #: include/list-table.php:63
312
  msgid "Full name"
313
  msgstr "Полное название"
314
 
315
  # @ polylang
316
- #: include/languages-form.php:85
317
  msgid "The name is how it is displayed on your site (for example: English)."
318
  msgstr "Название для отображения на сайте (например: Русский)."
319
 
320
  # @ polylang
321
- #: include/languages-form.php:89
322
- #: include/list-table.php:64
323
  msgid "Locale"
324
  msgstr "Локаль"
325
 
326
  # @ polylang
327
- #: include/languages-form.php:94
328
- msgid "Wordpress Locale for the language (for example: en_US). You will need to install the .mo file for this language."
329
- msgstr "Локаль Wordpress'a для языка (например: ru_RU). Вы должны установить файлы .mo для админ.панели и используемой темы."
 
 
 
 
330
 
331
  # @ polylang
332
- #: include/languages-form.php:98
333
  msgid "Language code"
334
  msgstr "Код языка"
335
 
336
  # @ polylang
337
- #: include/languages-form.php:100
338
  msgid "2-letters ISO 639-1 language code (for example: en)"
339
  msgstr "2х-буквенный ISO 639-1 код языка (например: ru)"
340
 
341
  # @ polylang
342
- #: include/languages-form.php:104
343
  msgid "Text direction"
344
  msgstr "Направление текста"
345
 
346
  # @ polylang
347
- #: include/languages-form.php:108
348
  msgid "left to right"
349
  msgstr "слева направо"
350
 
351
  # @ polylang
352
- #: include/languages-form.php:113
353
  msgid "right to left"
354
  msgstr "справа налево"
355
 
356
  # @ polylang
357
- #: include/languages-form.php:115
358
  msgid "Choose the text direction for the language"
359
  msgstr "Выберите направление текста для языка"
360
 
361
  # @ polylang
362
- #: include/languages-form.php:119
363
- #: include/list-table.php:66
364
  msgid "Order"
365
  msgstr "Порядок"
366
 
367
  # @ polylang
368
- #: include/languages-form.php:121
369
  msgid "Position of the language in the language switcher"
370
  msgstr "Порядок языка в переключателе языков"
371
 
 
 
 
 
372
  # @ polylang
373
- #: include/languages-form.php:180
374
  msgid "Language switcher"
375
  msgstr "Переключатель языков"
376
 
377
  # @ polylang
378
- #: include/languages-form.php:206
379
  msgid "Search translations"
380
- msgstr ""
381
 
382
- #: include/languages-form.php:215
383
  msgid "Clean strings translation database"
384
  msgstr "Почистить базу данных переводов строк"
385
 
386
  # @ polylang
387
- #: include/languages-form.php:231
388
  msgid "Default language"
389
  msgstr "Язык по умолчанию"
390
 
391
  # @ polylang
392
- #: include/languages-form.php:243
393
- msgid "There are posts, pages, categories or tags without language set. Do you want to set them all to default language ?"
394
- msgstr "Найдены записи, страницы, категории или метки без указанния какого-либо языка. Установить им язык по-умолчанию?"
 
 
 
 
395
 
396
  # @ polylang
397
- #: include/languages-form.php:251
398
  msgid "Detect browser language"
399
  msgstr "Определять язык в браузере"
400
 
401
  # @ polylang
402
- #: include/languages-form.php:257
403
- msgid "When the front page is visited, set the language according to the browser preference"
 
 
404
  msgstr "Установить язык сайта согласно настройкам браузера"
405
 
406
  # @ polylang
407
- #: include/languages-form.php:264
408
  msgid "URL modifications"
409
  msgstr "Модификации URL"
410
 
411
- #: include/languages-form.php:270
412
- msgid "The language is set from content. Posts, pages, categories and tags urls are not modified."
413
- msgstr "Язык устанавливается по содержимому. Адреса URL сообщений, страниц, категорий и тэгов не модифицируются."
 
 
 
 
414
 
415
- #: include/languages-form.php:278
416
- msgid "The language code, for example /en/, is added to all urls when using pretty permalinks."
417
- msgstr "Код языка, например /en/, добавляется ко всем URL, если используются постоянные ссылки."
 
 
 
 
418
 
419
  # @ polylang
420
- #: include/languages-form.php:287
421
  msgid "Remove /language/ in pretty permalinks. Example:"
422
  msgstr "Удалить /language/ в ЧПУ. Пример:"
423
 
424
  # @ polylang
425
- #: include/languages-form.php:296
426
  msgid "Keep /language/ in pretty permalinks. Example:"
427
  msgstr "Оставить /language/ в ЧПУ. Пример:"
428
 
429
  # @ polylang
430
- #: include/languages-form.php:305
431
  msgid "Hide URL language information for default language"
432
  msgstr "Спрятать название языка по-умолчанию из URL"
433
 
434
- #: include/languages-form.php:315
435
  #, php-format
436
- msgid "When using static front page, redirect the language page (example: %s) to the front page in the right language"
437
- msgstr "Если используются статические страницы, перенаправлять языковые варианты (например: %s) на главную страницу в нужном языке."
 
 
 
 
438
 
439
  # @ polylang
440
- #: include/languages-form.php:324
441
  msgid "Media"
442
- msgstr ""
443
 
444
  # @ polylang
445
- #: include/languages-form.php:330
446
  msgid "Activate languages and translations for media"
447
- msgstr ""
448
 
449
- #: include/languages-form.php:337
450
  msgid "Synchronization"
451
  msgstr "Синхронизация"
452
 
453
  # @ polylang
454
- #: include/languages-form.php:351
455
  msgid "Custom post types"
456
- msgstr ""
457
 
458
  # @ polylang
459
- #: include/languages-form.php:364
460
  msgid "Activate languages and translations for custom post types."
461
- msgstr ""
462
 
463
  # @ polylang
464
- #: include/languages-form.php:372
465
  msgid "Custom taxonomies"
466
- msgstr ""
467
 
468
  # @ polylang
469
- #: include/languages-form.php:385
470
  msgid "Activate languages and translations for custom taxonomies."
471
- msgstr ""
472
 
473
  # @ polylang
474
- #: include/list-table.php:55
475
- #: include/media-translations.php:22
476
- #: include/media-translations.php:60
477
- #: include/post-translations.php:10
478
- #: include/post-translations.php:33
479
- #: include/term-translations.php:18
480
- #: include/term-translations.php:80
481
  msgid "Edit"
482
  msgstr "Редактировать"
483
 
484
  # @ polylang
485
- #: include/list-table.php:56
486
  msgid "Delete"
487
  msgstr "Удалить"
488
 
489
  # @ polylang
490
- #: include/list-table.php:65
491
  msgid "Code"
492
  msgstr "Код"
493
 
494
  # @ polylang
495
- #: include/list-table.php:67
496
  msgid "Flag"
497
  msgstr "Флаг"
498
 
499
  # @ polylang
500
- #: include/list-table.php:68
501
  msgid "Posts"
502
  msgstr "Записи"
503
 
504
  # @ polylang
505
- #: include/list-table.php:118
506
  msgid "Name"
507
  msgstr "Название"
508
 
509
  # @ polylang
510
- #: include/list-table.php:119
511
  msgid "String"
512
  msgstr "Строка"
513
 
514
  # @ polylang
515
- #: include/media-translations.php:6
516
- #: include/media-translations.php:44
517
- #: include/term-translations.php:16
518
  msgid "Translation"
519
  msgstr "Перевод"
520
 
521
  # @ polylang
522
- #: include/media-translations.php:31
523
- #: include/media-translations.php:68
524
- #: include/post-translations.php:38
525
- #: include/term-translations.php:60
526
  msgid "Add new"
527
  msgstr "Добавить новый"
528
 
529
  # @ polylang
530
- #: include/post-translations.php:5
531
  msgid "ID of pages in other languages:"
532
  msgstr "ID страницы на других языках:"
533
 
534
  # @ polylang
535
- #: include/post-translations.php:5
536
  msgid "ID of posts in other languages:"
537
  msgstr "ID записи на других языках:"
538
 
539
  # @ polylang
540
- #: include/post-translations.php:9
541
  msgid "Page ID"
542
  msgstr "ID страницы"
543
 
544
  # @ polylang
545
- #: include/post-translations.php:9
546
  msgid "Post ID"
547
  msgstr "ID записи"
548
 
549
  # @ polylang
550
- #: include/term-translations.php:48
551
  msgid "No untranslated term"
552
  msgstr "Нет непереведенных значений"
553
 
554
  # @ polylang
555
- #: include/widget.php:6
556
  msgid "Language Switcher"
557
  msgstr "Переключатель языков"
558
 
559
  # @ polylang
560
- #: include/widget.php:6
561
  msgid "Displays a language switcher"
562
  msgstr "Показывает переключатель языков"
563
 
564
  # @ polylang
565
- #: include/widget.php:69
566
  msgid "Title:"
567
  msgstr "Название:"
568
-
569
- # @ polylang
570
- #. translators: plugin header field 'Description'
571
- #: polylang.php:0
572
- msgid "Adds multilingual capability to WordPress"
573
- msgstr ""
574
-
575
- # @ polylang
576
- #: polylang.php:118
577
- #, php-format
578
- msgid "You are using WordPress %s. Polylang requires at least WordPress %s."
579
- msgstr "Установлен WordPress %s. Для корректной работы Polylang требуется минимум WordPress %s."
580
-
581
- # @ polylang
582
- #: polylang.php:159
583
- msgid "For some reasons, Polylang could not create a table in your database."
584
- msgstr "По каким-то причинам Polylang не смог создать таблицы в вашей базе данных."
585
-
586
- # @ polylang
587
- #: polylang.php:220
588
- msgid "Polylang has been deactivated because you upgraded from a too old version."
589
- msgstr ""
590
-
591
- # @ polylang
592
- #: polylang.php:222
593
- #, php-format
594
- msgid "Please upgrade first to %s before ugrading to %s."
595
- msgstr ""
596
-
2
  msgstr ""
3
  "Project-Id-Version: polylang\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-01-29 15:29+0300\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: danalan <danalan@danalan.info>\n"
8
  "Language-Team: \n"
20
  "X-Poedit-SearchPath-0: ..\n"
21
 
22
  # @ polylang
23
+ #: ../polylang.php:124
24
  #, php-format
25
+ msgid "You are using WordPress %s. Polylang requires at least WordPress %s."
26
+ msgstr ""
27
+ "Установлен WordPress %s. Для корректной работы Polylang требуется минимум "
28
+ "WordPress %s."
29
+
30
+ # @ polylang
31
+ #: ../polylang.php:165
32
+ msgid "For some reasons, Polylang could not create a table in your database."
33
+ msgstr ""
34
+ "По каким-то причинам Polylang не смог создать таблицы в вашей базе данных."
35
 
36
  # @ polylang
37
+ #: ../polylang.php:226
38
+ msgid ""
39
+ "Polylang has been deactivated because you upgraded from a too old version."
40
+ msgstr ""
41
+ "Polylang деактивирован, потому что вы выполнили обновление со слишком старой "
42
+ "версии."
43
+
44
+ # @ polylang
45
+ #: ../polylang.php:228
46
  #, php-format
47
+ msgid "Please upgrade first to %s before ugrading to %s."
48
+ msgstr "Пожалуйста, обновитесь сначала до %s перед обновлением до %s."
49
+
50
+ # @ polylang
51
+ #: ../polylang.php:276 ../include/admin-base.php:55
52
+ #: ../include/admin-base.php:184 ../include/admin-filters.php:250
53
+ #: ../include/admin.php:23 ../include/admin.php:318
54
+ #: ../include/list-table.php:13
55
+ msgid "Languages"
56
+ msgstr "Языки"
57
 
58
  # @ polylang
59
+ #: ../polylang.php:277 ../include/admin-filters.php:216
60
+ #: ../include/admin-filters.php:274 ../include/admin-filters.php:608
61
+ #: ../include/admin-filters.php:824 ../include/admin-filters.php:842
62
+ #: ../include/list-table.php:12 ../include/media-translations.php:5
63
+ #: ../include/media-translations.php:43 ../include/post-translations.php:8
64
+ #: ../include/term-translations.php:15
65
+ msgid "Language"
66
+ msgstr "Язык"
67
+
68
+ # @ polylang
69
+ #: ../polylang.php:278 ../include/admin-filters.php:1113
70
+ msgid "All languages"
71
+ msgstr "Все языки"
72
+
73
+ # @ polylang
74
+ #: ../include/about.php:3
75
  #, php-format
76
+ msgid ""
77
+ "Polylang is provided with an extensive %sdocumentation%s (in English only). "
78
+ "It includes information on how to set up your multilingual site and use it "
79
+ "on a daily basis, a FAQ, as well as a documentation for programmers to adapt "
80
+ "their plugins and themes."
81
+ msgstr ""
82
+ "Polylang предоставляется с исчерпывающей %sдокументацией%s (только на "
83
+ "английском), которая включает информацию по настройке и использованию вашего "
84
+ "многоязычного сайта, ответы на частые вопросы, а также документацию для "
85
+ "программистов для адаптации их собственных плагинов и тем."
86
 
87
  # @ polylang
88
+ #: ../include/about.php:9
89
  #, php-format
90
+ msgid ""
91
+ "You will also find useful information in the %ssupport forum%s. However "
92
+ "don't forget to make a search before posting a new topic."
93
+ msgstr ""
94
+ "Также вы можете найти полезную информацию на %sфоруме поддержки%s. Однако, "
95
+ "не забывайте пользоваться поиском, прежде чем создавать новые темы."
96
 
97
  # @ polylang
98
+ #: ../include/about.php:16
99
+ #, php-format
100
+ msgid ""
101
+ "Polylang is free of charge and is released under the same license as "
102
+ "WordPress, the %sGPL%s."
103
+ msgstr ""
104
+ "Polylang бесплатен и предоставляется на таких же, как и WordPress условиях, "
105
+ "%sGPL%s."
106
 
107
  # @ polylang
108
+ #: ../include/about.php:22
109
+ #, php-format
110
+ msgid "If you wonder how you can help the project, just %sread this%s."
111
+ msgstr ""
112
+ "Если вас интересует, как можно помочь проекту, просто %sпрочтите это%s."
 
 
 
 
113
 
114
  # @ polylang
115
+ #: ../include/about.php:27
116
+ msgid ""
117
+ "Finally if you like this plugin or if it helps your business, donations to "
118
+ "the author are greatly appreciated."
119
+ msgstr ""
120
+ "Если же вам понравился этот плагин, или он помогает вам в бизнесе, автор "
121
+ "будет весьма признателен за любые добровольные пожертвования."
122
+
123
+ # @ polylang
124
+ #: ../include/admin-base.php:154
125
  msgid "Displays language names"
126
  msgstr "Показывать названия языков"
127
 
128
  # @ polylang
129
+ #: ../include/admin-base.php:155
130
  msgid "Displays flags"
131
  msgstr "Показывать флаги"
132
 
133
  # @ polylang
134
+ #: ../include/admin-base.php:156
135
  msgid "Forces link to front page"
136
  msgstr "Принудительно переходить на главную страницу при смене языка"
137
 
138
  # @ polylang
139
+ #: ../include/admin-base.php:157
140
  msgid "Hides the current language"
141
  msgstr "Убрать текущий язык"
142
 
143
  # @ polylang
144
+ #: ../include/admin-base.php:161
145
  msgid "Displays a language switcher at the end of the menu"
146
  msgstr "Показывает переключатель языков"
147
 
148
  # @ polylang
149
+ #: ../include/admin-base.php:162
150
  msgid "Displays as dropdown"
151
  msgstr "Показывать как выпадающий список"
152
 
153
  # @ polylang
154
+ #: ../include/admin-base.php:185
155
  msgid "Filters content by language"
156
  msgstr "Устанавливает язык"
157
 
158
  # @ polylang
159
+ #: ../include/admin-base.php:192
160
  msgid "Show all languages"
161
  msgstr "Показать все языки"
162
 
163
  # @ polylang
164
+ #: ../include/admin-filters.php:188 ../include/admin-filters.php:884
 
165
  msgid "Add new translation"
166
  msgstr "Добавить новый перевод"
167
 
168
+ #: ../include/admin-filters.php:202
169
+ msgid "&mdash; No Change &mdash;"
170
+ msgstr "&mdash; Без изменений &mdash;"
171
+
172
+ #: ../include/admin-filters.php:341
173
+ msgid "(no parent)"
174
+ msgstr "(нет родителя)"
 
 
 
 
 
 
 
175
 
176
  # @ polylang
177
+ #: ../include/admin-filters.php:623 ../include/admin-filters.php:658
178
+ #: ../include/list-table.php:112 ../include/media-translations.php:40
179
+ #: ../include/term-translations.php:6 ../include/term-translations.php:11
 
 
 
180
  msgid "Translations"
181
  msgstr "Переводы"
182
 
183
  # @ polylang
184
+ #: ../include/admin-filters.php:826 ../include/admin-filters.php:845
 
185
  msgid "Sets the language"
186
  msgstr "Устанавливает язык"
187
 
188
+ #: ../include/admin-filters.php:1032
189
+ msgid "None"
190
+ msgstr "Отсутствует"
191
+
192
  # @ polylang
193
+ #: ../include/admin-filters.php:1085
194
  msgid "Theme locations and languages"
195
  msgstr "Расположение темы и языков"
196
 
197
  # @ polylang
198
+ #: ../include/admin-filters.php:1091
199
  #, php-format
200
+ msgid ""
201
+ "Please go to the %slanguages page%s to set theme locations and languages"
202
+ msgstr ""
203
+ "Перейдите на %slanguages page%s для указания расположения темы и языков"
204
 
205
  # @ polylang
206
+ #: ../include/admin-filters.php:1109
207
  msgid "The widget is displayed for:"
208
  msgstr "Показывать виджет для"
209
 
210
  # @ polylang
211
+ #: ../include/admin-filters.php:1137
 
 
 
 
 
 
212
  msgid "Admin language"
213
  msgstr "Язык админ.панели"
214
 
215
+ #: ../include/admin-filters.php:1142
216
  msgid "Wordpress default"
217
  msgstr "По умолчанию"
218
 
219
  # @ default
220
  # @ polylang
221
+ #: ../include/admin-filters.php:1168 ../include/admin.php:326
 
222
  msgid "Settings"
223
  msgstr "Настройки"
224
 
225
  # @ polylang
226
+ #: ../include/admin-filters.php:1174
227
  msgid "Upgrading language files&#8230;"
228
  msgstr "Обновление языковых файлов&#8230;"
229
 
230
  # @ polylang
231
+ #: ../include/admin.php:22
232
  msgid "About Polylang"
233
  msgstr "О Polylang"
234
 
235
  # @ polylang
236
+ #: ../include/admin.php:27 ../include/list-table.php:80
 
237
  msgid "Strings translations"
238
  msgstr "Переводы строк"
239
 
240
  # @ polylang
241
+ #: ../include/admin.php:323
242
  msgid "Menus"
243
  msgstr "Меню"
244
 
245
  # @ polylang
246
+ #: ../include/admin.php:325 ../include/list-table.php:79
 
247
  msgid "Strings translation"
248
  msgstr "Перевод строк"
249
 
250
  # @ polylang
251
+ #: ../include/admin.php:347
 
 
 
 
 
252
  msgid "The language code must be 2 characters long"
253
  msgstr "Код языка должен состоять из 2-х символов"
254
 
255
  # @ polylang
256
+ #: ../include/admin.php:348
257
  msgid "The language code must be unique"
258
  msgstr "Код языка должен быть уникальным"
259
 
260
  # @ polylang
261
+ #: ../include/admin.php:349
262
  msgid "The language must have a name"
263
  msgstr "У языка должно быть название"
264
 
265
  # @ polylang
266
+ #: ../include/admin.php:350
267
+ msgid ""
268
+ "The language was created, but the WordPress language file was not "
269
+ "downloaded. Please install it manually."
270
+ msgstr ""
271
+ "Язык был успешно создан, однако отсутствует языковой файл WordPress. "
272
+ "Пожалуйста, установите его вручную."
273
+
274
+ # @ polylang
275
+ #: ../include/admin.php:451
276
+ msgid "Site Title"
277
+ msgstr "Название сайта"
278
+
279
+ #: ../include/admin.php:452
280
+ msgid "Tagline"
281
+ msgstr "Ключевая фраза"
282
+
283
+ #: ../include/admin.php:453
284
+ msgid "Date Format"
285
+ msgstr "Формат даты"
286
+
287
+ #: ../include/admin.php:454
288
+ msgid "Time Format"
289
+ msgstr "Формат времени"
290
 
291
  # @ polylang
292
+ #: ../include/admin.php:472
293
  msgid "Widget title"
294
  msgstr "Название виджета"
295
 
296
  # @ polylang
297
+ #: ../include/base.php:352
298
  msgid "Taxonomies"
299
+ msgstr "Таксономия"
300
 
301
  # @ polylang
302
+ #: ../include/base.php:353
303
  msgid "Custom fields"
304
+ msgstr "Пользовательские поля"
305
 
306
  # @ polylang
307
+ #: ../include/base.php:354
308
  msgid "Comment status"
309
+ msgstr "Статус комментария"
310
 
311
  # @ polylang
312
+ #: ../include/base.php:355
313
  msgid "Ping status"
314
+ msgstr "Статус отклика"
315
 
316
  # @ polylang
317
+ #: ../include/base.php:356
318
  msgid "Sticky posts"
319
+ msgstr "Прилепленные записи"
320
 
321
  # @ polylang
322
+ #: ../include/base.php:357
323
  msgid "Published date"
324
+ msgstr "Дата опубликования"
325
 
326
+ #: ../include/base.php:358
327
  msgid "Post format"
328
+ msgstr "Формат записи"
329
 
330
  # @ default
331
+ #: ../include/base.php:359
332
  msgid "Page parent"
333
+ msgstr "Родительская страница"
334
 
335
  # @ polylang
336
+ #: ../include/base.php:360
337
  msgid "Page template"
338
+ msgstr "Шаблон страницы"
339
 
340
  # @ polylang
341
+ #: ../include/base.php:361
342
  msgid "Page order"
343
+ msgstr "Порядок страниц"
344
 
345
  # @ polylang
346
+ #: ../include/base.php:362
347
  msgid "Featured image"
348
+ msgstr "Выбранный рисунок"
349
+
350
+ #: ../include/calendar.php:106
351
+ #, php-format
352
+ msgctxt "calendar caption"
353
+ msgid "%1$s %2$s"
354
+ msgstr "%1$s %2$s"
355
+
356
+ #: ../include/calendar.php:132 ../include/calendar.php:140
357
+ #, php-format
358
+ msgid "View posts for %1$s %2$s"
359
+ msgstr "Посмотреть записи за %1$s %2$s"
360
+
361
+ #: ../include/core.php:691
362
+ msgid "Search"
363
+ msgstr "Поиск"
364
 
365
  # @ polylang
366
+ #: ../include/languages-form.php:43
367
  msgid "Edit language"
368
  msgstr "Редактировать язык"
369
 
370
  # @ polylang
371
+ #: ../include/languages-form.php:43 ../include/languages-form.php:124
 
372
  msgid "Add new language"
373
  msgstr "Добавить новый язык"
374
 
375
  # @ polylang
376
+ #: ../include/languages-form.php:65
377
  msgid "Choose a language"
378
  msgstr "Показать все языки"
379
 
380
  # @ polylang
381
+ #: ../include/languages-form.php:79
382
  msgid "You can choose a language in the list or directly edit it below."
383
  msgstr "Выберите язык из списка или укажите сами."
384
 
385
  # @ polylang
386
+ #: ../include/languages-form.php:83 ../include/list-table.php:34
 
387
  msgid "Full name"
388
  msgstr "Полное название"
389
 
390
  # @ polylang
391
+ #: ../include/languages-form.php:85
392
  msgid "The name is how it is displayed on your site (for example: English)."
393
  msgstr "Название для отображения на сайте (например: Русский)."
394
 
395
  # @ polylang
396
+ #: ../include/languages-form.php:89 ../include/list-table.php:35
 
397
  msgid "Locale"
398
  msgstr "Локаль"
399
 
400
  # @ polylang
401
+ #: ../include/languages-form.php:94
402
+ msgid ""
403
+ "Wordpress Locale for the language (for example: en_US). You will need to "
404
+ "install the .mo file for this language."
405
+ msgstr ""
406
+ "Локаль Wordpress'a для языка (например: ru_RU). Вы должны установить файлы ."
407
+ "mo для админ.панели и используемой темы."
408
 
409
  # @ polylang
410
+ #: ../include/languages-form.php:98
411
  msgid "Language code"
412
  msgstr "Код языка"
413
 
414
  # @ polylang
415
+ #: ../include/languages-form.php:100
416
  msgid "2-letters ISO 639-1 language code (for example: en)"
417
  msgstr "2х-буквенный ISO 639-1 код языка (например: ru)"
418
 
419
  # @ polylang
420
+ #: ../include/languages-form.php:104
421
  msgid "Text direction"
422
  msgstr "Направление текста"
423
 
424
  # @ polylang
425
+ #: ../include/languages-form.php:108
426
  msgid "left to right"
427
  msgstr "слева направо"
428
 
429
  # @ polylang
430
+ #: ../include/languages-form.php:113
431
  msgid "right to left"
432
  msgstr "справа налево"
433
 
434
  # @ polylang
435
+ #: ../include/languages-form.php:115
436
  msgid "Choose the text direction for the language"
437
  msgstr "Выберите направление текста для языка"
438
 
439
  # @ polylang
440
+ #: ../include/languages-form.php:119 ../include/list-table.php:37
 
441
  msgid "Order"
442
  msgstr "Порядок"
443
 
444
  # @ polylang
445
+ #: ../include/languages-form.php:121
446
  msgid "Position of the language in the language switcher"
447
  msgstr "Порядок языка в переключателе языков"
448
 
449
+ #: ../include/languages-form.php:124
450
+ msgid "Update"
451
+ msgstr "Обновить"
452
+
453
  # @ polylang
454
+ #: ../include/languages-form.php:180
455
  msgid "Language switcher"
456
  msgstr "Переключатель языков"
457
 
458
  # @ polylang
459
+ #: ../include/languages-form.php:207
460
  msgid "Search translations"
461
+ msgstr "Поиск перевода"
462
 
463
+ #: ../include/languages-form.php:220
464
  msgid "Clean strings translation database"
465
  msgstr "Почистить базу данных переводов строк"
466
 
467
  # @ polylang
468
+ #: ../include/languages-form.php:236
469
  msgid "Default language"
470
  msgstr "Язык по умолчанию"
471
 
472
  # @ polylang
473
+ #: ../include/languages-form.php:248
474
+ msgid ""
475
+ "There are posts, pages, categories or tags without language set. Do you want "
476
+ "to set them all to default language ?"
477
+ msgstr ""
478
+ "Найдены записи, страницы, категории или метки без указанния какого-либо "
479
+ "языка. Установить им язык по-умолчанию?"
480
 
481
  # @ polylang
482
+ #: ../include/languages-form.php:256
483
  msgid "Detect browser language"
484
  msgstr "Определять язык в браузере"
485
 
486
  # @ polylang
487
+ #: ../include/languages-form.php:262
488
+ msgid ""
489
+ "When the front page is visited, set the language according to the browser "
490
+ "preference"
491
  msgstr "Установить язык сайта согласно настройкам браузера"
492
 
493
  # @ polylang
494
+ #: ../include/languages-form.php:269
495
  msgid "URL modifications"
496
  msgstr "Модификации URL"
497
 
498
+ #: ../include/languages-form.php:275
499
+ msgid ""
500
+ "The language is set from content. Posts, pages, categories and tags urls are "
501
+ "not modified."
502
+ msgstr ""
503
+ "Язык устанавливается по содержимому. Адреса URL записей, страниц, категорий "
504
+ "и тэгов не модифицируются."
505
 
506
+ #: ../include/languages-form.php:283
507
+ msgid ""
508
+ "The language code, for example /en/, is added to all urls when using pretty "
509
+ "permalinks."
510
+ msgstr ""
511
+ "Код языка, например /en/, добавляется ко всем URL, если используются "
512
+ "постоянные ссылки."
513
 
514
  # @ polylang
515
+ #: ../include/languages-form.php:292
516
  msgid "Remove /language/ in pretty permalinks. Example:"
517
  msgstr "Удалить /language/ в ЧПУ. Пример:"
518
 
519
  # @ polylang
520
+ #: ../include/languages-form.php:301
521
  msgid "Keep /language/ in pretty permalinks. Example:"
522
  msgstr "Оставить /language/ в ЧПУ. Пример:"
523
 
524
  # @ polylang
525
+ #: ../include/languages-form.php:310
526
  msgid "Hide URL language information for default language"
527
  msgstr "Спрятать название языка по-умолчанию из URL"
528
 
529
+ #: ../include/languages-form.php:320
530
  #, php-format
531
+ msgid ""
532
+ "When using static front page, redirect the language page (example: %s) to "
533
+ "the front page in the right language"
534
+ msgstr ""
535
+ "Если используются статические страницы, перенаправлять языковые варианты "
536
+ "(например: %s) на главную страницу в нужном языке."
537
 
538
  # @ polylang
539
+ #: ../include/languages-form.php:329
540
  msgid "Media"
541
+ msgstr "Медиа"
542
 
543
  # @ polylang
544
+ #: ../include/languages-form.php:335
545
  msgid "Activate languages and translations for media"
546
+ msgstr "Активировать языки и переводы для мультимедиа материалов"
547
 
548
+ #: ../include/languages-form.php:342
549
  msgid "Synchronization"
550
  msgstr "Синхронизация"
551
 
552
  # @ polylang
553
+ #: ../include/languages-form.php:356
554
  msgid "Custom post types"
555
+ msgstr "Пользовательские типы записей"
556
 
557
  # @ polylang
558
+ #: ../include/languages-form.php:369
559
  msgid "Activate languages and translations for custom post types."
560
+ msgstr "Активировать языки и переводы для пользовательских типов записей."
561
 
562
  # @ polylang
563
+ #: ../include/languages-form.php:377
564
  msgid "Custom taxonomies"
565
+ msgstr "Пользовательская таксономия"
566
 
567
  # @ polylang
568
+ #: ../include/languages-form.php:390
569
  msgid "Activate languages and translations for custom taxonomies."
570
+ msgstr "Активировать языки и переводы для пользовательской таксономии."
571
 
572
  # @ polylang
573
+ #: ../include/list-table.php:26 ../include/media-translations.php:22
574
+ #: ../include/media-translations.php:60 ../include/post-translations.php:10
575
+ #: ../include/post-translations.php:33 ../include/term-translations.php:18
576
+ #: ../include/term-translations.php:80
 
 
 
577
  msgid "Edit"
578
  msgstr "Редактировать"
579
 
580
  # @ polylang
581
+ #: ../include/list-table.php:27
582
  msgid "Delete"
583
  msgstr "Удалить"
584
 
585
  # @ polylang
586
+ #: ../include/list-table.php:36
587
  msgid "Code"
588
  msgstr "Код"
589
 
590
  # @ polylang
591
+ #: ../include/list-table.php:38
592
  msgid "Flag"
593
  msgstr "Флаг"
594
 
595
  # @ polylang
596
+ #: ../include/list-table.php:39
597
  msgid "Posts"
598
  msgstr "Записи"
599
 
600
  # @ polylang
601
+ #: ../include/list-table.php:110
602
  msgid "Name"
603
  msgstr "Название"
604
 
605
  # @ polylang
606
+ #: ../include/list-table.php:111
607
  msgid "String"
608
  msgstr "Строка"
609
 
610
  # @ polylang
611
+ #: ../include/media-translations.php:6 ../include/media-translations.php:44
612
+ #: ../include/term-translations.php:16
 
613
  msgid "Translation"
614
  msgstr "Перевод"
615
 
616
  # @ polylang
617
+ #: ../include/media-translations.php:31 ../include/media-translations.php:68
618
+ #: ../include/post-translations.php:38 ../include/term-translations.php:60
 
 
619
  msgid "Add new"
620
  msgstr "Добавить новый"
621
 
622
  # @ polylang
623
+ #: ../include/post-translations.php:5
624
  msgid "ID of pages in other languages:"
625
  msgstr "ID страницы на других языках:"
626
 
627
  # @ polylang
628
+ #: ../include/post-translations.php:5
629
  msgid "ID of posts in other languages:"
630
  msgstr "ID записи на других языках:"
631
 
632
  # @ polylang
633
+ #: ../include/post-translations.php:9
634
  msgid "Page ID"
635
  msgstr "ID страницы"
636
 
637
  # @ polylang
638
+ #: ../include/post-translations.php:9
639
  msgid "Post ID"
640
  msgstr "ID записи"
641
 
642
  # @ polylang
643
+ #: ../include/term-translations.php:48
644
  msgid "No untranslated term"
645
  msgstr "Нет непереведенных значений"
646
 
647
  # @ polylang
648
+ #: ../include/widget.php:6
649
  msgid "Language Switcher"
650
  msgstr "Переключатель языков"
651
 
652
  # @ polylang
653
+ #: ../include/widget.php:6
654
  msgid "Displays a language switcher"
655
  msgstr "Показывает переключатель языков"
656
 
657
  # @ polylang
658
+ #: ../include/widget.php:69
659
  msgid "Title:"
660
  msgstr "Название:"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
polylang.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Polylang
4
  Plugin URI: http://polylang.wordpress.com/
5
- Version: 1.0.1
6
  Author: F. Demarle
7
  Description: Adds multilingual capability to WordPress
8
  Text Domain: polylang
@@ -29,7 +29,7 @@ Domain Path: /languages
29
  *
30
  */
31
 
32
- define('POLYLANG_VERSION', '1.0.1');
33
  define('PLL_MIN_WP_VERSION', '3.1');
34
 
35
  define('POLYLANG_DIR', dirname(__FILE__)); // our directory
@@ -47,7 +47,7 @@ if (!defined('PLL_LOCAL_URL'))
47
  define('PLL_LOCAL_URL', WP_CONTENT_URL.'/polylang'); // default url to access user data such as custom flags
48
 
49
  if (!defined('PLL_COOKIE'))
50
- define('PLL_COOKIE', 'pll_language');
51
 
52
  require_once(PLL_INC.'/base.php');
53
 
@@ -182,13 +182,12 @@ class Polylang extends Polylang_Base {
182
  $options['taxonomies'] = array_values(get_taxonomies(array('_builtin' => false, 'show_ui => true')));
183
  }
184
  $options['version'] = POLYLANG_VERSION;
 
185
 
186
- if (update_option('polylang', $options)) {
187
- // add our rewrite rules
188
- $this->add_post_types_taxonomies();
189
- $this->prepare_rewrite_rules();
190
- flush_rewrite_rules();
191
- }
192
  }
193
 
194
  // plugin deactivation for multisite
@@ -254,6 +253,11 @@ class Polylang extends Polylang_Base {
254
  flush_rewrite_rules(); // rewrite rules have been modified in 1.0
255
  }
256
 
 
 
 
 
 
257
  $options['version'] = POLYLANG_VERSION;
258
  update_option('polylang', $options);
259
  }
2
  /*
3
  Plugin Name: Polylang
4
  Plugin URI: http://polylang.wordpress.com/
5
+ Version: 1.0.2
6
  Author: F. Demarle
7
  Description: Adds multilingual capability to WordPress
8
  Text Domain: polylang
29
  *
30
  */
31
 
32
+ define('POLYLANG_VERSION', '1.0.2');
33
  define('PLL_MIN_WP_VERSION', '3.1');
34
 
35
  define('POLYLANG_DIR', dirname(__FILE__)); // our directory
47
  define('PLL_LOCAL_URL', WP_CONTENT_URL.'/polylang'); // default url to access user data such as custom flags
48
 
49
  if (!defined('PLL_COOKIE'))
50
+ define('PLL_COOKIE', 'pll_language'); // cookie name. no cookie will be used if set to false
51
 
52
  require_once(PLL_INC.'/base.php');
53
 
182
  $options['taxonomies'] = array_values(get_taxonomies(array('_builtin' => false, 'show_ui => true')));
183
  }
184
  $options['version'] = POLYLANG_VERSION;
185
+ update_option('polylang', $options);
186
 
187
+ // add our rewrite rules
188
+ $this->add_post_types_taxonomies();
189
+ $this->prepare_rewrite_rules();
190
+ flush_rewrite_rules();
 
 
191
  }
192
 
193
  // plugin deactivation for multisite
253
  flush_rewrite_rules(); // rewrite rules have been modified in 1.0
254
  }
255
 
256
+ if (version_compare($options['version'], '1.0.2', '<'))
257
+ // set the option again in case it was not in 1.0
258
+ if (!isset($options['media_support']))
259
+ $options['media_support'] = defined('PLL_MEDIA_SUPPORT') && !PLL_MEDIA_SUPPORT ? 0 : 1;
260
+
261
  $options['version'] = POLYLANG_VERSION;
262
  update_option('polylang', $options);
263
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: multilingual, bilingual, translate, translation, language, multilanguage, i18n, international, l10n, localization
5
  Requires at least: 3.1
6
  Tested up to: 3.5
7
- Stable tag: 1.0.1
8
  License: GPLv2 or later
9
 
10
  Polylang adds multilingual content management support to WordPress.
@@ -24,7 +24,7 @@ You write posts, pages and create categories and post tags as usual, and then de
24
 
25
  = Translators =
26
 
27
- The plugin admin interface is currently available in 23 languages: English, French, German contributed by [Christian Ries](http://www.singbyfoot.lu), Russian contributed by [yoyurec](http://yoyurec.in.ua) and unostar, Greek contributed by [theodotos](http://www.ubuntucy.org), Dutch contributed by [AlbertGn](http://wordpress.org/support/profile/albertgn), Hebrew contributed by [ArielK](http://www.arielk.net), Polish contributed by [Peter Paciorkiewicz](http://www.paciorkiewicz.pl), Latvian contributed by [@AndyDeGroo](http://twitter.com/AndyDeGroo), Italian contributed by [Luca Barbetti](http://wordpress.org/support/profile/lucabarbetti), Danish contributed by [Compute](http://wordpress.org/support/profile/compute), Spanish contributed by Curro, Portuguese contributed by [Vitor Carvalho](http://vcarvalho.com/), Lithuanian contributed by [Naglis Jonaitis](http://najo.lt/), Turkish contributed by [darchws](http://darch.ws/), Finnish contributed by [Jani Alha](http://www.wysiwyg.fi), Bulgarian contributed by [pavelsof](http://wordpress.org/support/profile/pavelsof), Belarusian contributed by [Alexander Markevitch](http://fourfeathers.by/), Afrikaans contributed by [Kobus Joubert](http://translate3d.com/), Hungarian contributed by Csaba Erdei, Norwegian contributed by [Tom Boersma](http://www.oransje.com/), Slovak contributed by [Branco (WebHostingGeeks.com)](http://webhostinggeeks.com/user-reviews/), Swedish contributed by [matsii](http://wordpress.org/support/profile/matsii)
28
 
29
 
30
  Other [contributions](http://wordpress.org/extend/plugins/polylang/other_notes/) are welcome !
@@ -75,7 +75,7 @@ You can subscribe to the tag ['polylang-dev'](http://wordpress.org/tags/polylang
75
 
76
  = Translate the admin interface =
77
 
78
- Polylang is already available in 23 languages. It's very easy to add a new one! Download [poedit](http://www.poedit.net/download.php) (available for Windows, Mac OS X and Linux). Rename the file polylang.pot found in the polylang/languages directory into something like polylang-your_locale.po. Open the file with poedit and start translating (keeping strange codes such as %s, %1$s as is). Once done, just save and you will get two files polylang-your_locale.po and polylang-your_locale.mo that you can send to the author. The translation will be included with the next release and will be covered by the same license as Polylang (GPLv2 or later).
79
 
80
  = Communicate =
81
 
@@ -92,9 +92,28 @@ If you are using a version older than 0.8, please ugrade to 0.9.8 before ugradin
92
 
93
  == Changelog ==
94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  = 1.0.1 (2013-01-28) =
96
 
97
- * Add Swedish translation contributed by [matsii](http://wordpress.org/support/profile/matsii)
98
  * Add 2 new API functions : 'pll_is_translated_post_type' and 'pll_is_translated_taxonomy'
99
  * Bug correction: when using a static front page, the posts page is not filtered by language (introduced in 1.0)
100
  * Bug correction: disable translation for hard coded menu as it creates more problems than it solves (introduced in 1.0)
@@ -116,7 +135,7 @@ If you are using a version older than 0.8, please ugrade to 0.9.8 before ugradin
116
  * Add support of the WPML config file
117
  * Add support of 'icl_get_languages' and 'icl_link_to_element' functions from the WPML API
118
  * Add compatibility with YARPP and improve compatibility with WordPress SEO
119
- * Change cookie name which conflicts with Quick cache and allow users to overwrite it by defining the constant PLL_COOKIE
120
  * Bug correction: again the canonical redirection
121
  * Bug correction: the languages are not correctly displayed after they have been modified using quick edit
122
  * Bug correction: undefined index notice when saving strings translation when the admin language filter is active
4
  Tags: multilingual, bilingual, translate, translation, language, multilanguage, i18n, international, l10n, localization
5
  Requires at least: 3.1
6
  Tested up to: 3.5
7
+ Stable tag: 1.0.2
8
  License: GPLv2 or later
9
 
10
  Polylang adds multilingual content management support to WordPress.
24
 
25
  = Translators =
26
 
27
+ The plugin admin interface is currently available in 24 languages: English, French, German contributed by [Christian Ries](http://www.singbyfoot.lu), Russian contributed by [yoyurec](http://yoyurec.in.ua) and unostar, Greek contributed by [theodotos](http://www.ubuntucy.org), Dutch contributed by [AlbertGn](http://wordpress.org/support/profile/albertgn), Hebrew contributed by [ArielK](http://www.arielk.net), Polish contributed by [Peter Paciorkiewicz](http://www.paciorkiewicz.pl), Latvian contributed by [@AndyDeGroo](http://twitter.com/AndyDeGroo), Italian contributed by [Luca Barbetti](http://wordpress.org/support/profile/lucabarbetti), Danish contributed by [Compute](http://wordpress.org/support/profile/compute), Spanish contributed by Curro, Portuguese contributed by [Vitor Carvalho](http://vcarvalho.com/), Lithuanian contributed by [Naglis Jonaitis](http://najo.lt/), Turkish contributed by [darchws](http://darch.ws/), Finnish contributed by [Jani Alha](http://www.wysiwyg.fi), Bulgarian contributed by [pavelsof](http://wordpress.org/support/profile/pavelsof), Belarusian contributed by [Alexander Markevitch](http://fourfeathers.by/), Afrikaans contributed by [Kobus Joubert](http://translate3d.com/), Hungarian contributed by Csaba Erdei, Norwegian contributed by [Tom Boersma](http://www.oransje.com/), Slovak contributed by [Branco (WebHostingGeeks.com)](http://webhostinggeeks.com/user-reviews/), Swedish contributed by [matsii](http://wordpress.org/support/profile/matsii), Catalan contributed by [Núria Martínez Berenguer](http://nuriamb.capa.webfactional.com)
28
 
29
 
30
  Other [contributions](http://wordpress.org/extend/plugins/polylang/other_notes/) are welcome !
75
 
76
  = Translate the admin interface =
77
 
78
+ Polylang is already available in 24 languages. It's very easy to add a new one! Download [poedit](http://www.poedit.net/download.php) (available for Windows, Mac OS X and Linux). Rename the file polylang.pot found in the polylang/languages directory into something like polylang-your_locale.po. Open the file with poedit and start translating (keeping strange codes such as %s, %1$s as is). Once done, just save and you will get two files polylang-your_locale.po and polylang-your_locale.mo that you can send to the author. The translation will be included with the next release and will be covered by the same license as Polylang (GPLv2 or later).
79
 
80
  = Communicate =
81
 
92
 
93
  == Changelog ==
94
 
95
+ = 1.0.2 (2013-02-26) =
96
+
97
+ * Add Catalan translation contributed by [Núria Martínez Berenguer](http://nuriamb.capa.webfactional.com)
98
+ * Add the possibility to query comments by language
99
+ * Add the possibility not to set a cookie by defining PLL_COOKIE to false (Polylang may not work as expected on some pages)
100
+ * Now a returning visitor is redirected to its preferred language when visiting the front page in the default language
101
+ * Add compatibility with the plugin Custom field template (copy and synchronize custom fields)
102
+ * Improve compatibility with plugins or themes which overwrite columns in posts list table
103
+ * Add the filter 'pll_get_flag'
104
+ * Add support of 'icl_unregister_string' function from the WPML API
105
+ * Bug correction: synchronizing custom fields breaks the plugin Advanced Custom Fields
106
+ * Bug correction: 'pll_default_language' broken
107
+ * Bug correction: rewrite rules are not flushed when re-activating the plugin
108
+ * Bug correction: feed urls are not correctly escaped when using default permalinks
109
+ * Bug correction: notice Undefined index: media_support
110
+ * Bug correction: custom post types and taxonomies set in wpml-config.xml are not hidden
111
+ * Bug correction: get_terms cannot query multiple languages
112
+ * Bug correction: 'icl_register_string' is now persistant as in WPML (fixes Nextgen gallery translations which were not working)
113
+
114
  = 1.0.1 (2013-01-28) =
115
 
116
+ * Add Swedish translation contributed by [matsii](http://wordpress.org/support/profile/matsii)
117
  * Add 2 new API functions : 'pll_is_translated_post_type' and 'pll_is_translated_taxonomy'
118
  * Bug correction: when using a static front page, the posts page is not filtered by language (introduced in 1.0)
119
  * Bug correction: disable translation for hard coded menu as it creates more problems than it solves (introduced in 1.0)
135
  * Add support of the WPML config file
136
  * Add support of 'icl_get_languages' and 'icl_link_to_element' functions from the WPML API
137
  * Add compatibility with YARPP and improve compatibility with WordPress SEO
138
+ * Change cookie name which conflicts with Quick cache and allow users to overwrite it by defining the constant PLL_COOKIE
139
  * Bug correction: again the canonical redirection
140
  * Bug correction: the languages are not correctly displayed after they have been modified using quick edit
141
  * Bug correction: undefined index notice when saving strings translation when the admin language filter is active
uninstall.php CHANGED
@@ -73,6 +73,7 @@ class Polylang_Uninstall {
73
  delete_option('polylang_nav_menus');
74
  delete_option('polylang_widgets');
75
  delete_option('widget_polylang'); // automatically created by WP
 
76
  }
77
  }
78
 
73
  delete_option('polylang_nav_menus');
74
  delete_option('polylang_widgets');
75
  delete_option('widget_polylang'); // automatically created by WP
76
+ delete_option('polylang_wpml_strings');
77
  }
78
  }
79