Polylang - Version 0.9.1

Version Description

(2012-09-20) =

  • Add Finnish translation contributed by Jani Alha
  • Bug correction: improve the robustness of the admin content language filter
  • Bug correction: the language switcher displays languages which have no posts or pages (introduced in 0.9)
  • Bug correction: wrong default language when adding a new media
  • Bug correction: the dropdown language switcher does not switch language when there is no post translation
  • Bug correction: issue with translations when using category quick edit
  • Bug correction: home redirects to 404 when combining static front page + force_lang
Download this release

Release Info

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

Code changes from version 0.9 to 0.9.1

doc/documentation-en.odt CHANGED
Binary file
doc/documentation-en.pdf CHANGED
Binary file
include/admin-base.php CHANGED
@@ -34,8 +34,8 @@ class Polylang_Admin_Base extends Polylang_Base {
34
  $wp_locale->text_direction = get_metadata('term', $lang_id, '_rtl', true) ? 'rtl' : 'ltr';
35
 
36
  // set user meta when choosing to filter content by language
37
- if (isset($_GET['lang']) && $_GET['lang'])
38
- update_user_meta(get_current_user_id(), 'pll_filter_content', $_GET['lang'] == 'all' ? '' : $_GET['lang']);
39
 
40
  if (!$this->get_languages_list())
41
  return;
@@ -168,7 +168,8 @@ class Polylang_Admin_Base extends Polylang_Base {
168
  function admin_bar_menu($wp_admin_bar) {
169
  $url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
170
 
171
- $selected = isset($_GET['lang']) && $_GET['lang'] ? $_GET['lang'] :
 
172
  (($lg = get_user_meta(get_current_user_id(), 'pll_filter_content', true)) ? $lg : 'all');
173
 
174
  $wp_admin_bar->add_menu(array(
34
  $wp_locale->text_direction = get_metadata('term', $lang_id, '_rtl', true) ? 'rtl' : 'ltr';
35
 
36
  // set user meta when choosing to filter content by language
37
+ if (isset($_GET['lang']) && $_GET['lang'] && !is_numeric($_GET['lang'])) // numeric when editing a language
38
+ update_user_meta(get_current_user_id(), 'pll_filter_content', ($lang = $this->get_language($_GET['lang'])) ? $lang->slug : '');
39
 
40
  if (!$this->get_languages_list())
41
  return;
168
  function admin_bar_menu($wp_admin_bar) {
169
  $url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
170
 
171
+ // $_GET['lang'] is numeric when editing a language, not when selecting a new language in the filter
172
+ $selected = isset($_GET['lang']) && $_GET['lang'] && !is_numeric($_GET['lang']) && ($lang = $this->get_language($_GET['lang'])) ? $lang->slug :
173
  (($lg = get_user_meta(get_current_user_id(), 'pll_filter_content', true)) ? $lg : 'all');
174
 
175
  $wp_admin_bar->add_menu(array(
include/admin-filters.php CHANGED
@@ -196,6 +196,7 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
196
  printf('<label for="%s" class="alignleft"><span class="title">%s</span>%s</label>', $name, __('Language', 'polylang'), $this->dropdown_languages($args));
197
  echo '</div></fieldset>';
198
  }
 
199
  }
200
 
201
  // filters posts, pages and media by language
@@ -203,10 +204,10 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
203
  $qvars = &$query->query_vars;
204
 
205
  // do not filter post types such as nav_menu_item
206
- if (!in_array($qvars['post_type'], $this->post_types)) {
207
  if (isset($qvars['lang']))
208
  unset ($qvars['lang']);
209
- return;
210
  }
211
 
212
  // filters the list of media by language when uploading from post
@@ -218,6 +219,8 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
218
 
219
  if (isset($qvars['lang']) && $qvars['lang'] == 'all')
220
  unset ($qvars['lang']);
 
 
221
  }
222
 
223
  // adds the Language box in the 'Edit Post' and 'Edit Page' panels (as well as in custom post types panels)
@@ -228,7 +231,7 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
228
  // replace tag metabox by our own
229
  foreach (get_object_taxonomies($post_type) as $tax_name) {
230
  $taxonomy = get_taxonomy($tax_name);
231
- if ($taxonomy->show_ui && !is_taxonomy_hierarchical($tax_name)) {
232
  remove_meta_box('tagsdiv-' . $tax_name, null, 'side');
233
  add_meta_box('pll-tagsdiv-' . $tax_name, $taxonomy->labels->name, 'post_tags_meta_box', null, 'side', 'core', array('taxonomy' => $tax_name));
234
  }
@@ -466,15 +469,17 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
466
  return;
467
 
468
  // make sure we get save terms in the right language (especially tags with same name in different languages)
469
- foreach ($this->taxonomies as $tax) {
470
- $terms = get_the_terms($post_id, $tax);
471
- if (is_array($terms)) {
472
- $newterms = array();
473
- foreach ($terms as $term) {
474
- if ($term_id = $this->get_term($term->term_id, $_POST['post_lang_choice']))
475
- $newterms[] = (int) $term_id; // cast is important otherwise we get 'numeric' tags
 
 
 
476
  }
477
- wp_set_object_terms($post_id, $newterms, $tax);
478
  }
479
  }
480
 
@@ -526,7 +531,7 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
526
  $lang = $this->get_post_language($post_id);
527
 
528
  // fills with the post language when uploading from post, otherwise the default language
529
- if (!isset($lang))
530
  $lang = $post->post_parent ? $this->get_post_language($post->post_parent) : $this->get_default_language();
531
 
532
  $fields['language'] = array(
@@ -779,10 +784,14 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
779
  return;
780
 
781
  // save language
782
- if (isset($_POST['term_lang_choice']) && $_POST['term_lang_choice'])
783
  $this->set_term_language($term_id, $_POST['term_lang_choice']);
784
- if (isset($_POST['inline_lang_choice']) && $_POST['inline_lang_choice'])
785
- $this->set_term_language($term_id, $_POST['inline_lang_choice']); // don't use term_lang_choice for quick edit to avoid conflict with the "add term" form
 
 
 
 
786
  elseif (isset($_POST['post_lang_choice']))
787
  $this->set_term_language($term_id, $_POST['post_lang_choice']);
788
 
@@ -792,7 +801,7 @@ class Polylang_Admin_Filters extends Polylang_Admin_Base {
792
  // save translations after checking the translated term is in the right language (as well as cast id to int)
793
  foreach ($_POST['term_tr_lang'] as $lang=>$tr_id) {
794
  $tr_lang = $this->get_term_language((int) $tr_id);
795
- $translations[$lang] = isset($tr_lang) && $tr_lang->slug == $lang ? (int) $tr_id : 0;
796
  }
797
 
798
  $this->save_translations('term', $term_id, $translations);
196
  printf('<label for="%s" class="alignleft"><span class="title">%s</span>%s</label>', $name, __('Language', 'polylang'), $this->dropdown_languages($args));
197
  echo '</div></fieldset>';
198
  }
199
+ return $column;
200
  }
201
 
202
  // filters posts, pages and media by language
204
  $qvars = &$query->query_vars;
205
 
206
  // do not filter post types such as nav_menu_item
207
+ if (isset($qvars['post_type']) && !in_array($qvars['post_type'], $this->post_types)) {
208
  if (isset($qvars['lang']))
209
  unset ($qvars['lang']);
210
+ return $query;
211
  }
212
 
213
  // filters the list of media by language when uploading from post
219
 
220
  if (isset($qvars['lang']) && $qvars['lang'] == 'all')
221
  unset ($qvars['lang']);
222
+
223
+ return $query;
224
  }
225
 
226
  // adds the Language box in the 'Edit Post' and 'Edit Page' panels (as well as in custom post types panels)
231
  // replace tag metabox by our own
232
  foreach (get_object_taxonomies($post_type) as $tax_name) {
233
  $taxonomy = get_taxonomy($tax_name);
234
+ if ($taxonomy->show_ui && !is_taxonomy_hierarchical($tax_name)) {
235
  remove_meta_box('tagsdiv-' . $tax_name, null, 'side');
236
  add_meta_box('pll-tagsdiv-' . $tax_name, $taxonomy->labels->name, 'post_tags_meta_box', null, 'side', 'core', array('taxonomy' => $tax_name));
237
  }
469
  return;
470
 
471
  // make sure we get save terms in the right language (especially tags with same name in different languages)
472
+ if ($_POST['post_lang_choice']) {
473
+ foreach ($this->taxonomies as $tax) {
474
+ $terms = get_the_terms($post_id, $tax);
475
+ if (is_array($terms)) {
476
+ $newterms = array();
477
+ foreach ($terms as $term) {
478
+ if ($term_id = $this->get_term($term->term_id, $_POST['post_lang_choice']))
479
+ $newterms[] = (int) $term_id; // cast is important otherwise we get 'numeric' tags
480
+ }
481
+ wp_set_object_terms($post_id, $newterms, $tax);
482
  }
 
483
  }
484
  }
485
 
531
  $lang = $this->get_post_language($post_id);
532
 
533
  // fills with the post language when uploading from post, otherwise the default language
534
+ if (!$lang)
535
  $lang = $post->post_parent ? $this->get_post_language($post->post_parent) : $this->get_default_language();
536
 
537
  $fields['language'] = array(
784
  return;
785
 
786
  // save language
787
+ if (isset($_POST['term_lang_choice']))
788
  $this->set_term_language($term_id, $_POST['term_lang_choice']);
789
+ if (isset($_POST['inline_lang_choice'])) {
790
+ // don't use term_lang_choice for quick edit to avoid conflict with the "add term" form
791
+ if ($this->get_term_language($term_id)->slug != $_POST['inline_lang_choice'])
792
+ $this->delete_translation('term', $term_id);
793
+ $this->set_term_language($term_id, $_POST['inline_lang_choice']);
794
+ }
795
  elseif (isset($_POST['post_lang_choice']))
796
  $this->set_term_language($term_id, $_POST['post_lang_choice']);
797
 
801
  // save translations after checking the translated term is in the right language (as well as cast id to int)
802
  foreach ($_POST['term_tr_lang'] as $lang=>$tr_id) {
803
  $tr_lang = $this->get_term_language((int) $tr_id);
804
+ $translations[$lang] = $tr_lang && $tr_lang->slug == $lang ? (int) $tr_id : 0;
805
  }
806
 
807
  $this->save_translations('term', $term_id, $translations);
include/base.php CHANGED
@@ -105,8 +105,7 @@ abstract class Polylang_Base {
105
 
106
  // store the post language in the database
107
  function set_post_language($post_id, $lang) {
108
- if ($lang)
109
- wp_set_post_terms($post_id, $this->get_language($lang)->slug, 'language' );
110
  }
111
 
112
  // returns the language of a post
@@ -127,8 +126,7 @@ abstract class Polylang_Base {
127
 
128
  // store the term language in the database
129
  function set_term_language($term_id, $lang) {
130
- if ($lang)
131
- update_metadata('term', $term_id, '_language', $this->get_language($lang)->term_id);
132
  }
133
 
134
  // remove the term language in the database
105
 
106
  // store the post language in the database
107
  function set_post_language($post_id, $lang) {
108
+ wp_set_post_terms($post_id, $lang ? $this->get_language($lang)->slug : '', 'language' );
 
109
  }
110
 
111
  // returns the language of a post
126
 
127
  // store the term language in the database
128
  function set_term_language($term_id, $lang) {
129
+ update_metadata('term', $term_id, '_language', $lang ? $this->get_language($lang)->term_id : 0);
 
130
  }
131
 
132
  // remove the term language in the database
include/core.php CHANGED
@@ -339,6 +339,10 @@ class Polylang_Core extends Polylang_base {
339
  // special actions when home page is requested
340
  // optionally redirects to the home page in the preferred language
341
  function home_requested($query = false) {
 
 
 
 
342
  if ($this->options['hide_default'] && isset($_COOKIE['wordpress_polylang']))
343
  $this->curlang = $this->get_language($this->options['default_lang']);
344
  else
@@ -390,7 +394,7 @@ class Polylang_Core extends Polylang_base {
390
 
391
  // homepage is requested, let's set the language
392
  // take care to avoid posts page for which is_home = 1
393
- if (!$this->curlang && ((is_home() && !$qvars['page_id']) || (empty($query->query) && is_page() && $qvars['page_id'] == $this->page_on_front)))
394
  $this->home_requested($query);
395
 
396
  // redirect the language page to the homepage
@@ -643,12 +647,11 @@ class Polylang_Core extends Polylang_base {
643
  elseif (!is_tax('post_format') && !is_tax('language') && (is_category() || is_tag() || is_tax()) ) {
644
  $term = get_queried_object();
645
  $lang = $this->get_term_language($term->term_id);
646
- $taxonomy = $term->taxonomy;
647
 
648
- if ($language->slug == $lang->slug)
649
- $url = get_term_link($term, $taxonomy); // self link
650
  elseif ($link_id = $this->get_translation('term', $term->term_id, $language))
651
- $url = get_term_link(get_term($link_id, $taxonomy), $taxonomy);
652
  }
653
 
654
  // don't test if there are existing translations before creating the url as it would be very expensive in sql queries
@@ -832,7 +835,7 @@ class Polylang_Core extends Polylang_base {
832
  else {
833
  $output = '';
834
 
835
- foreach ($this->get_languages_list($hide_if_empty) as $language) {
836
  // hide current language
837
  if ($this->curlang->term_id == $language->term_id && $hide_current)
838
  continue;
339
  // special actions when home page is requested
340
  // optionally redirects to the home page in the preferred language
341
  function home_requested($query = false) {
342
+ // need this filter to get the right url when adding language code to all urls
343
+ if ($this->options['force_lang'] && $GLOBALS['wp_rewrite']->using_permalinks())
344
+ add_filter('_get_page_link', array(&$this, 'post_link'), 10, 2);
345
+
346
  if ($this->options['hide_default'] && isset($_COOKIE['wordpress_polylang']))
347
  $this->curlang = $this->get_language($this->options['default_lang']);
348
  else
394
 
395
  // homepage is requested, let's set the language
396
  // take care to avoid posts page for which is_home = 1
397
+ if (!$this->curlang && empty($query->query) && (is_home() || (is_page() && $qvars['page_id'] == $this->page_on_front)))
398
  $this->home_requested($query);
399
 
400
  // redirect the language page to the homepage
647
  elseif (!is_tax('post_format') && !is_tax('language') && (is_category() || is_tag() || is_tax()) ) {
648
  $term = get_queried_object();
649
  $lang = $this->get_term_language($term->term_id);
 
650
 
651
+ if (!$lang || $language->slug == $lang->slug)
652
+ $url = get_term_link($term, $term->taxonomy); // self link
653
  elseif ($link_id = $this->get_translation('term', $term->term_id, $language))
654
+ $url = get_term_link(get_term($link_id, $term->taxonomy), $term->taxonomy);
655
  }
656
 
657
  // don't test if there are existing translations before creating the url as it would be very expensive in sql queries
835
  else {
836
  $output = '';
837
 
838
+ foreach ($this->get_languages_list(array('hide_empty' => $hide_if_empty)) as $language) {
839
  // hide current language
840
  if ($this->curlang->term_id == $language->term_id && $hide_current)
841
  continue;
include/widget.php CHANGED
@@ -30,7 +30,7 @@ class Polylang_Widget extends WP_Widget {
30
  // javascript to switch the language when using a dropdown list
31
  if ($dropdown) {
32
  foreach ($polylang->get_languages_list() as $language) {
33
- $url = $force_home ? $polylang->get_home_url($language) : $polylang->get_translation_url($language);
34
  $urls[] = '"'.esc_js($language->slug).'":"'.esc_url($url).'"';
35
  }
36
 
30
  // javascript to switch the language when using a dropdown list
31
  if ($dropdown) {
32
  foreach ($polylang->get_languages_list() as $language) {
33
+ $url = $force_home || ($url = $polylang->get_translation_url($language)) == null ? $polylang->get_home_url($language) : $url;
34
  $urls[] = '"'.esc_js($language->slug).'":"'.esc_url($url).'"';
35
  }
36
 
languages/polylang-fi.mo ADDED
Binary file
languages/polylang-fi.po ADDED
@@ -0,0 +1,483 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: polylang\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-08-19 20:12+0100\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2: nplural=n>1;\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "X-Poedit-KeywordsList: _e;__;_x\n"
15
+ "X-Poedit-Basepath: .\n"
16
+ "X-Generator: Poedit 1.5.3\n"
17
+ "X-Poedit-SearchPath-0: ..\n"
18
+ "X-Poedit-SearchPath-1: ../include\n"
19
+
20
+ #: ../polylang.php:111
21
+ #, php-format
22
+ msgid "You are using WordPress %s. Polylang requires at least WordPress %s."
23
+ msgstr ""
24
+ "Käytät WordPress versiota %s. Polylang vaatii vähintään WordPress version %s."
25
+
26
+ #: ../polylang.php:125
27
+ msgid "For some reasons, Polylang could not create a table in your database."
28
+ msgstr "Jostain syystä Polylang ei voinut luoda taulukkoa tietokantaasi."
29
+
30
+ #: ../polylang.php:208
31
+ msgid "Error: Restore of local flags failed!"
32
+ msgstr "Virhe: Paikallisten lippujen palautus epäonnistui!"
33
+
34
+ #: ../polylang.php:209
35
+ #, php-format
36
+ msgid "Please move your local flags from %s to %s"
37
+ msgstr "Siirrä paikalliset lippusi kansiosta %s kansioon %s"
38
+
39
+ #: ../include/calendar.php:106
40
+ #, php-format
41
+ msgid "%1$s %2$s"
42
+ msgstr "%1$s %2$s"
43
+
44
+ #: ../include/calendar.php:132 ../include/calendar.php:140
45
+ #, php-format
46
+ msgid "View posts for %1$s %2$s"
47
+ msgstr "Näytä artikkelit %1$s %2$s"
48
+
49
+ #: ../include/media-translations.php:3 ../include/admin-filters.php:194
50
+ #: ../include/admin-filters.php:525 ../include/admin-filters.php:696
51
+ #: ../include/admin-filters.php:714 ../include/post-translations.php:8
52
+ #: ../include/term-translations.php:15
53
+ msgid "Language"
54
+ msgstr "Kieli"
55
+
56
+ #: ../include/media-translations.php:4 ../include/term-translations.php:16
57
+ msgid "Translation"
58
+ msgstr "Käännös"
59
+
60
+ #: ../include/media-translations.php:18 ../include/post-translations.php:10
61
+ #: ../include/post-translations.php:33 ../include/term-translations.php:18
62
+ #: ../include/term-translations.php:65
63
+ msgid "Edit"
64
+ msgstr "Muokkaa"
65
+
66
+ #: ../include/media-translations.php:26 ../include/post-translations.php:38
67
+ #: ../include/term-translations.php:54
68
+ msgid "Add new"
69
+ msgstr "Lisää uusi"
70
+
71
+ #: ../include/widget.php:6
72
+ msgid "Language Switcher"
73
+ msgstr "Kielivalinta"
74
+
75
+ #: ../include/widget.php:6
76
+ msgid "Displays a language switcher"
77
+ msgstr "Näytä kielivalinta"
78
+
79
+ #: ../include/widget.php:73
80
+ msgid "Title:"
81
+ msgstr "Otsikko:"
82
+
83
+ #: ../include/admin-base.php:50 ../include/admin-base.php:176
84
+ #: ../include/admin.php:290 ../include/admin-filters.php:221
85
+ msgid "Languages"
86
+ msgstr "Kielet"
87
+
88
+ #: ../include/admin-base.php:55
89
+ msgid "About Polylang"
90
+ msgstr "Tietoja Polylang:sta"
91
+
92
+ #: ../include/admin-base.php:149
93
+ msgid "Displays language names"
94
+ msgstr "Näytä kielien nimet"
95
+
96
+ #: ../include/admin-base.php:150
97
+ msgid "Displays flags"
98
+ msgstr "Näytä liput"
99
+
100
+ #: ../include/admin-base.php:151
101
+ msgid "Forces link to front page"
102
+ msgstr "Pakottaa linkin etusivulle"
103
+
104
+ #: ../include/admin-base.php:152
105
+ msgid "Hides the current language"
106
+ msgstr "Piilottaa nykyisen kielen"
107
+
108
+ #: ../include/admin-base.php:154
109
+ msgid "Displays a language switcher at the end of the menu"
110
+ msgstr "Näytä kielivalinta valikon lopussa"
111
+
112
+ #: ../include/admin-base.php:155
113
+ msgid "Displays as dropdown"
114
+ msgstr "Näytä pudotusvalikkona"
115
+
116
+ #: ../include/admin-base.php:177
117
+ msgid "Filters content by language"
118
+ msgstr "Suodata sisältöä kielen mukaan"
119
+
120
+ #: ../include/admin-base.php:184
121
+ msgid "Show all languages"
122
+ msgstr "Näytä kaikki kielet"
123
+
124
+ #: ../include/admin.php:295
125
+ msgid "Menus"
126
+ msgstr "Valikot"
127
+
128
+ #: ../include/admin.php:297
129
+ msgid "Strings translation"
130
+ msgstr "Merkkijonojen käännös"
131
+
132
+ #: ../include/admin.php:298 ../include/admin-filters.php:988
133
+ msgid "Settings"
134
+ msgstr "Asetukset"
135
+
136
+ #: ../include/admin.php:317
137
+ msgid "Enter a valid WorPress locale"
138
+ msgstr "Syötä oikeanmuotoinen WordPress lokaali"
139
+
140
+ #: ../include/admin.php:318
141
+ msgid "The language code must be 2 characters long"
142
+ msgstr "Kielikoodin täytyy olla 2 merkkiä pitkä"
143
+
144
+ #: ../include/admin.php:319
145
+ msgid "The language code must be unique"
146
+ msgstr "Kielikoodin täytyy olla uniikki"
147
+
148
+ #: ../include/admin.php:320
149
+ msgid "The language must have a name"
150
+ msgstr "Kielellä täytyy olla nimi"
151
+
152
+ #: ../include/admin.php:321
153
+ msgid ""
154
+ "The language was created, but the WordPress language file was not "
155
+ "downloaded. Please install it manually."
156
+ msgstr ""
157
+ "Kieli luotiin, mutta WordPress-kielitiedostoa ei ladattu. Asenna se käsin."
158
+
159
+ #: ../include/admin.php:409
160
+ msgid "Site Title"
161
+ msgstr "Sivuston otsikko"
162
+
163
+ #: ../include/admin.php:410
164
+ msgid "Tagline"
165
+ msgstr "Kuvaus"
166
+
167
+ #: ../include/admin.php:428
168
+ msgid "Widget title"
169
+ msgstr "Vimpaimen otsikko"
170
+
171
+ #: ../include/admin-filters.php:176 ../include/admin-filters.php:753
172
+ msgid "Add new translation"
173
+ msgstr "Lisää uusi käännös"
174
+
175
+ #: ../include/admin-filters.php:190
176
+ msgid "&mdash; No Change &mdash;"
177
+ msgstr "&mdash; Ei muutosta &mdash;"
178
+
179
+ #: ../include/admin-filters.php:244
180
+ msgid "Page's language:"
181
+ msgstr "Sivun kieli:"
182
+
183
+ #: ../include/admin-filters.php:244
184
+ msgid "Post's language:"
185
+ msgstr "Artikkelin kieli:"
186
+
187
+ #: ../include/admin-filters.php:305
188
+ msgid "(no parent)"
189
+ msgstr "(ei päätasoa)"
190
+
191
+ #: ../include/admin-filters.php:536 ../include/admin-filters.php:561
192
+ #: ../include/term-translations.php:6 ../include/term-translations.php:11
193
+ msgid "Translations"
194
+ msgstr "Käännökset"
195
+
196
+ #: ../include/admin-filters.php:698 ../include/admin-filters.php:717
197
+ msgid "Sets the language"
198
+ msgstr "Aseta kieli"
199
+
200
+ #: ../include/admin-filters.php:879
201
+ msgid "None"
202
+ msgstr "Ei mitään"
203
+
204
+ #: ../include/admin-filters.php:910
205
+ msgid "Theme locations and languages"
206
+ msgstr "Teeman sijainnit ja kielet"
207
+
208
+ #: ../include/admin-filters.php:916
209
+ #, php-format
210
+ msgid ""
211
+ "Please go to the %slanguages page%s to set theme locations and languages"
212
+ msgstr "Siirry %skielisivulle%s asettamaan teemojen sijainnit ja kielet"
213
+
214
+ #: ../include/admin-filters.php:931
215
+ msgid "The widget is displayed for:"
216
+ msgstr "Vimpain näytetään:"
217
+
218
+ #: ../include/admin-filters.php:935
219
+ msgid "All languages"
220
+ msgstr "Kaikki kielet"
221
+
222
+ #: ../include/admin-filters.php:959
223
+ msgid "Admin language"
224
+ msgstr "Ylläpidon kieli"
225
+
226
+ #: ../include/admin-filters.php:964
227
+ msgid "Wordpress default"
228
+ msgstr "Wordpress oletus"
229
+
230
+ #: ../include/admin-filters.php:994
231
+ msgid "Upgrading language files&#8230;"
232
+ msgstr "Päivitetään kielitiedostoja&#8230;"
233
+
234
+ #: ../include/languages-form.php:38
235
+ msgid "Edit language"
236
+ msgstr "Muokkaa kieltä"
237
+
238
+ #: ../include/languages-form.php:38 ../include/languages-form.php:105
239
+ msgid "Add new language"
240
+ msgstr "Lisää uusi kieli"
241
+
242
+ #: ../include/languages-form.php:60
243
+ msgid "Choose a language"
244
+ msgstr "Valitse kieli"
245
+
246
+ #: ../include/languages-form.php:68
247
+ msgid "You can choose a language in the list or directly edit it below."
248
+ msgstr "Voit valita kielen listalta tai muokata sitä suoraan alla."
249
+
250
+ #: ../include/languages-form.php:72
251
+ msgid "Full name"
252
+ msgstr "Täydellinen nimi"
253
+
254
+ #: ../include/languages-form.php:74
255
+ msgid "The name is how it is displayed on your site (for example: English)."
256
+ msgstr "Nimi kuinka se esiintyy sivustollasi (esimerkiksi: Englanti)."
257
+
258
+ #: ../include/languages-form.php:78
259
+ msgid "Locale"
260
+ msgstr "Lokaali"
261
+
262
+ #: ../include/languages-form.php:81
263
+ msgid ""
264
+ "Wordpress Locale for the language (for example: en_US). You will need to "
265
+ "install the .mo file for this language."
266
+ msgstr ""
267
+ "Wordpress lokaali tälle kielelle (esimerkiksi: en_US). Sinun pitää asentaa ."
268
+ "mo-tiedosto tälle kielelle."
269
+
270
+ #: ../include/languages-form.php:85
271
+ msgid "Language code"
272
+ msgstr "Kielikoodi"
273
+
274
+ #: ../include/languages-form.php:87
275
+ msgid "2-letters ISO 639-1 language code (for example: en)"
276
+ msgstr "2-kirjaiminen ISO 639-1 kielikoodi (esimerkiksi: en)"
277
+
278
+ #: ../include/languages-form.php:91
279
+ msgid "Text direction"
280
+ msgstr "Tekstin suunta"
281
+
282
+ #: ../include/languages-form.php:93
283
+ msgid "left to right"
284
+ msgstr "vasemmalta oikealle"
285
+
286
+ #: ../include/languages-form.php:95
287
+ msgid "right to left"
288
+ msgstr "oikealta vasemmalle"
289
+
290
+ #: ../include/languages-form.php:96
291
+ msgid "Choose the text direction for the language"
292
+ msgstr "Valitse kielen tekstin suunta"
293
+
294
+ #: ../include/languages-form.php:100
295
+ msgid "Order"
296
+ msgstr "Tilaus"
297
+
298
+ #: ../include/languages-form.php:102
299
+ msgid "Position of the language in the language switcher"
300
+ msgstr "Kielen sijainti kielivalinnassa"
301
+
302
+ #: ../include/languages-form.php:105
303
+ msgid "Update"
304
+ msgstr "Päivitä"
305
+
306
+ #: ../include/languages-form.php:151
307
+ msgid "Language switcher"
308
+ msgstr "Kielivalinta"
309
+
310
+ #: ../include/languages-form.php:175
311
+ msgid "Clean strings translation database"
312
+ msgstr "Tyhjennä merkkijonot käännöstietokannasta"
313
+
314
+ #: ../include/languages-form.php:191
315
+ msgid "Default language"
316
+ msgstr "Oletuskieli"
317
+
318
+ #: ../include/languages-form.php:203
319
+ msgid ""
320
+ "There are posts, pages, categories or tags without language set. Do you want "
321
+ "to set them all to default language ?"
322
+ msgstr ""
323
+ "Siellä on artikkeleita, sivuja, kategorioita tai tageja ilman asetettua "
324
+ "kieltä. Haluatko asettaa ne oletuskielelle?"
325
+
326
+ #: ../include/languages-form.php:211
327
+ msgid "Detect browser language"
328
+ msgstr "Tunnista selaimen kieli"
329
+
330
+ #: ../include/languages-form.php:217
331
+ msgid ""
332
+ "When the front page is visited, set the language according to the browser "
333
+ "preference"
334
+ msgstr "Kun etusivulla vieraillaan, aseta kieli selaimen asetuksen mukaan"
335
+
336
+ #: ../include/languages-form.php:224
337
+ msgid "URL modifications"
338
+ msgstr "URL muunnokset"
339
+
340
+ #: ../include/languages-form.php:230
341
+ msgid ""
342
+ "The language is set from content. Posts, pages, categories and tags urls are "
343
+ "not modified."
344
+ msgstr ""
345
+ "Kieli asetetaan sisällöstä. Artikkelien, sivujen, kategorioiden ja tagien "
346
+ "url-osoitteita ei muokata."
347
+
348
+ #: ../include/languages-form.php:238
349
+ msgid ""
350
+ "The language code, for example /en/, is added to all urls when using pretty "
351
+ "permalinks."
352
+ msgstr ""
353
+ "Kielikoodi, esimerkiksi /en/, lisätään url-osoitteisiin kun käytetään "
354
+ "osoiterakennetta."
355
+
356
+ #: ../include/languages-form.php:247
357
+ msgid "Remove /language/ in pretty permalinks. Example:"
358
+ msgstr "Poista /language/ osoiterakenteesta. Esimerkiksi:"
359
+
360
+ #: ../include/languages-form.php:256
361
+ msgid "Keep /language/ in pretty permalinks. Example:"
362
+ msgstr "Säilytä /language/ osoiterakenteessa. Esimerkiksi:"
363
+
364
+ #: ../include/languages-form.php:265
365
+ msgid "Hide URL language information for default language"
366
+ msgstr "Piilota URL-osoitteen kielitieto oletuskieleltä"
367
+
368
+ #: ../include/languages-form.php:274
369
+ #, php-format
370
+ msgid ""
371
+ "When using static front page, redirect the language page (example: %s) to "
372
+ "the front page in the right language"
373
+ msgstr ""
374
+ "Kun käytetään staattista etusivua, uudelleenohjaa kielisivu (esimerkiksi: "
375
+ "%s) oikean kielen etusivulle"
376
+
377
+ #: ../include/languages-form.php:281
378
+ msgid "Synchronization"
379
+ msgstr "Synkronointi"
380
+
381
+ #: ../include/languages-form.php:287
382
+ msgid ""
383
+ "Allow to synchronize categories, tags, featured image and other metas "
384
+ "between translations of a post or page"
385
+ msgstr ""
386
+ "Salli kategorioiden, tagien, artikkelikuvan ja muiden meta-tietojen "
387
+ "synkronointi artikkelin tai sivun käännösten välillä"
388
+
389
+ #: ../include/post-translations.php:5
390
+ msgid "ID of pages in other languages:"
391
+ msgstr "Sivun ID toisilla kielillä:"
392
+
393
+ #: ../include/post-translations.php:5
394
+ msgid "ID of posts in other languages:"
395
+ msgstr "Artikkelin ID toisilla kielillä:"
396
+
397
+ #: ../include/post-translations.php:9
398
+ msgid "Page ID"
399
+ msgstr "Sivun ID"
400
+
401
+ #: ../include/post-translations.php:9
402
+ msgid "Post ID"
403
+ msgstr "Artikkelin ID"
404
+
405
+ #: ../include/about.php:3
406
+ #, php-format
407
+ msgid ""
408
+ "Polylang is provided with an extensive %sdocumentation%s (in English only). "
409
+ "It includes information on how to set up your multilingual site and use it "
410
+ "on a daily basis, a FAQ, as well as a documentation for programmers to adapt "
411
+ "their plugins and themes."
412
+ msgstr ""
413
+ "Polylang toimitetaan kattavan %sdokumentaation%s kanssa (vain englanniksi). "
414
+ "Se sisältää tietoa kuinka perustat monikielisen sivustosi ja käytät sitä "
415
+ "päivittäisessä käytössä, UKK:t sekä dokumentaation ohjelmoijille "
416
+ "sovittaakseen heidän lisäosansa ja teemansa."
417
+
418
+ #: ../include/about.php:8
419
+ #, php-format
420
+ msgid ""
421
+ "You will also find useful information in the %ssupport forum%s. However "
422
+ "don't forget to make a search before posting a new topic."
423
+ msgstr ""
424
+ "Löydät myös tarpeellista tietoa %stukifoorumilta%s. Älä kuitenkaan unohda "
425
+ "tehdä hakua ennen uuden viestin lähettämistä."
426
+
427
+ #: ../include/about.php:14
428
+ #, php-format
429
+ msgid ""
430
+ "Polylang is free of charge and is released under the same license as "
431
+ "WordPress, the %sGPL%s."
432
+ msgstr ""
433
+ "Polylang on ilmainen ja se on julkaistu saman lisenssin alla kuin WordPress, "
434
+ "%sGPL%s."
435
+
436
+ #: ../include/about.php:18
437
+ #, php-format
438
+ msgid "If you wonder how you can help the project, just %sread this%s."
439
+ msgstr "Mikäli mietit kuinka voit auttaa projektia, %slue vain tämä%s."
440
+
441
+ #: ../include/about.php:22
442
+ msgid ""
443
+ "Finally if you like this plugin or if it helps your business, donations to "
444
+ "the author are greatly appreciated."
445
+ msgstr ""
446
+ "Viimeiseksi mikäli pidit tästä lisäosasta tai se auttaa yritystäsi, "
447
+ "lahjoituksia tekijälle arvostetaan suuresti."
448
+
449
+ #: ../include/core.php:547
450
+ msgid "Search"
451
+ msgstr "Hae"
452
+
453
+ #: ../include/term-translations.php:48
454
+ msgid "No untranslated term"
455
+ msgstr "Ei kääntämättömiä termejä"
456
+
457
+ #: ../include/list-table.php:27
458
+ msgid "Delete"
459
+ msgstr "Poista"
460
+
461
+ #: ../include/list-table.php:47
462
+ msgid "Code"
463
+ msgstr "Koodi"
464
+
465
+ #: ../include/list-table.php:49
466
+ msgid "Flag"
467
+ msgstr "Lippu"
468
+
469
+ #: ../include/list-table.php:50
470
+ msgid "Posts"
471
+ msgstr "Artikkelit"
472
+
473
+ #: ../include/list-table.php:105
474
+ msgid "Strings translations"
475
+ msgstr "Merkkijonojen käännökset"
476
+
477
+ #: ../include/list-table.php:131
478
+ msgid "Name"
479
+ msgstr "Nimi"
480
+
481
+ #: ../include/list-table.php:132
482
+ msgid "String"
483
+ msgstr "Merkkijono"
polylang.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Polylang
4
  Plugin URI: http://wordpress.org/extend/plugins/polylang/
5
- Version: 0.9
6
  Author: F. Demarle
7
  Description: Adds multilingual capability to Wordpress
8
  */
@@ -24,7 +24,7 @@ Description: Adds multilingual capability to Wordpress
24
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
  */
26
 
27
- define('POLYLANG_VERSION', '0.9');
28
  define('PLL_MIN_WP_VERSION', '3.1');
29
 
30
  define('POLYLANG_DIR', dirname(__FILE__)); // our directory
@@ -304,11 +304,17 @@ class Polylang extends Polylang_Base {
304
  $wpdb->termmeta = $wpdb->prefix . 'termmeta'; // registers the termmeta table in wpdb
305
  $options = get_option('polylang');
306
 
 
 
307
  // registers the language taxonomy
308
  // codex: use the init action to call this function
309
  // object types will be set later once all custom post types are registered
310
  register_taxonomy('language', null, array(
311
- 'label' => false,
 
 
 
 
312
  'public' => false, // avoid displaying the 'like post tags text box' in the quick edit
313
  'query_var'=>'lang',
314
  'update_count_callback' => '_update_post_term_count'));
@@ -317,8 +323,6 @@ class Polylang extends Polylang_Base {
317
  // language information always in front of the uri ('with_front' => false)
318
  // the 3rd parameter structure has been modified in WP 3.4
319
  add_permastruct('language', $options['rewrite'] ? '%language%' : 'language/%language%', version_compare($GLOBALS['wp_version'], '3.4' , '<') ? false : array('with_front' => false));
320
-
321
- load_plugin_textdomain('polylang', false, basename(POLYLANG_DIR).'/languages'); // plugin i18n
322
  }
323
 
324
  // registers our widgets
2
  /*
3
  Plugin Name: Polylang
4
  Plugin URI: http://wordpress.org/extend/plugins/polylang/
5
+ Version: 0.9.1
6
  Author: F. Demarle
7
  Description: Adds multilingual capability to Wordpress
8
  */
24
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
  */
26
 
27
+ define('POLYLANG_VERSION', '0.9.1');
28
  define('PLL_MIN_WP_VERSION', '3.1');
29
 
30
  define('POLYLANG_DIR', dirname(__FILE__)); // our directory
304
  $wpdb->termmeta = $wpdb->prefix . 'termmeta'; // registers the termmeta table in wpdb
305
  $options = get_option('polylang');
306
 
307
+ load_plugin_textdomain('polylang', false, basename(POLYLANG_DIR).'/languages'); // plugin i18n
308
+
309
  // registers the language taxonomy
310
  // codex: use the init action to call this function
311
  // object types will be set later once all custom post types are registered
312
  register_taxonomy('language', null, array(
313
+ 'labels' => array(
314
+ 'name' => __('Languages', 'polylang'),
315
+ 'singular_name' => __('Language', 'polylang'),
316
+ 'all_items' => __('All languages', 'polylang'),
317
+ ),
318
  'public' => false, // avoid displaying the 'like post tags text box' in the quick edit
319
  'query_var'=>'lang',
320
  'update_count_callback' => '_update_post_term_count'));
323
  // language information always in front of the uri ('with_front' => false)
324
  // the 3rd parameter structure has been modified in WP 3.4
325
  add_permastruct('language', $options['rewrite'] ? '%language%' : 'language/%language%', version_compare($GLOBALS['wp_version'], '3.4' , '<') ? false : array('with_front' => false));
 
 
326
  }
327
 
328
  // registers our widgets
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.4.2
7
- Stable tag: 0.9
8
 
9
  Polylang adds multilingual content management support to WordPress.
10
 
@@ -21,7 +21,8 @@ You write posts, pages and create categories and post tags as usual, and then de
21
  * A language switcher is provided as a widget or in the nav menu
22
  * As a bonus, each user can set the WordPress admin language in its profile
23
 
24
- The plugin admin interface is currently available in 15 languages: English, French, German contributed by [Christian Ries](http://www.singbyfoot.lu), Russian contributed by [yoyurec](http://yoyurec.in.ua), 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/)
 
25
 
26
  Other [contributions](http://wordpress.org/extend/plugins/polylang/other_notes/) are welcome !
27
 
@@ -79,7 +80,7 @@ You can subscribe to the tag ['polylang-dev'](http://wordpress.org/tags/polylang
79
 
80
  = Translate the admin interface =
81
 
82
- Polylang is already available in 15 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.
83
 
84
  = Communicate =
85
 
@@ -91,6 +92,16 @@ Every suggestions are welcome.
91
 
92
  == Changelog ==
93
 
 
 
 
 
 
 
 
 
 
 
94
  = 0.9 (2012-09-12) =
95
 
96
  * Add Turkish translation contributed by [darchws](http://darch.ws/)
4
  Tags: multilingual, bilingual, translate, translation, language, multilanguage, i18n, international, l10n, localization
5
  Requires at least: 3.1
6
  Tested up to: 3.4.2
7
+ Stable tag: 0.9.1
8
 
9
  Polylang adds multilingual content management support to WordPress.
10
 
21
  * A language switcher is provided as a widget or in the nav menu
22
  * As a bonus, each user can set the WordPress admin language in its profile
23
 
24
+ The plugin admin interface is currently available in 16 languages: English, French, German contributed by [Christian Ries](http://www.singbyfoot.lu), Russian contributed by [yoyurec](http://yoyurec.in.ua), 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)
25
+
26
 
27
  Other [contributions](http://wordpress.org/extend/plugins/polylang/other_notes/) are welcome !
28
 
80
 
81
  = Translate the admin interface =
82
 
83
+ Polylang is already available in 16 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.
84
 
85
  = Communicate =
86
 
92
 
93
  == Changelog ==
94
 
95
+ = 0.9.1 (2012-09-20) =
96
+
97
+ * Add Finnish translation contributed by [Jani Alha](http://www.wysiwyg.fi)
98
+ * Bug correction: improve the robustness of the admin content language filter
99
+ * Bug correction: the language switcher displays languages which have no posts or pages (introduced in 0.9)
100
+ * Bug correction: wrong default language when adding a new media
101
+ * Bug correction: the dropdown language switcher does not switch language when there is no post translation
102
+ * Bug correction: issue with translations when using category quick edit
103
+ * Bug correction: home redirects to 404 when combining static front page + force_lang = 1 + hide_default = 0
104
+
105
  = 0.9 (2012-09-12) =
106
 
107
  * Add Turkish translation contributed by [darchws](http://darch.ws/)