diff --git a/pole-sbv-content/plugins/polylang/admin/admin-base.php b/pole-sbv-content/plugins/polylang/admin/admin-base.php new file mode 100644 index 00000000..0f2f8cef --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-base.php @@ -0,0 +1,370 @@ +model->get_languages_list() ) { + return; + } + + $this->links = new PLL_Admin_Links( $this ); // FIXME needed here ? + $this->static_pages = new PLL_Admin_Static_Pages( $this ); // FIXME needed here ? + $this->filters_links = new PLL_Filters_Links( $this ); // FIXME needed here ? + + // Filter admin language for users + // We must not call user info before WordPress defines user roles in wp-settings.php + add_filter( 'setup_theme', array( $this, 'init_user' ) ); + add_filter( 'request', array( $this, 'request' ) ); + + // Adds the languages in admin bar + add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu' ), 100 ); // 100 determines the position + } + + /** + * Adds the link to the languages panel in the WordPress admin menu + * + * @since 0.1 + */ + public function add_menus() { + // Prepare the list of tabs + $tabs = array( 'lang' => __( 'Languages','polylang' ) ); + + // Only if at least one language has been created + if ( $this->model->get_languages_list() ) { + $tabs['strings'] = __( 'Strings translations', 'polylang' ); + } + + $tabs['settings'] = __( 'Settings', 'polylang' ); + + /** + * Filter the list of tabs in Polylang settings + * + * @since 1.5.1 + * + * @param array $tabs list of tab names + */ + $tabs = apply_filters( 'pll_settings_tabs', $tabs ); + + foreach ( $tabs as $tab => $title ) { + $page = 'lang' === $tab ? 'mlang' : "mlang_$tab"; + if ( empty( $parent ) ) { + $parent = $page; + add_menu_page( $title, __( 'Languages','polylang' ), 'manage_options', $page, null , 'dashicons-translation' ); + } + + add_submenu_page( $parent, $title, $title, 'manage_options', $page , array( $this, 'languages_page' ) ); + } + } + + /** + * Setup js scripts & css styles ( only on the relevant pages ) + * + * @since 0.6 + */ + public function admin_enqueue_scripts() { + $screen = get_current_screen(); + if ( empty( $screen ) ) { + return; + } + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + // For each script: + // 0 => the pages on which to load the script + // 1 => the scripts it needs to work + // 2 => 1 if loaded even if languages have not been defined yet, 0 otherwise + // 3 => 1 if loaded in footer + // FIXME: check if I can load more scripts in footer + $scripts = array( + 'post' => array( array( 'post', 'media', 'async-upload', 'edit' ), array( 'jquery', 'wp-ajax-response', 'post', 'jquery-ui-autocomplete' ), 0, 1 ), + 'media' => array( array( 'upload' ), array( 'jquery' ), 0, 1 ), + 'term' => array( array( 'edit-tags', 'term' ), array( 'jquery', 'wp-ajax-response', 'jquery-ui-autocomplete' ), 0, 1 ), + 'user' => array( array( 'profile', 'user-edit' ), array( 'jquery' ), 0, 0 ), + ); + + foreach ( $scripts as $script => $v ) { + if ( in_array( $screen->base, $v[0] ) && ( $v[2] || $this->model->get_languages_list() ) ) { + wp_enqueue_script( 'pll_' . $script, plugins_url( '/js/' . $script . $suffix . '.js', POLYLANG_FILE ), $v[1], POLYLANG_VERSION, $v[3] ); + } + } + + wp_enqueue_style( 'polylang_admin', plugins_url( '/css/admin' . $suffix . '.css', POLYLANG_FILE ), array(), POLYLANG_VERSION ); + } + + /** + * Sets pll_ajax_backend on all backend ajax request + * The final goal is to detect if an ajax request is made on admin or frontend + * + * Takes care to various situations: + * when the ajax request has no options.data thanks to ScreenfeedFr + * see: https://wordpress.org/support/topic/ajaxprefilter-may-not-work-as-expected + * when options.data is a json string + * see: https://wordpress.org/support/topic/polylang-breaking-third-party-ajax-requests-on-admin-panels + * when options.data is an empty string (GET request with the method 'load') + * see: https://wordpress.org/support/topic/invalid-url-during-wordpress-new-dashboard-widget-operation + * + * @since 1.4 + */ + public function admin_print_footer_scripts() { + global $post_ID, $tag_ID; + + $params = array( 'pll_ajax_backend' => 1 ); + if ( ! empty( $post_ID ) ) { + $params = array_merge( $params, array( 'pll_post_id' => (int) $post_ID ) ); + } + + if ( ! empty( $tag_ID ) ) { + $params = array_merge( $params, array( 'pll_term_id' => (int) $tag_ID ) ); + } + + $str = http_build_query( $params ); + $arr = json_encode( $params ); +?> + +curlang = $this->filter_lang; + + // POST + if ( isset( $_POST['post_lang_choice'] ) && $lang = $this->model->get_language( $_POST['post_lang_choice'] ) ) { + $this->curlang = $lang; + } elseif ( isset( $_POST['term_lang_choice'] ) && $lang = $this->model->get_language( $_POST['term_lang_choice'] ) ) { + $this->curlang = $lang; + } elseif ( isset( $_POST['inline_lang_choice'] ) && $lang = $this->model->get_language( $_POST['inline_lang_choice'] ) ) { + $this->curlang = $lang; + } + + // Edit Post + if ( isset( $_REQUEST['pll_post_id'] ) && $lang = $this->model->post->get_language( (int) $_REQUEST['pll_post_id'] ) ) { + $this->curlang = $lang; + } elseif ( 'post.php' === $GLOBALS['pagenow'] && isset( $_GET['post'] ) && is_numeric( $_GET['post'] ) && $lang = $this->model->post->get_language( (int) $_GET['post'] ) ) { + $this->curlang = $lang; + } elseif ( 'post-new.php' === $GLOBALS['pagenow'] && ( empty( $_GET['post_type'] ) || $this->model->is_translated_post_type( $_GET['post_type'] ) ) ) { + $this->curlang = empty( $_GET['new_lang'] ) ? $this->pref_lang : $this->model->get_language( $_GET['new_lang'] ); + } + + // Edit Term + // FIXME 'edit-tags.php' for backward compatibility with WP < 4.5 + elseif ( in_array( $GLOBALS['pagenow'], array( 'edit-tags.php', 'term.php' ) ) && isset( $_GET['tag_ID'] ) && $lang = $this->model->term->get_language( (int) $_GET['tag_ID'] ) ) { + $this->curlang = $lang; + } elseif ( isset( $_REQUEST['pll_term_id'] ) && $lang = $this->model->term->get_language( (int) $_REQUEST['pll_term_id'] ) ) { + $this->curlang = $lang; + } elseif ( 'edit-tags.php' === $GLOBALS['pagenow'] && isset( $_GET['taxonomy'] ) && $this->model->is_translated_taxonomy( $_GET['taxonomy'] ) ) { + if ( ! empty( $_GET['new_lang'] ) ) { + $this->curlang = $this->model->get_language( $_GET['new_lang'] ); + } elseif ( empty( $this->curlang ) ) { + $this->curlang = $this->pref_lang; + } + } + + // Ajax + if ( wp_doing_ajax() && ! empty( $_REQUEST['lang'] ) ) { + $this->curlang = $this->model->get_language( $_REQUEST['lang'] ); + } + } + + /** + * Defines the backend language and the admin language filter based on user preferences + * + * @since 1.2.3 + */ + public function init_user() { + // Backend locale + // FIXME: Backward compatibility with WP < 4.7 + if ( version_compare( $GLOBALS['wp_version'], '4.7alpha', '<' ) ) { + add_filter( 'locale', array( $this, 'get_locale' ) ); + } + + // Language for admin language filter: may be empty + // $_GET['lang'] is numeric when editing a language, not when selecting a new language in the filter + if ( ! wp_doing_ajax() && ! empty( $_GET['lang'] ) && ! is_numeric( $_GET['lang'] ) && current_user_can( 'edit_user', $user_id = get_current_user_id() ) ) { + update_user_meta( $user_id, 'pll_filter_content', ( $lang = $this->model->get_language( $_GET['lang'] ) ) ? $lang->slug : '' ); + } + + $this->filter_lang = $this->model->get_language( get_user_meta( get_current_user_id(), 'pll_filter_content', true ) ); + + // Set preferred language for use when saving posts and terms: must not be empty + $this->pref_lang = empty( $this->filter_lang ) ? $this->model->get_language( $this->options['default_lang'] ) : $this->filter_lang; + + /** + * Filter the preferred language on amin side + * The preferred language is used for example to determine the language of a new post + * + * @since 1.2.3 + * + * @param object $pref_lang preferred language + */ + $this->pref_lang = apply_filters( 'pll_admin_preferred_language', $this->pref_lang ); + + $this->set_current_language(); + + // Inform that the admin language has been set + // Only if the admin language is one of the Polylang defined language + // FIXME test get_user_locale for backward compatibility with WP 4.7 + if ( $curlang = $this->model->get_language( function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale() ) ) { + // FIXME: Backward compatibility with WP < 4.7 + if ( version_compare( $GLOBALS['wp_version'], '4.7alpha', '<' ) ) { + $GLOBALS['text_direction'] = $curlang->is_rtl ? 'rtl' : 'ltr'; // force text direction according to language setting + } + + /** This action is documented in frontend/choose-lang.php */ + do_action( 'pll_language_defined', $curlang->slug, $curlang ); + } else { + /** This action is documented in include/class-polylang.php */ + do_action( 'pll_no_language_defined' ); // to load overriden textdomains + } + } + + /** + * Avoids parsing a tax query when all languages are requested + * Fixes https://wordpress.org/support/topic/notice-undefined-offset-0-in-wp-includesqueryphp-on-line-3877 introduced in WP 4.1 + * @see the suggestion of @boonebgorges, https://core.trac.wordpress.org/ticket/31246 + * + * @since 1.6.5 + * + * @param array $qvars + * @return array + */ + public function request( $qvars ) { + if ( isset( $qvars['lang'] ) && 'all' === $qvars['lang'] ) { + unset( $qvars['lang'] ); + } + + return $qvars; + } + + /** + * Get the locale based on user preference + * FIXME: Backward compatibility with WP < 4.7 + * + * @since 0.4 + * + * @param string $locale + * @return string modified locale + */ + public function get_locale( $locale ) { + return ( $loc = get_user_meta( get_current_user_id(), 'locale', 'true' ) ) ? $loc : $locale; + } + + /** + * Adds the languages list in admin bar for the admin languages filter + * + * @since 0.9 + * + * @param object $wp_admin_bar + */ + public function admin_bar_menu( $wp_admin_bar ) { + $url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + + $all_item = (object) array( + 'slug' => 'all', + 'name' => __( 'Show all languages', 'polylang' ), + 'flag' => '', + ); + + $selected = empty( $this->filter_lang ) ? $all_item : $this->filter_lang; + + $title = sprintf( + '%2$s%3$s', + 'all' === $selected->slug ? '' : sprintf( ' lang="%s"', esc_attr( $selected->get_locale( 'display' ) ) ), + __( 'Filters content by language', 'polylang' ), + esc_html( $selected->name ) + ); + + $wp_admin_bar->add_menu( array( + 'id' => 'languages', + 'title' => $selected->flag . $title, + 'href' => esc_url( add_query_arg( 'lang', $selected->slug, remove_query_arg( 'paged', $url ) ) ), + 'meta' => array( 'title' => __( 'Filters content by language', 'polylang' ) ), + ) ); + + foreach ( array_merge( array( $all_item ), $this->model->get_languages_list() ) as $lang ) { + if ( $selected->slug === $lang->slug ) { + continue; + } + + $wp_admin_bar->add_menu( array( + 'parent' => 'languages', + 'id' => $lang->slug, + 'title' => $lang->flag . esc_html( $lang->name ), + 'href' => esc_url( add_query_arg( 'lang', $lang->slug, remove_query_arg( 'paged', $url ) ) ), + 'meta' => 'all' === $lang->slug ? array() : array( 'lang' => esc_attr( $lang->get_locale( 'display' ) ) ), + ) ); + } + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/admin-filters-columns.php b/pole-sbv-content/plugins/polylang/admin/admin-filters-columns.php new file mode 100644 index 00000000..391fab1b --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-filters-columns.php @@ -0,0 +1,341 @@ +links = &$polylang->links; + $this->model = &$polylang->model; + $this->filter_lang = &$polylang->filter_lang; + + // add the language and translations columns in 'All Posts', 'All Pages' and 'Media library' panels + foreach ( $this->model->get_translated_post_types() as $type ) { + // use the latest filter late as some plugins purely overwrite what's done by others :( + // specific case for media + add_filter( 'manage_' . ( 'attachment' == $type ? 'upload' : 'edit-' . $type ) . '_columns', array( $this, 'add_post_column' ), 100 ); + add_action( 'manage_' . ( 'attachment' == $type ? 'media' : $type . '_posts' ) . '_custom_column', array( $this, 'post_column' ), 10, 2 ); + } + + // quick edit and bulk edit + add_filter( 'quick_edit_custom_box', array( $this, 'quick_edit_custom_box' ), 10, 2 ); + add_filter( 'bulk_edit_custom_box', array( $this, 'quick_edit_custom_box' ), 10, 2 ); + + // adds the language column in the 'Categories' and 'Post Tags' tables + foreach ( $this->model->get_translated_taxonomies() as $tax ) { + add_filter( 'manage_edit-' . $tax . '_columns', array( $this, 'add_term_column' ) ); + add_filter( 'manage_' . $tax . '_custom_column', array( $this, 'term_column' ), 10, 3 ); + } + + // ajax responses to update list table rows + add_action( 'wp_ajax_pll_update_post_rows', array( $this, 'ajax_update_post_rows' ) ); + add_action( 'wp_ajax_pll_update_term_rows', array( $this, 'ajax_update_term_rows' ) ); + } + + /** + * adds languages and translations columns in posts, pages, media, categories and tags tables + * + * @since 0.8.2 + * + * @param array $columns List of table columns + * @param string $before The column before which we want to add our languages + * @return array modified list of columns + */ + protected function add_column( $columns, $before ) { + if ( $n = array_search( $before, array_keys( $columns ) ) ) { + $end = array_slice( $columns, $n ); + $columns = array_slice( $columns, 0, $n ); + } + + foreach ( $this->model->get_languages_list() as $language ) { + // don't add the column for the filtered language + if ( empty( $this->filter_lang ) || $language->slug != $this->filter_lang->slug ) { + $columns[ 'language_' . $language->slug ] = $language->flag ? $language->flag . '' . esc_html( $language->name ) . '' : esc_html( $language->slug ); + } + } + + return isset( $end ) ? array_merge( $columns, $end ) : $columns; + } + + /** + * returns the first language column in the posts, pages and media library tables + * + * @since 0.9 + * + * @return string first language column name + */ + protected function get_first_language_column() { + foreach ( $this->model->get_languages_list() as $language ) { + if ( empty( $this->filter_lang ) || $language->slug != $this->filter_lang->slug ) { + $columns[] = 'language_' . $language->slug; + } + } + + return empty( $columns ) ? '' : reset( $columns ); + } + + /** + * adds the language and translations columns ( before the comments column ) in the posts, pages and media library tables + * + * @since 0.1 + * + * @param array $columns list of posts table columns + * @return array modified list of columns + */ + function add_post_column( $columns ) { + return $this->add_column( $columns, 'comments' ); + } + + /** + * fills the language and translations columns in the posts, pages and media library tables + * take care that when doing ajax inline edit, the post may not be updated in database yet + * + * @since 0.1 + * + * @param string $column Column name + * @param int $post_id + */ + public function post_column( $column, $post_id ) { + $inline = wp_doing_ajax() && isset( $_REQUEST['action'], $_POST['inline_lang_choice'] ) && 'inline-save' === $_REQUEST['action']; + $lang = $inline ? $this->model->get_language( $_POST['inline_lang_choice'] ) : $this->model->post->get_language( $post_id ); + + if ( false === strpos( $column, 'language_' ) || ! $lang ) { + return; + } + + $language = $this->model->get_language( substr( $column, 9 ) ); + + // hidden field containing the post language for quick edit + if ( $column == $this->get_first_language_column() ) { + printf( '', intval( $post_id ), esc_html( $lang->slug ) ); + } + + $post_type_object = get_post_type_object( get_post_type( $post_id ) ); + + // link to edit post ( or a translation ) + if ( $id = $this->model->post->get( $post_id, $language ) ) { + // get_edit_post_link returns nothing if the user cannot edit the post + // thanks to Solinx. See http://wordpress.org/support/topic/feature-request-incl-code-check-for-capabilities-in-admin-screens + if ( $link = get_edit_post_link( $id ) ) { + if ( $id === $post_id ) { + $class = 'pll_icon_tick'; + /* translators: accessibility text, %s is a native language name */ + $s = sprintf( __( 'Edit this item in %s', 'polylang' ), $language->name ); + } else { + $class = esc_attr( 'pll_icon_edit translation_' . $id ); + /* translators: accessibility text, %s is a native language name */ + $s = sprintf( __( 'Edit the translation in %s', 'polylang' ), $language->name ); + } + printf( + '%4$s', + esc_attr( $class ), esc_attr( get_post( $id )->post_title ), esc_url( $link ), esc_html( $s ) + ); + } elseif ( $id === $post_id ) { + printf( + '%s', + /* translators: accessibility text, %s is a native language name */ + esc_html( sprintf( __( 'This item is in %s', 'polylang' ), $language->name ) ) + ); + } + } + // link to add a new translation + else { + echo $this->links->new_post_translation_link( $post_id, $language ); + } + } + + /** + * quick edit & bulk edit + * + * @since 0.9 + * + * @param string $column column name + * @param string $type either 'edit-tags' for terms list table or post type for posts list table + * @return string unmodified $column + */ + public function quick_edit_custom_box( $column, $type ) { + if ( $column == $this->get_first_language_column() ) { + + $elements = $this->model->get_languages_list(); + if ( current_filter() == 'bulk_edit_custom_box' ) { + array_unshift( $elements, (object) array( 'slug' => -1, 'name' => __( '— No Change —' ) ) ); + } + + $dropdown = new PLL_Walker_Dropdown(); + // the hidden field 'old_lang' allows to pass the old language to ajax request + printf( + '
+
+ +
+
', + esc_html__( 'Language', 'polylang' ), + $dropdown->walk( $elements, array( 'name' => 'inline_lang_choice', 'id' => '' ) ) + ); + } + return $column; + } + + /** + * adds the language column ( before the posts column ) in the 'Categories' or 'Post Tags' table + * + * @since 0.1 + * + * @param array $columns list of terms table columns + * @return array modified list of columns + */ + public function add_term_column( $columns ) { + return $this->add_column( $columns, 'posts' ); + } + + /** + * fills the language column in the 'Categories' or 'Post Tags' table + * + * @since 0.1 + * + * @param string $out + * @param string $column Column name + * @param int $term_id + */ + public function term_column( $out, $column, $term_id ) { + $inline = wp_doing_ajax() && isset( $_REQUEST['action'], $_POST['inline_lang_choice'] ) && 'inline-save-tax' === $_REQUEST['action']; + if ( false === strpos( $column, 'language_' ) || ! ( $lang = $inline ? $this->model->get_language( $_POST['inline_lang_choice'] ) : $this->model->term->get_language( $term_id ) ) ) { + return $out; + } + + $post_type = isset( $GLOBALS['post_type'] ) ? $GLOBALS['post_type'] : $_REQUEST['post_type']; // 2nd case for quick edit + $taxonomy = isset( $GLOBALS['taxonomy'] ) ? $GLOBALS['taxonomy'] : $_REQUEST['taxonomy']; + + if ( ! post_type_exists( $post_type ) || ! taxonomy_exists( $taxonomy ) ) { + return $out; + } + + $term_id = (int) $term_id; + $language = $this->model->get_language( substr( $column, 9 ) ); + + if ( $column == $this->get_first_language_column() ) { + $out = sprintf( '', intval( $term_id ), esc_html( $lang->slug ) ); + + // identify the default categories to disable the language dropdown in js + if ( in_array( get_option( 'default_category' ), $this->model->term->get_translations( $term_id ) ) ) { + $out .= sprintf( '', intval( $term_id ) ); + } + } + + // link to edit term ( or a translation ) + if ( ( $id = $this->model->term->get( $term_id, $language ) ) && $term = get_term( $id, $taxonomy ) ) { + if ( $link = get_edit_term_link( $id, $taxonomy, $post_type ) ) { + if ( $id === $term_id ) { + $class = 'pll_icon_tick'; + /* translators: accessibility text, %s is a native language name */ + $s = sprintf( __( 'Edit this item in %s', 'polylang' ), $language->name ); + } else { + $class = esc_attr( 'pll_icon_edit translation_' . $id ); + /* translators: accessibility text, %s is a native language name */ + $s = sprintf( __( 'Edit the translation in %s', 'polylang' ), $language->name ); + } + $out .= sprintf( + '%4$s', + $class, esc_attr( $term->name ), esc_url( $link ), esc_html( $s ) + ); + } elseif ( $id === $term_id ) { + $out .= printf( + '%s', + /* translators: accessibility text, %s is a native language name */ + esc_html( sprintf( __( 'This item is in %s', 'polylang' ), $language->name ) ) + ); + } + } + + // link to add a new translation + else { + $out .= $this->links->new_term_translation_link( $term_id, $taxonomy, $post_type, $language ); + } + + return $out; + } + + /** + * update rows of translated posts when the language is modified in quick edit + * + * @since 1.7 + */ + public function ajax_update_post_rows() { + global $wp_list_table; + + if ( ! post_type_exists( $post_type = $_POST['post_type'] ) || ! $this->model->is_translated_post_type( $post_type ) ) { + die( 0 ); + } + + check_ajax_referer( 'inlineeditnonce', '_pll_nonce' ); + + $x = new WP_Ajax_Response(); + $wp_list_table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => $_POST['screen'] ) ); + + $translations = empty( $_POST['translations'] ) ? array() : explode( ',', $_POST['translations'] ); // collect old translations + $translations = array_merge( $translations, array( $_POST['post_id'] ) ); // add current post + $translations = array_map( 'intval', $translations ); + + foreach ( $translations as $post_id ) { + $level = is_post_type_hierarchical( $post_type ) ? count( get_ancestors( $post_id, $post_type ) ) : 0; + if ( $post = get_post( $post_id ) ) { + ob_start(); + $wp_list_table->single_row( $post, $level ); + $data = ob_get_clean(); + $x->add( array( 'what' => 'row', 'data' => $data, 'supplemental' => array( 'post_id' => $post_id ) ) ); + } + } + + $x->send(); + } + + /** + * update rows of translated terms when adding / deleting a translation or when the language is modified in quick edit + * + * @since 1.7 + */ + public function ajax_update_term_rows() { + global $wp_list_table; + + if ( ! taxonomy_exists( $taxonomy = $_POST['taxonomy'] ) || ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + die( 0 ); + } + + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + $x = new WP_Ajax_Response(); + $wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => $_POST['screen'] ) ); + + $translations = empty( $_POST['translations'] ) ? array() : explode( ',', $_POST['translations'] ); // collect old translations + $translations = array_merge( $translations, $this->model->term->get_translations( (int) $_POST['term_id'] ) ); // add current translations + $translations = array_unique( $translations ); // remove doublons + $translations = array_map( 'intval', $translations ); + + foreach ( $translations as $term_id ) { + $level = is_taxonomy_hierarchical( $taxonomy ) ? count( get_ancestors( $term_id, $taxonomy ) ) : 0; + if ( $tag = get_term( $term_id, $taxonomy ) ) { + ob_start(); + $wp_list_table->single_row( $tag, $level ); + $data = ob_get_clean(); + $x->add( array( 'what' => 'row', 'data' => $data, 'supplemental' => array( 'term_id' => $term_id ) ) ); + } + } + + $x->send(); + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/admin-filters-media.php b/pole-sbv-content/plugins/polylang/admin/admin-filters-media.php new file mode 100644 index 00000000..b76a81c4 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-filters-media.php @@ -0,0 +1,195 @@ +ID; + $lang = $this->model->post->get_language( $post_id ); + + $dropdown = new PLL_Walker_Dropdown(); + $fields['language'] = array( + 'label' => __( 'Language', 'polylang' ), + 'input' => 'html', + 'html' => $dropdown->walk( $this->model->get_languages_list(), array( + 'name' => sprintf( 'attachments[%d][language]', $post_id ), + 'class' => 'media_lang_choice', + 'selected' => $lang ? $lang->slug : '', + ) ), + ); + + return $fields; + } + + /** + * Creates a media translation + * + * @since 1.8 + * + * @param int $post_id + * @param string|object $lang + * @return int id of the translated media + */ + public function create_media_translation( $post_id, $lang ) { + $post = get_post( $post_id ); + + if ( empty( $post ) ) { + return $post; + } + + $lang = $this->model->get_language( $lang ); // Make sure we get a valid language slug + + // Create a new attachment ( translate attachment parent if exists ) + $post->ID = null; // Will force the creation + $post->post_parent = ( $post->post_parent && $tr_parent = $this->model->post->get_translation( $post->post_parent, $lang->slug ) ) ? $tr_parent : 0; + $post->tax_input = array( 'language' => array( $lang->slug ) ); // Assigns the language + $tr_id = wp_insert_attachment( $post ); + + // Copy metadata, attached file and alternative text + foreach ( array( '_wp_attachment_metadata', '_wp_attached_file', '_wp_attachment_image_alt' ) as $key ) { + if ( $meta = get_post_meta( $post_id, $key , true ) ) { + add_post_meta( $tr_id, $key, $meta ); + } + } + + $this->model->post->set_language( $tr_id, $lang ); + + $translations = $this->model->post->get_translations( $post_id ); + if ( ! $translations && $src_lang = $this->model->post->get_language( $post_id ) ) { + $translations[ $src_lang->slug ] = $post_id; + } + + $translations[ $lang->slug ] = $tr_id; + $this->model->post->save_translations( $tr_id, $translations ); + + /** + * Fires after a media translation is created + * + * @since 1.6.4 + * + * @param int $post_id post id of the source media + * @param int $tr_id post id of the new media translation + * @param string $slug language code of the new translation + */ + do_action( 'pll_translate_media', $post_id, $tr_id, $lang->slug ); + return $tr_id; + } + + /** + * Creates a media translation + * + * @since 0.9 + */ + public function translate_media() { + // Security check + check_admin_referer( 'translate_media' ); + $post_id = (int) $_GET['from_media']; + + // Bails if the translations already exists + // See https://wordpress.org/support/topic/edit-translation-in-media-attachments?#post-7322303 + // Or if the source media does not exist + if ( $this->model->post->get_translation( $post_id, $_GET['new_lang'] ) || ! get_post( $post_id ) ) { + wp_safe_redirect( wp_get_referer() ); + exit; + } + + $tr_id = $this->create_media_translation( $post_id, $_GET['new_lang'] ); + wp_safe_redirect( admin_url( sprintf( 'post.php?post=%d&action=edit', $tr_id ) ) ); // WP 3.5+ + exit; + } + + /** + * Called when a media is saved + * Saves language and translations + * + * @since 0.9 + * + * @param array $post + * @param array $attachment + * @return array unmodified $post + */ + public function save_media( $post, $attachment ) { + // Language is filled in attachment by the function applying the filter 'attachment_fields_to_save' + // All security checks have been done by functions applying this filter + if ( ! empty( $attachment['language'] ) ) { + $this->model->post->set_language( $post['ID'], $attachment['language'] ); + } + + if ( isset( $_POST['media_tr_lang'] ) ) { + $this->save_translations( $post['ID'], $_POST['media_tr_lang'] ); + } + + return $post; + } + + /** + * Prevents WP deleting files when there are still media using them + * Thanks to Bruno "Aesqe" Babic and its plugin file gallery in which I took all the ideas for this function + * + * @since 0.9 + * + * @param string $file + * @return string unmodified $file + */ + public function wp_delete_file( $file ) { + global $wpdb; + + $uploadpath = wp_upload_dir(); + + $ids = $wpdb->get_col( $wpdb->prepare( " + SELECT post_id FROM $wpdb->postmeta + WHERE meta_key = '_wp_attached_file' AND meta_value = '%s'", + substr_replace( $file, '', 0, strlen( trailingslashit( $uploadpath['basedir'] ) ) ) + ) ); + + if ( ! empty( $ids ) ) { + // Regenerate intermediate sizes if it's an image ( since we could not prevent WP deleting them before ) + wp_update_attachment_metadata( $ids[0], wp_generate_attachment_metadata( $ids[0], $file ) ); + return ''; // Prevent deleting the main file + } + + return $file; + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/admin-filters-post-base.php b/pole-sbv-content/plugins/polylang/admin/admin-filters-post-base.php new file mode 100644 index 00000000..b6ed5009 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-filters-post-base.php @@ -0,0 +1,69 @@ +links = &$polylang->links; + $this->model = &$polylang->model; + $this->pref_lang = &$polylang->pref_lang; + } + + /** + * allows to set a language by default for posts if it has no language yet + * + * @since 1.5 + * + * @param int $post_id + */ + public function set_default_language( $post_id ) { + if ( ! $this->model->post->get_language( $post_id ) ) { + if ( isset( $_GET['new_lang'] ) && $lang = $this->model->get_language( $_GET['new_lang'] ) ) { + $this->model->post->set_language( $post_id, $lang ); + } + + elseif ( ( $parent_id = wp_get_post_parent_id( $post_id ) ) && $parent_lang = $this->model->post->get_language( $parent_id ) ) { + $this->model->post->set_language( $post_id, $parent_lang ); + } + + else { + $this->model->post->set_language( $post_id, $this->pref_lang ); + } + } + } + + /** + * save translations from language metabox + * + * @since 1.5 + * + * @param int $post_id + * @param array $arr + * @return array + */ + protected function save_translations( $post_id, $arr ) { + // security check + // as 'wp_insert_post' can be called from outside WP admin + check_admin_referer( 'pll_language', '_pll_nonce' ); + + // save translations after checking the translated post is in the right language + foreach ( $arr as $lang => $tr_id ) { + $translations[ $lang ] = ( $tr_id && $this->model->post->get_language( (int) $tr_id )->slug == $lang ) ? (int) $tr_id : 0; + } + + $this->model->post->save_translations( $post_id, $translations ); + return $translations; + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/admin-filters-post.php b/pole-sbv-content/plugins/polylang/admin/admin-filters-post.php new file mode 100644 index 00000000..166dcfe6 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-filters-post.php @@ -0,0 +1,546 @@ +options = &$polylang->options; + $this->curlang = &$polylang->curlang; + + add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); + + // Filters posts, pages and media by language + add_action( 'parse_query', array( $this, 'parse_query' ) ); + + // Adds the Languages box in the 'Edit Post' and 'Edit Page' panels + add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 10, 2 ); + + // Ajax response for changing the language in the post metabox + add_action( 'wp_ajax_post_lang_choice', array( $this, 'post_lang_choice' ) ); + add_action( 'wp_ajax_pll_posts_not_translated', array( $this, 'ajax_posts_not_translated' ) ); + + // Adds actions and filters related to languages when creating, saving or deleting posts and pages + add_action( 'save_post', array( $this, 'save_post' ), 21, 3 ); // Priority 21 to come after advanced custom fields ( 20 ) and before the event calendar which breaks everything after 25 + add_filter( 'wp_insert_post_parent', array( $this, 'wp_insert_post_parent' ), 10, 4 ); + add_action( 'before_delete_post', array( $this, 'delete_post' ) ); + if ( $this->options['media_support'] ) { + add_action( 'delete_attachment', array( $this, 'delete_post' ) ); // Action shared with media + } + + // Filters the pages by language in the parent dropdown list in the page attributes metabox + add_filter( 'page_attributes_dropdown_pages_args', array( $this, 'page_attributes_dropdown_pages_args' ), 10, 2 ); + + // Sets the language in Tiny MCE + add_filter( 'tiny_mce_before_init', array( $this, 'tiny_mce_before_init' ) ); + } + + /** + * Outputs a javascript list of terms ordered by language and hierarchical taxonomies + * to filter the category checklist per post language in quick edit + * Outputs a javascript list of pages ordered by language + * to filter the parent dropdown per post language in quick edit + * + * @since 1.7 + */ + public function admin_enqueue_scripts() { + $screen = get_current_screen(); + + // Hierarchical taxonomies + if ( 'edit' == $screen->base && $taxonomies = get_object_taxonomies( $screen->post_type, 'object' ) ) { + // Get translated hierarchical taxonomies + foreach ( $taxonomies as $taxonomy ) { + if ( $taxonomy->hierarchical && $taxonomy->show_in_quick_edit && $this->model->is_translated_taxonomy( $taxonomy->name ) ) { + $hierarchical_taxonomies[] = $taxonomy->name; + } + } + + if ( ! empty( $hierarchical_taxonomies ) ) { + $terms = get_terms( $hierarchical_taxonomies, array( 'get' => 'all' ) ); + + foreach ( $terms as $term ) { + if ( $lang = $this->model->term->get_language( $term->term_id ) ) { + $term_languages[ $lang->slug ][ $term->taxonomy ][] = $term->term_id; + } + } + + // Send all these data to javascript + if ( ! empty( $term_languages ) ) { + wp_localize_script( 'pll_post', 'pll_term_languages', $term_languages ); + } + } + } + + // Hierarchical post types + if ( 'edit' == $screen->base && is_post_type_hierarchical( $screen->post_type ) ) { + $pages = get_pages(); + + foreach ( $pages as $page ) { + if ( $lang = $this->model->post->get_language( $page->ID ) ) { + $page_languages[ $lang->slug ][] = $page->ID; + } + } + + // Send all these data to javascript + if ( ! empty( $page_languages ) ) { + wp_localize_script( 'pll_post', 'pll_page_languages', $page_languages ); + } + } + } + + /** + * Filters posts, pages and media by language + * + * @since 0.1 + * + * @param object $query a WP_Query object + */ + public function parse_query( $query ) { + $pll_query = new PLL_Query( $query, $this->model ); + $pll_query->filter_query( $this->curlang ); + } + + /** + * Adds the Language box in the 'Edit Post' and 'Edit Page' panels ( as well as in custom post types panels ) + * + * @since 0.1 + * + * @param string $post_type Current post type + * @param object $post Current post + */ + public function add_meta_boxes( $post_type, $post ) { + if ( $this->model->is_translated_post_type( $post_type ) ) { + add_meta_box( 'ml_box', __( 'Languages','polylang' ), array( $this, 'post_language' ), $post_type, 'side', 'high' ); + } + } + + /** + * Displays the Languages metabox in the 'Edit Post' and 'Edit Page' panels + * + * @since 0.1 + */ + public function post_language() { + global $post_ID; + $post_id = $post_ID; + $post_type = get_post_type( $post_ID ); + + $lang = ( $lg = $this->model->post->get_language( $post_ID ) ) ? $lg : + ( isset( $_GET['new_lang'] ) ? $this->model->get_language( $_GET['new_lang'] ) : + $this->pref_lang ); + + $dropdown = new PLL_Walker_Dropdown(); + + wp_nonce_field( 'pll_language', '_pll_nonce' ); + + // NOTE: the class "tags-input" allows to include the field in the autosave $_POST ( see autosave.js ) + printf( ' +

%1$s

+ +
%4$s
', + esc_html__( 'Language', 'polylang' ), + $id = ( 'attachment' === $post_type ) ? sprintf( 'attachments[%d][language]', $post_ID ) : 'post_lang_choice', + 'attachment' === $post_type ? 'media' : 'post', + $dropdown->walk( $this->model->get_languages_list(), array( + 'name' => $id, + 'class' => 'post_lang_choice tags-input', + 'selected' => $lang ? $lang->slug : '', + 'flag' => true, + ) ) + ); + + /** + * Fires before displaying the list of translations in the Languages metabox for posts + * + * @since 1.8 + */ + do_action( 'pll_before_post_translations', $post_type ); + + echo '
'; + if ( $lang ) { + include PLL_ADMIN_INC . '/view-translations-' . ( 'attachment' == $post_type ? 'media' : 'post' ) . '.php'; + } + echo '
' . "\n"; + } + + /** + * Ajax response for changing the language in the post metabox + * + * @since 0.2 + */ + public function post_lang_choice() { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + global $post_ID; // Obliged to use the global variable for wp_popular_terms_checklist + $post_id = $post_ID = (int) $_POST['post_id']; + $lang = $this->model->get_language( $_POST['lang'] ); + + $post_type = $_POST['post_type']; + $post_type_object = get_post_type_object( $post_type ); + if ( ! current_user_can( $post_type_object->cap->edit_post, $post_ID ) ) { + wp_die( -1 ); + } + + $this->model->post->set_language( $post_ID, $lang ); // Save language, useful to set the language when uploading media from post + + ob_start(); + if ( $lang ) { + include PLL_ADMIN_INC . '/view-translations-' . ( 'attachment' == $post_type ? 'media' : 'post' ) . '.php'; + } + $x = new WP_Ajax_Response( array( 'what' => 'translations', 'data' => ob_get_contents() ) ); + ob_end_clean(); + + // Categories + if ( isset( $_POST['taxonomies'] ) ) { + // Not set for pages + foreach ( $_POST['taxonomies'] as $taxname ) { + $taxonomy = get_taxonomy( $taxname ); + + ob_start(); + $popular_ids = wp_popular_terms_checklist( $taxonomy->name ); + $supplemental['populars'] = ob_get_contents(); + ob_end_clean(); + + ob_start(); + // Use $post_ID to remember ckecked terms in case we come back to the original language + wp_terms_checklist( $post_ID, array( 'taxonomy' => $taxonomy->name, 'popular_cats' => $popular_ids ) ); + $supplemental['all'] = ob_get_contents(); + ob_end_clean(); + + $supplemental['dropdown'] = wp_dropdown_categories( array( + 'taxonomy' => $taxonomy->name, + 'hide_empty' => 0, + 'name' => 'new' . $taxonomy->name . '_parent', + 'orderby' => 'name', + 'hierarchical' => 1, + 'show_option_none' => '— ' . $taxonomy->labels->parent_item . ' —', + 'echo' => 0, + ) ); + + $x->Add( array( 'what' => 'taxonomy', 'data' => $taxonomy->name, 'supplemental' => $supplemental ) ); + } + } + + // Parent dropdown list ( only for hierarchical post types ) + if ( in_array( $post_type, get_post_types( array( 'hierarchical' => true ) ) ) ) { + $post = get_post( $post_ID ); + + // Args and filter from 'page_attributes_meta_box' in wp-admin/includes/meta-boxes.php of WP 4.2.1 + $dropdown_args = array( + 'post_type' => $post->post_type, + 'exclude_tree' => $post->ID, + 'selected' => $post->post_parent, + 'name' => 'parent_id', + 'show_option_none' => __( '(no parent)' ), + 'sort_column' => 'menu_order, post_title', + 'echo' => 0, + ); + + /** This filter is documented in wp-admin/includes/meta-boxes.php */ + $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); // Since WP 3.3 + + $x->Add( array( 'what' => 'pages', 'data' => wp_dropdown_pages( $dropdown_args ) ) ); + } + + // Flag + $x->Add( array( 'what' => 'flag', 'data' => empty( $lang->flag ) ? esc_html( $lang->slug ) : $lang->flag ) ); + + // Sample permalink + $x->Add( array( 'what' => 'permalink', 'data' => get_sample_permalink_html( $post_ID ) ) ); + + $x->send(); + } + + /** + * Ajax response for input in translation autocomplete input box + * + * @since 1.5 + */ + public function ajax_posts_not_translated() { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + if ( ! post_type_exists( $_GET['post_type'] ) ) { + die( 0 ); + } + + $post_language = $this->model->get_language( $_GET['post_language'] ); + $translation_language = $this->model->get_language( $_GET['translation_language'] ); + + // Don't order by title: see https://wordpress.org/support/topic/find-translated-post-when-10-is-not-enough + $args = array( + 's' => wp_unslash( $_GET['term'] ), + 'suppress_filters' => 0, // To make the post_fields filter work + 'lang' => 0, // Avoid admin language filter + 'numberposts' => 20, // Limit to 20 posts + 'post_status' => 'any', + 'post_type' => $_GET['post_type'], + 'tax_query' => array( + array( + 'taxonomy' => 'language', + 'field' => 'term_taxonomy_id', // WP 3.5+ + 'terms' => $translation_language->term_taxonomy_id, + ), + ), + ); + + /** + * Filter the query args when auto suggesting untranslated posts in the Languages metabox + * This should help plugins to fix some edge cases + * + * @see https://wordpress.org/support/topic/find-translated-post-when-10-is-not-enough + * + * @since 1.7 + * + * @param array $args WP_Query arguments + */ + $args = apply_filters( 'pll_ajax_posts_not_translated_args', $args ); + $posts = get_posts( $args ); + + $return = array(); + + foreach ( $posts as $key => $post ) { + if ( ! $this->model->post->get_translation( $post->ID, $post_language ) ) { + $return[] = array( + 'id' => $post->ID, + 'value' => $post->post_title, + 'link' => $this->links->edit_post_translation_link( $post->ID ), + ); + } + } + + // Add current translation in list + if ( $post_id = $this->model->post->get_translation( (int) $_GET['pll_post_id'], $translation_language ) ) { + $post = get_post( $post_id ); + array_unshift( $return, array( + 'id' => $post_id, + 'value' => $post->post_title, + 'link' => $this->links->edit_post_translation_link( $post_id ), + ) ); + } + + wp_die( json_encode( $return ) ); + } + + /** + * Saves language + * Checks the terms saved are in the right language + * + * @since 1.5 + * + * @param int $post_id + * @param array $post + */ + protected function save_language( $post_id, $post ) { + // Security checks are necessary to accept language modifications as 'wp_insert_post' can be called from outside WP admin + + // Edit post + if ( isset( $_POST['post_lang_choice'], $_POST['post_ID'] ) && $_POST['post_ID'] == $post_id ) { + check_admin_referer( 'pll_language', '_pll_nonce' ); + $this->model->post->set_language( $post_id, $lang = $this->model->get_language( $_POST['post_lang_choice'] ) ); + } + + // Quick edit and bulk edit + // POST for quick edit, GET for bulk edit + elseif ( isset( $_REQUEST['inline_lang_choice'] ) ) { + // Bulk edit does not modify the language + if ( isset( $_GET['bulk_edit'] ) && -1 == $_REQUEST['inline_lang_choice'] ) { + check_admin_referer( 'bulk-posts' ); + $lang = $this->model->post->get_language( $post_id ); // Get the post language for later use when saving terms + } + // A language is set in the language dropdown + else { + isset( $_GET['bulk_edit'] ) ? check_admin_referer( 'bulk-posts' ) : check_admin_referer( 'inlineeditnonce', '_inline_edit' ); + + $old_lang = $this->model->post->get_language( $post_id ); // Stores the old language + $this->model->post->set_language( $post_id, $lang = $this->model->get_language( $_REQUEST['inline_lang_choice'] ) ); // set new language + + // Checks if the new language already exists in the translation group + if ( $old_lang && $old_lang->slug != $lang->slug ) { + $translations = $this->model->post->get_translations( $post_id ); + + // If yes, separate this post from the translation group + if ( array_key_exists( $lang->slug, $translations ) ) { + $this->model->post->delete_translation( $post_id ); + } + + elseif ( array_key_exists( $old_lang->slug, $translations ) ) { + unset( $translations[ $old_lang->slug ] ); + $this->model->post->save_translations( $post_id, $translations ); + } + } + } + } + + // Quick press + // 'post-quickpress-save', 'post-quickpress-publish' = backward compatibility WP < 3.8 + elseif ( isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], array( 'post-quickpress-save', 'post-quickpress-publish', 'post-quickdraft-save' ) ) ) { + check_admin_referer( 'add-' . $post->post_type ); + $this->model->post->set_language( $post_id, $lang = $this->pref_lang ); // Default language for Quick draft + } + + else { + $this->set_default_language( $post_id ); + } + + // Make sure we get save terms in the right language (especially tags with same name in different languages) + if ( ! empty( $lang ) ) { + // FIXME quite a lot of queries in foreach + foreach ( $this->model->get_translated_taxonomies() as $tax ) { + $terms = get_the_terms( $post_id, $tax ); + + if ( is_array( $terms ) ) { + $newterms = array(); + foreach ( $terms as $term ) { + // Check if the term is in the correct language or if a translation exist ( mainly for default category ) + if ( $newterm = $this->model->term->get( $term->term_id, $lang ) ) { + $newterms[] = (int) $newterm; + } + + // Or choose the correct language for tags ( initially defined by name ) + elseif ( $newterm = $this->model->term_exists( $term->name, $tax, $term->parent, $lang ) ) { + $newterms[] = (int) $newterm; // Cast is important otherwise we get 'numeric' tags + } + + // Or create the term in the correct language + elseif ( ! is_wp_error( $term_info = wp_insert_term( $term->name, $tax ) ) ) { + $newterms[] = (int) $term_info['term_id']; + } + } + + wp_set_object_terms( $post_id, $newterms, $tax ); + } + } + } + } + + /** + * Called when a post ( or page ) is saved, published or updated + * saves languages and translations + * + * @since 0.1 + * + * @param int $post_id + * @param object $post + * @param bool $update Whether it is an update or not + */ + public function save_post( $post_id, $post, $update ) { + // Does nothing except on post types which are filterable + if ( ! $this->model->is_translated_post_type( $post->post_type ) ) { + return; + } + + if ( $id = wp_is_post_revision( $post_id ) ) { + $post_id = $id; + } + + // Capability check + // As 'wp_insert_post' can be called from outside WP admin + $post_type_object = get_post_type_object( $post->post_type ); + if ( ( $update && current_user_can( $post_type_object->cap->edit_post, $post_id ) ) || ( ! $update && current_user_can( $post_type_object->cap->create_posts ) ) ) { + $this->save_language( $post_id, $post ); + + // Make sure we are saving translations only for the main post currently being edited + if ( isset( $_POST['post_tr_lang'], $_POST['post_ID'] ) && $_POST['post_ID'] == $post_id ) { + $translations = $this->save_translations( $post_id, $_POST['post_tr_lang'] ); + } + + /** + * Fires after the post language and translations are saved + * + * @since 1.2 + * + * @param int $post_id Post id + * @param object $post Post object + * @param array $translations The list of translations post ids + */ + do_action( 'pll_save_post', $post_id, $post, empty( $translations ) ? $this->model->post->get_translations( $post_id ) : $translations ); + } + + // Attempts to set a default language even if no capability + else { + $this->set_default_language( $post_id ); + } + } + + /** + * Make sure that the post parent is in the correct language when using bulk edit + * + * @since 1.8 + * + * @param int $post_parent Post parent ID. + * @param int $post_id Post ID. + * @param array $new_postarr Array of parsed post data. + * @param array $postarr Array of sanitized, but otherwise unmodified post data. + * @return int + */ + public function wp_insert_post_parent( $post_parent, $post_id, $new_postarr, $postarr ) { + if ( isset( $postarr['bulk_edit'] ) ) { + check_admin_referer( 'bulk-posts' ); + $lang = -1 == $postarr['inline_lang_choice'] ? + $this->model->post->get_language( $post_id ) : + $this->model->get_language( $postarr['inline_lang_choice'] ); + $post_parent = $this->model->post->get_translation( $post_parent, $lang ); + } + return $post_parent; + } + + /** + * Called when a post, page or media is deleted + * Don't delete translations if this is a post revision thanks to AndyDeGroo who catched this bug + * http://wordpress.org/support/topic/plugin-polylang-quick-edit-still-breaks-translation-linking-of-pages-in-072 + * + * @since 0.1 + * + * @param int $post_id + */ + public function delete_post( $post_id ) { + if ( ! wp_is_post_revision( $post_id ) ) { + $this->model->post->delete_translation( $post_id ); + } + } + + /** + * Filters the pages by language in the parent dropdown list in the page attributes metabox + * + * @since 0.6 + * + * @param array $dropdown_args Arguments passed to wp_dropdown_pages + * @param object $post + * @return array Modified arguments + */ + public function page_attributes_dropdown_pages_args( $dropdown_args, $post ) { + $dropdown_args['lang'] = isset( $_POST['lang'] ) ? $this->model->get_language( $_POST['lang'] ) : $this->model->post->get_language( $post->ID ); // ajax or not ? + if ( ! $dropdown_args['lang'] ) { + $dropdown_args['lang'] = $this->pref_lang; + } + + return $dropdown_args; + } + + /** + * Sets the language attribute and text direction for Tiny MCE + * + * @since 2.2 + * + * @param array $mce_init TinyMCE config + * @return array + */ + public function tiny_mce_before_init( $mce_init ) { + if ( ! empty( $this->curlang ) ) { + $mce_init['wp_lang_attr'] = $this->curlang->get_locale( 'display' ); + $mce_init['directionality'] = $this->curlang->is_rtl ? 'rtl' : 'ltr'; + } + return $mce_init; + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/admin-filters-term.php b/pole-sbv-content/plugins/polylang/admin/admin-filters-term.php new file mode 100644 index 00000000..885c2e26 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-filters-term.php @@ -0,0 +1,729 @@ +links = &$polylang->links; + $this->model = &$polylang->model; + $this->options = &$polylang->options; + $this->curlang = &$polylang->curlang; + $this->filter_lang = &$polylang->filter_lang; + $this->pref_lang = &$polylang->pref_lang; + + foreach ( $this->model->get_translated_taxonomies() as $tax ) { + // Adds the language field in the 'Categories' and 'Post Tags' panels + add_action( $tax . '_add_form_fields', array( $this, 'add_term_form' ) ); + + // Adds the language field and translations tables in the 'Edit Category' and 'Edit Tag' panels + add_action( $tax . '_edit_form_fields', array( $this, 'edit_term_form' ) ); + + // Adds action related to languages when deleting categories and post tags + add_action( 'delete_' . $tax, array( $this, 'delete_term' ) ); + } + + // Adds actions related to languages when creating or saving categories and post tags + add_filter( 'wp_dropdown_cats', array( $this, 'wp_dropdown_cats' ) ); + add_action( 'create_term', array( $this, 'save_term' ), 999, 3 ); + add_action( 'edit_term', array( $this, 'save_term' ), 999, 3 ); // late as it may conflict with other plugins, see http://wordpress.org/support/topic/polylang-and-wordpress-seo-by-yoast + add_action( 'pre_post_update', array( $this, 'pre_post_update' ) ); + add_filter( 'pre_term_name', array( $this, 'pre_term_name' ) ); + add_filter( 'pre_term_slug', array( $this, 'pre_term_slug' ), 10, 2 ); + + // Ajax response for edit term form + add_action( 'wp_ajax_term_lang_choice', array( $this, 'term_lang_choice' ) ); + add_action( 'wp_ajax_pll_terms_not_translated', array( $this, 'ajax_terms_not_translated' ) ); + + // Adds cache domain when querying terms + add_filter( 'get_terms_args', array( $this, 'get_terms_args' ), 10, 2 ); + + // Filters categories and post tags by language + add_filter( 'terms_clauses', array( $this, 'terms_clauses' ), 10, 3 ); + + // Allows to get the default categories in all languages + add_filter( 'option_default_category', array( $this, 'option_default_category' ) ); + add_action( 'update_option_default_category', array( $this, 'update_option_default_category' ), 10, 2 ); + + // Updates the translations term ids when splitting a shared term + add_action( 'split_shared_term', array( $this, 'split_shared_term' ), 10, 4 ); // WP 4.2 + } + + /** + * Adds the language field in the 'Categories' and 'Post Tags' panels + * + * @since 0.1 + */ + public function add_term_form() { + $taxonomy = $_GET['taxonomy']; + $post_type = isset( $GLOBALS['post_type'] ) ? $GLOBALS['post_type'] : $_REQUEST['post_type']; + + if ( ! taxonomy_exists( $taxonomy ) || ! post_type_exists( $post_type ) ) { + return; + } + + $lang = isset( $_GET['new_lang'] ) ? $this->model->get_language( $_GET['new_lang'] ) : $this->pref_lang; + $dropdown = new PLL_Walker_Dropdown(); + + wp_nonce_field( 'pll_language', '_pll_nonce' ); + + printf( ' +
+ +
%s
+

%s

+
', + esc_html__( 'Language', 'polylang' ), + $dropdown->walk( $this->model->get_languages_list(), array( + 'name' => 'term_lang_choice', + 'value' => 'term_id', + 'selected' => $lang ? $lang->term_id : '', + 'flag' => true, + ) ), + esc_html__( 'Sets the language', 'polylang' ) + ); + + if ( ! empty( $_GET['from_tag'] ) ) { + printf( '', (int) $_GET['from_tag'] ); + } + + // Adds translation fields + echo '
'; + if ( $lang ) { + include PLL_ADMIN_INC . '/view-translations-term.php'; + } + echo '
' . "\n"; + } + + /** + * Adds the language field and translations tables in the 'Edit Category' and 'Edit Tag' panels + * + * @since 0.1 + * + * @param object $tag + */ + public function edit_term_form( $tag ) { + $post_type = isset( $GLOBALS['post_type'] ) ? $GLOBALS['post_type'] : $_REQUEST['post_type']; + + if ( ! post_type_exists( $post_type ) ) { + return; + } + + $term_id = $tag->term_id; + $taxonomy = $tag->taxonomy; + + $lang = $this->model->term->get_language( $term_id ); + $lang = empty( $lang ) ? $this->pref_lang : $lang; + + $dropdown = new PLL_Walker_Dropdown(); + + // Disable the language dropdown and the translations input fields for default categories to prevent removal + $disabled = in_array( get_option( 'default_category' ), $this->model->term->get_translations( $term_id ) ); + + printf( ' + + + %s + + + + %s
+

%s

+ + ', + wp_nonce_field( 'pll_language', '_pll_nonce', true , false ), + esc_html__( 'Language', 'polylang' ), + $dropdown->walk( $this->model->get_languages_list(), array( + 'name' => 'term_lang_choice', + 'value' => 'term_id', + 'selected' => $lang ? $lang->term_id : '', + 'disabled' => $disabled, + 'flag' => true, + ) ), + esc_html__( 'Sets the language', 'polylang' ) + ); + + echo ''; + if ( $lang ) { + include PLL_ADMIN_INC . '/view-translations-term.php'; + } + echo '' . "\n"; + } + + /** + * Translates term parent if exists when using "Add new" ( translation ) + * + * @since 0.7 + * + * @param string $output html markup for dropdown list of categories + * @return string modified html + */ + public function wp_dropdown_cats( $output ) { + if ( isset( $_GET['taxonomy'], $_GET['from_tag'], $_GET['new_lang'] ) && taxonomy_exists( $_GET['taxonomy'] ) ) { + $term = get_term( (int) $_GET['from_tag'], $_GET['taxonomy'] ); + if ( $term && $id = $term->parent ) { + $lang = $this->model->get_language( $_GET['new_lang'] ); + if ( $parent = $this->model->term->get_translation( $id, $lang ) ) { + return str_replace( '"' . $parent . '"', '"' . $parent . '" selected="selected"', $output ); + } + } + } + return $output; + } + + /** + * stores the current post_id when bulk editing posts for use in save_language and pre_term_slug + * + * @since 1.7 + * + * @param int $post_id + */ + public function pre_post_update( $post_id ) { + if ( isset( $_GET['bulk_edit'] ) ) { + $this->post_id = $post_id; + } + } + + /** + * Allows to set a language by default for terms if it has no language yet + * + * @since 1.5.4 + * + * @param int $term_id + * @param string $taxonomy + */ + protected function set_default_language( $term_id, $taxonomy ) { + if ( ! $this->model->term->get_language( $term_id ) ) { + // Sets language from term parent if exists thanks to Scott Kingsley Clark + if ( ( $term = get_term( $term_id, $taxonomy ) ) && ! empty( $term->parent ) && $parent_lang = $this->model->term->get_language( $term->parent ) ) { + $this->model->term->set_language( $term_id, $parent_lang ); + } + else { + $this->model->term->set_language( $term_id, $this->pref_lang ); + } + } + } + + /** + * Saves language + * + * @since 1.5 + * + * @param int $term_id + * @param string $taxonomy + */ + protected function save_language( $term_id, $taxonomy ) { + global $wpdb; + // Security checks are necessary to accept language modifications + // as 'wp_update_term' can be called from outside WP admin + + // Edit tags + if ( isset( $_POST['term_lang_choice'] ) ) { + if ( 'add-' . $taxonomy == $_POST['action'] ) { + check_ajax_referer( $_POST['action'], '_ajax_nonce-add-' . $taxonomy ); // category metabox + } + else { + check_admin_referer( 'pll_language', '_pll_nonce' ); // edit tags or tags metabox + } + + $this->model->term->set_language( $term_id, $this->model->get_language( $_POST['term_lang_choice'] ) ); + } + + // *Post* bulk edit, in case a new term is created + elseif ( isset( $_GET['bulk_edit'], $_GET['inline_lang_choice'] ) ) { + check_admin_referer( 'bulk-posts' ); + + // Bulk edit does not modify the language + // So we possibly create a tag in several languages + if ( -1 == $_GET['inline_lang_choice'] ) { + // The language of the current term is set a according to the language of the current post + $this->model->term->set_language( $term_id, $this->model->post->get_language( $this->post_id ) ); + $term = get_term( $term_id, $taxonomy ); + + // Get all terms with the same name + // FIXME backward compatibility WP < 4.2 + // No WP function to get all terms with the exact same name so let's use a custom query + // $terms = get_terms( $taxonomy, array( 'name' => $term->name, 'hide_empty' => false, 'fields' => 'ids' ) ); should be OK in 4.2 + // I may need to rework the loop below + $terms = $wpdb->get_results( $wpdb->prepare( " + SELECT t.term_id FROM $wpdb->terms AS t + INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id + WHERE tt.taxonomy = %s AND t.name = %s", + $taxonomy, $term->name + ) ); + + // If we have several terms with the same name, they are translations of each other + if ( count( $terms ) > 1 ) { + foreach ( $terms as $term ) { + $translations[ $this->model->term->get_language( $term->term_id )->slug ] = $term->term_id; + } + + $this->model->term->save_translations( $term_id, $translations ); + } + } + + else { + $this->model->term->set_language( $term_id, $this->model->get_language( $_GET['inline_lang_choice'] ) ); + } + } + + // Quick edit + elseif ( isset( $_POST['inline_lang_choice'] ) ) { + check_ajax_referer( + isset( $_POST['action'] ) && 'inline-save' == $_POST['action'] ? 'inlineeditnonce' : 'taxinlineeditnonce', // Post quick edit or tag quick edit ? + '_inline_edit' + ); + + $old_lang = $this->model->term->get_language( $term_id ); // Stores the old language + $lang = $this->model->get_language( $_POST['inline_lang_choice'] ); // New language + $translations = $this->model->term->get_translations( $term_id ); + + // Checks if the new language already exists in the translation group + if ( $old_lang && $old_lang->slug != $lang->slug ) { + if ( array_key_exists( $lang->slug, $translations ) ) { + $this->model->term->delete_translation( $term_id ); + } + + elseif ( array_key_exists( $old_lang->slug, $translations ) ) { + unset( $translations[ $old_lang->slug ] ); + $this->model->term->save_translations( $term_id, $translations ); + } + } + + $this->model->term->set_language( $term_id, $lang ); // Set new language + } + + // Edit post + elseif ( isset( $_POST['post_lang_choice'] ) ) { // FIXME should be useless now + check_admin_referer( 'pll_language', '_pll_nonce' ); + $this->model->term->set_language( $term_id, $this->model->get_language( $_POST['post_lang_choice'] ) ); + } + + else { + $this->set_default_language( $term_id, $taxonomy ); + } + } + + /** + * Save translations from our form + * + * @since 1.5 + * + * @param int $term_id + * @return array + */ + protected function save_translations( $term_id ) { + // Security check as 'wp_update_term' can be called from outside WP admin + check_admin_referer( 'pll_language', '_pll_nonce' ); + + // Save translations after checking the translated term is in the right language ( as well as cast id to int ) + foreach ( $_POST['term_tr_lang'] as $lang => $tr_id ) { + $tr_lang = $this->model->term->get_language( (int) $tr_id ); + $translations[ $lang ] = $tr_lang && $tr_lang->slug == $lang ? (int) $tr_id : 0; + } + + $this->model->term->save_translations( $term_id, $translations ); + + return $translations; + } + + /** + * Called when a category or post tag is created or edited + * Saves language and translations + * + * @since 0.1 + * + * @param int $term_id + * @param int $tt_id term taxononomy id + * @param string $taxonomy + */ + public function save_term( $term_id, $tt_id, $taxonomy ) { + // Does nothing except on taxonomies which are filterable + if ( ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + return; + } + + // Capability check + // As 'wp_update_term' can be called from outside WP admin + // 2nd test for creating tags when creating / editing a post + $tax = get_taxonomy( $taxonomy ); + if ( current_user_can( $tax->cap->edit_terms ) || ( isset( $_POST['tax_input'][ $taxonomy ] ) && current_user_can( $tax->cap->assign_terms ) ) ) { + $this->save_language( $term_id, $taxonomy ); + + if ( isset( $_POST['term_tr_lang'] ) ) { + $translations = $this->save_translations( $term_id ); + } + + /** + * Fires after the term language and translations are saved + * + * @since 1.2 + * + * @param int $term_id term id + * @param string $taxonomy taxonomy name + * @param array $translations the list of translations term ids + */ + do_action( 'pll_save_term', $term_id, $taxonomy, empty( $translations ) ? $this->model->term->get_translations( $term_id ) : $translations ); + } + + // Attempts to set a default language even if no capability + else { + $this->set_default_language( $term_id, $taxonomy ); + } + } + + /** + * Stores the term name for use in pre_term_slug + * + * @since 0.9.5 + * + * @param string $name term name + * @return string unmodified term name + */ + public function pre_term_name( $name ) { + return $this->pre_term_name = $name; + } + + /** + * Creates the term slug in case the term already exists in another language + * + * @since 0.9.5 + * + * @param string $slug + * @param string $taxonomy + * @return string + */ + public function pre_term_slug( $slug, $taxonomy ) { + $name = sanitize_title( $this->pre_term_name ); + + // If the term already exists in another language + if ( ! $slug && $this->model->is_translated_taxonomy( $taxonomy ) && term_exists( $name, $taxonomy ) ) { + if ( isset( $_POST['term_lang_choice'] ) ) { + $slug = $name . '-' . $this->model->get_language( $_POST['term_lang_choice'] )->slug; + } + + elseif ( isset( $_POST['inline_lang_choice'] ) ) { + $slug = $name . '-' . $this->model->get_language( $_POST['inline_lang_choice'] )->slug; + } + + // *Post* bulk edit, in case a new term is created + elseif ( isset( $_GET['bulk_edit'], $_GET['inline_lang_choice'] ) ) { + // Bulk edit does not modify the language + if ( -1 == $_GET['inline_lang_choice'] ) { + $slug = $name . '-' . $this->model->post->get_language( $this->post_id )->slug; + } else { + $slug = $name . '-' . $this->model->get_language( $_GET['inline_lang_choice'] )->slug; + } + } + } + + return $slug; + } + + /** + * Called when a category or post tag is deleted + * Deletes language and translations + * + * @since 0.1 + * + * @param int $term_id + */ + public function delete_term( $term_id ) { + $this->model->term->delete_translation( $term_id ); + $this->model->term->delete_language( $term_id ); + } + + /** + * Ajax response for edit term form + * + * @since 0.2 + */ + public function term_lang_choice() { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + $lang = $this->model->get_language( $_POST['lang'] ); + $term_id = isset( $_POST['term_id'] ) ? (int) $_POST['term_id'] : null; + $taxonomy = $_POST['taxonomy']; + $post_type = $_POST['post_type']; + + if ( ! post_type_exists( $post_type ) || ! taxonomy_exists( $taxonomy ) ) { + die( 0 ); + } + + ob_start(); + if ( $lang ) { + include PLL_ADMIN_INC . '/view-translations-term.php'; + } + $x = new WP_Ajax_Response( array( 'what' => 'translations', 'data' => ob_get_contents() ) ); + ob_end_clean(); + + // Parent dropdown list ( only for hierarchical taxonomies ) + // $args copied from edit_tags.php except echo + if ( is_taxonomy_hierarchical( $taxonomy ) ) { + $args = array( + 'hide_empty' => 0, + 'hide_if_empty' => false, + 'taxonomy' => $taxonomy, + 'name' => 'parent', + 'orderby' => 'name', + 'hierarchical' => true, + 'show_option_none' => __( 'None' ), + 'echo' => 0, + ); + $x->Add( array( 'what' => 'parent', 'data' => wp_dropdown_categories( $args ) ) ); + } + + // Tag cloud + // Tests copied from edit_tags.php + else { + $tax = get_taxonomy( $taxonomy ); + if ( ! is_null( $tax->labels->popular_items ) ) { + $args = array( 'taxonomy' => $taxonomy, 'echo' => false ); + if ( current_user_can( $tax->cap->edit_terms ) ) { + $args = array_merge( $args, array( 'link' => 'edit' ) ); + } + + if ( $tag_cloud = wp_tag_cloud( $args ) ) { + $html = sprintf( '

%1$s

%2$s
', esc_html( $tax->labels->popular_items ), $tag_cloud ); + $x->Add( array( 'what' => 'tag_cloud', 'data' => $html ) ); + } + } + } + + // Flag + $x->Add( array( 'what' => 'flag', 'data' => empty( $lang->flag ) ? esc_html( $lang->slug ) : $lang->flag ) ); + + $x->send(); + } + + /** + * Ajax response for input in translation autocomplete input box + * + * @since 1.5 + */ + public function ajax_terms_not_translated() { + check_ajax_referer( 'pll_language', '_pll_nonce' ); + + $s = wp_unslash( $_GET['term'] ); + $post_type = $_GET['post_type']; + $taxonomy = $_GET['taxonomy']; + + if ( ! post_type_exists( $post_type ) || ! taxonomy_exists( $taxonomy ) ) { + die( 0 ); + } + + $term_language = $this->model->get_language( $_GET['term_language'] ); + $translation_language = $this->model->get_language( $_GET['translation_language'] ); + + $return = array(); + + // It is more efficient to use one common query for all languages as soon as there are more than 2 + foreach ( get_terms( $taxonomy, 'hide_empty=0&lang=0&name__like=' . $s ) as $term ) { + $lang = $this->model->term->get_language( $term->term_id ); + + if ( $lang && $lang->slug == $translation_language->slug && ! $this->model->term->get_translation( $term->term_id, $term_language ) ) { + $return[] = array( + 'id' => $term->term_id, + 'value' => $term->name, + 'link' => $this->links->edit_term_translation_link( $term->term_id, $taxonomy, $post_type ), + ); + } + } + + // Add current translation in list + // Not in add term for as term_id is not set + if ( 'undefined' !== $_GET['term_id'] && $term_id = $this->model->term->get_translation( (int) $_GET['term_id'], $translation_language ) ) { + $term = get_term( $term_id, $taxonomy ); + array_unshift( $return, array( + 'id' => $term_id, + 'value' => $term->name, + 'link' => $this->links->edit_term_translation_link( $term->term_id, $taxonomy, $post_type ), + ) ); + } + + wp_die( json_encode( $return ) ); + } + + /** + * Get the language(s) to filter get_terms + * + * @since 1.7.6 + * + * @param array $taxonomies queried taxonomies + * @param array $args get_terms arguments + * @return object|string|bool the language(s) to use in the filter, false otherwise + */ + protected function get_queried_language( $taxonomies, $args ) { + // Does nothing except on taxonomies which are filterable + // Since WP 4.7, make sure not to filter wp_get_object_terms() + if ( ! $this->model->is_translated_taxonomy( $taxonomies ) || ! empty( $args['object_ids'] ) ) { + return false; + } + + // If get_terms is queried with a 'lang' parameter + if ( isset( $args['lang'] ) ) { + return $args['lang']; + } + + // On tags page, everything should be filtered according to the admin language filter except the parent dropdown + if ( 'edit-tags.php' === $GLOBALS['pagenow'] && empty( $args['class'] ) ) { + return $this->filter_lang; + } + + return $this->curlang; + } + + /** + * Adds language dependent cache domain when querying terms + * Useful as the 'lang' parameter is not included in cache key by WordPress + * + * @since 1.3 + * + * @param array $args + * @param array $taxonomies + * @return array modified arguments + */ + public function get_terms_args( $args, $taxonomies ) { + // don't break _get_term_hierarchy() + if ( 'all' === $args['get'] && 'id' === $args['orderby'] && 'id=>parent' === $args['fields'] ) { + $args['lang'] = ''; + } + + if ( $lang = $this->get_queried_language( $taxonomies, $args ) ) { + $key = '_' . ( is_array( $lang ) ? implode( ',', $lang ) : $this->model->get_language( $lang )->slug ); + $args['cache_domain'] = empty( $args['cache_domain'] ) ? 'pll' . $key : $args['cache_domain'] . $key; + } + return $args; + } + + /** + * Filters categories and post tags by language(s) when needed on admin side + * + * @since 0.5 + * + * @param array $clauses list of sql clauses + * @param array $taxonomies list of taxonomies + * @param array $args get_terms arguments + * @return array modified sql clauses + */ + public function terms_clauses( $clauses, $taxonomies, $args ) { + $lang = $this->get_queried_language( $taxonomies, $args ); + return ! empty( $lang ) ? $this->model->terms_clauses( $clauses, $lang ) : $clauses; // adds our clauses to filter by current language + } + + /** + * Hack to avoid displaying delete link for the default category in all languages + * Also returns the default category in the right language when called from wp_delete_term + * + * @since 1.2 + * + * @param int $value + * @return int + */ + public function option_default_category( $value ) { + // Filters the default category in note below the category list table and in settings->writing dropdown + if ( isset( $this->pref_lang ) && $tr = $this->model->term->get( $value, $this->pref_lang ) ) { + $value = $tr; + } + + // FIXME backward compatibility with WP < 4.7 + if ( version_compare( $GLOBALS['wp_version'], '4.7alpha', '<' ) ) { + $traces = debug_backtrace(); + $n = version_compare( PHP_VERSION, '7', '>=' ) ? 3 : 4; // PHP 7 does not include call_user_func_array + + if ( isset( $traces[ $n ] ) ) { + // FIXME 'column_name' for backward compatibility with WP < 4.3 + if ( in_array( $traces[ $n ]['function'], array( 'column_cb', 'column_name', 'handle_row_actions' ) ) && in_array( $traces[ $n ]['args'][0]->term_id, $this->model->term->get_translations( $value ) ) ) { + return $traces[ $n ]['args'][0]->term_id; + } + + if ( 'wp_delete_term' == $traces[ $n ]['function'] ) { + return $this->model->term->get( $value, $this->model->term->get_language( $traces[ $n ]['args'][0] ) ); + } + } + } + + return $value; + } + + /** + * Checks if the new default category is translated in all languages + * If not, create the translations + * + * @since 1.7 + * + * @param int $old_value + * @param int $value + */ + public function update_option_default_category( $old_value, $value ) { + $default_cat_lang = $this->model->term->get_language( $value ); + + // Assign a default language to default category + if ( ! $default_cat_lang ) { + $default_cat_lang = $this->model->get_language( $this->options['default_lang'] ); + $this->model->term->set_language( (int) $value, $default_cat_lang ); + } + + foreach ( $this->model->get_languages_list() as $language ) { + if ( $language->slug != $default_cat_lang->slug && ! $this->model->term->get_translation( $value, $language ) ) { + $this->model->create_default_category( $language ); + } + } + } + + /** + * Updates the translations term ids when splitting a shared term + * Splits translations if these are shared terms too + * + * @since 1.7 + * + * @param int $term_id Shared term_id + * @param int $new_term_id + * @param int $term_taxonomy_id + * @param string $taxonomy + */ + public function split_shared_term( $term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) { + if ( ! $this->model->is_translated_taxonomy( $taxonomy ) ) { + return; + } + + // Avoid recursion + static $avoid_recursion = false; + if ( $avoid_recursion ) { + return; + } + + $avoid_recursion = true; + $lang = $this->model->term->get_language( $term_id ); + + foreach ( $this->model->term->get_translations( $term_id ) as $key => $tr_id ) { + if ( $lang->slug == $key ) { + $translations[ $key ] = $new_term_id; + } + else { + $tr_term = get_term( $tr_id, $taxonomy ); + $translations[ $key ] = _split_shared_term( $tr_id, $tr_term->term_taxonomy_id ); + + // Hack translation ids sent by the form to avoid overwrite in PLL_Admin_Filters_Term::save_translations + if ( isset( $_POST['term_tr_lang'][ $key ] ) && $_POST['term_tr_lang'][ $key ] == $tr_id ) { + $_POST['term_tr_lang'][ $key ] = $translations[ $key ]; + } + } + $this->model->term->set_language( $translations[ $key ], $key ); + } + + $this->model->term->save_translations( $new_term_id, $translations ); + $avoid_recursion = false; + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/admin-filters.php b/pole-sbv-content/plugins/polylang/admin/admin-filters.php new file mode 100644 index 00000000..9c1ba290 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-filters.php @@ -0,0 +1,281 @@ +model->get_languages_list( array( 'fields' => 'locale' ) ), $specific_locales ) ) { + add_filter( 'sanitize_title', array( $this, 'sanitize_title' ), 10, 3 ); + add_filter( 'sanitize_user', array( $this, 'sanitize_user' ), 10, 3 ); + } + + add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) ); + } + + /** + * Modifies the widgets forms to add our language dropdwown list + * + * @since 0.3 + * + * @param object $widget Widget instance + * @param null $return Not used + * @param array $instance Widget settings + */ + public function in_widget_form( $widget, $return, $instance ) { + $screen = get_current_screen(); + + // Test the Widgets screen and the Customizer to avoid displaying the option in page builders + // Saving the widget reloads the form. And curiously the action is in $_REQUEST but neither in $_POST, not in $_GET. + if ( ( isset( $screen ) && 'widgets' === $screen->base ) || ( isset( $_REQUEST['action'] ) && 'save-widget' === $_REQUEST['action'] ) || isset( $GLOBALS['wp_customize'] ) ) { + $dropdown = new PLL_Walker_Dropdown(); + printf( '

', + esc_attr( $widget->id . '_lang_choice' ), + esc_html__( 'The widget is displayed for:', 'polylang' ), + $dropdown->walk( + array_merge( + array( (object) array( 'slug' => 0, 'name' => __( 'All languages', 'polylang' ) ) ), + $this->model->get_languages_list() + ), + array( + 'name' => $widget->id . '_lang_choice', + 'class' => 'tags-input', + 'selected' => empty( $instance['pll_lang'] ) ? '' : $instance['pll_lang'], + ) + ) + ); + } + } + + /** + * Called when widget options are saved + * saves the language associated to the widget + * + * @since 0.3 + * + * @param array $instance Widget options + * @param array $new_instance Not used + * @param array $old_instance Not used + * @param object $widget WP_Widget object + * @return array Widget options + */ + public function widget_update_callback( $instance, $new_instance, $old_instance, $widget ) { + if ( ! empty( $_POST[ $key = $widget->id . '_lang_choice' ] ) && in_array( $_POST[ $key ], $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) ) { + $instance['pll_lang'] = $_POST[ $key ]; + } else { + unset( $instance['pll_lang'] ); + } + + return $instance; + } + + /** + * Updates language user preference set in user profile + * + * @since 0.4 + * + * @param int $user_id + */ + public function personal_options_update( $user_id ) { + // Admin language + // FIXME Backward compatibility with WP < 4.7 + if ( version_compare( $GLOBALS['wp_version'], '4.7alpha', '<' ) ) { + $user_lang = in_array( $_POST['user_lang'], $this->model->get_languages_list( array( 'fields' => 'locale' ) ) ) ? $_POST['user_lang'] : 0; + update_user_meta( $user_id, 'locale', $user_lang ); + } + + // Biography translations + foreach ( $this->model->get_languages_list() as $lang ) { + $meta = $lang->slug == $this->options['default_lang'] ? 'description' : 'description_' . $lang->slug; + $description = empty( $_POST[ 'description_' . $lang->slug ] ) ? '' : trim( $_POST[ 'description_' . $lang->slug ] ); + + /** This filter is documented in wp-includes/user.php */ + $description = apply_filters( 'pre_user_description', $description ); // Applies WP default filter wp_filter_kses + update_user_meta( $user_id, $meta, $description ); + } + } + + /** + * Form for language user preference in user profile + * + * @since 0.4 + * + * @param object $profileuser + */ + public function personal_options( $profileuser ) { + // FIXME: Backward compatibility with WP < 4.7 + if ( version_compare( $GLOBALS['wp_version'], '4.7alpha', '<' ) ) { + $dropdown = new PLL_Walker_Dropdown(); + printf( ' + + + %s + ', + esc_html__( 'Admin language', 'polylang' ), + $dropdown->walk( + array_merge( + array( (object) array( 'locale' => 0, 'name' => __( 'WordPress default', 'polylang' ) ) ), + $this->model->get_languages_list() + ), + array( + 'name' => 'user_lang', + 'value' => 'locale', + 'selected' => get_user_meta( $profileuser->ID, 'locale', true ), + ) + ) + ); + } + + // Hidden informations to modify the biography form with js + foreach ( $this->model->get_languages_list() as $lang ) { + $meta = $lang->slug == $this->options['default_lang'] ? 'description' : 'description_' . $lang->slug; + + /** This filter is documented in wp-includes/user.php */ + $description = apply_filters( 'user_description', get_user_meta( $profileuser->ID, $meta, true ) ); // Applies WP default filter wp_kses_data + + printf( '', + esc_attr( $lang->slug ), + esc_attr( $lang->name ), + esc_attr( $description ) + ); + } + } + + /** + * Ugprades languages files after a core upgrade + * only for backward compatibility WP < 4.0 *AND* Polylang < 1.6 + * + * @since 0.6 + * + * @param string $version new WP version + */ + public function upgrade_languages( $version ) { + // $GLOBALS['wp_version'] is the old WP version + if ( version_compare( $version, '4.0', '>=' ) && version_compare( $GLOBALS['wp_version'], '4.0', '<' ) ) { + + /** This filter is documented in wp-admin/includes/update-core.php */ + apply_filters( 'update_feedback', __( 'Upgrading language files…', 'polylang' ) ); + PLL_Upgrade::download_language_packs(); + } + } + + /** + * Allows to update translations files for plugins and themes + * + * @since 1.6 + * + * @param array $locales Not used + * @return array list of locales to update + */ + function update_check_locales( $locales ) { + return $this->model->get_languages_list( array( 'fields' => 'locale' ) ); + } + + /** + * Filters the locale according to the current language instead of the language + * of the admin interface + * + * @since 2.0 + * + * @param string $locale + * @return string + */ + public function get_locale( $locale ) { + return $this->curlang->locale; + } + + /** + * Maybe fix the result of sanitize_title() in case the languages include German or Danish + * Without this filter, if language of the title being sanitized is different from the language + * used for the admin interface and if one this language is German or Danish, some specific + * characters such as ä, ö, ü, ß are incorrectly sanitized. + * + * @since 2.0 + * + * @param string $title Sanitized title. + * @param string $raw_title The title prior to sanitization. + * @param string $context The context for which the title is being sanitized. + * @return string + */ + public function sanitize_title( $title, $raw_title, $context ) { + static $once = false; + + if ( ! $once && 'save' == $context && ! empty( $this->curlang ) && ! empty( $title ) ) { + $once = true; + add_filter( 'locale', array( $this, 'get_locale' ), 20 ); // After the filter for the admin interface + $title = sanitize_title( $raw_title, '', $context ); + remove_filter( 'locale', array( $this, 'get_locale' ), 20 ); + $once = false; + } + return $title; + } + + /** + * Maybe fix the result of sanitize_user() in case the languages include German or Danish + * + * @since 2.0 + * + * @param string $username Sanitized username. + * @param string $raw_username The username prior to sanitization. + * @param bool $strict Whether to limit the sanitization to specific characters. Default false. + * @return string + */ + public function sanitize_user( $username, $raw_username, $strict ) { + static $once = false; + + if ( ! $once && ! empty( $this->curlang ) ) { + $once = true; + add_filter( 'locale', array( $this, 'get_locale' ), 20 ); // After the filter for the admin interface + $username = sanitize_user( $raw_username, '', $strict ); + remove_filter( 'locale', array( $this, 'get_locale' ), 20 ); + $once = false; + } + return $username; + } + + /** + * Adds a text direction dependent class to the body + * + * @since 2.2 + * + * @param string $classes Space-separated list of CSS classes. + * @return string + */ + public function admin_body_class( $classes ) { + if ( ! empty( $this->curlang ) ) { + $classes .= ' pll-dir-' . ( $this->curlang->is_rtl ? 'rtl' : 'ltr' ); + } + return $classes; + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/admin-links.php b/pole-sbv-content/plugins/polylang/admin/admin-links.php new file mode 100644 index 00000000..7b0ddeae --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-links.php @@ -0,0 +1,177 @@ +cap->create_posts ) ) { + return ''; + } + + if ( 'attachment' == $post_type ) { + $args = array( + 'action' => 'translate_media', + 'from_media' => $post_id, + 'new_lang' => $language->slug, + ); + + // add nonce for media as we will directly publish a new attachment from a clic on this link + $link = wp_nonce_url( add_query_arg( $args, admin_url( 'admin.php' ) ), 'translate_media' ); + } else { + $args = array( + 'post_type' => $post_type, + 'from_post' => $post_id, + 'new_lang' => $language->slug, + ); + + $link = add_query_arg( $args, admin_url( 'post-new.php' ) ); + } + + /** + * Filter the new post translation link + * + * @since 1.8 + * + * @param string $link the new post translation link + * @param object $language the language of the new translation + * @param int $post_id the source post id + */ + return apply_filters( 'pll_get_new_post_translation_link', $link, $language, $post_id ); + } + + /** + * returns html markup for a new post translation link + * + * @since 1.8 + * + * @param int $post_id + * @param object $language + * @return string + */ + public function new_post_translation_link( $post_id, $language ) { + $link = $this->get_new_post_translation_link( $post_id, $language ); + return $link ? sprintf( + '%2$s', + esc_url( $link ), + /* translators: accessibility text, %s is a native language name */ + esc_html( sprintf( __( 'Add a translation in %s', 'polylang' ), $language->name ) ) + ) : ''; + } + + /** + * returns html markup for a translation link + * + * @since 1.4 + * + * @param int $post_id translation post id + * @return string + */ + public function edit_post_translation_link( $post_id ) { + $link = get_edit_post_link( $post_id ); + $language = $this->model->post->get_language( $post_id ); + return $link ? sprintf( + '%2$s', + esc_url( $link ), + /* translators: accessibility text, %s is a native language name */ + esc_html( sprintf( __( 'Edit the translation in %s', 'polylang' ), $language->name ) ) + ) : ''; + } + + /** + * get the link to create a new term translation + * + * @since 1.5 + * + * @param int $term_id + * @param string $taxonomy + * @param string $post_type + * @param object $language + * @return string + */ + public function get_new_term_translation_link( $term_id, $taxonomy, $post_type, $language ) { + $tax = get_taxonomy( $taxonomy ); + if ( ! $tax || ! current_user_can( $tax->cap->edit_terms ) ) { + return ''; + } + + $args = array( + 'taxonomy' => $taxonomy, + 'post_type' => $post_type, + 'from_tag' => $term_id, + 'new_lang' => $language->slug, + ); + + $link = add_query_arg( $args, admin_url( 'edit-tags.php' ) ); + + /** + * Filter the new term translation link + * + * @since 1.8 + * + * @param string $link the new term translation link + * @param object $language the language of the new translation + * @param int $term_id the source term id + * @param string $taxonomy + * @param string $post_type + */ + return apply_filters( 'pll_get_new_term_translation_link', $link, $language, $term_id, $taxonomy, $post_type ); + } + + /** + * returns html markup for a new term translation + * + * @since 1.8 + * + * @param int $term_id + * @param string $taxonomy + * @param string $post_type + * @param object $language + * @return string + */ + public function new_term_translation_link( $term_id, $taxonomy, $post_type, $language ) { + $link = $this->get_new_term_translation_link( $term_id, $taxonomy, $post_type, $language ); + return $link ? sprintf( + '%2$s', + esc_url( $link ), + /* translators: accessibility text, %s is a native language name */ + esc_html( sprintf( __( 'Add a translation in %s', 'polylang' ), $language->name ) ) + ) : ''; + } + + /** + * returns html markup for a term translation link + * + * @since 1.4 + * + * @param object $term_id translation term id + * @param string $taxonomy + * @param string $post_type + * @return string + */ + public function edit_term_translation_link( $term_id, $taxonomy, $post_type ) { + $link = get_edit_term_link( $term_id, $taxonomy, $post_type ); + $language = $this->model->term->get_language( $term_id ); + return $link ? sprintf( + '%2$s', + esc_url( $link ), + /* translators: accessibility text, %s is a native language name */ + esc_html( sprintf( __( 'Edit the translation in %s', 'polylang' ), $language->name ) ) + ) : ''; + } +} + diff --git a/pole-sbv-content/plugins/polylang/admin/admin-model.php b/pole-sbv-content/plugins/polylang/admin/admin-model.php new file mode 100644 index 00000000..0c847645 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-model.php @@ -0,0 +1,540 @@ + language name ( used only for display ) + * slug -> language code ( ideally 2-letters ISO 639-1 language code ) + * locale -> WordPress locale. If something wrong is used for the locale, the .mo files will not be loaded... + * rtl -> 1 if rtl language, 0 otherwise + * term_group -> language order when displayed + * + * Optional arguments that $args can contain: + * no_default_cat -> if set, no default category will be created for this language + * flag -> country code, see flags.php + * + * @since 1.2 + * + * @param array $args + * @return bool true if success / false if failed + */ + public function add_language( $args ) { + if ( ! $this->validate_lang( $args ) ) { + return false; + } + + // First the language taxonomy + $description = serialize( array( 'locale' => $args['locale'], 'rtl' => (int) $args['rtl'], 'flag_code' => empty( $args['flag'] ) ? '' : $args['flag'] ) ); + $r = wp_insert_term( $args['name'], 'language', array( 'slug' => $args['slug'], 'description' => $description ) ); + if ( is_wp_error( $r ) ) { + // Avoid an ugly fatal error if something went wrong ( reported once in the forum ) + add_settings_error( 'general', 'pll_add_language', __( 'Impossible to add the language.', 'polylang' ) ); + return false; + } + wp_update_term( (int) $r['term_id'], 'language', array( 'term_group' => (int) $args['term_group'] ) ); // can't set the term group directly in wp_insert_term + + // The term_language taxonomy + // Don't want shared terms so use a different slug + wp_insert_term( $args['name'], 'term_language', array( 'slug' => 'pll_' . $args['slug'] ) ); + + $this->clean_languages_cache(); // Udpate the languages list now ! + + if ( ! isset( $this->options['default_lang'] ) ) { + // If this is the first language created, set it as default language + $this->options['default_lang'] = $args['slug']; + update_option( 'polylang', $this->options ); + + // And assign default language to default category + $this->term->set_language( (int) get_option( 'default_category' ), (int) $r['term_id'] ); + } elseif ( empty( $args['no_default_cat'] ) ) { + $this->create_default_category( $args['slug'] ); + } + + // Init a mo_id for this language + $mo = new PLL_MO(); + $mo->export_to_db( $this->get_language( $args['slug'] ) ); + + /** + * Fires when a language is added + * + * @since 1.9 + * + * @param array $args arguments used to create the language + */ + do_action( 'pll_add_language', $args ); + + $this->clean_languages_cache(); // Again to set add mo_id in the cached languages list + flush_rewrite_rules(); // Refresh rewrite rules + + add_settings_error( 'general', 'pll_languages_created', __( 'Language added.', 'polylang' ), 'updated' ); + return true; + } + + /** + * Delete a language + * + * @since 1.2 + * + * @param int $lang_id language term_id + */ + public function delete_language( $lang_id ) { + $lang = $this->get_language( (int) $lang_id ); + + if ( empty( $lang ) ) { + return; + } + + // Oops ! we are deleting the default language... + // Need to do this before loosing the information for default category translations + if ( $this->options['default_lang'] == $lang->slug ) { + $slugs = $this->get_languages_list( array( 'fields' => 'slug' ) ); + $slugs = array_diff( $slugs, array( $lang->slug ) ); + + if ( ! empty( $slugs ) ) { + $this->update_default_lang( reset( $slugs ) ); // Arbitrary choice... + } else { + unset( $this->options['default_lang'] ); + } + } + + // Delete the translations + $this->update_translations( $lang->slug ); + + // Delete language option in widgets + foreach ( $GLOBALS['wp_registered_widgets'] as $widget ) { + if ( ! empty( $widget['callback'][0] ) && ! empty( $widget['params'][0]['number'] ) ) { + $obj = $widget['callback'][0]; + $number = $widget['params'][0]['number']; + if ( is_object( $obj ) && method_exists( $obj, 'get_settings' ) && method_exists( $obj, 'save_settings' ) ) { + $settings = $obj->get_settings(); + if ( isset( $settings[ $number ]['pll_lang'] ) && $settings[ $number ]['pll_lang'] == $lang->slug ) { + unset( $settings[ $number ]['pll_lang'] ); + $obj->save_settings( $settings ); + } + } + } + } + + // Delete menus locations + if ( ! empty( $this->options['nav_menus'] ) ) { + foreach ( $this->options['nav_menus'] as $theme => $locations ) { + foreach ( $locations as $location => $languages ) { + unset( $this->options['nav_menus'][ $theme ][ $location ][ $lang->slug ] ); + } + } + } + + // Delete users options + foreach ( get_users( array( 'fields' => 'ID' ) ) as $user_id ) { + delete_user_meta( $user_id, 'pll_filter_content', $lang->slug ); + delete_user_meta( $user_id, 'description_' . $lang->slug ); + } + + // Delete the string translations + $post = wpcom_vip_get_page_by_title( 'polylang_mo_' . $lang->term_id, OBJECT, 'polylang_mo' ); + if ( ! empty( $post ) ) { + wp_delete_post( $post->ID ); + } + + // Delete domain + unset( $this->options['domains'][ $lang->slug ] ); + + // Delete the language itself + wp_delete_term( $lang->term_id, 'language' ); + wp_delete_term( $lang->tl_term_id, 'term_language' ); + + // Update languages list + $this->clean_languages_cache(); + + update_option( 'polylang', $this->options ); + flush_rewrite_rules(); // refresh rewrite rules + add_settings_error( 'general', 'pll_languages_deleted', __( 'Language deleted.', 'polylang' ), 'updated' ); + } + + /** + * Update language properties + * + * List of arguments that $args must contain: + * lang_id -> term_id of the language to modify + * name -> language name ( used only for display ) + * slug -> language code ( ideally 2-letters ISO 639-1 language code + * locale -> WordPress locale. If something wrong is used for the locale, the .mo files will not be loaded... + * rtl -> 1 if rtl language, 0 otherwise + * term_group -> language order when displayed + * + * Optional arguments that $args can contain: + * flag -> country code, see flags.php + * + * @since 1.2 + * + * @param array $args + * @return bool true if success / false if failed + */ + public function update_language( $args ) { + $lang = $this->get_language( (int) $args['lang_id'] ); + if ( ! $this->validate_lang( $args, $lang ) ) { + return false; + } + + // Update links to this language in posts and terms in case the slug has been modified + $slug = $args['slug']; + $old_slug = $lang->slug; + + if ( $old_slug != $slug ) { + // Update the language slug in translations + $this->update_translations( $old_slug, $slug ); + + // Update language option in widgets + foreach ( $GLOBALS['wp_registered_widgets'] as $widget ) { + if ( ! empty( $widget['callback'][0] ) && ! empty( $widget['params'][0]['number'] ) ) { + $obj = $widget['callback'][0]; + $number = $widget['params'][0]['number']; + if ( is_object( $obj ) && method_exists( $obj, 'get_settings' ) && method_exists( $obj, 'save_settings' ) ) { + $settings = $obj->get_settings(); + if ( isset( $settings[ $number ]['pll_lang'] ) && $settings[ $number ]['pll_lang'] == $old_slug ) { + $settings[ $number ]['pll_lang'] = $slug; + $obj->save_settings( $settings ); + } + } + } + } + + // Update menus locations + if ( ! empty( $this->options['nav_menus'] ) ) { + foreach ( $this->options['nav_menus'] as $theme => $locations ) { + foreach ( $locations as $location => $languages ) { + if ( ! empty( $this->options['nav_menus'][ $theme ][ $location ][ $old_slug ] ) ) { + $this->options['nav_menus'][ $theme ][ $location ][ $slug ] = $this->options['nav_menus'][ $theme ][ $location ][ $old_slug ]; + unset( $this->options['nav_menus'][ $theme ][ $location ][ $old_slug ] ); + } + } + } + } + + // Update domains + if ( ! empty( $this->options['domains'][ $old_slug ] ) ) { + $this->options['domains'][ $slug ] = $this->options['domains'][ $old_slug ]; + unset( $this->options['domains'][ $old_slug ] ); + } + + // Update the default language option if necessary + if ( $this->options['default_lang'] == $old_slug ) { + $this->options['default_lang'] = $slug; + } + } + + update_option( 'polylang', $this->options ); + + // And finally update the language itself + $description = serialize( array( 'locale' => $args['locale'], 'rtl' => (int) $args['rtl'], 'flag_code' => empty( $args['flag'] ) ? '' : $args['flag'] ) ); + wp_update_term( (int) $lang->term_id, 'language', array( 'slug' => $slug, 'name' => $args['name'], 'description' => $description, 'term_group' => (int) $args['term_group'] ) ); + wp_update_term( (int) $lang->tl_term_id, 'term_language', array( 'slug' => 'pll_' . $slug, 'name' => $args['name'] ) ); + + /** + * Fires when a language is added + * + * @since 1.9 + * + * @param array $args arguments used to modify the language + */ + do_action( 'pll_update_language', $args ); + + $this->clean_languages_cache(); + flush_rewrite_rules(); // Refresh rewrite rules + add_settings_error( 'general', 'pll_languages_updated', __( 'Language updated.', 'polylang' ), 'updated' ); + return true; + } + + /** + * Validates data entered when creating or updating a language + * @see PLL_Admin_Model::add_language + * + * @since 0.4 + * + * @param array $args + * @param object $lang optional the language currently updated, the language is created if not set + * @return bool true if success / false if failed + */ + protected function validate_lang( $args, $lang = null ) { + // Validate locale with the same pattern as WP 4.3. See #28303 + if ( ! preg_match( '#^[a-z]{2,3}(?:_[A-Z]{2})?(?:_[a-z0-9]+)?$#', $args['locale'], $matches ) ) { + add_settings_error( 'general', 'pll_invalid_locale', __( 'Enter a valid WordPress locale', 'polylang' ) ); + } + + // Validate slug characters + if ( ! preg_match( '#^[a-z_-]+$#', $args['slug'] ) ) { + add_settings_error( 'general', 'pll_invalid_slug', __( 'The language code contains invalid characters', 'polylang' ) ); + } + + // Validate slug is unique + if ( $this->get_language( $args['slug'] ) && ( null === $lang || ( isset( $lang ) && $lang->slug != $args['slug'] ) ) ) { + add_settings_error( 'general', 'pll_non_unique_slug', __( 'The language code must be unique', 'polylang' ) ); + } + + // Validate name + // No need to sanitize it as wp_insert_term will do it for us + if ( empty( $args['name'] ) ) { + add_settings_error( 'general', 'pll_invalid_name', __( 'The language must have a name', 'polylang' ) ); + } + + // Validate flag + if ( ! empty( $args['flag'] ) && ! file_exists( POLYLANG_DIR . '/flags/' . $args['flag'] . '.png' ) ) { + add_settings_error( 'general', 'pll_invalid_flag', __( 'The flag does not exist', 'polylang' ) ); + } + + return get_settings_errors() ? false : true; + } + + /** + * Used to set the language of posts or terms in mass + * + * @since 1.2 + * + * @param string $type either 'post' or 'term' + * @param array $ids array of post ids or term ids + * @param object|string $lang object or slug + */ + public function set_language_in_mass( $type, $ids, $lang ) { + global $wpdb; + + $ids = array_map( 'intval', $ids ); + $lang = $this->get_language( $lang ); + $tt_id = 'term' === $type ? $lang->tl_term_taxonomy_id : $lang->term_taxonomy_id; + + foreach ( $ids as $id ) { + $values[] = $wpdb->prepare( '( %d, %d )', $id, $tt_id ); + } + + if ( ! empty( $values ) ) { + $values = array_unique( $values ); + $wpdb->query( "INSERT INTO $wpdb->term_relationships ( object_id, term_taxonomy_id ) VALUES " . implode( ',', $values ) ); + $lang->update_count(); // Updating term count is mandatory ( thanks to AndyDeGroo ) + } + + if ( 'term' === $type ) { + clean_term_cache( $ids, 'term_language' ); + + foreach ( $ids as $id ) { + $translations[] = array( $lang->slug => $id ); + } + + if ( ! empty( $translations ) ) { + $this->set_translation_in_mass( 'term', $translations ); + } + } else { + clean_term_cache( $ids, 'language' ); + } + } + + /** + * Used to create a translations groups in mass + * + * @since 1.6.3 + * + * @param string $type either 'post' or 'term' + * @param array $translations array of translations arrays + */ + public function set_translation_in_mass( $type, $translations ) { + global $wpdb; + + $taxonomy = $type . '_translations'; + + foreach ( $translations as $t ) { + $term = uniqid( 'pll_' ); // the term name + $terms[] = $wpdb->prepare( '( "%s", "%s" )', $term, $term ); + $slugs[] = $wpdb->prepare( '"%s"', $term ); + $description[ $term ] = serialize( $t ); + $count[ $term ] = count( $t ); + } + + // Insert terms + if ( ! empty( $terms ) ) { + $terms = array_unique( $terms ); + $wpdb->query( "INSERT INTO $wpdb->terms ( slug, name ) VALUES " . implode( ',', $terms ) ); + } + + // Get all terms with their term_id + $terms = $wpdb->get_results( "SELECT term_id, slug FROM $wpdb->terms WHERE slug IN ( " . implode( ',', $slugs ) . ' )' ); + + // Prepare terms taxonomy relationship + foreach ( $terms as $term ) { + $term_ids[] = $term->term_id; + $tts[] = $wpdb->prepare( '( %d, "%s", "%s", %d )', $term->term_id, $taxonomy, $description[ $term->slug ], $count[ $term->slug ] ); + } + + // Insert term_taxonomy + if ( ! empty( $tts ) ) { + $tts = array_unique( $tts ); + $wpdb->query( "INSERT INTO $wpdb->term_taxonomy ( term_id, taxonomy, description, count ) VALUES " . implode( ',', $tts ) ); + } + + // Get all terms with term_taxonomy_id + $terms = get_terms( $taxonomy, array( 'hide_empty' => false ) ); + + // Prepare objects relationships + foreach ( $terms as $term ) { + $t = unserialize( $term->description ); + if ( in_array( $t, $translations ) ) { + foreach ( $t as $object_id ) { + if ( ! empty( $object_id ) ) { + $trs[] = $wpdb->prepare( '( %d, %d )', $object_id, $term->term_taxonomy_id ); + } + } + } + } + + // Insert term_relationships + if ( ! empty( $trs ) ) { + $wpdb->query( "INSERT INTO $wpdb->term_relationships ( object_id, term_taxonomy_id ) VALUES " . implode( ',', $trs ) ); + $trs = array_unique( $trs ); + } + + clean_term_cache( $term_ids, $taxonomy ); + } + + /** + * Returns unstranslated posts and terms ids ( used in settings ) + * + * @since 0.9 + * + * @return array array made of an array of post ids and an array of term ids + */ + public function get_objects_with_no_lang() { + $posts = get_posts( array( + 'numberposts' => -1, + 'nopaging' => true, + 'post_type' => $this->get_translated_post_types(), + 'post_status' => 'any', + 'fields' => 'ids', + 'tax_query' => array( + array( + 'taxonomy' => 'language', + 'terms' => $this->get_languages_list( array( 'fields' => 'term_id' ) ), + 'operator' => 'NOT IN', + ), + ), + ) ); + + $terms = get_terms( $this->get_translated_taxonomies(), array( 'get' => 'all', 'fields' => 'ids' ) ); + $groups = $this->get_languages_list( array( 'fields' => 'tl_term_id' ) ); + $tr_terms = get_objects_in_term( $groups, 'term_language' ); + $terms = array_unique( array_diff( $terms, $tr_terms ) ); // array_unique to avoid duplicates if a term is in more than one taxonomy + $terms = array_map( 'intval', $terms ); + + /** + * Filter the list of untranslated posts ids and terms ids + * + * @since 0.9 + * + * @param bool|array $objects false if no ids found, list of post and/or term ids otherwise + */ + return apply_filters( 'pll_get_objects_with_no_lang', empty( $posts ) && empty( $terms ) ? false : array( 'posts' => $posts, 'terms' => $terms ) ); + } + + /** + * Used to delete translations or update the translations when a language slug has been modified in settings + * + * @since 0.5 + * + * @param string $old_slug the old language slug + * @param string $new_slug optional, the new language slug, if not set it means the correspondant has been deleted + */ + public function update_translations( $old_slug, $new_slug = '' ) { + global $wpdb; + + $terms = get_terms( array( 'post_translations', 'term_translations' ) ); + + foreach ( $terms as $term ) { + $term_ids[ $term->taxonomy ][] = $term->term_id; + $tr = unserialize( $term->description ); + if ( ! empty( $tr[ $old_slug ] ) ) { + if ( $new_slug ) { + $tr[ $new_slug ] = $tr[ $old_slug ]; // Suppress this for delete + } else { + $dr['id'][] = (int) $tr[ $old_slug ]; + $dr['tt'][] = (int) $term->term_taxonomy_id; + } + unset( $tr[ $old_slug ] ); + + if ( empty( $tr ) || 1 == count( $tr ) ) { + $dt['t'][] = (int) $term->term_id; + $dt['tt'][] = (int) $term->term_taxonomy_id; + } else { + $ut['case'][] = $wpdb->prepare( 'WHEN %d THEN %s', $term->term_id, serialize( $tr ) ); + $ut['in'][] = (int) $term->term_id; + } + } + } + + // Delete relationships + if ( ! empty( $dr ) ) { + $wpdb->query( " + DELETE FROM $wpdb->term_relationships + WHERE object_id IN ( " . implode( ',', $dr['id'] ) . ' ) + AND term_taxonomy_id IN ( ' . implode( ',', $dr['tt'] ) . ' ) + ' ); + } + + // Delete terms + if ( ! empty( $dt ) ) { + $wpdb->query( "DELETE FROM $wpdb->terms WHERE term_id IN ( " . implode( ',', $dt['t'] ) . ' )' ); + $wpdb->query( "DELETE FROM $wpdb->term_taxonomy WHERE term_taxonomy_id IN ( " . implode( ',', $dt['tt'] ) . ' )' ); + } + + // Update terms + if ( ! empty( $ut ) ) { + $wpdb->query( " + UPDATE $wpdb->term_taxonomy + SET description = ( CASE term_id " . implode( ' ', $ut['case'] ) . ' END ) + WHERE term_id IN ( ' . implode( ',', $ut['in'] ) . ' ) + ' ); + } + + if ( ! empty( $term_ids ) ) { + foreach ( $term_ids as $taxonomy => $ids ) { + clean_term_cache( $ids, $taxonomy ); + } + } + } + + /** + * Updates the default language + * taking care to update the default category & the nav menu locations + * + * @since 1.8 + * + * @param string $slug new language slug + */ + public function update_default_lang( $slug ) { + // The nav menus stored in theme locations should be in the default language + $theme = get_stylesheet(); + if ( ! empty( $this->options['nav_menus'][ $theme ] ) ) { + foreach ( $this->options['nav_menus'][ $theme ] as $key => $loc ) { + $menus[ $key ] = empty( $loc[ $slug ] ) ? 0 : $loc[ $slug ]; + } + set_theme_mod( 'nav_menu_locations', $menus ); + } + + // The default category should be in the default language + $default_cats = $this->term->get_translations( get_option( 'default_category' ) ); + if ( isset( $default_cats[ $slug ] ) ) { + update_option( 'default_category', $default_cats[ $slug ] ); + } + + // Update options + $this->options['default_lang'] = $slug; + update_option( 'polylang', $this->options ); + + $this->clean_languages_cache(); + flush_rewrite_rules(); + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/admin-nav-menu.php b/pole-sbv-content/plugins/polylang/admin/admin-nav-menu.php new file mode 100644 index 00000000..a2306a54 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-nav-menu.php @@ -0,0 +1,331 @@ +theme = get_option( 'stylesheet' ); + + // Populates nav menus locations + // Since WP 4.4, must be done before customize_register is fired + add_filter( 'theme_mod_nav_menu_locations', array( $this, 'theme_mod_nav_menu_locations' ), 20 ); + + // Integration in the WP menu interface + add_action( 'admin_init', array( $this, 'admin_init' ) ); // after Polylang upgrade + } + + /** + * Setups filters and terms + * adds the language switcher metabox and create new nav menu locations + * + * @since 1.1 + */ + public function admin_init() { + add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); + add_action( 'wp_update_nav_menu_item', array( $this, 'wp_update_nav_menu_item' ), 10, 2 ); + add_filter( 'wp_get_nav_menu_items', array( $this, 'translate_switcher_title' ) ); + + // Translation of menus based on chosen locations + add_filter( 'pre_update_option_theme_mods_' . $this->theme, array( $this, 'pre_update_option_theme_mods' ) ); + add_action( 'delete_nav_menu', array( $this, 'delete_nav_menu' ) ); + + // Filter _wp_auto_add_pages_to_menu by language + add_action( 'transition_post_status', array( $this, 'auto_add_pages_to_menu' ), 5, 3 ); // before _wp_auto_add_pages_to_menu + + // FIXME is it possible to choose the order ( after theme locations in WP3.5 and older ) ? + // FIXME not displayed if Polylang is activated before the first time the user goes to nav menus http://core.trac.wordpress.org/ticket/16828 + add_meta_box( 'pll_lang_switch_box', __( 'Language switcher', 'polylang' ), array( $this, 'lang_switch' ), 'nav-menus', 'side', 'high' ); + + $this->create_nav_menu_locations(); + } + + /** + * Language switcher metabox + * The checkbox and all hidden fields are important + * Thanks to John Morris for his very interesting post http://www.johnmorrisonline.com/how-to-add-a-fully-functional-custom-meta-box-to-wordpress-navigation-menus/ + * + * @since 1.1 + */ + public function lang_switch() { + global $_nav_menu_placeholder, $nav_menu_selected_id; + $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1; + ?> +
+
+ +
+

+ + class="button-secondary submit-add-to-menu right" value="" name="add-post-type-menu-item" id="submit-posttype-lang-switch"> + + +

+
+ base ) { + return; + } + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + wp_enqueue_script( 'pll_nav_menu', plugins_url( '/js/nav-menu' . $suffix . '.js', POLYLANG_FILE ), array( 'jquery' ), POLYLANG_VERSION ); + + $data['strings'] = PLL_Switcher::get_switcher_options( 'menu', 'string' ); // The strings for the options + $data['title'] = __( 'Language switcher', 'polylang' ); // The title + + // Get all language switcher menu items + $items = get_posts( array( + 'numberposts' => -1, + 'nopaging' => true, + 'post_type' => 'nav_menu_item', + 'fields' => 'ids', + 'meta_key' => '_pll_menu_item', + ) ); + + // The options values for the language switcher + $data['val'] = array(); + foreach ( $items as $item ) { + $data['val'][ $item ] = get_post_meta( $item, '_pll_menu_item', true ); + } + + // Send all these data to javascript + wp_localize_script( 'pll_nav_menu', 'pll_data', $data ); + } + + /** + * Save our menu item options + * + * @since 1.1 + * + * @param int $menu_id not used + * @param int $menu_item_db_id + */ + public function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0 ) { + if ( empty( $_POST['menu-item-url'][ $menu_item_db_id ] ) || '#pll_switcher' != $_POST['menu-item-url'][ $menu_item_db_id ] ) { + return; + } + + // Security check as 'wp_update_nav_menu_item' can be called from outside WP admin + if ( current_user_can( 'edit_theme_options' ) ) { + check_admin_referer( 'update-nav_menu', 'update-nav-menu-nonce' ); + + $options = array( 'hide_if_no_translation' => 0, 'hide_current' => 0, 'force_home' => 0, 'show_flags' => 0, 'show_names' => 1, 'dropdown' => 0 ); // Default values + // Our jQuery form has not been displayed + if ( empty( $_POST['menu-item-pll-detect'][ $menu_item_db_id ] ) ) { + if ( ! get_post_meta( $menu_item_db_id, '_pll_menu_item', true ) ) { // Our options were never saved + update_post_meta( $menu_item_db_id, '_pll_menu_item', $options ); + } + } + else { + foreach ( $options as $opt => $v ) { + $options[ $opt ] = empty( $_POST[ 'menu-item-' . $opt ][ $menu_item_db_id ] ) ? 0 : 1; + } + update_post_meta( $menu_item_db_id, '_pll_menu_item', $options ); // Allow us to easily identify our nav menu item + } + } + } + + /** + * Translates the language switcher menu items title in case the user switches the admin language + * + * @since 1.1.1 + * + * @param array $items + * @return array modified $items + */ + public function translate_switcher_title( $items ) { + foreach ( $items as $item ) { + if ( '#pll_switcher' == $item->url ) { + $item->post_title = __( 'Language switcher', 'polylang' ); + } + } + return $items; + } + + /** + * Assign menu languages and translations based on ( temporary ) locations + * + * @since 1.8 + * + * @param array $locations nav menu locations + * @return array + */ + public function update_nav_menu_locations( $locations ) { + $default = $this->options['default_lang']; + + // Extract language and menu from locations + foreach ( $locations as $loc => $menu ) { + $infos = $this->explode_location( $loc ); + $this->options['nav_menus'][ $this->theme ][ $infos['location'] ][ $infos['lang'] ] = $menu; + if ( $this->options['default_lang'] != $infos['lang'] ) { + unset( $locations[ $loc ] ); // Remove temporary locations before database update + } + } + + update_option( 'polylang', $this->options ); + return $locations; + } + + /** + * Assign menu languages and translations based on ( temporary ) locations + * + * @since 1.1 + * + * @param array $mods theme mods + * @return unmodified $mods + */ + public function pre_update_option_theme_mods( $mods ) { + if ( current_user_can( 'edit_theme_options' ) && isset( $mods['nav_menu_locations'] ) ) { + + // Manage Locations tab in Appearance -> Menus + if ( isset( $_GET['action'] ) && 'locations' == $_GET['action'] ) { + check_admin_referer( 'save-menu-locations' ); + $this->options['nav_menus'][ $this->theme ] = array(); + } + + // Edit Menus tab in Appearance -> Menus + // Add the test of $_POST['update-nav-menu-nonce'] to avoid conflict with Vantage theme + elseif ( isset( $_POST['action'], $_POST['update-nav-menu-nonce'] ) && 'update' == $_POST['action'] ) { + check_admin_referer( 'update-nav_menu', 'update-nav-menu-nonce' ); + $this->options['nav_menus'][ $this->theme ] = array(); + } + + // Customizer + // Don't reset locations in this case. + // see http://wordpress.org/support/topic/menus-doesnt-show-and-not-saved-in-theme-settings-multilingual-site + elseif ( isset( $_POST['action'] ) && 'customize_save' == $_POST['action'] ) { + check_ajax_referer( 'save-customize_' . $GLOBALS['wp_customize']->get_stylesheet(), 'nonce' ); + } + + else { + return $mods; // No modification for nav menu locations + } + + $mods['nav_menu_locations'] = $this->update_nav_menu_locations( $mods['nav_menu_locations'] ); + } + return $mods; + } + + /** + * Fills temporary menu locations based on menus translations + * + * @since 1.2 + * + * @param bool|array $menus + * @return bool|array modified list of menu locations + */ + public function theme_mod_nav_menu_locations( $menus ) { + // Prefill locations with 0 value in case a location does not exist in $menus + $locations = get_registered_nav_menus(); + if ( is_array( $locations ) ) { + $locations = array_fill_keys( array_keys( $locations ), 0 ); + $menus = is_array( $menus ) ? array_merge( $locations , $menus ) : $locations; + } + + if ( is_array( $menus ) ) { + foreach ( $menus as $loc => $menu ) { + foreach ( $this->model->get_languages_list() as $lang ) { + if ( ! empty( $this->options['nav_menus'][ $this->theme ][ $loc ][ $lang->slug ] ) && term_exists( $this->options['nav_menus'][ $this->theme ][ $loc ][ $lang->slug ], 'nav_menu' ) ) { + $menus[ $this->combine_location( $loc, $lang ) ] = $this->options['nav_menus'][ $this->theme ][ $loc ][ $lang->slug ]; + } + } + } + } + + return $menus; + } + + /** + * Removes the nav menu term_id from the locations stored in Polylang options when a nav menu is deleted + * + * @since 1.7.3 + * + * @param int $term_id nav menu id + */ + function delete_nav_menu( $term_id ) { + if ( isset( $this->options['nav_menus'] ) ) { + foreach ( $this->options['nav_menus'] as $theme => $locations ) { + foreach ( $locations as $loc => $languages ) { + foreach ( $languages as $lang => $menu_id ) { + if ( $menu_id === $term_id ) { + unset( $this->options['nav_menus'][ $theme ][ $loc ][ $lang ] ); + } + } + } + } + + update_option( 'polylang', $this->options ); + } + } + + /** + * Filters the option nav_menu_options for auto added pages to menu + * + * @since 0.9.4 + * + * @param array $options + * @return array Modified options + */ + public function nav_menu_options( $options ) { + $options['auto_add'] = array_intersect( $options['auto_add'], $this->auto_add_menus ); + return $options; + } + + /** + * Filters _wp_auto_add_pages_to_menu by language + * + * @since 0.9.4 + * + * @param string $new_status Transition to this post status. + * @param string $old_status Previous post status. + * @param object $post Post data. + */ + public function auto_add_pages_to_menu( $new_status, $old_status, $post ) { + if ( 'publish' != $new_status || 'publish' == $old_status || 'page' != $post->post_type || ! empty( $post->post_parent ) || ! ( $lang = $this->model->post->get_language( $post->ID ) ) ) { + return; + } + + if ( ! empty( $this->options['nav_menus'][ $this->theme ] ) ) { + $this->auto_add_menus = array(); + + // Get all the menus in the page language + foreach ( $this->options['nav_menus'][ $this->theme ] as $loc ) { + if ( ! empty( $loc[ $lang->slug ] ) ) { + $this->auto_add_menus[] = $loc[ $lang->slug ]; + } + } + + add_filter( 'option_nav_menu_options', array( $this, 'nav_menu_options' ) ); + } + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/admin-static-pages.php b/pole-sbv-content/plugins/polylang/admin/admin-static-pages.php new file mode 100644 index 00000000..b45cb62d --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-static-pages.php @@ -0,0 +1,165 @@ +ID ) && empty( $post->post_content ) ) { + add_action( 'edit_form_after_title', '_wp_posts_page_notice' ); + remove_post_type_support( $post_type, 'editor' ); + } + } + } + + /** + * Add post state for translations of the front page and posts page + * + * @since 1.8 + * + * @param array $post_states + * @param object $post + * @return array + */ + public function display_post_states( $post_states, $post ) { + if ( in_array( $post->ID, $this->model->get_languages_list( array( 'fields' => 'page_on_front' ) ) ) ) { + $post_states['page_on_front'] = __( 'Front Page' ); + } + + if ( in_array( $post->ID, $this->model->get_languages_list( array( 'fields' => 'page_for_posts' ) ) ) ) { + $post_states['page_for_posts'] = __( 'Posts Page' ); + } + + return $post_states; + } + + /** + * Refresh language cache when a static front page has been translated + * + * @since 1.8 + * + * @param int $post_id Not used + * @param object $post Not used + * @param array $translations + */ + public function pll_save_post( $post_id, $post, $translations ) { + if ( in_array( $this->page_on_front, $translations ) ) { + $this->model->clean_languages_cache(); + } + } + + /** + * Checks if a page is translted in all languages + * + * @since 2.2 + * + * @param int $page_id + * @return bool + */ + protected function is_page_translated( $page_id ) { + if ( $page_id ) { + $translations = count( $this->model->post->get_translations( $page_id ) ); + $languages = count( $this->model->get_languages_list() ); + + if ( $languages > 1 && $translations != $languages ) { + return false; + } + } + + return true; + } + + /** + * Prevents choosing an untranslated static front page + * Displays an error message + * + * @since 1.6 + * + * @param int $page_id New page on front page id + * @param int $old_id Old page on front page_id + * @return int + */ + public function update_page_on_front( $page_id, $old_id ) { + if ( ! $this->is_page_translated( $page_id ) ) { + $page_id = $old_id; + add_settings_error( 'reading', 'pll_page_on_front_error', __( 'The chosen static front page must be translated in all languages.', 'polylang' ) ); + } + + return $page_id; + } + + /** + * Displays an error message in the customizer when choosing an untranslated static front page + * + * @since 2.2 + * + * @param object $validity WP_Error object + * @param int $page_id New page on front page id + * @return object + */ + public function customize_validate_page_on_front( $validity, $page_id ) { + if ( ! $this->is_page_translated( $page_id ) ) { + return new WP_Error( 'pll_page_on_front_error', __( 'The chosen static front page must be translated in all languages.', 'polylang' ) ); + } + + return $validity; + } + + /** + * Prevents WP resetting the option if the admin language filter is active for a language with no pages + * + * @since 1.9.3 + * + * @param string $value + * @param string $old_value + * @return string + */ + public function update_show_on_front( $value, $old_value ) { + if ( ! empty( $GLOBALS['pagenow'] ) && 'options-reading.php' === $GLOBALS['pagenow'] && 'posts' === $value && ! get_pages() && get_pages( array( 'lang' => '' ) ) ) { + $value = $old_value; + } + return $value; + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/admin-strings.php b/pole-sbv-content/plugins/polylang/admin/admin-strings.php new file mode 100644 index 00000000..6374ac22 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin-strings.php @@ -0,0 +1,137 @@ + array( + 'blogname' => __( 'Site Title' ), + 'blogdescription' => __( 'Tagline' ), + 'date_format' => __( 'Date Format' ), + 'time_format' => __( 'Time Format' ), + ), + 'widget_title' => __( 'Widget title', 'polylang' ), + 'widget_text' => __( 'Widget text', 'polylang' ), + ); + + // WP strings + foreach ( self::$default_strings['options'] as $option => $string ) { + self::register_string( $string, get_option( $option ), 'WordPress' ); + } + + // widgets titles + global $wp_registered_widgets; + $sidebars = wp_get_sidebars_widgets(); + foreach ( $sidebars as $sidebar => $widgets ) { + if ( 'wp_inactive_widgets' == $sidebar || empty( $widgets ) ) { + continue; + } + + foreach ( $widgets as $widget ) { + // nothing can be done if the widget is created using pre WP2.8 API :( + // there is no object, so we can't access it to get the widget options + if ( ! isset( $wp_registered_widgets[ $widget ]['callback'][0] ) || ! is_object( $wp_registered_widgets[ $widget ]['callback'][0] ) || ! method_exists( $wp_registered_widgets[ $widget ]['callback'][0], 'get_settings' ) ) { + continue; + } + + $widget_settings = $wp_registered_widgets[ $widget ]['callback'][0]->get_settings(); + $number = $wp_registered_widgets[ $widget ]['params'][0]['number']; + + // don't enable widget translation if the widget is visible in only one language or if there is no title + if ( empty( $widget_settings[ $number ]['pll_lang'] ) ) { + if ( isset( $widget_settings[ $number ]['title'] ) && $title = $widget_settings[ $number ]['title'] ) { + self::register_string( self::$default_strings['widget_title'], $title, 'Widget' ); + } + + if ( isset( $widget_settings[ $number ]['text'] ) && $text = $widget_settings[ $number ]['text'] ) { + self::register_string( self::$default_strings['widget_text'], $text, 'Widget', true ); + } + } + } + } + + /** + * Filter the list of strings registered for translation + * Mainly for use by our PLL_WPML_Compat class + * + * @since 1.0.2 + * + * @param array $strings list of strings + */ + self::$strings = apply_filters( 'pll_get_strings', self::$strings ); + return self::$strings; + } + + /** + * performs the sanitization ( before saving in DB ) of default strings translations + * + * @since 1.6 + * + * @param string $translation translation to sanitize + * @param string $name unique name for the string + * @return string + */ + static public function sanitize_string_translation( $translation, $name ) { + $translation = wp_unslash( trim( $translation ) ); + + if ( false !== ( $option = array_search( $name, self::$default_strings['options'], true ) ) ) { + $translation = sanitize_option( $option, $translation ); + } + + if ( $name == self::$default_strings['widget_title'] ) { + $translation = strip_tags( $translation ); + } + + if ( $name == self::$default_strings['widget_text'] && ! current_user_can( 'unfiltered_html' ) ) { + $translation = wp_unslash( wp_filter_post_kses( addslashes( $translation ) ) ); // wp_filter_post_kses() expects slashed + } + + return $translation; + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/admin.php b/pole-sbv-content/plugins/polylang/admin/admin.php new file mode 100644 index 00000000..ad53080b --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/admin.php @@ -0,0 +1,116 @@ + inherited, reference to Polylang options array + * model => inherited, reference to PLL_Model object + * links_model => inherited, reference to PLL_Links_Model object + * links => inherited, reference to PLL_Admin_Links object + * static_pages => inherited, reference to PLL_Admin_Static_Pages object + * filters_links => inherited, reference to PLL_Filters_Links object + * curlang => inherited, optional, current language used to filter the content (language of the post or term being edited, equal to filter_lang otherwise) + * filter_lang => inherited, optional, current status of the admin languages filter (in the admin bar) + * pref_lang => inherited, preferred language used as default when saving posts or terms + * filters => reference to PLL_Filters object + * filters_columns => reference to PLL_Admin_Filters_Columns object + * filters_post => reference to PLL_Admin_Filters_Post object + * filters_term => reference to PLL_Admin_filters_Term object + * nav_menu => reference to PLL_Admin_Nav_Menu object + * filters_media => optional, reference to PLL_Admin_Filters_Media object + * + * @since 1.2 + */ +class PLL_Admin extends PLL_Admin_Base { + public $filters, $filters_columns, $filters_post, $filters_term, $nav_menu, $sync, $filters_media; + + /** + * loads the polylang text domain + * setups filters and action needed on all admin pages and on plugins page + * + * @since 1.2 + * + * @param object $links_model + */ + public function __construct( &$links_model ) { + parent::__construct( $links_model ); + + // adds a 'settings' link in the plugins table + add_filter( 'plugin_action_links_' . POLYLANG_BASENAME, array( $this, 'plugin_action_links' ) ); + add_action( 'in_plugin_update_message-' . POLYLANG_BASENAME, array( $this, 'plugin_update_message' ), 10, 2 ); + } + + /** + * setups filters and action needed on all admin pages and on plugins page + * loads the settings pages or the filters base on the request + * + * @since 1.2 + */ + public function init() { + parent::init(); + + // setup filters for admin pages + // priority 5 to make sure filters are there before customize_register is fired + if ( $this->model->get_languages_list() ) { + add_action( 'wp_loaded', array( $this, 'add_filters' ), 5 ); + } + } + + /** + * adds a 'settings' link in the plugins table + * + * @since 0.1 + * + * @param array $links list of links associated to the plugin + * @return array modified list of links + */ + public function plugin_action_links( $links ) { + array_unshift( $links, '' . __( 'Settings', 'polylang' ) . '' ); + return $links; + } + + /** + * adds the upgrade notice in plugins table + * + * @since 1.1.6 + * + * @param array $plugin_data Not used + * @param object $r Plugin update data + */ + function plugin_update_message( $plugin_data, $r ) { + if ( isset( $r->upgrade_notice ) ) { + printf( '

%s

', esc_html( $r->upgrade_notice ) ); + } + } + + /** + * setup filters for admin pages + * + * @since 1.2 + */ + public function add_filters() { + // all these are separated just for convenience and maintainability + $classes = array( 'Filters', 'Filters_Columns', 'Filters_Post', 'Filters_Term', 'Nav_Menu', 'Sync' ); + + // don't load media filters if option is disabled or if user has no right + if ( $this->options['media_support'] && ( $obj = get_post_type_object( 'attachment' ) ) && ( current_user_can( $obj->cap->edit_posts ) || current_user_can( $obj->cap->create_posts ) ) ) { + $classes[] = 'Filters_Media'; + } + + foreach ( $classes as $class ) { + $obj = strtolower( $class ); + + /** + * Filter the class to instantiate when loding admin filters + * + * @since 1.5 + * + * @param string $class class name + */ + $class = apply_filters( 'pll_' . $obj, 'PLL_Admin_' . $class ); + $this->$obj = new $class( $this ); + } + } +} diff --git a/pole-sbv-content/plugins/polylang/admin/view-translations-media.php b/pole-sbv-content/plugins/polylang/admin/view-translations-media.php new file mode 100644 index 00000000..a9c7509a --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/view-translations-media.php @@ -0,0 +1,44 @@ + +

+ + model->get_languages_list() as $language ) { + if ( $language->term_id == $lang->term_id ) { + continue; + } + ?> + + + + + +
flag; ?>name ); ?> + model->post->get_translation( $post_id, $language ) ) && $translation_id !== $post_id ) { + printf( + '%s', + esc_attr( $language->slug ), + esc_attr( $translation_id ), + $this->links->edit_post_translation_link( $translation_id ) + ); + } + + // No translation + else { + echo $this->links->new_post_translation_link( $post_id, $language ); + } + ?> +
diff --git a/pole-sbv-content/plugins/polylang/admin/view-translations-post.php b/pole-sbv-content/plugins/polylang/admin/view-translations-post.php new file mode 100644 index 00000000..bea394db --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/view-translations-post.php @@ -0,0 +1,70 @@ + +

+ + model->get_languages_list() as $language ) { + if ( $language->term_id == $lang->term_id ) { + continue; + } + + $value = $this->model->post->get_translation( $post_ID, $language ); + if ( ! $value || $value == $post_ID ) { // $value == $post_ID happens if the post has been ( auto )saved before changing the language + $value = ''; + } + + if ( isset( $_GET['from_post'] ) ) { + $value = $this->model->post->get( (int) $_GET['from_post'], $language ); + } + + $link = $add_link = $this->links->new_post_translation_link( $post_ID, $language ); + + if ( $value ) { + $selected = get_post( $value ); + $link = $this->links->edit_post_translation_link( $value ); + } + ?> + + + + + slug ); + ?> + + + +
flag ? $language->flag : esc_html( $language->slug ); ?> + %2$s + + ', + esc_attr( $language->slug ), + /* translators: accessibility text */ + esc_html__( 'Translation', 'polylang' ), + empty( $value ) ? 0 : esc_attr( $selected->ID ), + empty( $value ) ? '' : esc_attr( $selected->post_title ), + empty( $link ) ? ' disabled="disabled"' : '', + esc_attr( $language->get_locale( 'display' ) ), + $language->is_rtl ? 'rtl' : 'ltr' + ); + ?> +
diff --git a/pole-sbv-content/plugins/polylang/admin/view-translations-term.php b/pole-sbv-content/plugins/polylang/admin/view-translations-term.php new file mode 100644 index 00000000..9e7d8459 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/admin/view-translations-term.php @@ -0,0 +1,97 @@ + + + + +

+ + + model->get_languages_list() as $language ) { + if ( $language->term_id == $lang->term_id ) { + continue; + } + + // Look for any existing translation in this language + // Take care not to propose a self link + $translation = 0; + if ( isset( $term_id ) && ( $translation_id = $this->model->term->get_translation( $term_id, $language ) ) && $translation_id != $term_id ) { + $translation = get_term( $translation_id, $taxonomy ); + } + if ( isset( $_GET['from_tag'] ) && ( $translation_id = $this->model->term->get( (int) $_GET['from_tag'], $language ) ) && ! $this->model->term->get_translation( $translation_id, $lang ) ) { + $translation = get_term( $translation_id, $taxonomy ); + } + + if ( isset( $term_id ) ) { // Do not display the add new link in add term form ( $term_id not set !!! ) + $link = $add_link = $this->links->new_term_translation_link( $term_id, $taxonomy, $post_type, $language ); + } + + if ( $translation ) { + $link = $this->links->edit_term_translation_link( $translation->term_id, $taxonomy, $post_type ); + } + ?> + + + + + + + + + +
+ flag; ?> + %2$s', + isset( $term_id ) ? '' : ' screen-reader-text', + esc_html( $language->name ) + ); + ?> + + %2$s + + ', + esc_attr( $language->slug ), + /* translators: accessibility text */ + esc_html__( 'Translation', 'polylang' ), + empty( $translation ) ? 0 : esc_attr( $translation->term_id ), + empty( $translation ) ? '' : esc_attr( $translation->name ), + empty( $disabled ) ? '' : ' disabled="disabled"', + esc_attr( $language->get_locale( 'display' ) ), + $language->is_rtl ? 'rtl' : 'ltr' + ); + ?> +
+ + + curlang ) is now equal to the language of current post or term being edited (#19) +* The sample permalink is now updated when changing the language in the Languages metabox +* Revamp the wpml-config.xml reader to use simplexml instead of our custom xml parser +* Improve support for the WPML API (including Hook API introduced in WPML 3.2) +* Add support for translation of meta titles and descriptions of custom post types and custom taxonomies in Yoast SEO +* Replace uncached functions by WPCOM VIP functions when available +* Improve compatibility with WP 4.6 +* Fix parent category wrongly assigned to post when synchronizing children categories (#21) +* Fix custom fonts not loaded when using multiple domains or subdomains +* Fix remove_accents() not working for German and Danish (#24) +* Fix incorrect static front pages urls on backend +* Fix impossible to directly enter the page number in strings translation table (introduced in 1.9.3) +* Fix conflict with WP Sweep (needs WP Sweep 1.0.8+) +* Fix potential performance issue by querying only taxonomies to show in quick edit to filter the category checklist +* Fix conflict (database error) with ReOrder-posts-within-categories plugin +* Fix languages per page option not saved + += 1.9.3 (2016-06-28) = + +* Pro: Allow to add slashes in url slugs translations +* Pro: Fix archive links not using translated slugs +* Pro: Fix visitor being redirected to 404 if his browser preference is set to an inactive language +* Fix strings translations table always back to page 1 when submitting the form (#14) +* Fix get_pages( array( 'lang' => '' ) ) not querying all the languages +* Fix switching the admin language filter can override the static front page settings (#16) + += 1.9.2 (2016-06-06) = + +* Pro: fix unreachable hierarchical custom post type posts when they are sharing slugs across languages +* Fix missing argument 3 in icl_t +* Fix conflict with WooCommerce product variations + += 1.9.1 (2016-05-23) = + +* Pro: add compatibility with Beaver Builder +* Pro: fix media wrongly created when adding a new media translation +* Add azb, ceb, de_CH_informal, es_GT, mr, nl_NL_formal to the predefined list of languages +* Fix the language switcher not linking to media translations for anonymous visitors + += 1.9 (2016-04-27) = + +* Pro: add the possibility to translate custom post types slugs, taxonomies slugs and more +* Pro: add the possibility to share the same post or term slug across languages +* Pro: add the possibility to duplicate the content when creating a new translation +* Pro: add the possibility to create all translations at once when uploading a media +* Pro: add the possibility to disable a language +* Add license and update management +* Add inline docs for all filters and actions +* When possible, the rel alternate hreflang now display only the language code (without the country code) +* When combined with flags in the language switcher, wrap the language name inside tags +* Add customizer selective refresh support for the language switcher widget ( needs WP 4.5+ ) +* Fix dynamic options of the language switcher widget not working in the customizer +* Fix possible error 404 on page shortlink when using subdomains or multiple domains +* Fix get_adjacent_post() and wp_get_archives() for untranslated post types ( needs WP 4.4+ ) +* Fix language homepage urls not present in Yoast SEO sitemap (when the homepages display posts) + += 1.8.5 (2016-04-03) = + +* Revert from $_SERVER['PHP_SELF'] to $_SERVER['SCRIPT_FILENAME'] to detect if the user is on login/register/signup page +* Fix incompatibility introduced by WP 4.5 in Edit single taxonomy term screen +* Fix existing post overriden when creating a language and a conflicting plugin sets the global $post on languages pages + += 1.8.4 (2016-03-06) = + +* Revert canonical redirection of static front page when combining plain permalinks + default language hidden in url (introduced in 1.8.2) + += 1.8.3 (2016-03-04) = + +* fix: All pages are redirected to the home page on some installations (introduced in 1.8.2) + += 1.8.2 (2016-03-02) = + +* Add support for the 'wpml_get_default_language()' function from the WPML API +* Stop blocking saving settings when errors are detected (invalid domains) +* Use publicly_queryable => true instead of public => true for the language taxonomy (WP 4.5+) +* fix: PHP notice when pll_default_language() is called before a language is created +* fix: PHP notice undefined property PLL_Language::$page_on_front +* fix: canonical redirection of static front page when combining plain permalinks + default language hidden in url +* fix: YARPP compatibility broken in v1.8 +* fix: Remove the delete link for translations of the default category (introduced back by WP 4.3) +* fix: settings not displayed with WP 4.1 or older + += 1.8.1 (2016-01-31) = + +* Update the list of Facebook locales used for Opengraph support with Yoast SEO and Jetpack +* fix: secondary query with translated post type and untranslated taxonomy mixes languages (introduced in 1.8) +* fix: issue with paged static front page when hiding the default language in url +* fix: potential issue with cache after synchronizations +* fix: trailing slash added to canonical home url outputed by Yoast SEO when using default permalinks + += 1.8 (2016-01-19) = + +* Minimum WordPress version is now 4.0 +* Add ary, bn_BD, en_ZA, es_AR, fr_CA and fr_BE to the predefined languages list +* Adopt WordPress coding standards +* New structure for translated posts and terms (=> several methods of PLL_Model are deprecated). +* Revamp the management of the static front page and page for posts +* Improve performance for navigation menus with a lot of pages +* The Polylang and WPML API are now loaded when 'plugins_loaded' is fired (on frontend only if at least one language has been defined) +* Add 'pll_get_post_translations()' and 'pll_get_term_translations()' to the API +* Add filter 'pll_cookie_expiration' to change the cookie expiration time +* Add support for 'wpml_get_language_information()' function from the WPML API +* The default language is now managed directly from the languages list table +* Various accessibility improvements +* It is now possible to choose the languages flags from the available list (custom flags on frontend still work as previously) +* Revamp the settings page (now a list table with inline configuration) +* Add an option to remove all data when uninstalling the plugin +* Add test of subdomains and domains accessibility +* Add post state for translations of the front page and posts page +* Add better support of the customizer menus introduced in WP 4.3 +* Media taxonomies (created by 3rd party plugins) are now filtered by language when editing a media +* Synchronization of taxonomies (created by 3rd party plugins) and meta are now enabled for media +* The 'hreflang' tag now refers to the locale instead of the 2-letters language code +* Workaround for WordPress locales not being W3C valid (see #33511) +* Workaround a bug in Nextgen Gallery causing redirect on album +* Add compatibility with Duplicate Post plugin to avoid duplicated post keeping the link to translations +* Add compatibility with Jetpack Related Posts +* fix: incorrect rewrite rules after changing how the language is set (need to flush rewrite rules after this) +* fix: password protected pages don't work on multiple domains +* fix: ensure that the page parent is in the correct language when using bulk edit +* fix: is_tax set on category and post tags archives when it should not +* fix: automatically added new top-level pages to menus are not filtered by language +* fix: nav menus locations are messed when changing the default language +* fix: error 404 for untranslated taxonomies pages +* fix: single posts and pages links do not include the language code when using the default permalinks and forcing the language code in url +* fix: missing trailing slash on home url when using default permalinks or a static front page +* fix: sticky visibility is copied to new translation only if the synchronization is activated +* fix: remove "» Languages » [language name]" from the feed title +* fix: spaces are not honored when searching strings translations +* fix: default language not set and terms translations not correctly imported when using WordPress Importer +* fix: the browser language detection does not differentiate 'en_US' and 'en_GB' +* fix: non alphanumeric characters query vars values lead to an infinite redirection loop on static front pages +* fix: user profile not saved for a language when the language code contains a "-" +* fix: non translated posts page always link to the static front page even when they should not +* fix: remove hreflang="x-default" when using one domain per language +* fix: deprecated function notice in WP 4.5 alpha +* fix: wrong url for attachments when media are translated and using subdomains +* fix: wrong url for unattached attachments when using subdirectories (since WP 4.4) +* fix: wrong url scheme for custom flags + += 1.7.12 (2015-11-13) = + +* The language taxonomy is now public for compatibility with WP 4.4 +* fix: nav menus locations are not correctly populated in customizer in WP 4.4 +* fix: the termmeta table was still deleted at upgrade +* fix: fatal error when using the argument 'post_id' in 'pll_the_languages()' (introduced in 1.7.11) [props EKesty](https://wordpress.org/support/topic/bug-on) +* fix: potential notice in 'pll_the_languages()' [props mattkeys](https://wordpress.org/support/topic/bug-on) + += 1.7.11 (2015-10-15) = + +* fix: conflict with GET ajax requests sent by the jquery method load +* fix: notice in frontend-nav-menu.php at line 211 (introduced in 1.7.10) [props Jesse Graupmann](https://wordpress.org/support/topic/warning-and-notice-on-upgrade) +* fix: the parent list in page attributes metabox is not in the correct language (introduced in 1.7.10) +* fix: error 404 for attachments +* fix: the language switcher is not displayed when combining "Forces link to front page" and "Hides languages with no translation" + += 1.7.10 (2015-09-28) = + +* Add Occitan translation contributed by [Cédric Valmary](http://www.totenoc.eu/) +* Add de_DE_formal, en_NZ, es_CO, hy, oci, ps and tl to the predefined languages list +* Add the filter 'pll_predefined_languages' and the actions 'pll_language_edit_form_fields' and 'pll_language_add_form_fields' +* the termmeta table (used in Polylang < 1.2) is no more deleted when uninstalling the plugin (as it will soon be included in WP) +* fix: prevent creating a media translation if one already exists +* fix: Attempt to translate the nav menus for themes registering a theme location but not using it in wp_nav_menu() +* fix: Jetpack infinite scroll +* fix: issue with terms languages when two languages have the same name +* fix: notices when deleting a tag and Lingotek is active +* fix: the languages cache is not cleaned when updating the site home url +* fix: conflict with the theme Ambition +* fix: front page canonical url displayed by Yoast SEO +* fix: typo in options definition at install [props null.bit](https://wordpress.org/support/topic/suggestions-for-two-new-filters?replies=5#post-7466159) +* fix: error when adding a term in a non-translated taxonomy + += 1.7.9 (2015-08-17) = + +* Minimum WordPress version is now v3.9 +* Add: hreflang="x-default" on front page when the default language code is not hidden in urls +* fix: remove hreflang links in html head section of paged archives to please Google +* fix: conflict with WPSEO sitemap caching when using multiple domains. [props Junaid Bhura](https://wordpress.org/support/topic/wp-seo-sitemap-and-translation-subdomain-issue?replies=8#post-7113817) +* fix: change the order of strings translations columns for better display on mobile devices in WP 4.3 +* fix: various issues with nav menus and customizer in WP 4.3 +* fix: correctly disallow unchecking both show names and show flags in the language switcher form + += 1.7.8 (2015-07-21) = + +* fix: conflict with PHP < 5.4 introduced in 1.7.7 + += 1.7.7 (2015-07-20) = + +* Add Romanian translation contributed by uskro +* Add Japanese translation contributed by [Eiko Toda](http://www.eikotoda.com) +* Update French translation contributed by [fxbenard](http://fxbenard.com/) +* The language locale is now validated with the same pattern as in WP 4.3. See #28303 +* fix: make sure that the language switcher never finds translations for untranslated post types (could occur when the post type was previously translated) +* fix: display the default category according to the admin language filter in settings->writing +* fix: flushing rewrite rules at network activation and de-activation is back. [props RavanH](https://polylang.wordpress.com/2015/06/10/polylang-1-7-6-and-multisite/comment-page-1/#comment-1138) +* fix: avoid a conflict with WP Super Cache preloading (loading 'polylang_mo' posts which are 404). [props ecdltf](https://wordpress.org/support/topic/polylang_mo-and-404s-take-2) +* fix: customizer menus issues introduced by changes in WP 4.1 +* fix: strings translations are not saved when pressing enter +* fix: it is not possible to de-activate the translation for custom post types and taxonomies from wpml-config.xml +* fix: conflict whith plugins using stringified json in ajax requests + += 1.7.6 (2015-06-10) = + +* Add Galician translation contributed by [Toño Calo](http://fedellar.wordpress.com/) +* fix: incorrect post type archive link for untranslated post types +* fix: notices in wp-import.php +* fix: avoid flushing rewrite rules at network activation and de-activation +* fix: the note below the category list table displays the default category according to the admin language filter +* fix: wrong future posts permalinks +* fix: deleting a media translation deletes the file too +* fix: when using persistent object cache, get_terms is not always filtered by the correct language on admin side +* fix: it is possible to create two categories having the same translation +* fix: fatal error when using the dropdown language switcher in WP < 4.1 + += 1.7.5 (2015-05-11) = + +* Add 'pll_languages_list' filter +* fix: warning when a plugin calls 'icl_object_id' with an untranslated post type (seen in ACF 4.4.1) +* fix: the language is not correctly set from the url when using PATHINFO permalinks (introduced in 1.6!) +* fix: notice when a search is filtered by a taxonomy term in a different language + += 1.7.4 (2015-05-03) = + +* fix: translated taxonomies and post types from wpml-config.xml are not filtered on frontend (introduced in 1.7.2) +* fix: WPML strings translations not always loaded (introduced in 1.7) +* fix: $.ajaxPrefilter() may not work as expected [props ScreenfeedFr](https://wordpress.org/support/topic/ajaxprefilter-may-not-work-as-expected) +* fix: can't hide the language code for the default language when using subdomains +* fix: incorrect static front page url when hiding the default language information +* fix: an untranslated posts page may display posts in all languages +* fix: javascript error when changing the language of a hierarchical post type from the languages metabox in WP 4.2 +* fix: subdomains urls are malformed when the main site uses www. +* fix: suggest tags are not filtered in quick edit +* fix: parent page dropdown list not filtered in quick edit + += 1.7.3 (2015-04-11) = + +* the transient 'pll_languages_list' now stores an array of arrays instead of an array of PLL_Language objects +* fix: fatal error for users hosted at GoDaddy (due to PLL_Language objects stored in a transient) +* fix: additional query vars are removed from home page +* fix: categories are not filtered by the admin language switcher in posts list table (introduced in 1.7) +* fix: when using multiple domains, the domain url is lost when modifying the language slug +* fix: the queried object is incorrectly set for author archives (introduced in 1.6.5) +* fix: notice when a nav menu assigned to a translated nav menu location has been deleted +* fix: no canonical redirection when using pretty permalinks and querying default permalinks + += 1.7.2 (2015-03-23) = + +* fix: comments are filtered for posts in a post type not managed by Polylang +* fix: translated static front page don't work when setting PLL_CACHE_HOME_URL to false (introduced in 1.7) +* fix: the query for taxonomies on custom post types is broken (when adding the language code to the url) + += 1.7.1 (2015-03-20) = + +* fix: wrong redirection when using a static front page and replacing the page name by the language code (introduced in 1.7) + += 1.7 (2015-03-19) = + +* Minimum WordPress version is now v3.8 +* Add new languages to the predefined languages list: Swiss German, Hazaragi +* Add compatibility with nested tax queries introduced in WP 4.1 +* Add compatibility with splitting shared terms to be introduced in WP 4.2 +* Add the possibility to change the domain in the default language when using multiple domains (avoids a conflict with the domain mapping plugin) +* Add the possibility to set the language from the code in url when using default permalinks +* Adding the language code in url is now default at first activation (should improve the out of the box compatibility with other plugins and themes) +* Add new language switcher option to hide a language with no translation +* pll_the_languages() now outputs the js code to handle language change in dropdown list (as done by the widget) +* Improve performance by using base64 encoded flags + various slight optimizations +* Improve protection against chained redirects +* The find posts list is now filtered per media language when clicking on attach link in Media library +* Copy alternative text when creating a media translation +* The category checklist in quick edit is now filtered per post language instead of admin language filter +* Quick and bulk language edit don't break translations anymore if the new language is free +* Make it impossible to change the language of the default categories +* Make sure that a default category defined in settings->writing is translated in all languages +* Tweak css for mobiles in add and edit term form +* Tweak the query getting the list of available posts in the autocomplete input field in the post languages metabox +* fix: after adding a term translation, need to refresh the page before adding a new term +* fix: term translations rows are not modified in list table when a term is added / deleted or inline edited +* fix: post translations rows are not modified in list table when a post is inline edited +* fix: using brackets in language name breaks strings translations +* fix: quick edit may conflict with other plugins +* fix: impossible to use several dropdown languages widgets +* fix: pll_the_languages() may display a dropdown with empty options +* fix: the categories widget does not work correctly with dropdown +* fix: autosave post always created after manual save +* fix: tax query not filtered by language when using 'NOT IN' operator on a translated taxonomy +* fix: incorrect translation url for searches filtered by taxonomy +* fix: backward incompatibility for edited_term_taxonomy action introduced in WP 4.2 +* fix: the home link may be incorrect on MS Windows +* fix: tags in wrong language may be assigned when bulk editing posts in several languages +* fix: tags created when bulk editing posts are not assigned any language +* fix: Illegal string offset 'taxonomy' introduced in v1.6.5 +* fix: Undefined property: WP_Query::$queried_object_id when calling pll_the_languages(array('raw' => 1)) in a function hooked to 'wp'. props [KLicheR](https://wordpress.org/support/profile/klicher) +* fix: Notice in admin.php when used with MailPoet plugin + += 1.6.5 (2015-02-18) = + +* Add new correspondances between WordPress locales and Facebook locales (for WPSEO and Jetpack users) +* fix: quick draft posts are always assigned the default category in the default language +* fix: Notice: Undefined offset: 0 in wp-includes/query.php introduced in WP 4.1 +* fix: is_tax and is_archive are not correctly set when a custom taxonomy term is queried +* fix: conflict introduced by WPSEO 1.7.2+ + += 1.6.4 (2015-02-01) = + +* Add es_MX to predefined languages list +* Add compatibility with WordPress SEO sitemaps for multiple domains and subdomains +* fix: a new post is assigned the wrong (untranslated) default category if no category is assigned by the user +* fix: the home links now have the right scheme even if PLL_CACHE_HOME_URL is not set to false +* fix: fatal error when using old versions of WPSEO (I should do what I tell other to do!) +* fix: strings translations are not switched when using switch_to_blog + += 1.6.3 (2015-01-09) = + +* Add Georgian translation contributed by [Tours in Georgia](http://www.georgia-tours.eu/) +* fix: WXR export does not include the language of untranslated terms (will now work only for newly saved terms) +* fix: better cleaning of DB when translated objects are deleted +* fix: incorrect (ajax) translations links when modifying a term language +* fix: warning: Illegal string offset 'taxonomy' introduced by the combination of WP 4.1 and some plugins. + += 1.6.2 (2014-12-14) = + +* fix: bugs and inconsistencies compared to WPML in 'icl_get_languages' (should fix a conflict with Avada) +* fix: https issue +* fix: stop displaying an error when adding en_US as new language (translation not downloaded) +* fix: infinite redirect loop on (unattached) attachment links +* fix: impossible to add tags in post quick edit (introduced in 1.5) +* fix: the customizer does not land to the right page when cumulating: static front page + page name in url + default language code not hidden +* fix: read parent theme wpml-config.xml before child theme +* fix: add protection to avoid empty language +* fix: page preview link again + += 1.6.1 (2014-11-19) = + +* Add Brazilian Portuguese translation contributed by [Henrique Vianna](http://henriquevianna.com/) +* Improve compatibility with Types: allow custom fields to be populated when creating a new translation +* Make it impossible to remove the translations of the default category +* Fix: possibility to add a path when using multiple domains (same path for all languages) broken since v1.5.6 +* Fix: preview link for non default language when using multiple domains +* Fix: error displayed when setting the static front page and only one language has been defined +* Fix: revert changes on rewrite rules with front introduced in 1.6 +* Fix: conflict with WordPress SEO when no language has been created + += 1.6 (2014-10-27) = + +* Add Croatian translation contributed by Bajro +* Add new languages to predefined languages list: Azerbaijani, English (Australia), English (UK), Basque +* Add flag in front of the language select dropdown for posts and terms +* Add widget text translation +* Add opengraph support for locale and translations when WordPress SEO or Jetpack are activated +* Add error message if attempting to assign an untranslated page as static front page +* Add 'pll_sanitize_string_translation' filter to sanitize registered strings translations when saved +* Fix: change the en_US flag to US flag. The UK flag is now associated to en_GB +* Fix: change Belarussian locale from be_BY to bel to in agreement with translate.wordpress.org +* Fix home pages duplicate urls when using domains or subdomains +* Fix rewrite rules with front +* Fix: terms are always in default language when created from post bulk edit + += 1.5.6 (2014-10-11) = + +* Fix: the admin language filter is not active for paginated taxonomy in nav menu admin panel +* Fix: wrong redirection if a domain is a substring of another domain (ex: mysite.com and mysite.co) +* Fix: impossible to translate numeric values in options defined in wpml-config.xml +* Fix: call to undefined method PLL_Links::get_translation_url() with Avada theme +* Fix: manage_{$this->screen->taxonomy}_custom_icolumn is a filter and not an action + += 1.5.5 (2014-09-10) = + +* Fix: missing argument 4 in icl_translate +* Fix: conflict with Vantage theme +* Fix: possible issue with cookie domain on 'localhost' +* Fix: filtering string translations does not work when the group name contains a space +* Fix: Possible 404 error for attachments +* Fix: PHP notice when a shared term is not translated in all taxonomies + += 1.5.4 (2014-08-13) = + +* Add new API functions: pll_get_post_language, pll_get_term_language, pll_translate_string +* Add better compatibility with Jetpack 3 +* Fix: attachments don't get any language when uploaded from frontend +* Fix: authors cannot create tags +* Fix: too restrictive capability checks for some edge cases +* Fix: conflict with WPSEO: taxonomy metas cannot be saved + += 1.5.3 (2014-07-12) = + +* Add: Capability check before creating links in post list table +* Add: Possibility not to cache languages objects with option PLL_CACHE_LANGUAGES (for GoDaddy users) +* Fix: Saving a header or a background in menu Appearance resets nav menus locations (introduced in 1.5) +* Fix: sub-sub-options and deeper levels defined in wpml-config.xml are not translated +* Fix: Fatal error when creating a new site when Polylang is network activated (introduced in v1.5.1) +* Fix: Admin language forced to English when activating Polylang (before creating any new language) +* Fix: 'pll_count_posts' second parameter not taken into account +* Fix: 'edit-post' and 'create-posts' capabilities are not differentiated when saving a post + += 1.5.2 (2014-06-24) = + +* Fix: Revert post translations terms cleaning introduced in 1.5 as it seems to cause problems +* Fix: Impossible to delete a biographical info (introduced in 1.5) +* Fix: Security issue reported by [Gregory Viguier](http://www.screenfeed.fr/) + += 1.5.1 (2014-06-19) = + +* Add: filter 'pll_settings_tabs' and action 'pll_settings_active_tab_{$tab}' +* Add: possibility to add a path when using multiple domains (same path for all languages) +* Fix: Bad redirection if /language/ is added to urls (introduced in 1.5) +* Fix: Nav menu locations are not saved in customizer (introduced in 1.4) +* Fix: Unable to unset nav menu locations +* Fix: Incorrect link for date archives in language switcher (introduced in 1.5) +* Fix: Fatal error when using featured content in Twenty Fourteen +* Fix: Posts bulk edit broken (introduced in 1.5) +* Fix: Polylang does not play nice with switch_to_blog +* Fix: Warning: reset() expects parameter 1 to be array, null given in admin-filters-columns.php on line 81 + += 1.5 (2014-05-29) = + +* Add Ukrainian translation contributed by [http://getvoip.com/](http://getvoip.com/) +* Refresh translation metaboxes (again): now translated posts are chosen from an autocomplete input field +* Categories and post tags translations are also chosen in an automplete input field +* Better error management on languages pages +* Use Dashicons instead of Icomoon icons for WP 3.8+ +* Check if translated post is readable by the current user before displaying the language switcher +* Minimum Twenty Fourteen version is now 1.1 +* Code cleaning +* Add support for Quick draft introduced in WP 3.8 +* Add support for object cache plugins for recent posts and recent comments widgets +* Add support for pages with modified query in the language switcher (ex: when multiple post types queried on the same page) +* Add new API functions: pll_languages_list, pll_set_post_language, pll_set_term_language, pll_save_post_translations, pll_save_term_translations, pll_count_posts +* Add new filter pll_the_languages_args +* Add support for ICL_LANGUAGE_CODE == 'all' on admin side +* Fix: Galician flag +* Fix: static page on front pagination is broken +* Fix: search url may be broken +* Fix: PHP notice in icl_get_languages +* Fix: more robust way of detecting language in url when using directory +* Fix: delete translations terms orphans in database +* Fix: inconsistent behavior when setting page on front from customizer +* Fix: deleting a category assigns posts to wrong default category +* Fix: quick edit breaks synchronization +* Fix: some security issues + += 1.4.5 (2014-04-19) = + +* Fix: Notice when combined with WPSEO 1.5+ +* Fix: Impossible to disable a widget language filter once set (introduced in 1.4.4) +* Fix: Unexpected redirection of the homepage with language code when permalink structure has no trailing slash (introduced in 1.4.4) +* Fix: Some installs lead to wrong redirection when using domains (introduced in 1.4.4) +* Fix: Possible infinite redirection while previewing posts (introduced in 1.4.4) +* Fix: Uploaded medias don't get a language since WP 3.9 +* Fix: Compatibility with Twenty Fourteen Ephemera widget in the version shipped with WP 3.9 + += 1.4.4 (2014-04-09) = + +* Add: Compatibility with widgets customizer introduced in WP 3.9 +* Fix: No post in translation dropdown after switching the language in edit post (introduced in 1.4.3) +* Fix: No canonical redirection when there is no language code in url and the language code is not hidden for the default language +* Fix: Suppress language cookie when using multiple domains + += 1.4.3 (2014-03-22) = + +* Add: Serbian translation contributed by Sinisa +* Add: Myanmar translation contributed by Sithu Thwin +* Fix: comment form redirects to wp-admin when using multiple domains or subdomains. +* Fix: fatal error with old versions of PHP (tested on PHP 5.2.4) +* Fix: Bad gateway experienced by users hosted by wpengine.com +* Fix: links got from tiny MCE link button are filtered with admin language filter instead of current post language +* Fix: possibly wrong redirection in check_language_code_in_url when using multiple domains or subdomains + += 1.4.2 (2014-02-24) = + +* Add: check multiple post types in PLL_Model::count_posts +* Fix: error 404 on category links when setting the language by content (introduced in 1.4.1) +* Fix: PHP notices in frontend-nav-menu.php with Artisteer themes +* Fix: decrease the memory usage of untranslated posts list +* Fix: home page not correctly redirected to canonical when using page on front and page name is kept in url + += 1.4.1 (2014-02-16) = + +* Add: Czech translation contributed by [Přemysl Karbula](http://www.premyslkarbula.cz) +* Fix: the displayed language is not correct in quick edit for categories and post tags +* Fix: the language switcher does not display the correct link for translated parent categories if only children have posts +* Fix: 3rd parameter of icl_object_id is not optional +* Fix: issue when combining multiple domains and browser detection -> the combination is now forbidden +* Fix: conflict Shiba Media Library: link between media translations is lost when using media quick edit +* Fix: notice when using taxonomies in wpml-config.xml +* Fix: incorrect post format link +* Fix: Twenty Fourteen Ephemera widget strings are not translated + += 1.4 (2014-01-22) = + +* Add Traditionial Chinese translation contributed by [香腸](http://sofree.cc/) +* Minimum WordPress version is now v3.5 +* Refresh translations metaboxes: now translated posts are chosen in a dropdown list +* Check if translated archives for category, tag and post format are empty before displaying the language switcher +* Add specific management of translated featured tag in Twenty Fourteen +* Add the possibility not to cache homepage urls with option PLL_CACHE_HOME_URL (for users having several domains). +* The function get_pages is now filtered by language +* Ajax requests on frontend are now automatically detected. It is no more necessary to set 'pll_load_front' :) +* Various performance improvements +* 'pll_get_post_types' and 'pll_get_taxonomies' filters must be added *before* 'after_setup_theme' is fired +* Pre 1.2 data will be removed from DB at first upgrade at least 60 days after upgrade to 1.4 +* Removed some duplicate code between admin and frontend +* Bug correction: incorrect pagination when using domains or subdomains +* Bug correction: post format link not translated +* Bug correction: impossible to use child terms with same name in hierarchical taxonomies +* Bug correction: the terms list table is filtered according to new translation language instead of admin language filter + += 1.3.1 (2013-12-13) = + +* Bug correction: fatal error on settings page if a static front page without language is set +* Bug correction: wrong home url when using different domains per language + += 1.3 (2013-12-11) = + +* Refresh admin UI for better look in WP 3.8 and more dynamic comportment +* The "Detect browser language" option does now also controls returning visits (based on cookie). +* Improved performance by optimizing some queries for WP 3.5+ +* The user biography in default language is now stored in default WordPress usermeta +* Add language parameter in API function pll_home_url and allow to call it on admin side +* Calling 'get_terms' with the 'lang' parameter now uses a cache object per language +* Bug correction: conflict with unstranslated taxonomies +* Bug correction: possible malformed translation archive url in language switcher +* Bug correction: a wrong language may be displayed in quick edit dropdown +* Bug correction: it is possible to add multiple translations (in the same language) for a single taxonomy term +* Bug correction: non public post types and taxonomies are visible in Polylang settings +* Bug correction: the language is always chosen from cookie (or browser preferences) in some installations +* Bug correction: Firefox language preference is not recognized when comparison is made on locale (instead of ISO 639-1 language code) +* Bug correction: incorrect tax_query in PLL_Auto_Translate + += 1.2.4 (2013-11-28) = + +* Better support for theme customizer +* Bug correction: admin bar search does not filter by language +* Bug correction: possible conflict on secondary query when querying taxonomies or single page +* Bug correction: post type is not included in url when editing or adding a term translation +* Bug correction: various warnings and PHP notices + += 1.2.3 (2013-11-17) = + +* Avoid fatal error when ugrading with Nextgen Gallery active +* Bug correction: menus locations of non default language are lost at theme deactivation +* Bug correction: impossible to set menus locations of non default language in some specific cases +* Bug correction: bbpress admin is broken + += 1.2.2 (2013-11-14) = + +* Updated Polish translation thanks to [Bartosz](http://www.dfactory.eu/) +* Delay strings translations upgrade from 'wp_loaded' to 'admin_init' to avoid fatal error when wp-ecommerce is active +* Remove Jetpack infinite scroll compatibility code as it seems useless with new Polylang 1.2 code structure +* Bug correction: fatal error when doing ajax on frontend +* Bug correction: ICL_LANGUAGE_CODE incorrectly defined when doing ajax on frontend +* Bug correction: ['current_lang'] and ['no-translation'] indexes disappeared from pll_the_languages raw output +* Bug correction: invalid argument supplied for foreach() in /polylang/include/mo.php on line 57 +* Bug correction: cookie may not be correctly set +* Bug correction: languages columns may not be displayed in custom post types and custom taxonomies tables + += 1.2.1 (2013-11-11) = + +* Update badly encoded Latvian translation +* Suppress one query in PLL_WPML_Config when not in multisite +* Bug correction: strings translations are not correctly upgraded +* Bug correction: nav menus locations are not correctly upgraded for non default language + += 1.2 (2013-11-10) = + +This version does include important changes in database. More than ever, make a database backup before upgrading + +* Add Arabic translation contributed by [Anas Sulaiman](http://ahs.pw/) +* Major rewrite with new structure +* Change the language and translations model from meta to taxonomy (no extra termmeta table created anymore) +* Move the strings translations from option to a custom post type +* Add support for language code in subdomain and for one different domain per language (experimental) +* Add support of WordPress Importer plugin. Export must have been done with Polylang 1.2+ (experimental) +* Add support for theme navigation customizer (was de-activated by Polylang since WP 3.4) +* Request confirmation for deleting a language +* Better management of default category for each language +* Now check if date and post type archives are translated before displaying the language switcher +* Update management of the 'copy' action of the custom fields section in wpml-config.xml +* Add support for ICL_LANGUAGE_CODE and ICL_LANGUAGE_NAME of the WPML API on admin side +* Add support of WPSEO custom strings translations when the language is set from content +* Modify admin language filter for valid html and better visibility +* Synchronization is now disabled by default (due to too much conflicts / questions on the forum) +* Include rel="alternate" hreflang="x" selflink per google recommendation +* Improve inline documentation +* Bug correction: wrong datatype for second argument in polylang/include/auto-translate.php (introduced in 1.1.6) +* Bug correction: same id is used for all language items in menu +* Bug correction: wpml-config.xml file not loaded for sitewide active plugins on network installations +* Bug correction: page parent dropdown list (in page attributes metabox) not correctly displayed when switching from a language with empty list + += 1.1.6 (2013-10-13) = + +* Add the possibility to display the upgrade notice on plugins page +* Bug correction: Illegal string offset 'taxonomy' in polylang/include/auto-translate.php +* Bug correction: user defined strings translations are not loaded on admin side +* Bug correction: untranslated post types are auto translated +* Bug correction: tags are not added to post when the name exists in several languages and they are not translations of each other + += 1.1.5 (2013-09-15) = + +* Add compatibility with Aqua Resizer (often used in porfolio themes) +* Add support of 'icl_get_default_language' function from the WPML API +* Remove the 3 characters limitation for the language code +* Change default names for zh_CN, zh_HK, zh_TW +* Bug correction: urls are modified in search forms + += 1.1.4 (2013-08-16) = + +* Add simplified Chinese language contributed by [Changmeng Hu](http://www.wpdaxue.com) +* Add Indonesian language contributed by [ajoull](http://www.ajoull.com/) +* Bug correction: nav menu locations are lost when using the admin language filter +* Bug correction: the cookie is not set when adding the language code to all urls (introduced in 1.1.3) + += 1.1.3 (2013-07-21) = + +* Add Venetian language contributed by Michele Brunelli +* Bug correction: wrong rewrite rules for non translated custom post type archives +* Bug correction: 'post_id' parameter of pll_the_languages does not work +* Bug correction: warning in wp_nav_menu_objects with Artisteer generated themes +* Bug correction: warning when used together with theme my login plugin +* Bug correction: language slug is modified and translations are lost when creating a nav menu with the same name as a language + += 1.1.2 (2013-06-18) = + +* Posts and terms now inherit parent's language if created outside the standard WordPress ui +* Improve the compatibility with the plugins Types and The Events Calendar, and again with WordPress SEO +* Improve performance +* Improve html validation +* Add 'raw' argument to 'pll_the_languages' +* Add the filter 'pll_translation_url' +* Bug correction: no language is set for a (translated custom taxonomy) term when added from a (non tranlated) custom post type edit page +* Bug correction: warning if 'get_terms' is called with a non-array 'include' argument (introduced in 1.1.1) +* Bug correction: warning if the menu language switcher has nothing to display + += 1.1.1 (2013-05-20) = + +* Move nav menu language switcher split from 'wp_nav_menu_objects' to 'wp_get_nav_menu_items' filter +* Add the filter 'pll_redirect_home' +* Automatically translate ids in 'include' argument of 'get_terms' (useful for the menus in the Suffusion theme) +* Add compatibility with Jetpack infinite scroll +* Bug correction: rtl text direction not set when adding the language code to all urls (introduced in 1.1) +* Bug correction: hide again navigation panel in theme customizer as it still doesn't work +* Bug correction: is_home not set on translated page when searching an empty string +* Bug correction: fatal error when creating a post or term from frontend (introduced in 1.1) +* Bug correction: attachments may load a wrong language when media translation was enabled then disabled +* Bug correction: warning when querying posts before the action 'wp_loaded' has been fired (in auto-translate.php) +* Bug correction: potential issue if other plugins use the filter 'get_nav_menu' +* Bug correction: interference between language inline edit and search in admin list tables +* Bug correction: auto-translate breaks queries tax_query when the 'field' is set to 'id' +* Bug correction: search is not filtered by language for default permalinks (introduced in 1.1) +* Tests done with WP 3.6 beta 3 and Twenty thirteen + += 1.1 (2013-05-10) = + +* When adding the language to all urls, the language is now defined in (plugins_loaded, 1) for better compatibility with some plugins (WordPress SEO) +* When querying posts and terms, ids are now automatically translated +* Add the possibility to group string translations +* Add the possibility to delete strings registered with 'icl_register_string' +* Move the option 'polylang_widgets' in general polylang options +* Better integration of the multilingual nav menus (everything is now integrated in the menus page of WordPress +* The language switcher is now a menu item which can be placed everywhere in a nav menu +* Posts or terms created from frontend are now assigned the current language (or another one if specified in the variable 'lang') +* Bug correction: continents-cities-xx_XX.mo not downloaded +* Bug correction: a gzipped 404 page is downloaded when a mo file does not exist on WordPress languages files repository +* Bug correction: post_date_gmt not synchronized together with post_date +* Tests done with WP 3.6 beta 2 and Twenty thirteen + += 1.0.4 (2013-04-08) = + +* Add Estonian translation contributed by [Ahto Naris](http://profiles.wordpress.org/ahtonaris/) +* Now compatible with languages files stored in wp-content/languages/themes +* Bug correction: page preview does not work when adding the language code to all urls +* Bug correction: error when a post type or taxonomy label is not a string +* Bug correction: admin text section of wpml-config.xml (introduced in 1.0.3) +* Bug correction: infinite redirect loop when querying an unattached media and the language code is added to all urls +* Bug correction: the text direction is not set from Polylang options when the language code is added to all urls +* Bug correction: get_adjacent_post is filtered by language even for post types without language +* Bug correction: the home url is not not in the correct language in wp-login.php +* Bug correction: the language is not correctly set when using date and name permalinks (introduced in 1.0.3) + += 1.0.3 (2013-03-17) = + +* Add Catalan translation contributed by [Núria Martínez Berenguer](http://nuriamb.capa.webfactional.com) +* Add Ukrainian translation contributed by [cmd soft](http://www.cmd-soft.com/) +* Improve compatibility with WordPress SEO (sitemap for categories and tags) +* A query is no more filtered by language when setting the parameter 'lang' to an empty value +* Add the possibility to create a custom wpml-config.xml file in wp-content/polylang/ +* Bug correction: custom menus are not displayed on search page (introduced in 1.0.2) +* Bug correction: sql error when filtering terms by language (introduced in 1.0.2) +* Bug correction: SSL doesn't work properly +* Bug correction: php notice on IIS servers +* Bug correction: clicking on the radio buttons in the admin language switcher does not work in Chrome +* Bug correction: on multisite, the signup page is redirected to the home page +* Bug correction: date archives are not correctly filtered for the default language when hiding the language code and using date and name permalinks +* Bug correction: only one wpml-config.xml file is parsed + += 1.0.2 (2013-02-26) = + +* 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) + += 1.0.1 (2013-01-28) = + +* Add Swedish translation contributed by [matsii](http://wordpress.org/support/profile/matsii) +* Add 2 new API functions : 'pll_is_translated_post_type' and 'pll_is_translated_taxonomy' +* Bug correction: when using a static front page, the posts page is not filtered by language (introduced in 1.0) +* Bug correction: disable translation for hard coded menu as it creates more problems than it solves (introduced in 1.0) + += 1.0 (2013-01-24) = + +* Add Hungarian translation contributed by Csaba Erdei +* Add Norwegian translation contributed by [Tom Boersma](http://www.oransje.com/) +* Add Slovak translation contributed by [Branco (WebHostingGeeks.com)](http://webhostinggeeks.com/user-reviews/) +* Code cleaning -> remove compatibility with versions older than 0.8 +* Add search in the string translations list table +* Add options to better control the synchronization of various metas for posts +* It is now possible to synchronize sticky posts and publication dates +* Add option to disable the multilingual support of media +* Add options to better control the multilingual capability of custom post types and taxonomies +* Better integration with new media management in WP 3.5 +* Improve menu translation for themes which register a theme location but don't use it in wp_nav_menu (hard coded menu) +* Add the pll_preferred_language filter allowing plugins to modify the language set by browser preferences detection +* Add support of the WPML config file +* Add support of 'icl_get_languages' and 'icl_link_to_element' functions from the WPML API +* Add compatibility with YARPP and improve compatibility with WordPress SEO +* Change cookie name which conflicts with Quick cache and allow users to overwrite it by defining the constant PLL_COOKIE +* Bug correction: again the canonical redirection +* Bug correction: the languages are not correctly displayed after they have been modified using quick edit +* Bug correction: undefined index notice when saving strings translation when the admin language filter is active +* Bug correction: rewrite rules are not correctly flushed when adding / deleting a language (introduced in 0.9.2) +* Bug correction: the list of pages is displayed when a static font page translation is not translated (now replaced by the list of posts) +* Bug correction: permalinks are not modified when doing cron and the language code is added to all urls +* Bug correction: creating a new term with the same name as a language may modify the language code (slug) + += 0.9.8 (2012-12-05) = + +* Bug correction: ajax on frontend does not work when adding the language code to all urls +* Bug correction: search forms using the get_search_form filter do not work + += 0.9.7 (2012-12-04) = + +* Bug correction: the admin language filter does filter non translatable post types +* Bug correction: again the canonical redirection +* Bug correction: fatal error when Polylang is used together with 'Author Avatars List' +* Bug correction: widget titles uselessly appear in the strings translations table when the widget is set for only one language +* Tests done with WordPress 3.5 RC3 and Twenty Twelve + += 0.9.6 (2012-11-26) = + +* It is now possible to query the terms by language using the WordPress function 'get_terms' +* Bug correction: search for empty string in default language displays posts in all languages when hiding the URL language information for default language +* Bug correction: completely reworked the canonical redirection introduced in 0.9.5 which created more problems than it solved +* Bug correction: ajax for media translations does not work +* Started tests with WordPress 3.5 RC1 and Twenty Twelve + += 0.9.5 (2012-11-13) = + +* The user can now choose the number of languages and strings translations to display +* Add compatibility with the 'icl_object_id' function and ICL_LANGUAGE_CODE and ICL_LANGUAGE_NAME constants from the WPML API +* Add 17 languages to the predefined list (automatic download and update of language files won't work) +* Bug correction: post preview does not work when adding the language code to all urls +* Bug correction: redirect to front page in default language when posting a comment on static front page +* Bug correction: impossible to create terms with the same name in different languages +* Bug correction: query string added by other plugins is erased when adding the language code to all urls +* Bug correction: redirect erase 'POST' variables on homepage when adding the language code to all urls +* Bug correction: English (en_US) loads rtl style when using a localized WordPress package with an rtl language +* Bug correction: on some installation strings translations do not work with some special characters +* Bug correction: incoming links are not redirected to canonical url when adding the language code to all urls and hiding the code for the default language +* Bug correction: search form does not work in non default language when using permalinks without trailing slash + += 0.9.4 (2012-10-23) = + +* Add Afrikaans translation contributed by [Kobus Joubert](http://translate3d.com/) +* Add Belarusian translation contributed by [Alexander Markevitch](http://fourfeathers.by/) +* Add Afrikaans (af) and Belarusian (be_BY) to predefined languages list (automatic download and update of language files won't work) +* Add the possibility to translate the date format and time format +* Add compatibility with the 'icl_get_home_url' function from the WPML API +* Bug correction: still some issues with string translations +* Bug correction: search is not filtered by the (default) language when the language is set by content and the language code is hidden for the default language +* Bug correction: posts & pages preview urls are broken when adding the language code to all urls +* Bug correction: automatically added new top-level pages to menus are not filtered by language +* Bug correction: the admin language filter messes the categories languages when editing a post and the parent dropdown list when editing a category +* Bug correction: search form does not work when using a static front page (introduced in 0.9.2) +* Bug correction: can't set languages for categories and post tags on blogs created after polylang has been activated at network level +* Bug correction: menus don't work with catch box theme ('has_nav_menu' not correctly filtered) + += 0.9.3 (2012-10-08) = + +* Add Bulgarian translation contributed by [pavelsof](http://wordpress.org/support/profile/pavelsof) +* Add compatibility with WPML API for strings translations +* Bug correction: dates are not translated (introduced in 0.9.2) +* Bug correction: the language is lost when keeping - No change - for language in bulk edit +* Bug correction: categories and tags are duplicate (when default language is set automatically to existing content and categories and tags share the same name) + += 0.9.2 (2012-09-30) = + +* Support new WordPress (WP 3.5+) convention for js and css files naming +* Improve performance, mainly on frontend +* Bug correction: the category language is not set when creating it in the post editor (introduced in 0.9) +* Bug correction: unable to add a query string when using a static front page +* Bug correction: ajax tag suggestion in "edit post" conflicts with the admin content language filter +* Bug correction: ugly notices when trying to access a static front page which has not been translated +* Bug correction: the language code is added to custom post types and taxonomies permalinks even if they are not translatable +* Bug correction: some arrays in wp_locale mix English and other language +* Bug correction: the media language is not correctly set when uploading from post if the post has not been saved after choosing the language + += 0.9.1 (2012-09-20) = + +* Add Finnish translation contributed by [Jani Alha](http://www.wysiwyg.fi) +* 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 = 1 + hide_default = 0 + += 0.9 (2012-09-12) = + +* Add Turkish translation contributed by [darchws](http://darch.ws/) +* Add media translation support +* Add a persistant content language filter on admin side (WP 3.2+ required) +* Add biographical info translation +* Add multiline support for string translations +* Add the possibility to clean the strings translation database +* Add quick edit and bulk edit support for posts and pages +* Add quick edit support for categories and tags +* The language is now loaded with 'setup_theme' action instead of 'wp' action when always adding language information url +* Search form now does use javascript only for searchform.php when pretty permalinks are not used +* Add the option PLL_SEARCH_FORM_JS to disable the js code used to modify the search form +* Suppress the option PLL_SYNC, replaced by an option in the language settings ui +* Suppress the PLL_DISPLAY_ALL option +* Suppress the template tag 'the_languages' (replaced by 'pll_the_languages' since v0.5) +* Suppress the function 'pll_is_front_page' (useless since 0.8.2) +* Bug correction: the browser language is sometimes not correctly detected by Android +* Bug correction: the rtl text direction is not correct when editing an existing language +* Bug correction: rss feed does not work if translated site title or tagline contains special characters +* Bug correction: post types and taxonomies labels are not translated on frontend +* Bug correction: the filter 'pll_copy_post_metas' does not work for metas with multiple values +* Bug correction: translations table for post and terms are uselessly serialized two times +* Bug correction: attempt to suppress conflict with themes which hardcode the name of nav menus (but do define a theme location) +* Bug correction: homepage displays all posts when the front page displays a static page and no page is selected for front page (but one is selected for posts page) +* Bug correction: widgets disappear when Polylang is enabled + += 0.8.10 (2012-08-06) = + +* Add Lithuanian (lt_LT) to predefined languages list (automatic download and update of language files won't work) +* Add Lithuanian translation contributed by [Naglis Jonaitis](http://najo.lt/) +* Bug correction: empty string translation issue +* Bug correction: 'wp_list_pages' does not filter custom post types +* Bug correction: warning if posts are queried before the action 'wp_loaded' has been fired +* Bug correction: notice in twentyten when resquesting a date archive with no posts + += 0.8.9 (2012-07-20) = + +* Add Portuguese translation contributed by [Vitor Carvalho](http://vcarvalho.com/) + += 0.8.8 (2012-07-18) = + +* Validation improvement thanks to kg69design +* Bug correction: custom post types rewrite rules are broken when registered with query_var=>false +* Bug correction: user admin language not deleted when uninstalling the plugin +* Bug correction: pll_current_language('name') returns locale instead of language name +* Bug correction: ajax on frontend does not work +* Bug correction: homepage pagination broken when redirecting the language page to a static front page +* Bug correction: taxonomies conflicts on custom post types +* Bug correction: the admin language is not updated when edited by other users + += 0.8.7 (2012-06-10) = + +* Add the possibility to load Polylang API for ajax requests on frontend +* Bug correction: search form is broken when using a static front page +* Bug correction: admin bar search does not work +* Tests done with WordPress 3.4 RC2 + += 0.8.6 (2012-05-23) = + +* Add the possibility to use a local config file to set options +* Improve robustness (less PHP notices) +* Bug correction: Menus not showing in preview mode +* Bug correction: fatal error when customizing a theme in WP 3.4 beta 4 +* Bug correction: second page of search results returns 404 when using pretty permalinks + += 0.8.5 (2012-05-14) = + +* Bug correction : sites using static front page are messed in v0.8.4 + += 0.8.4 (2012-05-13) = + +* Add a new argument 'post_id' to the function pll_the_languages to display posts translations within the loop +* Bug correction: every posts in every languages are shown on the homepage when requesting the wrong one with or without 'www.' +* Bug correction: every posts in every languages are shown when requesting /?p=string +* Bug correction: the language is not correctly set for wp-signup.php and wp-activate.php +* Bug correction: wrong home links when using permalinks with front with WP 3.3 and older +* Bug correction: wrong redirection after posting a comment when adding the language information to all urls +* Bug correction: term language may be lost in some situations +* Bug correction: post language is set to default if updated outside the edit post page +* Bug correction: javascript error in WP 3.1 +* Bug correction: can't toggle visibility of tags metabox in edit post panel +* Tests done with WordPress 3.4 beta 4 + += 0.8.3 (2012-04-10) = + +* Add Danish translation contributed by [Compute](http://wordpress.org/support/profile/compute) +* Add Spanish translation contributed by Curro +* Add the possibility to add a content in a different language than the current one by setting explicitely the lang parameter in the secondary query +* Add support of PATHINFO permalinks +* Bug correction: secondary queries not correctly filtered by language +* Bug correction: wrong archives links when using permalinks with front +* Bug correction: wrong homepage link when keeping 'language' in permalinks with front +* Bug correction: flush_rewrite_rules notice when setting up a static front page (introduced in 0.8.2) +* Bug correction: every posts in every languages are shown when hitting the homepage with a query string unknown to WP (thanks to Gonçalo Peres) +* Bug correction: every posts in every languages are shown on the homepage when PHP adds index.php to the url +* Tests done with WordPress 3.4 beta 1 + + += 0.8.2 (2012-03-20) = + +* Add Italian translation contributed by [Luca Barbetti](http://wordpress.org/support/profile/lucabarbetti) +* Improve performance on admin side +* Comment status and ping status are now copied when adding a new translation +* Deprecated API function 'pll_is_front_page' as it is now useless +* Bug correction: Wrong translation url for taxonomies when adding the language information to all urls +* Bug correction: "translation" of search page does not work if the site is only made of pages +* Bug correction: wrong language permalink structure introduced in 0.8.1 +* Bug correction: wrong language set when clicking on "add new" translation in edit category and edit tags panels +* Bug correction: site does not display if no languages are set +* Bug correction: get_author_posts_url is 404 +* Bug correction: homepage is 404 when using a static front page and adding the language information to all urls + += 0.8.1 (2012-03-11) = + +* Add Latvian translation contributed by [@AndyDeGroo](http://twitter.com/AndyDeGroo) +* It is now possible to synchronize multiple values for custom fields +* Add new API function pll_current_language +* Add the pll_rewrite_rules filter allowing plugins to filter rewrite rules by language +* WP 3.4 preparation: disable the menu section in the customize theme admin panel (unusable with Polylang) +* Bug correction: removing 'language' in permalinks does not work in WP 3.4 alpha +* Bug correction: problems with custom post type archives when 'has_archive' is set (thanks to AndyDeGroo) +* Bug correction: 404 error when combining %postname% permastructure with "Add language information to all URL" option +* Bug correction: translated custom strings are duplicated if registered several times +* Bug correction: queries with an array of post types are not correctly filtered +* Bug correction: wp-login.php always in English + += 0.8 (2012-02-29) = + +* Sticky posts are now filtered by language +* It is now possible to use the language page as home page +* Add an "About Polylang" metabox on the languages admin page +* Add the pll_the_languages filter allowing to filter the whole output of the language switcher +* Add a new argument 'display_names_as' to the function pll_the_languages +* Add pll_get_post_types & pll_get_taxonomies filters allowing to enable / disable the language filter for post types & taxonomies +* Add ckb to predefined languages list +* Completely reworked the string translation storage in the database +* Some performance improvements on admin side +* Improve compatibility with other plugins broken by the home url filter +* Add an option to disable the home url filter +* Add an option to disable synchronization of metas between translations +* Bug correction: body class 'home' is not set on translated homepage +* Bug correction: robots.txt is broken when adding the language code to all urls (including default language) +* Bug correction: bad name for the Czech flag +* Bug correction: bad language information in rss feed for WP < 3.4 +* Bug correction: signup broken on multisite +* Bug correction: the translation url is set to self when using a static front page and no page for posts and there is no translation +* Bug correction: problems with custom post type archive titles +* Bug correction: problems with custom post type if rewrite slug is different from post_type (thanks to AndyDeGroo) +* Bug correction: quick edit still breaks translation linking of pages (thanks to AndyDeGroo) +* Bug correction: bad rewrite rules for feeds (introduced in 0.7.2) +* Bug correction: the order is not saved when creating a language +* Bug correction: the categories list is not updated when adding a new category (ajax broken) + += 0.7.2 (2012-02-15) = + +* Add Polish translation contributed by [Peter Paciorkiewicz](http://www.paciorkiewicz.pl) +* Add 5 new languages to predefined list +* completely reworked rewrite rules +* WP 3.4 preparation: add new WordPress languages files to download when creating a new language +* Bug correction: custom nav menus do not work in Artisteer generated themes +* Bug correction: having a single language causes multiple warnings while saving post/page. +* Bug correction: custom nav menu broken on archives pages +* Bug correction: the language switcher does not link to translated post type archive when using pretty permalinks +* Bug correction: the tags are not saved in the right language when translated tags have the same name +* Bug correction: bad link in post preview when adding language code to all urls +* Bug correction: feed not filtered by language when adding language code to all urls +* Bug correction: duplicate canonical link when used together with WordPress SEO by Yoast +* Bug correction: the all posts admin page is messed if another plugin adds a column +* Bug correction: 404 error on static front page when adding language code to all urls (including default language) + += 0.7.1 (2012-02-06) = + +* Allow using 3 characters languages codes (ISO 639-2 or 639-3) +* The predefined languages dropdown list now displays the locale to help differentiate some languages +* Add 5 new languages to predefined list +* Bug correction: the filter 'pll_copy_post_metas' does not work +* Bug correction: impossible to add a tag in the edit post panel +* Bug correction: rewrite rules not correct +* Bug correction: cache issue with css and js files + += 0.7 (2012-01-30) = + +* Add Hebrew translation contributed by [ArielK](http://www.arielk.net) +* Add support for RTL languages for both frontend and admin +* Twenty Ten and Twenty Eleven languages files are now automatically downloaded when creating a new langage +* Improve filtering tags by language in the edit post panel +* Category parent dropdown list is now filtered by language +* Category parents are now synchronized between translations +* Add the possibility to have the language information in all URL +* Add support for post formats +* Add option allowing not to show the current language in the language switcher (for both menu and widget) +* Add a title attribute (and the possibility to personalize it with a filter) to flags +* pll_get_post and pll_get_term second parameter is now optional and defaults to current language +* Add pll_the_language_link filter allowing to filter translation links outputed by the language switcher +* The option PLL_DISPLAY_ALL is no longer supported +* Bug correction: Autosave reset to default language +* Bug correction: blog info not translated in feeds +* Bug correction: post comments feed always in default language +* Bug correction: undefined index notice when setting up a custom menu widget +* Bug correction: rewrite rules are not correctly reset when deactivating the plugin +* Bug correction: is_home not correctly set on pages 2, 3... +* Bug correction: avoid naming conflicts (in sql queries) with other themes / plugins +* Bug correction: bad language detection and url rewriting of custom post types archives + += 0.6.1 (2012-01-12) = + +* Add Dutch translation contributed by [AlbertGn](http://wordpress.org/support/profile/albertgn) +* Disable everything except the languages management panel while no language has been created +* Bug correction: can't have the same featured image in translated posts +* Bug correction: parent page dropdown does appear only after the page has been saved +* Bug correction: archives widget not working anymore +* Bug correction: string translations does not work for WP < 3.3 +* Bug correction: fix fatal error in string translations caused by widgets using the old API +* Bug correction: the strings translation panel is unable to translate strings with special characters +* Bug correction: Polylang "is_front_page" returns true on archives pages + += 0.6 (2012-01-07) = + +* Add Greek translation contributed by [theodotos](http://www.ubuntucy.org) +* WordPress languages files are now automatically downloaded when creating a new langage (and updated when updating WordPress) +* Add the possibility to change the order of the languages in the language switcher +* Add the possibility to translate the site title, tagline and widgets titles +* Categories, post tags, featured image, page parent, page template and menu order are now copied when adding a new translation +* Translations are now accessibles in the "Posts", "Pages", "Categories" and "Post tags" admin panels +* Improve the dropdown language switcher widget (sends now to translated page or home page based on options) +* Move custom flags from polylang/local_flags to wp_content/polylang +* Add two options to "pll_the_languages" ('hide_if_no_translation' and 'hide_current'). *The function does not output ul tag anymore* +* Improve API +* Bug correction: Twenty eleven custom Header problem with v0.5.1 +* Bug correction: front-page.php not loaded for translated front page + += 0.5.1 (2011-12-18) = + +* Improved German translation contributed by [Christian Ries](http://www.singbyfoot.lu) +* Bug correction: translated homepage not recognized as home page when it displays posts +* Bug correction: predefined language list does not work on IE8 +* Bug correction: on some installations, "Add New" post doesn't keep intended language +* Bug correction: fatal error when Polylang is used together with the plugin Tabbed Widgets +* Bug correction: language Switcher points sometimes to wrong places + += 0.5 (2011-12-07) = + +* Add multisite support +* Rework the Polylang admin panel. There is now a set of predefined languages +* Improve categories and tags language filter in the edit post panel +* Categories and tags created in the edit post panel are now created with the same language as the post +* The language switcher can now force the link to the front page instead of the translated page +* The nav menus can now display a language switcher +* Improved performance +* Optimized the calendar widget (less code and sql queries executed) +* Added the possibility to display posts and terms with no language set (see the documentation to know how to enable this functionnality) +* Started the creation of a small API for theme and plugin programmers +* Bug correction: when using a static front page, the page for posts does not work when using the default permalink settings +* Bug correction: the search form does not work if a static front page is used +* Bug correction: quick edit breaks translations +* Bug correction: categories and post tags translations don't work for more than 2 languages +* Bug correction: the output of wp_page_menu is not correct for non default languages + += 0.4.4 (2011-11-28) = + +* Bug correction: When using a static front page, the translated home page displays posts instead of the translated page +* Bug correction: Automatic language setting of existing categories and post tags does not work correctly + += 0.4.3 (2011-11-19) = + +* Add Russian translation contributed by [yoyurec](http://yoyurec.in.ua) +* Bug correction: impossible to suppress the language name in the language switcher widget settings +* Bug correction: post's page does not work when using a static front page +* Bug correction: flags in local_flags directory are removed after an automatic upgrade (now works for an upgrade from 0.4.3+ to a higher version) +* Bug correction: switching to default language displays a 404 Error when hiding the default language in url and displaying the language switcher as dropdown +* Other minor bug corrections +* Tests done with WordPress 3.3 beta 3 + += 0.4.2 (2011-11-16) = + +* Bug correction: language settings page is broken in v0.4.1 + += 0.4.1 (2011-11-16) = + +* Bug correction: flags shows even when you set doesn't to show +* Bug correction: custom taxonomies do not work +* Bug correction: some users get the fatal error: call to undefined function wp_get_current_user() in /wp-includes/user.php on line 227 + += 0.4 (2011-11-10) = + +* Add a documentation (in English only) +* Add the possibility to hide the url language information for the default language +* Add the possibility to set the admin language in the user profile +* Add the possibilty to fill existing posts, pages, categories & tags with the default language +* Add support for custom post types and custom taxonomies +* Add the possibility to display flags in the language switcher +* Add CSS classes to customize rendering of the language switcher +* Add the possibility to display the language switcher as a dropdown list +* Add support for calendar widget +* Improve performance: less sql queries +* Improve data validation when creating or updating languages +* Bug correction: 'wp_list_pages' page order is ignored when the plugin is enabled +* Bug correction: when using 'edit' or 'add new' (translation) for posts, the categories appear in the wrong language +* Bug correction: pages are not included in language post count +* Bug correction: the language switcher does not display languages if there are only pages +* Bug correction: the widget filter does not allow to come back to 'all languages' once a language has been set +* Other minor bug corrections + += 0.3.2 (2011-10-20) = + +* Bug correction: authors pages are not filtered by language +* Bug correction: language pages use the archive template +* Bug correction: database error for comments on posts and pages +* Bug correction: "Add new" translation for pages creates a post instead of a page +* Bug correction: the search query does not look into pages + += 0.3.1 (2011-10-16) = + +* Bug correction: the widget settings cannot be saved when activating Polylang +* Bug correction: the archives widget does not display any links +* Bug correction: ajax form for translations not working in the 'Categories' and 'Post tags' admin panels + += 0.3 (2011-10-07) = + +* Add language filter for widgets +* Improved performance for filtering pages by language +* Improved security +* Minor bug correction with versions management + += 0.2 (2011-10-05) = + +* Add language filter for nav menus +* Add German translation +* Add language filter for recent comments +* Add ajax to term edit form +* Add ajax to post metabox +* Improved performance for filtering terms by language +* Bugs correction + += 0.1 (2011-09-22) = +* Initial release + diff --git a/pole-sbv-content/plugins/polylang/css/admin.css b/pole-sbv-content/plugins/polylang/css/admin.css new file mode 100644 index 00000000..3e5c3167 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/css/admin.css @@ -0,0 +1,400 @@ +/* languages admin panel */ +#add-lang select { + width: 95%; +} + +.column-locale, +.languages .column-slug { + width : 15% +} + +.column-default_lang { + width : 5%; +} + +.column-term_group, +.column-flag, .column-count { + width : 10%; +} + +.icon-default-lang:before { + font-family: 'dashicons'; + content: "\f155"; +} + +.form-field input[type="radio"] { + width: auto; + margin-right: 2px; +} + +/* about Polylang metabox */ +#pll-about-box p, +#pll-recommended p { + text-align: justify; +} + +#pll-about-box input { + margin: 0; + padding: 0; + float: right; +} + +/* strings translation table */ +.stringstranslations .column-name, +.stringstranslations .column-context { + width: 10%; +} + +.stringstranslations .column-string { + width: 33%; +} + +.translation label { + display: inline-block; + width: 23%; + vertical-align: top; +} + +.translation input, +.translation textarea { + width: 72%; +} + +/* settings */ +.pll-settings { + margin-top: 20px; +} + +.pll-settings .plugin-title { + width: 25%; +} + +#wpbody-content .pll-settings .pll-configure tr { + display: table-row; +} + +#wpbody-content .pll-settings .pll-configure td { + display: table-cell; +} + +#wpbody-content .pll-settings .pll-configure > td { + padding: 20px 20px 20px 40px; +} + +.pll-configure legend { + font-size: 14px; + font-weight: 600; + margin-bottom: 0.5em; +} + +.pll-configure td .description { + margin-top: 2px; + margin-bottom: 0.5em; +} + +.pll-configure p.submit { + margin-top: 20px; +} + +.pll-configure .button { + margin-right: 20px; +} + +.pll-configure fieldset { + margin-bottom: 1.5em; +} + +.pll-inline-block-list { + margin: 0; +} + +.pll-inline-block-list li { + display: inline-block; + margin: 0; + width: 250px; +} + +/* settings URL modifications */ +#pll-domains-table td { + padding: 2px 2px 2px 1.5em; + -webkit-box-shadow: none; + box-shadow: none; + border: none; +} + +.pll-settings-url-col { + display: inline-block; + width: 49%; + vertical-align: top; +} + +/* settings Activation keys */ +#pll-licenses-table td { + vertical-align: top; +} + +#pll-licenses-table label { + font-size: 1em; + font-weight: 600; +} + +.pll-configure .pll-deactivate-license { + margin: 0 0 0 20px; +} + +/* language columns in edit.php and edit-tags.php */ +th[class*='column-language_'], +td[class*='column-language_'] { + width: 1.5em; +} + +/* Text direcction in post.php and edit-tags.php */ +.pll-dir-rtl textarea, +.pll-dir-rtl input[type="text"] { + direction: rtl; +} + +.pll-dir-ltr textarea, +.pll-dir-ltr input[type="text"] { + direction: ltr; +} + +.pll-dir-ltr .tr_lang, +.pll-dir-rtl .tr_lang { + direction: inherit; +} + +/* languages metabox in post.php */ +#post-translations p { + float: left; +} + +#post-translations table { + table-layout: fixed; + width: 100%; + clear: both; +} + +#post-translations a { + text-decoration: none; +} + +#post-translations .pll-language-column, +#post-translations .pll-column-icon { + width: 20px; +} + +#post-translations .tr_lang { + width: 100%; +} + +#post-translations td { + padding: 2px; +} + +#post-translations .spinner, +#term-translations .spinner { + float: none; + margin: 0; + background-position: center; + width: auto; +} + +.pll-column-icon { + text-align: center; +} + +#select-post-language .pll-select-flag { + padding: 4px; + margin-right: 32px; +} + +/* specific cases for media */ +#select-media-language .pll-select-flag { + padding: 4px; + margin-right: 10px; +} + +.pll-media-edit-column { + float: right; +} + +/* language and translations in edit-tags.php */ +.pll-translation-flag { /* also for media */ + margin-right: 14px; +} + +#select-add-term-language .pll-select-flag { + padding: 11px; + margin-right: 13px; +} + +#select-edit-term-language .pll-select-flag { + padding: 11px; + margin-right: 4px; +} + +#term-translations p { + /* same style as label */ + font-size: 12px; + font-style: normal; + padding: 2px; + color: #23282d; +} + +#add-term-translations, +#edit-term-translations { + width: 95%; +} + +#term-translations .pll-language-column { + line-height: 28px; + width: 20%; +} + +#term-translations .pll-edit-column, +#add-term-translations .pll-language-column { + width: 20px; +} + +#edit-term-translations .pll-language-column { + padding: 15px 10px; + font-weight: normal; +} + +/* icon fonts */ +.pll_icon_tick:before { + content: "\f147"; +} +.pll_icon_add:before { + content: "\f132"; +} +.pll_icon_edit:before { + content: "\f464"; +} + +[class^="pll_icon_"] { + font: 20px/1 'dashicons'; + vertical-align: middle; +} + +/* admin bar */ +#wpadminbar #wp-admin-bar-languages .ab-item img { + margin: 0 8px 0 2px; +} + +#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon { + float: none; + top: 4px; +} + +#wpadminbar #wp-admin-bar-languages .ab-icon:before { + content: "\f326"; + top: 1px; +} + +@media screen and ( max-width: 782px ) { + /* settings */ + #wpbody-content .pll-settings .pll-configure > td { + padding: 20px; + } + + #wpbody-content .pll-settings #cb { + padding: 20px 9px; + } + + /* settings URL modifications */ + .pll-inline-block { + width: auto; + } + + .pll-settings-url-col { + display: block; + width: 100%; + } + + /* settings licenses */ + #wpbody-content .pll-settings #pll-licenses-table td { + display: block; + } + + .pll-configure .pll-deactivate-license { + margin: 10px 0 5px; + } + + /* strings translations table */ + .stringstranslations .column-context, + .stringstranslations .column-name { + display: none; /* backward compatibility WP < 4.3 */ + } + + .translation label { + display: block; + width: 95%; + padding-left: 0; + } + + .translation input { + width: 95%; + } + + /* hide selected language flag and translations language name */ + #select-add-term-language .pll-select-flag, + #select-edit-term-language .pll-select-flag, + #edit-term-translations .pll-language-name { + display: none; + } + + #edit-term-translations { + width: 100%; + } + + #add-term-translations .pll-language-column { + line-height: 38px; + } + + #edit-term-translations td { + padding: 8px 10px; + } + + #edit-term-translations .pll-language-column, + #edit-term-translations .pll-edit-column { + width: 20px; + } + + /* translations tables should be kept as table */ + .term-translations .pll-language-column, + .term-translations .pll-edit-column, + .term-translations .pll-translation-column { + display: table-cell; + } + + .term-translations .hidden { + display: none; + } + + /* admin bar */ + #wpadminbar #wp-admin-bar-languages { + display: block; /*shows our menu on mobile devices */ + } + + #wpadminbar #wp-admin-bar-languages > .ab-item { + width: 50px; + text-align: center; + } + + #wpadminbar #wp-admin-bar-languages > .ab-item .ab-icon:before { + font: 32px/1 'dashicons'; + top: -1px; + } + + #wpadminbar #wp-admin-bar-languages > .ab-item img { + margin: 19px 0; + } + + #wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon { + margin-right: 6px; + font-size: 20px !important; + line-height: 20px !important; + } +} diff --git a/pole-sbv-content/plugins/polylang/css/admin.min.css b/pole-sbv-content/plugins/polylang/css/admin.min.css new file mode 100644 index 00000000..bb5a7b37 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/css/admin.min.css @@ -0,0 +1 @@ +#pll-licenses-table td,.translation label{vertical-align:top}#add-lang select{width:95%}.column-locale,.languages .column-slug{width:15%}.column-default_lang{width:5%}.column-count,.column-flag,.column-term_group{width:10%}.icon-default-lang:before{font-family:dashicons;content:"\f155"}.form-field input[type=radio]{width:auto;margin-right:2px}#pll-about-box p,#pll-recommended p{text-align:justify}#pll-about-box input{margin:0;padding:0;float:right}.stringstranslations .column-context,.stringstranslations .column-name{width:10%}.stringstranslations .column-string{width:33%}.translation label{display:inline-block;width:23%}.translation input,.translation textarea{width:72%}.pll-settings{margin-top:20px}.pll-settings .plugin-title{width:25%}#wpbody-content .pll-settings .pll-configure tr{display:table-row}#wpbody-content .pll-settings .pll-configure td{display:table-cell}#wpbody-content .pll-settings .pll-configure>td{padding:20px 20px 20px 40px}.pll-configure legend{font-size:14px;font-weight:600;margin-bottom:.5em}.pll-configure td .description{margin-top:2px;margin-bottom:.5em}.pll-configure p.submit{margin-top:20px}.pll-configure .button{margin-right:20px}.pll-configure fieldset{margin-bottom:1.5em}.pll-inline-block-list{margin:0}.pll-inline-block-list li{display:inline-block;margin:0;width:250px}#pll-domains-table td{padding:2px 2px 2px 1.5em;-webkit-box-shadow:none;box-shadow:none;border:none}.pll-settings-url-col{display:inline-block;width:49%;vertical-align:top}#pll-licenses-table label{font-size:1em;font-weight:600}.pll-configure .pll-deactivate-license{margin:0 0 0 20px}td[class*=column-language_],th[class*=column-language_]{width:1.5em}.pll-dir-rtl input[type=text],.pll-dir-rtl textarea{direction:rtl}.pll-dir-ltr input[type=text],.pll-dir-ltr textarea{direction:ltr}.pll-dir-ltr .tr_lang,.pll-dir-rtl .tr_lang{direction:inherit}#post-translations p{float:left}#post-translations table{table-layout:fixed;width:100%;clear:both}#post-translations a{text-decoration:none}#post-translations .pll-column-icon,#post-translations .pll-language-column{width:20px}#post-translations .tr_lang{width:100%}#post-translations td{padding:2px}#post-translations .spinner,#term-translations .spinner{float:none;margin:0;background-position:center;width:auto}.pll-column-icon{text-align:center}#select-post-language .pll-select-flag{padding:4px;margin-right:32px}#select-media-language .pll-select-flag{padding:4px;margin-right:10px}.pll-media-edit-column{float:right}.pll-translation-flag{margin-right:14px}#select-add-term-language .pll-select-flag{padding:11px;margin-right:13px}#select-edit-term-language .pll-select-flag{padding:11px;margin-right:4px}#term-translations p{font-size:12px;font-style:normal;padding:2px;color:#23282d}#add-term-translations,#edit-term-translations{width:95%}#term-translations .pll-language-column{line-height:28px;width:20%}#add-term-translations .pll-language-column,#term-translations .pll-edit-column{width:20px}#edit-term-translations .pll-language-column{padding:15px 10px;font-weight:400}.pll_icon_tick:before{content:"\f147"}.pll_icon_add:before{content:"\f132"}.pll_icon_edit:before{content:"\f464"}[class^=pll_icon_]{font:20px/1 dashicons;vertical-align:middle}#wpadminbar #wp-admin-bar-languages .ab-item img{margin:0 8px 0 2px}#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon{float:none;top:4px}#wpadminbar #wp-admin-bar-languages .ab-icon:before{content:"\f326";top:1px}@media screen and (max-width:782px){#wpbody-content .pll-settings .pll-configure>td{padding:20px}#wpbody-content .pll-settings #cb{padding:20px 9px}.pll-inline-block{width:auto}.pll-settings-url-col{display:block;width:100%}#wpbody-content .pll-settings #pll-licenses-table td{display:block}.pll-configure .pll-deactivate-license{margin:10px 0 5px}.stringstranslations .column-context,.stringstranslations .column-name{display:none}.translation label{display:block;width:95%;padding-left:0}.translation input{width:95%}#edit-term-translations .pll-language-name,#select-add-term-language .pll-select-flag,#select-edit-term-language .pll-select-flag{display:none}#edit-term-translations{width:100%}#add-term-translations .pll-language-column{line-height:38px}#edit-term-translations td{padding:8px 10px}#edit-term-translations .pll-edit-column,#edit-term-translations .pll-language-column{width:20px}.term-translations .pll-edit-column,.term-translations .pll-language-column,.term-translations .pll-translation-column{display:table-cell}.term-translations .hidden{display:none}#wpadminbar #wp-admin-bar-languages{display:block}#wpadminbar #wp-admin-bar-languages>.ab-item{width:50px;text-align:center}#wpadminbar #wp-admin-bar-languages>.ab-item .ab-icon:before{font:32px/1 dashicons;top:-1px}#wpadminbar #wp-admin-bar-languages>.ab-item img{margin:19px 0}#wpadminbar #wp-admin-bar-languages #wp-admin-bar-all .ab-item .ab-icon{margin-right:6px;font-size:20px!important;line-height:20px!important}} diff --git a/pole-sbv-content/plugins/polylang/css/selectmenu.css b/pole-sbv-content/plugins/polylang/css/selectmenu.css new file mode 100644 index 00000000..9eb29261 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/css/selectmenu.css @@ -0,0 +1,140 @@ +/* Greatly modified version of the jquery-ui.css */ + +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} + +.ui-menu .ui-menu { + position: absolute; +} + +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} + +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-selectmenu-text .ui-icon, +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} + +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} + +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} + +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 23px; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} + +.ui-selectmenu-open { + display: block; +} + +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; +} + +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -10px; + position: absolute; + top: 50%; +} + +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 2em; + display: block; + line-height: 23px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.ui-widget-content, +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + background: #fff; + border: 1px solid #ddd; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset; + color: #32373c; +} + +.ui-widget-content .ui-state-hover, +.ui-widget-content .ui-state-focus { + background: #f5f5f5; +} + +.ui-selectmenu-button.ui-state-focus { + border: 1px solid #5b9dd9; + box-shadow: 0 0 2px rgba(30, 140, 190, 0.8); +} + +.ui-icon-triangle-1-s:before { + content: "\f140"; + font: 20px/1 'dashicons'; +} + +.ui-widget-content { + max-height: 231px; + box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); +} diff --git a/pole-sbv-content/plugins/polylang/css/selectmenu.min.css b/pole-sbv-content/plugins/polylang/css/selectmenu.min.css new file mode 100644 index 00000000..5527ee05 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/css/selectmenu.min.css @@ -0,0 +1 @@ +.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;min-height:0;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon,.ui-selectmenu-text .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:700;line-height:23px;padding:2px .4em;margin:.5em 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none}.ui-selectmenu-button span.ui-icon{right:.5em;left:auto;margin-top:-10px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:.4em 2.1em .4em 2em;display:block;line-height:23px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-state-default,.ui-widget-content,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{background:#fff;border:1px solid #ddd;box-shadow:0 1px 2px rgba(0,0,0,.07) inset;color:#32373c}.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover{background:#f5f5f5}.ui-selectmenu-button.ui-state-focus{border:1px solid #5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.ui-icon-triangle-1-s:before{content:"\f140";font:20px/1 dashicons}.ui-widget-content{max-height:231px;box-shadow:0 2px 6px rgba(100,100,100,.3)} diff --git a/pole-sbv-content/plugins/polylang/flags/ad.png b/pole-sbv-content/plugins/polylang/flags/ad.png new file mode 100644 index 00000000..625ca84f Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ad.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ae.png b/pole-sbv-content/plugins/polylang/flags/ae.png new file mode 100644 index 00000000..ef3a1ecf Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ae.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/af.png b/pole-sbv-content/plugins/polylang/flags/af.png new file mode 100644 index 00000000..a4742e29 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/af.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ag.png b/pole-sbv-content/plugins/polylang/flags/ag.png new file mode 100644 index 00000000..556d5504 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ag.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ai.png b/pole-sbv-content/plugins/polylang/flags/ai.png new file mode 100644 index 00000000..74ed29d9 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ai.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/al.png b/pole-sbv-content/plugins/polylang/flags/al.png new file mode 100644 index 00000000..92354cb6 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/al.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/am.png b/pole-sbv-content/plugins/polylang/flags/am.png new file mode 100644 index 00000000..344a2a86 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/am.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/an.png b/pole-sbv-content/plugins/polylang/flags/an.png new file mode 100644 index 00000000..633e4b89 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/an.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ao.png b/pole-sbv-content/plugins/polylang/flags/ao.png new file mode 100644 index 00000000..bcbd1d6d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ao.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ar.png b/pole-sbv-content/plugins/polylang/flags/ar.png new file mode 100644 index 00000000..e5ef8f1f Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ar.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/arab.png b/pole-sbv-content/plugins/polylang/flags/arab.png new file mode 100644 index 00000000..365172ac Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/arab.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/as.png b/pole-sbv-content/plugins/polylang/flags/as.png new file mode 100644 index 00000000..32f30e4c Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/as.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/at.png b/pole-sbv-content/plugins/polylang/flags/at.png new file mode 100644 index 00000000..0f15f34f Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/at.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/au.png b/pole-sbv-content/plugins/polylang/flags/au.png new file mode 100644 index 00000000..a01389a7 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/au.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/aw.png b/pole-sbv-content/plugins/polylang/flags/aw.png new file mode 100644 index 00000000..a3579c2d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/aw.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ax.png b/pole-sbv-content/plugins/polylang/flags/ax.png new file mode 100644 index 00000000..1eea80a7 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ax.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/az.png b/pole-sbv-content/plugins/polylang/flags/az.png new file mode 100644 index 00000000..4ee9fe5c Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/az.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ba.png b/pole-sbv-content/plugins/polylang/flags/ba.png new file mode 100644 index 00000000..c7749924 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ba.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/basque.png b/pole-sbv-content/plugins/polylang/flags/basque.png new file mode 100644 index 00000000..cb2f25e1 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/basque.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bb.png b/pole-sbv-content/plugins/polylang/flags/bb.png new file mode 100644 index 00000000..0df19c71 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bb.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bd.png b/pole-sbv-content/plugins/polylang/flags/bd.png new file mode 100644 index 00000000..076a8bf8 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bd.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/be.png b/pole-sbv-content/plugins/polylang/flags/be.png new file mode 100644 index 00000000..d86ebc80 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/be.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bf.png b/pole-sbv-content/plugins/polylang/flags/bf.png new file mode 100644 index 00000000..ab5ce8fe Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bf.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bg.png b/pole-sbv-content/plugins/polylang/flags/bg.png new file mode 100644 index 00000000..0469f060 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bg.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bh.png b/pole-sbv-content/plugins/polylang/flags/bh.png new file mode 100644 index 00000000..ea8ce687 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bh.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bi.png b/pole-sbv-content/plugins/polylang/flags/bi.png new file mode 100644 index 00000000..5cc2e30c Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bi.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bj.png b/pole-sbv-content/plugins/polylang/flags/bj.png new file mode 100644 index 00000000..1cc8b458 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bj.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bm.png b/pole-sbv-content/plugins/polylang/flags/bm.png new file mode 100644 index 00000000..c0c7aead Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bn.png b/pole-sbv-content/plugins/polylang/flags/bn.png new file mode 100644 index 00000000..8fb09849 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bn.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bo.png b/pole-sbv-content/plugins/polylang/flags/bo.png new file mode 100644 index 00000000..ce7ba522 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bo.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/br.png b/pole-sbv-content/plugins/polylang/flags/br.png new file mode 100644 index 00000000..9b1a5538 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/br.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bs.png b/pole-sbv-content/plugins/polylang/flags/bs.png new file mode 100644 index 00000000..639fa6cf Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bs.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bt.png b/pole-sbv-content/plugins/polylang/flags/bt.png new file mode 100644 index 00000000..1d512dff Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bt.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bw.png b/pole-sbv-content/plugins/polylang/flags/bw.png new file mode 100644 index 00000000..fcb10394 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bw.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/by.png b/pole-sbv-content/plugins/polylang/flags/by.png new file mode 100644 index 00000000..504774ec Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/by.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/bz.png b/pole-sbv-content/plugins/polylang/flags/bz.png new file mode 100644 index 00000000..be63ee1c Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/bz.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ca.png b/pole-sbv-content/plugins/polylang/flags/ca.png new file mode 100644 index 00000000..1f204193 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ca.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/catalonia.png b/pole-sbv-content/plugins/polylang/flags/catalonia.png new file mode 100644 index 00000000..5041e308 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/catalonia.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cc.png b/pole-sbv-content/plugins/polylang/flags/cc.png new file mode 100644 index 00000000..aed3d3b4 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cc.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cd.png b/pole-sbv-content/plugins/polylang/flags/cd.png new file mode 100644 index 00000000..5e489424 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cd.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cf.png b/pole-sbv-content/plugins/polylang/flags/cf.png new file mode 100644 index 00000000..da687bdc Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cf.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cg.png b/pole-sbv-content/plugins/polylang/flags/cg.png new file mode 100644 index 00000000..a859792e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cg.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ch.png b/pole-sbv-content/plugins/polylang/flags/ch.png new file mode 100644 index 00000000..242ec01a Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ch.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ci.png b/pole-sbv-content/plugins/polylang/flags/ci.png new file mode 100644 index 00000000..3f2c62eb Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ci.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ck.png b/pole-sbv-content/plugins/polylang/flags/ck.png new file mode 100644 index 00000000..746d3d6f Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ck.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cl.png b/pole-sbv-content/plugins/polylang/flags/cl.png new file mode 100644 index 00000000..29c6d61b Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cl.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cm.png b/pole-sbv-content/plugins/polylang/flags/cm.png new file mode 100644 index 00000000..f65c5bd5 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cn.png b/pole-sbv-content/plugins/polylang/flags/cn.png new file mode 100644 index 00000000..89144146 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cn.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/co.png b/pole-sbv-content/plugins/polylang/flags/co.png new file mode 100644 index 00000000..a118ff4a Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/co.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cr.png b/pole-sbv-content/plugins/polylang/flags/cr.png new file mode 100644 index 00000000..c7a37317 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cr.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cu.png b/pole-sbv-content/plugins/polylang/flags/cu.png new file mode 100644 index 00000000..083f1d61 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cu.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cv.png b/pole-sbv-content/plugins/polylang/flags/cv.png new file mode 100644 index 00000000..a63f7eaf Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cv.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cx.png b/pole-sbv-content/plugins/polylang/flags/cx.png new file mode 100644 index 00000000..48e31adb Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cx.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cy.png b/pole-sbv-content/plugins/polylang/flags/cy.png new file mode 100644 index 00000000..5b1ad6c0 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cy.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/cz.png b/pole-sbv-content/plugins/polylang/flags/cz.png new file mode 100644 index 00000000..c8403dd2 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/cz.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/de.png b/pole-sbv-content/plugins/polylang/flags/de.png new file mode 100644 index 00000000..ac4a9773 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/de.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/dj.png b/pole-sbv-content/plugins/polylang/flags/dj.png new file mode 100644 index 00000000..582af364 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/dj.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/dk.png b/pole-sbv-content/plugins/polylang/flags/dk.png new file mode 100644 index 00000000..e2993d3c Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/dk.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/dm.png b/pole-sbv-content/plugins/polylang/flags/dm.png new file mode 100644 index 00000000..5fbffcba Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/dm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/do.png b/pole-sbv-content/plugins/polylang/flags/do.png new file mode 100644 index 00000000..5a04932d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/do.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/dz.png b/pole-sbv-content/plugins/polylang/flags/dz.png new file mode 100644 index 00000000..335c2391 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/dz.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ec.png b/pole-sbv-content/plugins/polylang/flags/ec.png new file mode 100644 index 00000000..0caa0b1e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ec.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ee.png b/pole-sbv-content/plugins/polylang/flags/ee.png new file mode 100644 index 00000000..0c82efb7 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ee.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/eg.png b/pole-sbv-content/plugins/polylang/flags/eg.png new file mode 100644 index 00000000..8a3f7a10 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/eg.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/eh.png b/pole-sbv-content/plugins/polylang/flags/eh.png new file mode 100644 index 00000000..90a1195b Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/eh.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/england.png b/pole-sbv-content/plugins/polylang/flags/england.png new file mode 100644 index 00000000..3a7311d5 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/england.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/er.png b/pole-sbv-content/plugins/polylang/flags/er.png new file mode 100644 index 00000000..13065ae9 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/er.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/es.png b/pole-sbv-content/plugins/polylang/flags/es.png new file mode 100644 index 00000000..c2de2d71 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/es.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/esperanto.png b/pole-sbv-content/plugins/polylang/flags/esperanto.png new file mode 100644 index 00000000..03a333e2 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/esperanto.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/et.png b/pole-sbv-content/plugins/polylang/flags/et.png new file mode 100644 index 00000000..2e893fa0 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/et.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/fi.png b/pole-sbv-content/plugins/polylang/flags/fi.png new file mode 100644 index 00000000..14ec091b Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fi.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/fj.png b/pole-sbv-content/plugins/polylang/flags/fj.png new file mode 100644 index 00000000..cee99889 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fj.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/fk.png b/pole-sbv-content/plugins/polylang/flags/fk.png new file mode 100644 index 00000000..ceaeb27d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fk.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/fm.png b/pole-sbv-content/plugins/polylang/flags/fm.png new file mode 100644 index 00000000..066bb247 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/fo.png b/pole-sbv-content/plugins/polylang/flags/fo.png new file mode 100644 index 00000000..cbceb809 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fo.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/fr.png b/pole-sbv-content/plugins/polylang/flags/fr.png new file mode 100644 index 00000000..8332c4ec Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/fr.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ga.png b/pole-sbv-content/plugins/polylang/flags/ga.png new file mode 100644 index 00000000..0e0d4343 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ga.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/galicia.png b/pole-sbv-content/plugins/polylang/flags/galicia.png new file mode 100644 index 00000000..64b0cbb4 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/galicia.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gb.png b/pole-sbv-content/plugins/polylang/flags/gb.png new file mode 100644 index 00000000..ff701e19 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gb.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gd.png b/pole-sbv-content/plugins/polylang/flags/gd.png new file mode 100644 index 00000000..9ab57f54 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gd.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ge.png b/pole-sbv-content/plugins/polylang/flags/ge.png new file mode 100644 index 00000000..728d9707 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ge.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gh.png b/pole-sbv-content/plugins/polylang/flags/gh.png new file mode 100644 index 00000000..4e2f8965 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gh.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gi.png b/pole-sbv-content/plugins/polylang/flags/gi.png new file mode 100644 index 00000000..e76797f6 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gi.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gl.png b/pole-sbv-content/plugins/polylang/flags/gl.png new file mode 100644 index 00000000..ef12a73b Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gl.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gm.png b/pole-sbv-content/plugins/polylang/flags/gm.png new file mode 100644 index 00000000..0720b667 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gn.png b/pole-sbv-content/plugins/polylang/flags/gn.png new file mode 100644 index 00000000..ea660b01 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gn.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gp.png b/pole-sbv-content/plugins/polylang/flags/gp.png new file mode 100644 index 00000000..dbb086d0 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gp.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gq.png b/pole-sbv-content/plugins/polylang/flags/gq.png new file mode 100644 index 00000000..ebe20a28 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gq.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gr.png b/pole-sbv-content/plugins/polylang/flags/gr.png new file mode 100644 index 00000000..8651ade7 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gr.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gs.png b/pole-sbv-content/plugins/polylang/flags/gs.png new file mode 100644 index 00000000..7ef0bf59 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gs.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gt.png b/pole-sbv-content/plugins/polylang/flags/gt.png new file mode 100644 index 00000000..c43a70d3 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gt.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gu.png b/pole-sbv-content/plugins/polylang/flags/gu.png new file mode 100644 index 00000000..92f37c05 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gu.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gw.png b/pole-sbv-content/plugins/polylang/flags/gw.png new file mode 100644 index 00000000..b37bcf06 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gw.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/gy.png b/pole-sbv-content/plugins/polylang/flags/gy.png new file mode 100644 index 00000000..22cbe2f5 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/gy.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/hk.png b/pole-sbv-content/plugins/polylang/flags/hk.png new file mode 100644 index 00000000..d5c380ca Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/hk.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/hm.png b/pole-sbv-content/plugins/polylang/flags/hm.png new file mode 100644 index 00000000..a01389a7 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/hm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/hn.png b/pole-sbv-content/plugins/polylang/flags/hn.png new file mode 100644 index 00000000..96f83885 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/hn.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/hr.png b/pole-sbv-content/plugins/polylang/flags/hr.png new file mode 100644 index 00000000..696b5154 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/hr.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ht.png b/pole-sbv-content/plugins/polylang/flags/ht.png new file mode 100644 index 00000000..416052af Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ht.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/hu.png b/pole-sbv-content/plugins/polylang/flags/hu.png new file mode 100644 index 00000000..7baafe44 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/hu.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/id.png b/pole-sbv-content/plugins/polylang/flags/id.png new file mode 100644 index 00000000..c6bc0faf Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/id.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ie.png b/pole-sbv-content/plugins/polylang/flags/ie.png new file mode 100644 index 00000000..26baa31e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ie.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/il.png b/pole-sbv-content/plugins/polylang/flags/il.png new file mode 100644 index 00000000..2ca772d0 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/il.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/in.png b/pole-sbv-content/plugins/polylang/flags/in.png new file mode 100644 index 00000000..e4d7e81a Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/in.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/io.png b/pole-sbv-content/plugins/polylang/flags/io.png new file mode 100644 index 00000000..3e74b6a3 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/io.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/iq.png b/pole-sbv-content/plugins/polylang/flags/iq.png new file mode 100644 index 00000000..878a3514 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/iq.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ir.png b/pole-sbv-content/plugins/polylang/flags/ir.png new file mode 100644 index 00000000..c5fd136a Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ir.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/is.png b/pole-sbv-content/plugins/polylang/flags/is.png new file mode 100644 index 00000000..b8f6d0f0 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/is.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/it.png b/pole-sbv-content/plugins/polylang/flags/it.png new file mode 100644 index 00000000..89692f74 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/it.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/jm.png b/pole-sbv-content/plugins/polylang/flags/jm.png new file mode 100644 index 00000000..7be119e0 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/jm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/jo.png b/pole-sbv-content/plugins/polylang/flags/jo.png new file mode 100644 index 00000000..11bd4972 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/jo.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/jp.png b/pole-sbv-content/plugins/polylang/flags/jp.png new file mode 100644 index 00000000..325fbad3 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/jp.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ke.png b/pole-sbv-content/plugins/polylang/flags/ke.png new file mode 100644 index 00000000..51879adf Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ke.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/kg.png b/pole-sbv-content/plugins/polylang/flags/kg.png new file mode 100644 index 00000000..0a818f67 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kg.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/kh.png b/pole-sbv-content/plugins/polylang/flags/kh.png new file mode 100644 index 00000000..30f6bb1b Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kh.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ki.png b/pole-sbv-content/plugins/polylang/flags/ki.png new file mode 100644 index 00000000..2dcce4b3 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ki.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/km.png b/pole-sbv-content/plugins/polylang/flags/km.png new file mode 100644 index 00000000..812b2f56 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/km.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/kn.png b/pole-sbv-content/plugins/polylang/flags/kn.png new file mode 100644 index 00000000..febd5b48 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kn.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/kp.png b/pole-sbv-content/plugins/polylang/flags/kp.png new file mode 100644 index 00000000..d3d509aa Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kp.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/kr.png b/pole-sbv-content/plugins/polylang/flags/kr.png new file mode 100644 index 00000000..9c0a78eb Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kr.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/kurdistan.png b/pole-sbv-content/plugins/polylang/flags/kurdistan.png new file mode 100644 index 00000000..02517b46 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kurdistan.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/kw.png b/pole-sbv-content/plugins/polylang/flags/kw.png new file mode 100644 index 00000000..96546da3 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kw.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ky.png b/pole-sbv-content/plugins/polylang/flags/ky.png new file mode 100644 index 00000000..15c5f8e4 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ky.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/kz.png b/pole-sbv-content/plugins/polylang/flags/kz.png new file mode 100644 index 00000000..45a8c887 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/kz.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/la.png b/pole-sbv-content/plugins/polylang/flags/la.png new file mode 100644 index 00000000..e28acd01 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/la.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/lb.png b/pole-sbv-content/plugins/polylang/flags/lb.png new file mode 100644 index 00000000..d0d452bf Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lb.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/lc.png b/pole-sbv-content/plugins/polylang/flags/lc.png new file mode 100644 index 00000000..a47d0655 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lc.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/li.png b/pole-sbv-content/plugins/polylang/flags/li.png new file mode 100644 index 00000000..6469909c Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/li.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/lk.png b/pole-sbv-content/plugins/polylang/flags/lk.png new file mode 100644 index 00000000..088aad6d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lk.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/lr.png b/pole-sbv-content/plugins/polylang/flags/lr.png new file mode 100644 index 00000000..89a5bc7e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lr.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ls.png b/pole-sbv-content/plugins/polylang/flags/ls.png new file mode 100644 index 00000000..33fdef10 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ls.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/lt.png b/pole-sbv-content/plugins/polylang/flags/lt.png new file mode 100644 index 00000000..c8ef0da0 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lt.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/lu.png b/pole-sbv-content/plugins/polylang/flags/lu.png new file mode 100644 index 00000000..4cabba98 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lu.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/lv.png b/pole-sbv-content/plugins/polylang/flags/lv.png new file mode 100644 index 00000000..49b69981 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/lv.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ly.png b/pole-sbv-content/plugins/polylang/flags/ly.png new file mode 100644 index 00000000..b163a9f8 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ly.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ma.png b/pole-sbv-content/plugins/polylang/flags/ma.png new file mode 100644 index 00000000..f3867702 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ma.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mc.png b/pole-sbv-content/plugins/polylang/flags/mc.png new file mode 100644 index 00000000..1aa830f1 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mc.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/md.png b/pole-sbv-content/plugins/polylang/flags/md.png new file mode 100644 index 00000000..4e92c189 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/md.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/me.png b/pole-sbv-content/plugins/polylang/flags/me.png new file mode 100644 index 00000000..ac725355 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/me.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mg.png b/pole-sbv-content/plugins/polylang/flags/mg.png new file mode 100644 index 00000000..d2715b3d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mg.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mh.png b/pole-sbv-content/plugins/polylang/flags/mh.png new file mode 100644 index 00000000..fb523a8c Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mh.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mk.png b/pole-sbv-content/plugins/polylang/flags/mk.png new file mode 100644 index 00000000..db173aaf Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mk.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ml.png b/pole-sbv-content/plugins/polylang/flags/ml.png new file mode 100644 index 00000000..2cec8ba4 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ml.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mm.png b/pole-sbv-content/plugins/polylang/flags/mm.png new file mode 100644 index 00000000..10340d26 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mn.png b/pole-sbv-content/plugins/polylang/flags/mn.png new file mode 100644 index 00000000..9396355d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mn.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mo.png b/pole-sbv-content/plugins/polylang/flags/mo.png new file mode 100644 index 00000000..deb801dd Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mo.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mp.png b/pole-sbv-content/plugins/polylang/flags/mp.png new file mode 100644 index 00000000..298d588b Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mp.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mq.png b/pole-sbv-content/plugins/polylang/flags/mq.png new file mode 100644 index 00000000..010143b3 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mq.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mr.png b/pole-sbv-content/plugins/polylang/flags/mr.png new file mode 100644 index 00000000..319546b1 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mr.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ms.png b/pole-sbv-content/plugins/polylang/flags/ms.png new file mode 100644 index 00000000..d4cbb433 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ms.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mt.png b/pole-sbv-content/plugins/polylang/flags/mt.png new file mode 100644 index 00000000..00af9487 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mt.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mu.png b/pole-sbv-content/plugins/polylang/flags/mu.png new file mode 100644 index 00000000..b7fdce1b Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mu.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mv.png b/pole-sbv-content/plugins/polylang/flags/mv.png new file mode 100644 index 00000000..5073d9ec Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mv.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mw.png b/pole-sbv-content/plugins/polylang/flags/mw.png new file mode 100644 index 00000000..13886e9f Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mw.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mx.png b/pole-sbv-content/plugins/polylang/flags/mx.png new file mode 100644 index 00000000..5bc58ab3 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mx.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/my.png b/pole-sbv-content/plugins/polylang/flags/my.png new file mode 100644 index 00000000..9034cbab Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/my.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/mz.png b/pole-sbv-content/plugins/polylang/flags/mz.png new file mode 100644 index 00000000..76405e06 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/mz.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/na.png b/pole-sbv-content/plugins/polylang/flags/na.png new file mode 100644 index 00000000..63358c67 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/na.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/nc.png b/pole-sbv-content/plugins/polylang/flags/nc.png new file mode 100644 index 00000000..2cad2837 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nc.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ne.png b/pole-sbv-content/plugins/polylang/flags/ne.png new file mode 100644 index 00000000..d85f424f Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ne.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/nf.png b/pole-sbv-content/plugins/polylang/flags/nf.png new file mode 100644 index 00000000..f9bcdda1 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nf.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ng.png b/pole-sbv-content/plugins/polylang/flags/ng.png new file mode 100644 index 00000000..3eea2e02 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ng.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ni.png b/pole-sbv-content/plugins/polylang/flags/ni.png new file mode 100644 index 00000000..3969aaaa Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ni.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/nl.png b/pole-sbv-content/plugins/polylang/flags/nl.png new file mode 100644 index 00000000..fe44791e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nl.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/no.png b/pole-sbv-content/plugins/polylang/flags/no.png new file mode 100644 index 00000000..160b6b5b Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/no.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/np.png b/pole-sbv-content/plugins/polylang/flags/np.png new file mode 100644 index 00000000..aeb058b7 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/np.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/nr.png b/pole-sbv-content/plugins/polylang/flags/nr.png new file mode 100644 index 00000000..705fc337 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nr.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/nu.png b/pole-sbv-content/plugins/polylang/flags/nu.png new file mode 100644 index 00000000..c3ce4aed Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nu.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/nz.png b/pole-sbv-content/plugins/polylang/flags/nz.png new file mode 100644 index 00000000..10d6306d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/nz.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/occitania.png b/pole-sbv-content/plugins/polylang/flags/occitania.png new file mode 100644 index 00000000..e500b351 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/occitania.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/om.png b/pole-sbv-content/plugins/polylang/flags/om.png new file mode 100644 index 00000000..2ffba7e8 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/om.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/pa.png b/pole-sbv-content/plugins/polylang/flags/pa.png new file mode 100644 index 00000000..9b2ee9a7 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pa.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/pe.png b/pole-sbv-content/plugins/polylang/flags/pe.png new file mode 100644 index 00000000..62a04977 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pe.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/pf.png b/pole-sbv-content/plugins/polylang/flags/pf.png new file mode 100644 index 00000000..771a0f65 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pf.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/pg.png b/pole-sbv-content/plugins/polylang/flags/pg.png new file mode 100644 index 00000000..10d62334 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pg.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ph.png b/pole-sbv-content/plugins/polylang/flags/ph.png new file mode 100644 index 00000000..b89e1593 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ph.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/pk.png b/pole-sbv-content/plugins/polylang/flags/pk.png new file mode 100644 index 00000000..e9df70ca Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pk.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/pl.png b/pole-sbv-content/plugins/polylang/flags/pl.png new file mode 100644 index 00000000..d413d010 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pl.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/pm.png b/pole-sbv-content/plugins/polylang/flags/pm.png new file mode 100644 index 00000000..ba91d2c7 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/pn.png b/pole-sbv-content/plugins/polylang/flags/pn.png new file mode 100644 index 00000000..aa9344f5 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pn.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/pr.png b/pole-sbv-content/plugins/polylang/flags/pr.png new file mode 100644 index 00000000..82d9130d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pr.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ps.png b/pole-sbv-content/plugins/polylang/flags/ps.png new file mode 100644 index 00000000..f5f54776 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ps.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/pt.png b/pole-sbv-content/plugins/polylang/flags/pt.png new file mode 100644 index 00000000..ece79801 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pt.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/pw.png b/pole-sbv-content/plugins/polylang/flags/pw.png new file mode 100644 index 00000000..6178b254 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/pw.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/py.png b/pole-sbv-content/plugins/polylang/flags/py.png new file mode 100644 index 00000000..cb8723c0 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/py.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/qa.png b/pole-sbv-content/plugins/polylang/flags/qa.png new file mode 100644 index 00000000..ed4c621f Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/qa.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/quebec.png b/pole-sbv-content/plugins/polylang/flags/quebec.png new file mode 100644 index 00000000..a90cf0bb Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/quebec.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ro.png b/pole-sbv-content/plugins/polylang/flags/ro.png new file mode 100644 index 00000000..57e74a65 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ro.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/rs.png b/pole-sbv-content/plugins/polylang/flags/rs.png new file mode 100644 index 00000000..9439a5b6 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/rs.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ru.png b/pole-sbv-content/plugins/polylang/flags/ru.png new file mode 100644 index 00000000..47da4214 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ru.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/rw.png b/pole-sbv-content/plugins/polylang/flags/rw.png new file mode 100644 index 00000000..53564917 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/rw.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sa.png b/pole-sbv-content/plugins/polylang/flags/sa.png new file mode 100644 index 00000000..b4641c7e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sa.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sb.png b/pole-sbv-content/plugins/polylang/flags/sb.png new file mode 100644 index 00000000..a9937ccf Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sb.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sc.png b/pole-sbv-content/plugins/polylang/flags/sc.png new file mode 100644 index 00000000..39ee3718 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sc.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/scotland.png b/pole-sbv-content/plugins/polylang/flags/scotland.png new file mode 100644 index 00000000..a0e57b41 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/scotland.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sd.png b/pole-sbv-content/plugins/polylang/flags/sd.png new file mode 100644 index 00000000..eaab69eb Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sd.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/se.png b/pole-sbv-content/plugins/polylang/flags/se.png new file mode 100644 index 00000000..1994653d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/se.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sg.png b/pole-sbv-content/plugins/polylang/flags/sg.png new file mode 100644 index 00000000..dd34d612 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sg.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sh.png b/pole-sbv-content/plugins/polylang/flags/sh.png new file mode 100644 index 00000000..4b1d2a29 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sh.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/si.png b/pole-sbv-content/plugins/polylang/flags/si.png new file mode 100644 index 00000000..bb1476ff Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/si.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sk.png b/pole-sbv-content/plugins/polylang/flags/sk.png new file mode 100644 index 00000000..7ccbc827 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sk.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sl.png b/pole-sbv-content/plugins/polylang/flags/sl.png new file mode 100644 index 00000000..12d812d2 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sl.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sm.png b/pole-sbv-content/plugins/polylang/flags/sm.png new file mode 100644 index 00000000..3df2fdcf Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sn.png b/pole-sbv-content/plugins/polylang/flags/sn.png new file mode 100644 index 00000000..eabb71db Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sn.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/so.png b/pole-sbv-content/plugins/polylang/flags/so.png new file mode 100644 index 00000000..4a1ea4b2 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/so.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sr.png b/pole-sbv-content/plugins/polylang/flags/sr.png new file mode 100644 index 00000000..5eff9271 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sr.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ss.png b/pole-sbv-content/plugins/polylang/flags/ss.png new file mode 100644 index 00000000..6b5018a2 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ss.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/st.png b/pole-sbv-content/plugins/polylang/flags/st.png new file mode 100644 index 00000000..2978557b Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/st.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sv.png b/pole-sbv-content/plugins/polylang/flags/sv.png new file mode 100644 index 00000000..24987990 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sv.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sy.png b/pole-sbv-content/plugins/polylang/flags/sy.png new file mode 100644 index 00000000..f5ce30dc Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sy.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/sz.png b/pole-sbv-content/plugins/polylang/flags/sz.png new file mode 100644 index 00000000..914ee861 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/sz.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tc.png b/pole-sbv-content/plugins/polylang/flags/tc.png new file mode 100644 index 00000000..8fc1156b Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tc.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/td.png b/pole-sbv-content/plugins/polylang/flags/td.png new file mode 100644 index 00000000..667f21fd Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/td.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tf.png b/pole-sbv-content/plugins/polylang/flags/tf.png new file mode 100644 index 00000000..80529a43 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tf.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tg.png b/pole-sbv-content/plugins/polylang/flags/tg.png new file mode 100644 index 00000000..3aa00ad4 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tg.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/th.png b/pole-sbv-content/plugins/polylang/flags/th.png new file mode 100644 index 00000000..dd8ba917 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/th.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tibet.png b/pole-sbv-content/plugins/polylang/flags/tibet.png new file mode 100644 index 00000000..6ecc135e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tibet.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tj.png b/pole-sbv-content/plugins/polylang/flags/tj.png new file mode 100644 index 00000000..617bf645 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tj.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tk.png b/pole-sbv-content/plugins/polylang/flags/tk.png new file mode 100644 index 00000000..67b8c8cb Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tk.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tl.png b/pole-sbv-content/plugins/polylang/flags/tl.png new file mode 100644 index 00000000..77da181e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tl.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tm.png b/pole-sbv-content/plugins/polylang/flags/tm.png new file mode 100644 index 00000000..828020ec Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tn.png b/pole-sbv-content/plugins/polylang/flags/tn.png new file mode 100644 index 00000000..183cdd3d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tn.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/to.png b/pole-sbv-content/plugins/polylang/flags/to.png new file mode 100644 index 00000000..f89b8ba7 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/to.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tr.png b/pole-sbv-content/plugins/polylang/flags/tr.png new file mode 100644 index 00000000..be32f77e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tr.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tt.png b/pole-sbv-content/plugins/polylang/flags/tt.png new file mode 100644 index 00000000..2a11c1e2 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tt.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tv.png b/pole-sbv-content/plugins/polylang/flags/tv.png new file mode 100644 index 00000000..28274c5f Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tv.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tw.png b/pole-sbv-content/plugins/polylang/flags/tw.png new file mode 100644 index 00000000..f31c654c Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tw.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/tz.png b/pole-sbv-content/plugins/polylang/flags/tz.png new file mode 100644 index 00000000..c00ff796 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/tz.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ua.png b/pole-sbv-content/plugins/polylang/flags/ua.png new file mode 100644 index 00000000..09563a21 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ua.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ug.png b/pole-sbv-content/plugins/polylang/flags/ug.png new file mode 100644 index 00000000..33f4affa Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ug.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/us.png b/pole-sbv-content/plugins/polylang/flags/us.png new file mode 100644 index 00000000..10f451fe Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/us.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/uy.png b/pole-sbv-content/plugins/polylang/flags/uy.png new file mode 100644 index 00000000..31d948a0 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/uy.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/uz.png b/pole-sbv-content/plugins/polylang/flags/uz.png new file mode 100644 index 00000000..fef5dc17 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/uz.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/va.png b/pole-sbv-content/plugins/polylang/flags/va.png new file mode 100644 index 00000000..b31eaf22 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/va.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/vc.png b/pole-sbv-content/plugins/polylang/flags/vc.png new file mode 100644 index 00000000..8fa17b06 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/vc.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ve.png b/pole-sbv-content/plugins/polylang/flags/ve.png new file mode 100644 index 00000000..00c90f9a Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ve.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/veneto.png b/pole-sbv-content/plugins/polylang/flags/veneto.png new file mode 100644 index 00000000..8dcf6a7b Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/veneto.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/vg.png b/pole-sbv-content/plugins/polylang/flags/vg.png new file mode 100644 index 00000000..41569079 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/vg.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/vi.png b/pole-sbv-content/plugins/polylang/flags/vi.png new file mode 100644 index 00000000..ed26915a Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/vi.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/vn.png b/pole-sbv-content/plugins/polylang/flags/vn.png new file mode 100644 index 00000000..ec7cd48a Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/vn.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/vu.png b/pole-sbv-content/plugins/polylang/flags/vu.png new file mode 100644 index 00000000..b3397bc6 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/vu.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/wales.png b/pole-sbv-content/plugins/polylang/flags/wales.png new file mode 100644 index 00000000..e0d7cee1 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/wales.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/wf.png b/pole-sbv-content/plugins/polylang/flags/wf.png new file mode 100644 index 00000000..9f955873 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/wf.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ws.png b/pole-sbv-content/plugins/polylang/flags/ws.png new file mode 100644 index 00000000..c1695080 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ws.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/ye.png b/pole-sbv-content/plugins/polylang/flags/ye.png new file mode 100644 index 00000000..468dfad0 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/ye.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/yt.png b/pole-sbv-content/plugins/polylang/flags/yt.png new file mode 100644 index 00000000..c298f378 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/yt.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/za.png b/pole-sbv-content/plugins/polylang/flags/za.png new file mode 100644 index 00000000..57c58e21 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/za.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/zm.png b/pole-sbv-content/plugins/polylang/flags/zm.png new file mode 100644 index 00000000..c25b07be Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/zm.png differ diff --git a/pole-sbv-content/plugins/polylang/flags/zw.png b/pole-sbv-content/plugins/polylang/flags/zw.png new file mode 100644 index 00000000..53c97259 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/flags/zw.png differ diff --git a/pole-sbv-content/plugins/polylang/frontend/choose-lang-content.php b/pole-sbv-content/plugins/polylang/frontend/choose-lang-content.php new file mode 100644 index 00000000..7a468e62 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/choose-lang-content.php @@ -0,0 +1,141 @@ +options['media_support'] ) ) { + return $this->get_preferred_language(); + } + + if ( $var = get_query_var( 'lang' ) ) { + $lang = explode( ',',$var ); + $lang = $this->model->get_language( reset( $lang ) ); // choose the first queried language + } + + elseif ( ( is_single() || is_page() || ( is_attachment() && $this->options['media_support'] ) ) && ( ( $var = get_queried_object_id() ) || ( $var = get_query_var( 'p' ) ) || ( $var = get_query_var( 'page_id' ) ) || ( $var = get_query_var( 'attachment_id' ) ) ) ) { + $lang = $this->model->post->get_language( $var ); + } + + else { + foreach ( $this->model->get_translated_taxonomies() as $taxonomy ) { + if ( $var = get_query_var( get_taxonomy( $taxonomy )->query_var ) ) { + $lang = $this->model->term->get_language( $var, $taxonomy ); + } + } + } + + /** + * Filter the language before it is set from the content + * + * @since 0.9 + * + * @param bool|object $lang language object or false if none was found + */ + return apply_filters( 'pll_get_current_language', isset( $lang ) ? $lang : false ); + } + + /** + * sets the language for home page + * add the lang query var when querying archives with no language code + * + * @since 1.2 + * + * @param object $query instance of WP_Query + */ + public function parse_main_query( $query ) { + if ( $query !== $GLOBALS['wp_the_query'] ) { + return; + } + + $qv = $query->query_vars; + + // homepage is requested, let's set the language + // take care to avoid posts page for which is_home = 1 + if ( empty( $query->query ) && ( is_home() || is_page() ) ) { + $this->home_language(); + $this->home_requested(); + } + + parent::parse_main_query( $query ); + + $is_archive = ( count( $query->query ) == 1 && ! empty( $qv['paged'] ) ) || + $query->is_date || + $query->is_author || + ( ! empty( $qv['post_type'] ) && $query->is_post_type_archive && $this->model->is_translated_post_type( $qv['post_type'] ) ); + + // sets the language in case we hide the default language + // use $query->query['s'] as is_search is not set when search is empty + // http://wordpress.org/support/topic/search-for-empty-string-in-default-language + if ( $this->options['hide_default'] && ! isset( $qv['lang'] ) && ( $is_archive || isset( $query->query['s'] ) || ( count( $query->query ) == 1 && ! empty( $qv['feed'] ) ) ) ) { + $this->set_language( $this->model->get_language( $this->options['default_lang'] ) ); + $this->set_curlang_in_query( $query ); + } + } + + /** + * sets the language from content + * + * @since 1.2 + */ + public function wp() { + // nothing to do if the language has already been set ( although normally the filter has been removed ) + if ( ! $this->curlang && $curlang = $this->get_language_from_content() ) { + parent::set_language( $curlang ); + } + } + + /** + * if no language found by get_language_from_content, return the preferred one + * + * @since 0.9 + * + * @param object|bool $lang Language found in get_language_from_content + * @return object Language + */ + public function pll_get_current_language( $lang ) { + return ! $lang ? $this->get_preferred_language() : $lang; + } +} diff --git a/pole-sbv-content/plugins/polylang/frontend/choose-lang-domain.php b/pole-sbv-content/plugins/polylang/frontend/choose-lang-domain.php new file mode 100644 index 00000000..74eabd0b --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/choose-lang-domain.php @@ -0,0 +1,36 @@ +model->get_language( $this->links_model->get_language_from_url() ); + } + + /** + * Adds query vars to query for home pages in all languages + * + * @since 1.5 + */ + public function home_requested() { + $this->set_curlang_in_query( $GLOBALS['wp_query'] ); + /** This action is documented in include/choose-lang.php */ + do_action( 'pll_home_requested' ); + } +} diff --git a/pole-sbv-content/plugins/polylang/frontend/choose-lang-url.php b/pole-sbv-content/plugins/polylang/frontend/choose-lang-url.php new file mode 100644 index 00000000..158b2e1f --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/choose-lang-url.php @@ -0,0 +1,102 @@ +set_language_from_url(); + } + + add_action( 'request', array( $this, 'request' ) ); + } + + /** + * finds the language according to information found in the url + * + * @since 1.2 + */ + public function set_language_from_url() { + $host = str_replace( 'www.', '', parse_url( $this->links_model->home, PHP_URL_HOST ) ); + $home_path = parse_url( $this->links_model->home, PHP_URL_PATH ); + + $requested_host = str_replace( 'www.', '', $_SERVER['HTTP_HOST'] ); + $requested_uri = rtrim( str_replace( $this->index, '', $_SERVER['REQUEST_URI'] ), '/' ); // some PHP setups turn requests for / into /index.php in REQUEST_URI + + // home is resquested + if ( $requested_host == $host && $requested_uri == $home_path && empty( $_SERVER['QUERY_STRING'] ) ) { + $this->home_language(); + add_action( 'setup_theme', array( $this, 'home_requested' ) ); + } + + // take care to post & page preview http://wordpress.org/support/topic/static-frontpage-url-parameter-url-language-information + elseif ( isset( $_GET['preview'] ) && ( ( isset( $_GET['p'] ) && $id = (int) $_GET['p'] ) || ( isset( $_GET['page_id'] ) && $id = (int) $_GET['page_id'] ) ) ) { + $curlang = ( $lg = $this->model->post->get_language( $id ) ) ? $lg : $this->model->get_language( $this->options['default_lang'] ); + } + + // take care to ( unattached ) attachments + elseif ( isset( $_GET['attachment_id'] ) && $id = (int) $_GET['attachment_id'] ) { + $curlang = ( $lg = $this->model->post->get_language( $id ) ) ? $lg : $this->get_preferred_language(); + } + + elseif ( $slug = $this->links_model->get_language_from_url() ) { + $curlang = $this->model->get_language( $slug ); + } + + elseif ( $this->options['hide_default'] ) { + $curlang = $this->model->get_language( $this->options['default_lang'] ); + } + + // if no language found, check_language_code_in_url will attempt to find one and redirect to the correct url + // otherwise 404 will be fired in the preferred language + $this->set_language( empty( $curlang ) ? $this->get_preferred_language() : $curlang ); + } + + + /** + * adds the current language in query vars + * useful for subdomains and multiple domains + * + * @since 1.8 + * + * @param array $qv main request query vars + * @return array modified query vars + */ + public function request( $qv ) { + // FIXME take care not to break untranslated content + // FIXME media ? + + // untranslated post types + if ( isset( $qv['post_type'] ) && ! $this->model->is_translated_post_type( $qv['post_type'] ) ) { + return $qv; + } + + // untranslated taxonomies + $tax_qv = array_filter( wp_list_pluck( get_taxonomies( array(), 'objects' ), 'query_var' ) ); // get all taxonomies query vars + $tax_qv = array_intersect( $tax_qv, array_keys( $qv ) ); // get all queried taxonomies query vars + + if ( ! $this->model->is_translated_taxonomy( array_keys( $tax_qv ) ) ) { + return $qv; + } + + if ( isset( $this->curlang ) && empty( $qv['lang'] ) ) { + $qv['lang'] = $this->curlang->slug; + } + + return $qv; + } +} diff --git a/pole-sbv-content/plugins/polylang/frontend/choose-lang.php b/pole-sbv-content/plugins/polylang/frontend/choose-lang.php new file mode 100644 index 00000000..c68de983 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/choose-lang.php @@ -0,0 +1,328 @@ +links_model = &$polylang->links_model; + $this->model = &$polylang->model; + $this->options = &$polylang->options; + + $this->curlang = &$polylang->curlang; + } + + /** + * sets the language for ajax requests + * and setup actions + * any child class must call this method if it overrides it + * + * @since 1.8 + */ + public function init() { + if ( PLL_AJAX_ON_FRONT || false === stripos( $_SERVER['SCRIPT_FILENAME'], 'index.php' ) ) { + $this->set_language( empty( $_REQUEST['lang'] ) ? $this->get_preferred_language() : $this->model->get_language( $_REQUEST['lang'] ) ); + } + + add_action( 'pre_comment_on_post', array( $this, 'pre_comment_on_post' ) ); // sets the language of comment + add_action( 'parse_query', array( $this, 'parse_main_query' ), 2 ); // sets the language in special cases + add_action( 'wp', array( $this, 'maybe_setcookie' ), 7 ); + } + + /** + * writes language cookie + * loads user defined translations + * fires the action 'pll_language_defined' + * + * @since 1.2 + * + * @param object $curlang current language + */ + protected function set_language( $curlang ) { + // don't set the language a second time + if ( isset( $this->curlang ) ) { + return; + } + + // final check in case $curlang has an unexpected value + // see https://wordpress.org/support/topic/detect-browser-language-sometimes-setting-null-language + $this->curlang = ( $curlang instanceof PLL_Language ) ? $curlang : $this->model->get_language( $this->options['default_lang'] ); + + $GLOBALS['text_direction'] = $this->curlang->is_rtl ? 'rtl' : 'ltr'; + + /** + * Fires when the current language is defined + * + * @since 0.9.5 + * + * @param string $slug current language code + * @param object $curlang current language object + */ + do_action( 'pll_language_defined', $this->curlang->slug, $this->curlang ); + } + + /** + * set a cookie to remember the language. + * possibility to set PLL_COOKIE to false will disable cookie although it will break some functionalities + * + * @since 1.5 + */ + public function maybe_setcookie() { + // check headers have not been sent to avoid ugly error + // cookie domain must be set to false for localhost ( default value for COOKIE_DOMAIN ) thanks to Stephen Harris. + if ( ! headers_sent() && PLL_COOKIE !== false && ! empty( $this->curlang ) && ( ! isset( $_COOKIE[ PLL_COOKIE ] ) || $_COOKIE[ PLL_COOKIE ] != $this->curlang->slug ) && ! is_404() ) { + + /** + * Filter the Polylang cookie duration + * + * @since 1.8 + * + * @param int $duration cookie duration in seconds + */ + $expiration = apply_filters( 'pll_cookie_expiration', YEAR_IN_SECONDS ); + + setcookie( + PLL_COOKIE, + $this->curlang->slug, + time() + $expiration, + COOKIEPATH, + 2 == $this->options['force_lang'] ? parse_url( $this->links_model->home, PHP_URL_HOST ) : COOKIE_DOMAIN, + is_ssl() + ); + } + } + + /** + * get the preferred language according to the browser preferences + * code adapted from http://www.thefutureoftheweb.com/blog/use-accept-language-header + * + * @since 1.8 + * + * @return string|bool the preferred language slug or false + */ + public function get_preferred_browser_language() { + $accept_langs = array(); + + if ( isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) { + // break up string into pieces ( languages and q factors ) + preg_match_all( '/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*( 1|0\.[0-9]+))?/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $lang_parse ); + + $k = $lang_parse[1]; + $v = $lang_parse[4]; + + if ( $n = count( $k ) ) { + // set default to 1 for any without q factor + foreach ( $v as $key => $val ) { + if ( '' === $val ) { + $v[ $key ] = 1; + } + } + + // bubble sort ( need a stable sort for Android, so can't use a PHP sort function ) + if ( $n > 1 ) { + for ( $i = 2; $i <= $n; $i++ ) { + for ( $j = 0; $j <= $n - 2; $j++ ) { + if ( $v[ $j ] < $v[ $j + 1 ] ) { + // swap values + $temp = $v[ $j ]; + $v[ $j ] = $v[ $j + 1 ]; + $v[ $j + 1 ] = $temp; + // Swap keys + $temp = $k[ $j ]; + $k[ $j ] = $k[ $j + 1 ]; + $k[ $j + 1 ] = $temp; + } + } + } + } + $accept_langs = array_combine( $k,$v ); + } + } + + $languages = $this->model->get_languages_list( array( 'hide_empty' => true ) ); // hides languages with no post + + /** + * Filter the list of languages to use to match the browser preferences + * + * @since 1.9.3 + * + * @param array $languages array of PLL_Language objects + */ + $languages = apply_filters( 'pll_languages_for_browser_preferences', $languages ); + + // looks through sorted list and use first one that matches our language list + foreach ( array_keys( $accept_langs ) as $accept_lang ) { + // first loop to match the exact locale + foreach ( $languages as $language ) { + if ( 0 === strcasecmp( $accept_lang, $language->get_locale( 'display' ) ) ) { + return $language->slug; + } + } + + // second loop to match the language set + foreach ( $languages as $language ) { + if ( 0 === stripos( $accept_lang, $language->slug ) || 0 === stripos( $language->get_locale( 'display' ), $accept_lang ) ) { + return $language->slug; + } + } + } + return false; + } + + /** + * returns the language according to browser preference or the default language + * + * @since 0.1 + * + * @return object browser preferred language or default language + */ + public function get_preferred_language() { + // check first if the user was already browsing this site + if ( isset( $_COOKIE[ PLL_COOKIE ] ) ) { + return $this->model->get_language( $_COOKIE[ PLL_COOKIE ] ); + } + + /** + * Filter the visitor's preferred language (normally set first by cookie + * if this is not the first visit, then by the browser preferences). + * If no preferred language has been found or set by this filter, + * Polylang fallbacks to the default language + * + * @since 1.0 + * + * @param string $language preferred language code + */ + $slug = apply_filters( 'pll_preferred_language', $this->options['browser'] ? $this->get_preferred_browser_language() : false ); + + // return default if there is no preferences in the browser or preferences does not match our languages or it is requested not to use the browser preference + return ( $lang = $this->model->get_language( $slug ) ) ? $lang : $this->model->get_language( $this->options['default_lang'] ); + } + + /** + * sets the language when home page is resquested + * + * @since 1.2 + */ + protected function home_language() { + // test referer in case PLL_COOKIE is set to false + // thanks to Ov3rfly http://wordpress.org/support/topic/enhance-feature-when-front-page-is-visited-set-language-according-to-browser + $language = $this->options['hide_default'] && ( ( isset( $_SERVER['HTTP_REFERER'] ) && in_array( parse_url( $_SERVER['HTTP_REFERER'], PHP_URL_HOST ), $this->links_model->get_hosts() ) ) || ! $this->options['browser'] ) ? + $this->model->get_language( $this->options['default_lang'] ) : + $this->get_preferred_language(); // sets the language according to browser preference or default language + $this->set_language( $language ); + } + + /** + * to call when the home page has been requested + * make sure to call this after 'setup_theme' has been fired as we need $wp_query + * performs a redirection to the home page in the current language if needed + * + * @since 0.9 + */ + public function home_requested() { + // we are already on the right page + if ( $this->options['default_lang'] == $this->curlang->slug && $this->options['hide_default'] ) { + $this->set_curlang_in_query( $GLOBALS['wp_query'] ); + + /** + * Fires when the site root page is requested + * + * @since 1.8 + */ + do_action( 'pll_home_requested' ); + } + // redirect to the home page in the right language + // test to avoid crash if get_home_url returns something wrong + // FIXME why this happens? http://wordpress.org/support/topic/polylang-crashes-1 + // don't redirect if $_POST is not empty as it could break other plugins + // don't forget the query string which may be added by plugins + elseif ( is_string( $redirect = $this->curlang->home_url ) && empty( $_POST ) ) { + $redirect = empty( $_SERVER['QUERY_STRING'] ) ? $redirect : $redirect . ( $this->links_model->using_permalinks ? '?' : '&' ) . $_SERVER['QUERY_STRING']; + + /** + * When a visitor reaches the site home, Polylang redirects to the home page in the correct language. + * This filter allows plugins to modify the redirected url or prevent this redirection + * + * @since 1.1.1 + * + * @param string $redirect the url the visitor will be redirected to + */ + if ( $redirect = apply_filters( 'pll_redirect_home', $redirect ) ) { + wp_redirect( $redirect ); + exit; + } + } + } + + /** + * set the language when posting a comment + * + * @since 0.8.4 + * + * @param int $post_id the post beeing commented + */ + public function pre_comment_on_post( $post_id ) { + $this->set_language( $this->model->post->get_language( $post_id ) ); + } + + /** + * modifies some main query vars for home page and page for posts + * to enable one home page ( and one page for posts ) per language + * + * @since 1.2 + * + * @param object $query instance of WP_Query + */ + public function parse_main_query( $query ) { + if ( ! $query->is_main_query() ) { + return; + } + + /** + * This filter allows to set the language based on information contained in the main query + * + * @since 1.8 + * + * @param bool|object $lang false or language object + * @param object $query WP_Query object + */ + if ( $lang = apply_filters( 'pll_set_language_from_query', false, $query ) ) { + $this->set_language( $lang ); + $this->set_curlang_in_query( $query ); + } + + // sets is_home on translated home page when it displays posts + // is_home must be true on page 2, 3... too + // as well as when searching an empty string: http://wordpress.org/support/topic/plugin-polylang-polylang-breaks-search-in-spun-theme + if ( 'posts' == get_option( 'show_on_front' ) && ( count( $query->query ) == 1 || ( is_paged() && count( $query->query ) == 2 ) || ( isset( $query->query['s'] ) && ! $query->query['s'] ) ) && $lang = get_query_var( 'lang' ) ) { + $lang = $this->model->get_language( $lang ); + $this->set_language( $lang ); // sets the language now otherwise it will be too late to filter sticky posts ! + $query->is_home = true; + $query->is_archive = $query->is_tax = false; + } + } + + /** + * Sets the current language in the query + * + * @since 2.2 + * + * @param object $query + */ + protected function set_curlang_in_query( &$query ) { + $pll_query = new PLL_Query( $query, $this->model ); + $pll_query->set_language( $this->curlang ); + } +} diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-auto-translate.php b/pole-sbv-content/plugins/polylang/frontend/frontend-auto-translate.php new file mode 100644 index 00000000..3f46f714 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/frontend-auto-translate.php @@ -0,0 +1,250 @@ +model = &$polylang->model; + $this->curlang = &$polylang->curlang; + + add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) ); // after main Polylang filter + add_filter( 'get_terms_args', array( $this, 'get_terms_args' ), 10, 2 ); + } + + /** + * helper function to get the translated post in the current language + * + * since 1.8 + * + * @param int $post_id + * @return int + */ + protected function get_post( $post_id ) { + return $this->model->post->get( $post_id, $this->curlang ); + } + + /** + * helper function to get the translated term in the current language + * + * since 1.8 + * + * @param int $term_id + * @return int + */ + protected function get_term( $term_id ) { + return $this->model->term->get( $term_id, $this->curlang ); + } + + /** + * filters posts query to automatically translate included ids + * + * @since 1.1 + * + * @param object $query WP_Query object + */ + public function pre_get_posts( $query ) { + global $wpdb; + $qv = &$query->query_vars; + + if ( $query->is_main_query() || isset( $qv['lang'] ) || ( ! empty( $qv['post_type'] ) && ! $this->model->is_translated_post_type( $qv['post_type'] ) ) ) { + return; + } + + // /!\ always keep untranslated as is + + // term ids separated by a comma + $arr = array(); + if ( ! empty( $qv['cat'] ) ) { + foreach ( explode( ',', $qv['cat'] ) as $cat ) { + $tr = $this->get_term( abs( $cat ) ); + $arr[] = $cat < 0 ? -$tr : $tr; + } + + $qv['cat'] = implode( ',', $arr ); + } + + // category_name + $arr = array(); + if ( ! empty( $qv['category_name'] ) ) { + foreach ( explode( ',', $qv['category_name'] ) as $slug ) { + $arr[] = ( ( $cat = wpcom_vip_get_category_by_slug( $slug ) ) && ( $tr_id = $this->get_term( $cat->term_id ) ) && ! is_wp_error( $tr = get_category( $tr_id ) ) ) ? $tr->slug : $slug; + } + + $qv['category_name'] = implode( ',', $arr ); + } + + // array of term ids + foreach ( array( 'category__and', 'category__in', 'category__not_in', 'tag__and', 'tag__in', 'tag__not_in' ) as $key ) { + $arr = array(); + if ( ! empty( $qv[ $key ] ) ) { + foreach ( $qv[ $key ] as $cat ) { + $arr[] = ( $tr = $this->get_term( $cat ) ) ? $tr : $cat; + } + $qv[ $key ] = $arr; + } + } + + // tag + $arr = array(); + if ( ! empty( $qv['tag'] ) ) { + $sep = strpos( $qv['tag'], ',' ) !== false ? ',' : '+'; // two possible separators for tag slugs + foreach ( explode( $sep, $qv['tag'] ) as $slug ) { + $arr[] = ( ( $tag = wpcom_vip_get_term_by( 'slug', $slug, 'post_tag' ) ) && ( $tr_id = $this->get_term( $tag->term_id ) ) && ! is_wp_error( $tr = get_tag( $tr_id ) ) ) ? $tr->slug : $slug; + } + + $qv['tag'] = implode( $sep, $arr ); + } + + // tag_id can only take one id + if ( ! empty( $qv['tag_id'] ) && $tr_id = $this->get_term( $qv['tag_id'] ) ) { + $qv['tag_id'] = $tr_id; + } + + // array of tag slugs + foreach ( array( 'tag_slug__and', 'tag_slug__in' ) as $key ) { + $arr = array(); + if ( ! empty( $qv[ $key ] ) ) { + foreach ( $qv[ $key ] as $slug ) { + $arr[] = ( ( $tag = wpcom_vip_get_term_by( 'slug', $slug, 'post_tag' ) ) && ( $tr_id = $this->get_term( $tag->term_id ) ) && ! is_wp_error( $tr = get_tag( $tr_id ) ) ) ? $tr->slug : $slug; + } + + $qv[ $key ] = $arr; + } + } + + // custom taxonomies + // according to codex, this type of query is deprecated as of WP 3.1 but it does not appear in WP 3.5 source code + foreach ( array_intersect( $this->model->get_translated_taxonomies(), get_taxonomies( array( '_builtin' => false ) ) ) as $taxonomy ) { + $tax = get_taxonomy( $taxonomy ); + $arr = array(); + if ( ! empty( $qv[ $tax->query_var ] ) ) { + $sep = strpos( $qv[ $tax->query_var ], ',' ) !== false ? ',' : '+'; // two possible separators + foreach ( explode( $sep, $qv[ $tax->query_var ] ) as $slug ) { + $arr[] = ( ( $tag = wpcom_vip_get_term_by( 'slug', $slug, $taxonomy ) ) && ( $tr_id = $this->get_term( $tag->term_id ) ) && ! is_wp_error( $tr = get_term( $tr_id, $taxonomy ) ) ) ? $tr->slug : $slug; + } + + $qv[ $tax->query_var ] = implode( $sep, $arr ); + } + } + + // tax_query since WP 3.1 + if ( ! empty( $qv['tax_query'] ) && is_array( $qv['tax_query'] ) ) { + $qv['tax_query'] = $this->translate_tax_query_recursive( $qv['tax_query'] ); + } + + // p, page_id, post_parent can only take one id + foreach ( array( 'p', 'page_id', 'post_parent' ) as $key ) { + if ( ! empty( $qv[ $key ] ) && $tr_id = $this->get_post( $qv[ $key ] ) ) { + $qv[ $key ] = $tr_id; + } + } + + // name, can only take one slug + if ( ! empty( $qv['name'] ) ) { + if ( empty( $qv['post_type'] ) ) { + $post_types = array( 'post' ); + } elseif ( 'any' === $qv['post_type'] ) { + $post_types = get_post_types( array('exclude_from_search' => false) ); // May return a empty array + } else { + $post_types = (array) $qv['post_type']; + } + + if ( ! empty( $post_types ) ) { + // no function to get post by name except get_posts itself + $where = "{$wpdb->posts}.post_type IN ('" . implode( "', '", esc_sql( $post_types ) ) . "')"; + $id = $wpdb->get_var( $wpdb->prepare( "SELECT ID from {$wpdb->posts} WHERE {$where} AND post_name=%s", $qv['name'] ) ); + $qv['name'] = ( $id && ( $tr_id = $this->get_post( $id ) ) && $tr = get_post( $tr_id ) ) ? $tr->post_name : $qv['name']; + } + } + + // pagename, the page id is already available in queried_object_id + if ( ! empty( $qv['pagename'] ) && ! empty( $query->queried_object_id ) && $tr_id = $this->get_post( $query->queried_object_id ) ) { + $query->queried_object_id = $tr_id; + $qv['pagename'] = get_page_uri( $tr_id ); + } + + // array of post ids + // post_parent__in & post_parent__not_in since WP 3.6 + foreach ( array( 'post__in', 'post__not_in', 'post_parent__in', 'post_parent__not_in' ) as $key ) { + $arr = array(); + if ( ! empty( $qv[ $key ] ) ) { + // post__in used by the 2 functions below + // useless to filter them as output is already in the right language and would result in performance loss + foreach ( debug_backtrace() as $trace ) { + if ( in_array( $trace['function'], array( 'wp_nav_menu', 'gallery_shortcode' ) ) ) { + return; + } + } + + foreach ( $qv[ $key ] as $p ) { + $arr[] = ( $tr = $this->get_post( $p ) ) ? $tr : $p; + } + + $qv[ $key ] = $arr; + } + } + } + + /** + * filters terms query to automatically translate included ids + * + * @since 1.1.1 + * + * @param array $args + * @param array $taxonomies + * @return array modified $args + */ + public function get_terms_args( $args, $taxonomies ) { + if ( ! empty( $args['include'] ) && ( empty( $taxonomies ) || $this->model->is_translated_taxonomy( $taxonomies ) ) ) { + foreach ( wp_parse_id_list( $args['include'] ) as $id ) { + $arr[] = ( $tr = $this->get_term( $id ) ) ? $tr : $id; + } + + $args['include'] = $arr; + } + return $args; + } + + /** + * translates tax queries + * compatible with nested tax queries introduced in WP 4.1 + * + * @since 1.7 + * + * @param array $tax_queries + * @return array translated tax queries + */ + protected function translate_tax_query_recursive( $tax_queries ) { + foreach ( $tax_queries as $key => $q ) { + if ( isset( $q['taxonomy'], $q['terms'] ) && $this->model->is_translated_taxonomy( $q['taxonomy'] ) ) { + $arr = array(); + $field = isset( $q['field'] ) && in_array( $q['field'], array( 'slug', 'name' ) ) ? $q['field'] : 'term_id'; + foreach ( (array) $q['terms'] as $t ) { + $arr[] = ( ( $tag = wpcom_vip_get_term_by( $field, $t, $q['taxonomy'] ) ) && ( $tr_id = $this->get_term( $tag->term_id ) ) && ! is_wp_error( $tr = get_term( $tr_id, $q['taxonomy'] ) ) ) ? $tr->$field : $t; + } + + $tax_queries[ $key ]['terms'] = $arr; + } + + // nested queries + elseif ( is_array( $q ) ) { + $tax_queries[ $key ] = $this->translate_tax_query_recursive( $q ); + } + } + + return $tax_queries; + } +} diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-filters-links.php b/pole-sbv-content/plugins/polylang/frontend/frontend-filters-links.php new file mode 100644 index 00000000..6ced1e07 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/frontend-filters-links.php @@ -0,0 +1,393 @@ +curlang = &$polylang->curlang; + $this->cache = new PLL_Cache(); + + // Rewrites author and date links to filter them by language + foreach ( array( 'feed_link', 'author_link', 'search_link', 'year_link', 'month_link', 'day_link' ) as $filter ) { + add_filter( $filter, array( $this, 'archive_link' ), 20 ); + } + + // Meta in the html head section + add_action( 'wp_head', array( $this, 'wp_head' ) ); + + // Modifies the home url + if ( ! defined( 'PLL_FILTER_HOME_URL' ) || PLL_FILTER_HOME_URL ) { + add_filter( 'home_url', array( $this, 'home_url' ), 10, 2 ); + } + + if ( $this->options['force_lang'] > 1 ) { + // Rewrites next and previous post links when not automatically done by WordPress + add_filter( 'get_pagenum_link', array( $this, 'archive_link' ), 20 ); + + // Rewrites ajax url + add_filter( 'admin_url', array( $this, 'admin_url' ), 10, 2 ); + } + + // Redirects to canonical url before WordPress redirect_canonical + // but after Nextgen Gallery which hacks $_SERVER['REQUEST_URI'] !!! and restores it in 'template_redirect' with priority 1 + add_action( 'template_redirect', array( $this, 'check_canonical_url' ), 4 ); + } + + /** + * Modifies the author and date links to add the language parameter ( as well as feed link ) + * + * @since 0.4 + * + * @param string $link + * @return string modified link + */ + public function archive_link( $link ) { + return $this->links_model->switch_language_in_link( $link, $this->curlang ); + } + + /** + * Modifies page links + * and caches the result + * + * @since 1.7 + * + * @param string $link post link + * @param int $post_id post ID + * @return string modified post link + */ + public function _get_page_link( $link, $post_id ) { + $sample = false !== strpos( $link, '%pagename%' ); // To avoid a conflict with plugin Custom Permalinks + $cache_key = "post:{$post_id}:{$sample}"; + if ( false === $_link = $this->cache->get( $cache_key ) ) { + $_link = parent::_get_page_link( $link, $post_id ); + $this->cache->set( $cache_key, $_link ); + } + return $_link; + } + + /** + * Modifies attachment links + * and caches the result + * + * @since 1.6.2 + * + * @param string $link attachment link + * @param int $post_id attachment link + * @return string modified attachment link + */ + public function attachment_link( $link, $post_id ) { + $cache_key = 'post:' . $post_id; + if ( false === $_link = $this->cache->get( $cache_key ) ) { + $_link = parent::attachment_link( $link, $post_id ); + $this->cache->set( $cache_key, $_link ); + } + return $_link; + } + + /** + * Modifies custom posts links + * and caches the result + * + * @since 1.6 + * + * @param string $link post link + * @param object $post post object + * @return string modified post link + */ + public function post_type_link( $link, $post ) { + $sample = false !== strpos( $link, '%postname%' ); // To avoid a conflict with plugin Custom Permalinks + $cache_key = "post:{$post->ID}:{$sample}"; + if ( false === $_link = $this->cache->get( $cache_key ) ) { + $_link = parent::post_type_link( $link, $post ); + $this->cache->set( $cache_key, $_link ); + } + return $_link; + } + + /** + * Modifies filtered taxonomies ( post format like ) and translated taxonomies links + * and caches the result + * + * @since 0.7 + * + * @param string $link + * @param object $term term object + * @param string $tax taxonomy name + * @return string modified link + */ + public function term_link( $link, $term, $tax ) { + $cache_key = 'term:' . $term->term_id; + if ( false === $_link = $this->cache->get( $cache_key ) ) { + if ( in_array( $tax, $this->model->get_filtered_taxonomies() ) ) { + $_link = $this->links_model->switch_language_in_link( $link, $this->curlang ); + + /** This filter is documented in include/filters-links.php */ + $_link = apply_filters( 'pll_term_link', $_link, $this->curlang, $term ); + } + + else { + $_link = parent::term_link( $link, $term, $tax ); + } + $this->cache->set( $cache_key, $_link ); + } + return $_link; + } + + /** + * Outputs references to translated pages ( if exists ) in the html head section + * + * @since 0.1 + */ + public function wp_head() { + // Don't output anything on paged archives: see https://wordpress.org/support/topic/hreflang-on-page2 + // Don't output anything on paged pages and paged posts + if ( is_paged() || ( is_singular() && ( $page = get_query_var( 'page' ) ) && $page > 1 ) ) { + return; + } + + // Google recommends to include self link https://support.google.com/webmasters/answer/189077?hl=en + foreach ( $this->model->get_languages_list() as $language ) { + if ( $url = $this->links->get_translation_url( $language ) ) { + $urls[ $language->get_locale( 'display' ) ] = $url; + } + } + + // Ouptputs the section only if there are translations ( $urls always contains self link ) + if ( ! empty( $urls ) && count( $urls ) > 1 ) { + + // Prepare the list of languages to remove the country code + foreach ( array_keys( $urls ) as $locale ) { + $split = explode( '-', $locale ); + $languages[ $locale ] = reset( $split ); + } + + $count = array_count_values( $languages ); + + foreach ( $urls as $locale => $url ) { + $lang = $count[ $languages[ $locale ] ] > 1 ? $locale : $languages[ $locale ]; // Output the country code only when necessary + $hreflangs[ $lang ] = $url; + } + + // Adds the site root url when the default language code is not hidden + // See https://wordpress.org/support/topic/implementation-of-hreflangx-default + if ( is_front_page() && ! $this->options['hide_default'] && $this->options['force_lang'] < 3 ) { + $hreflangs['x-default'] = home_url( '/' ); + } + + /** + * Filters the list of rel hreflang attributes + * + * @since 2.1 + * + * @param array $hreflangs Array of urls with language codes as keys + */ + $hreflangs = apply_filters( 'pll_rel_hreflang_attributes', $hreflangs ); + + foreach ( $hreflangs as $lang => $url ) { + printf( '' . "\n", esc_url( $url ), esc_attr( $lang ) ); + } + } + } + + /** + * Filters the home url to get the right language + * + * @since 0.4 + * + * @param string $url + * @param string $path + * @return string + */ + public function home_url( $url, $path ) { + if ( ! ( did_action( 'template_redirect' ) || did_action( 'login_init' ) ) || rtrim( $url,'/' ) != $this->links_model->home ) { + return $url; + } + + static $white_list, $black_list; // Avoid evaluating this at each function call + + // We *want* to filter the home url in these cases + if ( empty( $white_list ) ) { + // On Windows get_theme_root() mixes / and \ + // We want only \ for the comparison with debug_backtrace + $theme_root = get_theme_root(); + $theme_root = ( false === strpos( $theme_root, '\\' ) ) ? $theme_root : str_replace( '/', '\\', $theme_root ); + + /** + * Filter the white list of the Polylang 'home_url' filter + * The $args contains an array of arrays each of them having + * a 'file' key and/or a 'function' key to decide which functions in + * which files using home_url() calls must be filtered + * + * @since 1.1.2 + * + * @param array $args + */ + $white_list = apply_filters( 'pll_home_url_white_list', array( + array( 'file' => $theme_root ), + array( 'function' => 'wp_nav_menu' ), + array( 'function' => 'login_footer' ), + array( 'function' => 'get_custom_logo' ), + ) ); + } + + // We don't want to filter the home url in these cases + if ( empty( $black_list ) ) { + + /** + * Filter the black list of the Polylang 'home_url' filter + * The $args contains an array of arrays each of them having + * a 'file' key and/or a 'function' key to decide which functions in + * which files using home_url() calls must be filtered + * + * @since 1.1.2 + * + * @param array $args + */ + $black_list = apply_filters( 'pll_home_url_black_list', array( + array( 'file' => 'searchform.php' ), // Since WP 3.6 searchform.php is passed through get_search_form + array( 'function' => 'get_search_form' ), + ) ); + } + + $traces = version_compare( PHP_VERSION, '5.2.5', '>=' ) ? debug_backtrace( false ) : debug_backtrace(); + unset( $traces[0], $traces[1] ); // We don't need the last 2 calls: this function + call_user_func_array (or apply_filters on PHP7+) + + foreach ( $traces as $trace ) { + // Black list first + foreach ( $black_list as $v ) { + if ( ( isset( $trace['file'], $v['file'] ) && false !== strpos( $trace['file'], $v['file'] ) ) || ( isset( $trace['function'], $v['function'] ) && $trace['function'] == $v['function'] ) ) { + return $url; + } + } + + foreach ( $white_list as $v ) { + if ( ( isset( $trace['function'], $v['function'] ) && $trace['function'] == $v['function'] ) || + ( isset( $trace['file'], $v['file'] ) && false !== strpos( $trace['file'], $v['file'] ) && in_array( $trace['function'], array( 'home_url', 'get_home_url', 'bloginfo', 'get_bloginfo' ) ) ) ) { + $ok = true; + } + } + } + + return empty( $ok ) ? $url : ( empty( $path ) ? rtrim( $this->links->get_home_url( $this->curlang ), '/' ) : $this->links->get_home_url( $this->curlang ) ); + } + + /** + * Rewrites ajax url when using domains or subdomains + * + * @since 1.5 + * + * @param string $url admin url with path evaluated by WordPress + * @param string $path admin path + * @return string + */ + public function admin_url( $url, $path ) { + return 'admin-ajax.php' === $path ? $this->links_model->switch_language_in_link( $url, $this->curlang ) : $url; + } + + /** + * If the language code is not in agreement with the language of the content + * redirects incoming links to the proper URL to avoid duplicate content + * + * @since 0.9.6 + * + * @param string $requested_url optional + * @param bool $do_redirect optional, whether to perform the redirection or not + * @return string if redirect is not performed + */ + public function check_canonical_url( $requested_url = '', $do_redirect = true ) { + global $wp_query, $post, $is_IIS; + + // Don't redirect in same cases as WP + if ( is_trackback() || is_search() || is_admin() || is_preview() || is_robots() || ( $is_IIS && ! iis7_supports_permalinks() ) ) { + return; + } + + // Don't redirect mysite.com/?attachment_id= to mysite.com/en/?attachment_id= + if ( 1 == $this->options['force_lang'] && is_attachment() && isset( $_GET['attachment_id'] ) ) { + return; + } + + // If the default language code is not hidden and the static front page url contains the page name + // the customizer lands here and the code below would redirect to the list of posts + if ( is_customize_preview() ) { + return; + } + + if ( empty( $requested_url ) ) { + $requested_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + } + + if ( is_single() || is_page() ) { + if ( isset( $post->ID ) && $this->model->is_translated_post_type( $post->post_type ) ) { + $language = $this->model->post->get_language( (int) $post->ID ); + } + } + + elseif ( is_category() || is_tag() || is_tax() ) { + $obj = $wp_query->get_queried_object(); + if ( $this->model->is_translated_taxonomy( $obj->taxonomy ) ) { + $language = $this->model->term->get_language( (int) $obj->term_id ); + } + } + + elseif ( $wp_query->is_posts_page ) { + $obj = $wp_query->get_queried_object(); + $language = $this->model->post->get_language( (int) $obj->ID ); + } + + elseif ( is_404() && ! empty( $wp_query->query['page_id'] ) && $id = get_query_var( 'page_id' ) ) { + // Special case for page shortlinks when using subdomains or multiple domains + // Needed because redirect_canonical doesn't accept to change the domain name + $language = $this->model->post->get_language( (int) $id ); + } + + if ( empty( $language ) ) { + $language = $this->curlang; + $redirect_url = $requested_url; + } else { + // First get the canonical url evaluated by WP + // Workaround a WP bug wich removes the port for some urls and get it back at second call to redirect_canonical + $_redirect_url = ( ! $_redirect_url = redirect_canonical( $requested_url, false ) ) ? $requested_url : $_redirect_url; + $redirect_url = ( ! $redirect_url = redirect_canonical( $_redirect_url, false ) ) ? $_redirect_url : $redirect_url; + + // Then get the right language code in url + $redirect_url = $this->options['force_lang'] ? + $this->links_model->switch_language_in_link( $redirect_url, $language ) : + $this->links_model->remove_language_from_link( $redirect_url ); // Works only for default permalinks + } + + /** + * Filters the canonical url detected by Polylang + * + * @since 1.6 + * + * @param bool|string $redirect_url false or the url to redirect to + * @param object $language the language detected + */ + $redirect_url = apply_filters( 'pll_check_canonical_url', $redirect_url, $language ); + + // The language is not correctly set so let's redirect to the correct url for this object + if ( $do_redirect && $redirect_url && $requested_url != $redirect_url ) { + wp_redirect( $redirect_url, 301 ); + exit; + } + + return $redirect_url; + } +} diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-filters-search.php b/pole-sbv-content/plugins/polylang/frontend/frontend-filters-search.php new file mode 100644 index 00000000..fa90546e --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/frontend-filters-search.php @@ -0,0 +1,129 @@ +links_model = &$polylang->links_model; + $this->curlang = &$polylang->curlang; + + // adds the language information in the search form + // low priority in case the search form is created using the same filter as described in http://codex.wordpress.org/Function_Reference/get_search_form + add_filter( 'get_search_form', array( $this, 'get_search_form' ), 99 ); + + // adds the language information in admin bar search form + add_action( 'add_admin_bar_menus', array( $this, 'add_admin_bar_menus' ) ); + + // adds javascript at the end of the document + // was used for WP < 3.6. kept just in case + if ( defined( 'PLL_SEARCH_FORM_JS' ) && PLL_SEARCH_FORM_JS ) { + add_action( 'wp_footer', array( $this, 'wp_print_footer_scripts' ) ); + } + } + + /** + * adds the language information in the search form + * does not work if searchform.php ( prior to WP 3.6 ) is used or if the search form is hardcoded in another template file + * + * @since 0.1 + * + * @param string $form search form + * @return string modified search form + */ + public function get_search_form( $form ) { + if ( $form ) { + if ( $this->links_model->using_permalinks ) { + // take care to modify only the url in the
tag + preg_match( '##', $form, $matches ); + $old = reset( $matches ); + $new = preg_replace( '#' . esc_url( $this->links_model->home ) . '\/?#', esc_url( $this->curlang->search_url ), $old ); + $form = str_replace( $old, $new, $form ); + } + else { + $form = str_replace( '', '', $form ); + } + } + + return $form; + } + + /** + * adds the language information in admin bar search form + * + * @since 1.2 + */ + function add_admin_bar_menus() { + remove_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 4 ); + add_action( 'admin_bar_menu', array( $this, 'admin_bar_search_menu' ), 4 ); + } + + /** + * rewrites the admin bar search form to pass our get_search form filter. See #21342 + * code base is WP 4.3.1 + * + * @since 0.9 + * + * @param object $wp_admin_bar + */ + public function admin_bar_search_menu( $wp_admin_bar ) { + $form = '
'; + $form .= ''; + $form .= ''; + $form .= ''; + $form .= '
'; + + $wp_admin_bar->add_menu( array( + 'parent' => 'top-secondary', + 'id' => 'search', + 'title' => $this->get_search_form( $form ), // pass the get_search_form filter + 'meta' => array( 'class' => 'admin-bar-search', 'tabindex' => -1 ), + ) ); + } + + /** + * allows modifying the search form if it does not pass get_search_form + * + * @since 0.1 + */ + public function wp_print_footer_scripts() { + // don't use directly e[0] just in case there is somewhere else an element named 's' + // check before if the hidden input has not already been introduced by get_search_form ( FIXME: is there a way to improve this ) ? + // thanks to AndyDeGroo for improving the code for compatility with old browsers + // http://wordpress.org/support/topic/development-of-polylang-version-08?replies=6#post-2645559 + $lang = esc_js( $this->curlang->slug ); + $js = "//"; + echo ''; + } +} diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-filters.php b/pole-sbv-content/plugins/polylang/frontend/frontend-filters.php new file mode 100644 index 00000000..886c5a5d --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/frontend-filters.php @@ -0,0 +1,381 @@ +options['media_support'] ) { + add_filter( 'widget_media_image_instance', array( $this, 'widget_media_instance' ), 1 ); // Since WP 4.8 + } + + // Strings translation ( must be applied before WordPress applies its default formatting filters ) + foreach ( array( 'widget_text', 'widget_title', 'option_blogname', 'option_blogdescription', 'option_date_format', 'option_time_format' ) as $filter ) { + add_filter( $filter, 'pll__', 1 ); + } + + // Translates biography + add_filter( 'get_user_metadata', array( $this, 'get_user_metadata' ), 10, 4 ); + + // Set posts and terms language when created from frontend ( ex with P2 theme ) + add_action( 'save_post', array( $this, 'save_post' ), 200, 2 ); + add_action( 'create_term', array( $this, 'save_term' ), 10, 3 ); + add_action( 'edit_term', array( $this, 'save_term' ), 10, 3 ); + + if ( $this->options['media_support'] ) { + add_action( 'add_attachment', array( $this, 'set_default_language' ) ); + } + + // Support theme customizer + // FIXME of course does not work if 'transport' is set to 'postMessage' + if ( isset( $_POST['wp_customize'], $_POST['customized'] ) ) { + add_filter( 'pre_option_blogname', 'pll__', 20 ); + add_filter( 'pre_option_blogdescription', 'pll__', 20 ); + } + } + + /** + * Returns the locale based on current language + * + * @since 0.1 + * + * @param string $locale + * @return string + */ + public function get_locale( $locale ) { + return $this->curlang->locale; + } + + /** + * Filters sticky posts by current language + * + * @since 0.8 + * + * @param array $posts list of sticky posts ids + * @return array modified list of sticky posts ids + */ + public function option_sticky_posts( $posts ) { + global $wpdb; + + if ( $this->curlang && ! empty( $posts ) ) { + $_posts = wp_cache_get( 'sticky_posts', 'options' ); // This option is usually cached in 'all_options' by WP + + if ( empty( $_posts ) || ! is_array( $_posts[ $this->curlang->term_taxonomy_id ] ) ) { + $posts = array_map( 'intval', $posts ); + $posts = implode( ',', $posts ); + + $languages = $this->model->get_languages_list( array( 'fields' => 'term_taxonomy_id' ) ); + $_posts = array_fill_keys( $languages, array() ); // Init with empty arrays + $languages = implode( ',', $languages ); + + $relations = $wpdb->get_results( "SELECT object_id, term_taxonomy_id FROM {$wpdb->term_relationships} WHERE object_id IN ({$posts}) AND term_taxonomy_id IN ({$languages})" ); + + foreach ( $relations as $relation ) { + $_posts[ $relation->term_taxonomy_id ][] = $relation->object_id; + } + wp_cache_add( 'sticky_posts', $_posts, 'options' ); + } + + $posts = $_posts[ $this->curlang->term_taxonomy_id ]; + } + + return $posts; + } + + /** + * Adds language dependent cache domain when querying terms + * useful as the 'lang' parameter is not included in cache key by WordPress + * + * @since 1.3 + * + * @param array $args + * @return array + */ + public function get_terms_args( $args ) { + $lang = isset( $args['lang'] ) ? $args['lang'] : $this->curlang->slug; + $key = '_' . ( is_array( $lang ) ? implode( ',', $lang ) : $lang ); + $args['cache_domain'] = empty( $args['cache_domain'] ) ? 'pll' . $key : $args['cache_domain'] . $key; + return $args; + } + + /** + * Filters categories and post tags by language when needed + * + * @since 0.2 + * + * @param array $clauses sql clauses + * @param array $taxonomies + * @param array $args get_terms arguments + * @return array modified sql clauses + */ + public function terms_clauses( $clauses, $taxonomies, $args ) { + // Does nothing except on taxonomies which are filterable + // Since WP 4.7, make sure not to filter wp_get_object_terms() + if ( ! $this->model->is_translated_taxonomy( $taxonomies ) || ! empty( $args['object_ids'] ) ) { + return $clauses; + } + + // Adds our clauses to filter by language + return $this->model->terms_clauses( $clauses, isset( $args['lang'] ) ? $args['lang'] : $this->curlang ); + } + + /** + * Modifies the sql request for wp_get_archives to filter by the current language + * + * @since 1.9 + * + * @param string $sql JOIN clause + * @param array $r wp_get_archives arguments + * @return string modified JOIN clause + */ + public function getarchives_join( $sql, $r ) { + return ! empty( $r['post_type'] ) && $this->model->is_translated_post_type( $r['post_type'] ) ? $sql . $this->model->post->join_clause() : $sql; + } + + /** + * Modifies the sql request for wp_get_archives to filter by the current language + * + * @since 1.9 + * + * @param string $sql WHERE clause + * @param array $r wp_get_archives arguments + * @return string modified WHERE clause + */ + public function getarchives_where( $sql, $r ) { + return ! empty( $r['post_type'] ) && $this->model->is_translated_post_type( $r['post_type'] ) ? $sql . $this->model->post->where_clause( $this->curlang ) : $sql; + } + + /** + * Modifies the sql request for get_adjacent_post to filter by the current language + * + * @since 0.1 + * + * @param string $sql The JOIN clause in the SQL. + * @param bool $in_same_term Whether post should be in a same taxonomy term. + * @param array $excluded_terms Array of excluded term IDs. + * @param string $taxonomy Taxonomy. Used to identify the term used when `$in_same_term` is true. + * @param WP_Post $post WP_Post object. + * @return string modified JOIN clause + */ + public function posts_join( $sql, $in_same_term, $excluded_terms, $taxonomy = '', $post = null ) { + return $this->model->is_translated_post_type( $post->post_type ) ? $sql . $this->model->post->join_clause( 'p' ) : $sql; + } + + /** + * Modifies the sql request for wp_get_archives and get_adjacent_post to filter by the current language + * + * @since 0.1 + * + * @param string $sql The WHERE clause in the SQL. + * @param bool $in_same_term Whether post should be in a same taxonomy term. + * @param array $excluded_terms Array of excluded term IDs. + * @param string $taxonomy Taxonomy. Used to identify the term used when `$in_same_term` is true. + * @param WP_Post $post WP_Post object. + * @return string modified WHERE clause + */ + public function posts_where( $sql, $in_same_term, $excluded_terms, $taxonomy = '', $post = null ) { + return $this->model->is_translated_post_type( $post->post_type ) ? $sql . $this->model->post->where_clause( $this->curlang ) : $sql; + } + + /** + * Filters the widgets according to the current language + * Don't display if a language filter is set and this is not the current one + * + * @since 0.3 + * + * @param array $instance widget settings + * @param object $widget WP_Widget object + * @return bool|array false if we hide the widget, unmodified $instance otherwise + */ + public function widget_display_callback( $instance, $widget ) { + return ! empty( $instance['pll_lang'] ) && $instance['pll_lang'] != $this->curlang->slug ? false : $instance; + } + + /** + * Remove widgets from sidebars if they are not visible in the current language + * Needed to allow is_active_sidebar() to return false if all widgets are not for the current language. See #54 + * + * @since 2.1 + * + * @param array $sidebars_widgets An associative array of sidebars and their widgets + * @return array + */ + public function sidebars_widgets( $sidebars_widgets ) { + global $wp_registered_widgets; + + foreach ( $sidebars_widgets as $sidebar => $widgets ) { + if ( 'wp_inactive_widgets' == $sidebar || empty( $widgets ) ) { + continue; + } + + foreach ( $widgets as $key => $widget ) { + // Nothing can be done if the widget is created using pre WP2.8 API :( + // There is no object, so we can't access it to get the widget options + if ( ! isset( $wp_registered_widgets[ $widget ]['callback'] ) || ! is_array( $wp_registered_widgets[ $widget ]['callback'] ) || ! isset( $wp_registered_widgets[ $widget ]['callback'][0] ) || ! is_object( $wp_registered_widgets[ $widget ]['callback'][0] ) || ! method_exists( $wp_registered_widgets[ $widget ]['callback'][0], 'get_settings' ) ) { + continue; + } + + $widget_settings = $wp_registered_widgets[ $widget ]['callback'][0]->get_settings(); + $number = $wp_registered_widgets[ $widget ]['params'][0]['number']; + + // Remove the widget if not visible in the current language + if ( ! empty( $widget_settings[ $number ]['pll_lang'] ) && $widget_settings[ $number ]['pll_lang'] !== $this->curlang->slug ) { + unset( $sidebars_widgets[ $sidebar ][ $key ] ); + } + } + } + + return $sidebars_widgets; + } + + /** + * Translates media in media widgets + * + * @since 2.1.5 + * + * @param array $instance Widget instance data + * @return array + */ + public function widget_media_instance( $instance ) { + if ( empty( $instance['pll_lang'] ) && $instance['attachment_id'] && $tr_id = pll_get_post( $instance['attachment_id'] ) ) { + $instance['attachment_id'] = $tr_id; + $attachment = get_post( $tr_id ); + + if ( $instance['caption'] && ! empty( $attachment->post_excerpt ) ) { + $instance['caption'] = $attachment->post_excerpt; + } + + if ( $instance['alt'] && $alt_text = get_post_meta( $tr_id, '_wp_attachment_image_alt', true ) ) { + $instance['alt'] = $alt_text; + } + + if ( $instance['image_title'] && ! empty( $attachment->post_title ) ) { + $instance['image_title'] = $attachment->post_title; + } + } + return $instance; + } + + /** + * Translates biography + * Makes sure that the correct locale is used for ajax calls when the user is logged in + * + * @since 0.9 + * + * @param null $return + * @param int $id User id + * @param string $meta_key + * @param bool $single Whether to return only the first value of the specified $meta_key + * @return null|string + */ + public function get_user_metadata( $return, $id, $meta_key, $single ) { + switch ( $meta_key ) { + case 'description': + if ( $this->curlang->slug !== $this->options['default_lang'] ) { + $return = get_user_meta( $id, 'description_' . $this->curlang->slug, $single ); + } + break; + case 'locale': + if ( Polylang::is_ajax_on_front() ) { + $return = get_locale(); + } + break; + } + + return $return; + } + + /** + * Allows to set a language by default for posts if it has no language yet + * + * @since 1.5.4 + * + * @param int $post_id + */ + public function set_default_language( $post_id ) { + if ( ! $this->model->post->get_language( $post_id ) ) { + if ( isset( $_REQUEST['lang'] ) ) { + $this->model->post->set_language( $post_id, $_REQUEST['lang'] ); + } elseif ( ( $parent_id = wp_get_post_parent_id( $post_id ) ) && $parent_lang = $this->model->post->get_language( $parent_id ) ) { + $this->model->post->set_language( $post_id, $parent_lang ); + } else { + $this->model->post->set_language( $post_id, $this->curlang ); + } + } + } + + /** + * Called when a post ( or page ) is saved, published or updated + * Does nothing except on post types which are filterable + * Sets the language but does not allow to modify it + * + * @since 1.1 + * + * @param int $post_id + * @param object $post + */ + public function save_post( $post_id, $post ) { + if ( $this->model->is_translated_post_type( $post->post_type ) ) { + $this->set_default_language( $post_id ); + } + } + + /** + * Called when a category or post tag is created or edited + * Does nothing except on taxonomies which are filterable + * Sets the language but does not allow to modify it + * + * @since 1.1 + * + * @param int $term_id + * @param int $tt_id Term taxonomy id + * @param string $taxonomy + */ + public function save_term( $term_id, $tt_id, $taxonomy ) { + if ( $this->model->is_translated_taxonomy( $taxonomy ) && ! $this->model->term->get_language( $term_id ) ) { + if ( isset( $_REQUEST['lang'] ) ) { + $this->model->term->set_language( $term_id, $_REQUEST['lang'] ); + } elseif ( ( $term = get_term( $term_id, $taxonomy ) ) && ! empty( $term->parent ) && $parent_lang = $this->model->term->get_language( $term->parent ) ) { + $this->model->term->set_language( $term_id, $parent_lang ); + } else { + $this->model->term->set_language( $term_id, $this->curlang ); + } + } + } +} diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-links.php b/pole-sbv-content/plugins/polylang/frontend/frontend-links.php new file mode 100644 index 00000000..866ba88c --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/frontend-links.php @@ -0,0 +1,209 @@ +curlang = &$polylang->curlang; + $this->cache = new PLL_Cache(); + + } + + /** + * Returns the url of the translation ( if exists ) of the current page + * + * @since 0.1 + * + * @param object $language + * @return string + */ + public function get_translation_url( $language ) { + global $wp_query; + + if ( false !== $translation_url = $this->cache->get( 'translation_url:' . $language->slug ) ) { + return $translation_url; + } + + // Make sure that we have the queried object + // See https://wordpress.org/support/topic/patch-for-fixing-a-notice + $queried_object_id = $wp_query->get_queried_object_id(); + + /** + * Filter the translation url before Polylang attempts to find one + * Internally used by Polylang for the static front page and posts page + * + * @since 1.8 + * + * @param string $url Empty or the url of the translation of teh current page + * @param object $language Language of the translation + * @param int $queried_object_id Queried object id + */ + if ( ! $url = apply_filters( 'pll_pre_translation_url', '', $language, $queried_object_id ) ) { + $qv = $wp_query->query_vars; + $hide = $this->options['default_lang'] == $language->slug && $this->options['hide_default']; + + // Post and attachment + if ( is_single() && ( $this->options['media_support'] || ! is_attachment() ) && ( $id = $this->model->post->get( $queried_object_id, $language ) ) && $this->current_user_can_read( $id ) ) { + $url = get_permalink( $id ); + } + + // Page + elseif ( is_page() && ( $id = $this->model->post->get( $queried_object_id, $language ) ) && $this->current_user_can_read( $id ) ) { + $url = get_page_link( $id ); + } + + elseif ( is_search() ) { + $url = $this->get_archive_url( $language ); + + // Special case for search filtered by translated taxonomies: taxonomy terms are translated in the translation url + if ( ! empty( $wp_query->tax_query->queries ) ) { + foreach ( $wp_query->tax_query->queries as $tax_query ) { + if ( ! empty( $tax_query['taxonomy'] ) && $this->model->is_translated_taxonomy( $tax_query['taxonomy'] ) ) { + + $tax = get_taxonomy( $tax_query['taxonomy'] ); + $terms = get_terms( $tax->name, array( 'fields' => 'id=>slug' ) ); // Filtered by current language + + foreach ( $tax_query['terms'] as $slug ) { + $term_id = array_search( $slug, $terms ); // What is the term_id corresponding to taxonomy term? + if ( $term_id && $term_id = $this->model->term->get_translation( $term_id, $language ) ) { // Get the translated term_id + $term = get_term( $term_id, $tax->name ); + $url = str_replace( $slug, $term->slug, $url ); + } + } + } + } + } + } + + // Translated taxonomy + // Take care that is_tax() is false for categories and tags + elseif ( ( is_category() || is_tag() || is_tax() ) && ( $term = get_queried_object() ) && $this->model->is_translated_taxonomy( $term->taxonomy ) ) { + $lang = $this->model->term->get_language( $term->term_id ); + + if ( ! $lang || $language->slug == $lang->slug ) { + $url = wpcom_vip_get_term_link( $term, $term->taxonomy ); // Self link + } + + elseif ( $tr_id = $this->model->term->get_translation( $term->term_id, $language ) ) { + if ( $tr_term = get_term( $tr_id, $term->taxonomy ) ) { + // Check if translated term ( or children ) have posts + $count = $tr_term->count || ( is_taxonomy_hierarchical( $term->taxonomy ) && array_sum( wp_list_pluck( get_terms( $term->taxonomy, array( 'child_of' => $tr_term->term_id, 'lang' => $language->slug ) ), 'count' ) ) ); + + /** + * Filter whether to hide an archive translation url + * + * @since 2.2.4 + * + * @param bool $hide True to hide the translation url. + * defaults to true when the translated archive is empty, false otherwise. + * @param string $lang The language code of the translation + * @param array $args Arguments used to evaluated the number of posts in the archive + */ + if ( ! apply_filters( 'pll_hide_archive_translation_url', ! $count , $language->slug, array( 'taxonomy' => $term->taxonomy ) ) ) { + $url = wpcom_vip_get_term_link( $tr_term, $term->taxonomy ); + } + } + } + } + + // Post type archive + elseif ( is_post_type_archive() ) { + if ( $this->model->is_translated_post_type( $qv['post_type'] ) ) { + $args = array( 'post_type' => $qv['post_type'] ); + $count = $this->model->count_posts( $language, $args ); + + /** This filter is documented in frontend/frontend-links.php */ + if ( ! apply_filters( 'pll_hide_archive_translation_url', ! $count , $language->slug, $args ) ) { + $url = $this->get_archive_url( $language ); + } + } + } + + // Other archives + elseif ( is_archive() ) { + $keys = array( 'post_type', 'm', 'year', 'monthnum', 'day', 'author', 'author_name' ); + $keys = array_merge( $keys, $this->model->get_filtered_taxonomies_query_vars() ); + $args = array_intersect_key( $qv, array_flip( $keys ) ); + $count = $this->model->count_posts( $language, $args ); + + /** This filter is documented in frontend/frontend-links.php */ + if ( ! apply_filters( 'pll_hide_archive_translation_url', ! $count , $language->slug, $args ) ) { + $url = $this->get_archive_url( $language ); + } + } + + // Front page when it is the list of posts + elseif ( is_front_page() ) { + $url = $this->get_home_url( $language ); + } + } + + /** + * Filter the translation url of the current page before Polylang caches it + * + * @since 1.1.2 + * + * @param null|string $url The translation url, null if none was found + * @param string $language The language code of the translation + */ + $translation_url = apply_filters( 'pll_translation_url', ( isset( $url ) && ! is_wp_error( $url ) ? $url : null ), $language->slug ); + $this->cache->set( 'translation_url:' . $language->slug, $translation_url ); + return $translation_url; + } + + /** + * Get the translation of the current archive url + * used also for search + * + * @since 1.2 + * + * @param object $language + * @return string + */ + public function get_archive_url( $language ) { + $url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + $url = $this->links_model->switch_language_in_link( $url, $language ); + $url = $this->links_model->remove_paged_from_link( $url ); + + /** + * Filter the archive url + * + * @since 1.6 + * + * @param string $url Url of the archive + * @param object $language Language of the archive + */ + return apply_filters( 'pll_get_archive_url', $url, $language ); + } + + /** + * Returns the home url in the right language + * + * @since 0.1 + * + * @param object $language Optional, defaults to current language + * @param bool $is_search Optional, whether we need the home url for a search form, defaults to false + */ + public function get_home_url( $language = '', $is_search = false ) { + if ( empty( $language ) ) { + $language = $this->curlang; + } + + return parent::get_home_url( $language, $is_search ); + } +} diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-nav-menu.php b/pole-sbv-content/plugins/polylang/frontend/frontend-nav-menu.php new file mode 100644 index 00000000..9cec1d1a --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/frontend-nav-menu.php @@ -0,0 +1,297 @@ +curlang = &$polylang->curlang; + + // Split the language switcher menu item in several language menu items + add_filter( 'wp_get_nav_menu_items', array( $this, 'wp_get_nav_menu_items' ), 20 ); // after the customizer menus + add_filter( 'wp_nav_menu_objects', array( $this, 'wp_nav_menu_objects' ) ); + add_filter( 'nav_menu_link_attributes', array( $this, 'nav_menu_link_attributes' ), 10, 2 ); + + // Filters menus by language + add_filter( 'theme_mod_nav_menu_locations', array( $this, 'nav_menu_locations' ), 20 ); + add_filter( 'wp_nav_menu_args', array( $this, 'wp_nav_menu_args' ) ); + + // The customizer + if ( isset( $_POST['wp_customize'], $_POST['customized'] ) ) { + add_filter( 'wp_nav_menu_args', array( $this, 'filter_args_before_customizer' ) ); + add_filter( 'wp_nav_menu_args', array( $this, 'filter_args_after_customizer' ), 2000 ); + } + } + + /** + * Sort menu items by menu order + * + * @since 1.7.9 + * + * @param object $a The first object to compare + * @param object $b The second object to compare + * @return int -1 or 1 if $a is considered to be respectively less than or greater than $b. + */ + protected function usort_menu_items( $a, $b ) { + return ( $a->menu_order < $b->menu_order ) ? -1 : 1; + } + + /** + * Splits the one item of backend in several items on frontend + * take care to menu_order as it is used later in wp_nav_menu + * + * @since 1.1.1 + * + * @param array $items menu items + * @return array modified items + */ + public function wp_get_nav_menu_items( $items ) { + if ( doing_action( 'customize_register' ) ) { // needed since WP 4.3, doing_action available since WP 3.9 + return $items; + } + + // The customizer menus does not sort the items and we need them to be sorted before splitting the language switcher + usort( $items, array( $this, 'usort_menu_items' ) ); + + $new_items = array(); + $offset = 0; + + foreach ( $items as $key => $item ) { + if ( $options = get_post_meta( $item->ID, '_pll_menu_item', true ) ) { + $i = 0; + + $switcher = new PLL_Switcher; + $args = array_merge( array( 'raw' => 1 ), $options ); + $the_languages = $switcher->the_languages( PLL()->links, $args ); + + // parent item for dropdown + if ( ! empty( $options['dropdown'] ) ) { + $item->title = $options['show_flags'] && $options['show_names'] ? $this->curlang->flag . ' ' . esc_html( $this->curlang->name ) : ( $options['show_flags'] ? $this->curlang->flag : esc_html( $this->curlang->name ) ); + $item->attr_title = ''; + $item->classes = array( 'pll-parent-menu-item' ); + $new_items[] = $item; + $offset++; + } + + foreach ( $the_languages as $lang ) { + $lang_item = clone $item; + $lang_item->ID = $lang_item->ID . '-' . $lang['slug']; // A unique ID + $lang_item->title = $options['show_flags'] && $options['show_names'] ? $lang['flag'] . '' . esc_html( $lang['name'] ) . '' : ( $options['show_flags'] ? $lang['flag'] : esc_html( $lang['name'] ) ); + $lang_item->attr_title = ''; + $lang_item->url = $lang['url']; + $lang_item->lang = $lang['locale']; // Save this for use in nav_menu_link_attributes + $lang_item->classes = $lang['classes']; + $lang_item->menu_order += $offset + $i++; + if ( ! empty( $options['dropdown'] ) ) { + $lang_item->menu_item_parent = $item->db_id; + $lang_item->db_id = 0; // to avoid recursion + } + $new_items[] = $lang_item; + } + $offset += $i - 1; + } else { + $item->menu_order += $offset; + $new_items[] = $item; + } + } + return $new_items; + } + + /** + * Returns the ancestors of a menu item + * + * @since 1.1.1 + * + * @param object $item + * @return array ancestors ids + */ + public function get_ancestors( $item ) { + $ids = array(); + $_anc_id = (int) $item->db_id; + while ( ( $_anc_id = get_post_meta( $_anc_id, '_menu_item_menu_item_parent', true ) ) && ! in_array( $_anc_id, $ids ) ) { + $ids[] = $_anc_id; + } + return $ids; + } + + /** + * Removes current-menu and current-menu-ancestor classes to lang switcher when not on the home page + * + * @since 1.1.1 + * + * @param array $items + * @return array modified menu items + */ + public function wp_nav_menu_objects( $items ) { + $r_ids = $k_ids = array(); + + foreach ( $items as $item ) { + if ( ! empty( $item->classes ) && is_array( $item->classes ) ) { + if ( in_array( 'current-lang', $item->classes ) ) { + $item->current = false; + $item->classes = array_diff( $item->classes, array( 'current-menu-item' ) ); + $r_ids = array_merge( $r_ids, $this->get_ancestors( $item ) ); // Remove the classes for these ancestors + } elseif ( in_array( 'current-menu-item', $item->classes ) ) { + $k_ids = array_merge( $k_ids, $this->get_ancestors( $item ) ); // Keep the classes for these ancestors + } + } + } + + $r_ids = array_diff( $r_ids, $k_ids ); + + foreach ( $items as $item ) { + if ( ! empty( $item->db_id ) && in_array( $item->db_id, $r_ids ) ) { + $item->classes = array_diff( $item->classes, array( 'current-menu-ancestor', 'current-menu-parent', 'current_page_parent', 'current_page_ancestor' ) ); + } + } + + return $items; + } + + /** + * Adds hreflang attribute for the language switcher menu items + * available since WP 3.6 + * + * @since 1.1 + * + * @param array $atts + * @param object $item + * @return array modified $atts + */ + public function nav_menu_link_attributes( $atts, $item ) { + if ( isset( $item->lang ) ) { + $atts['lang'] = $atts['hreflang'] = esc_attr( $item->lang ); + } + return $atts; + } + + /** + * Fills the theme nav menus locations with the right menu in the right language + * Needs to wait for the language to be defined + * + * @since 1.2 + * + * @param array|bool $menus list of nav menus locations, false if menu locations have not been filled yet + * @return array|bool modified list of nav menus locations + */ + public function nav_menu_locations( $menus ) { + if ( is_array( $menus ) && ! empty( $this->curlang ) ) { + // First get multilingual menu locations from DB + $theme = get_option( 'stylesheet' ); + + foreach ( $menus as $loc => $menu ) { + $menus[ $loc ] = empty( $this->options['nav_menus'][ $theme ][ $loc ][ $this->curlang->slug ] ) ? 0 : $this->options['nav_menus'][ $theme ][ $loc ][ $this->curlang->slug ]; + } + + // Support for theme customizer + // Let's look for multilingual menu locations directly in $_POST as there are not in customizer object + if ( isset( $_POST['wp_customize'], $_POST['customized'] ) ) { + $customized = json_decode( wp_unslash( $_POST['customized'] ) ); + + if ( is_object( $customized ) ) { + foreach ( $customized as $key => $c ) { + if ( false !== strpos( $key, 'nav_menu_locations[' ) ) { + $loc = substr( trim( $key, ']' ), 19 ); + $infos = $this->explode_location( $loc ); + if ( $infos['lang'] == $this->curlang->slug ) { + $menus[ $infos['location'] ] = $c; + } elseif ( $this->curlang->slug == $this->options['default_lang'] ) { + $menus[ $loc ] = $c; + } + } + } + } + } + } + return $menus; + } + + /** + * Attempt to translate the nav menu when it is hardcoded or when no location is defined in wp_nav_menu + * + * @since 1.7.10 + * + * @param array $args + * @return array modified $args + */ + public function wp_nav_menu_args( $args ) { + $theme = get_option( 'stylesheet' ); + + if ( empty( $this->curlang ) || empty( $this->options['nav_menus'][ $theme ] ) ) { + return $args; + } + + // Get the nav menu based on the requested menu + $menu = wp_get_nav_menu_object( $args['menu'] ); + + // Attempt to find a translation of this menu + // This obviously does not work if the nav menu has no associated theme location + if ( $menu ) { + foreach ( $this->options['nav_menus'][ $theme ] as $menus ) { + if ( in_array( $menu->term_id, $menus ) && ! empty( $menus[ $this->curlang->slug ] ) ) { + $args['menu'] = $menus[ $this->curlang->slug ]; + return $args; + } + } + } + + // Get the first menu that has items and and is in the current language if we still can't find a menu + if ( ! $menu && ! $args['theme_location'] ) { + $menus = wp_get_nav_menus(); + foreach ( $menus as $menu_maybe ) { + if ( $menu_items = wp_get_nav_menu_items( $menu_maybe->term_id, array( 'update_post_term_cache' => false ) ) ) { + foreach ( $this->options['nav_menus'][ $theme ] as $menus ) { + if ( in_array( $menu_maybe->term_id, $menus ) && ! empty( $menus[ $this->curlang->slug ] ) ) { + $args['menu'] = $menus[ $this->curlang->slug ]; + return $args; + } + } + } + } + } + + return $args; + } + + /** + * Filters the nav menu location before the customizer so that it matches the temporary location in the customizer + * + * @since 1.8 + * + * @param array $args wp_nav_menu $args + * @return array modified $args + */ + public function filter_args_before_customizer( $args ) { + if ( ! empty( $this->curlang ) ) { + $args['theme_location'] = $this->combine_location( $args['theme_location'], $this->curlang ); + } + return $args; + } + + /** + * Filters the nav menu location after the customizer to get back the true nav menu location for the theme + * + * @since 1.8 + * + * @param array $args wp_nav_menu $args + * @return array modified $args + */ + public function filter_args_after_customizer( $args ) { + $infos = $this->explode_location( $args['theme_location'] ); + $args['theme_location'] = $infos['location']; + return $args; + } +} diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend-static-pages.php b/pole-sbv-content/plugins/polylang/frontend/frontend-static-pages.php new file mode 100644 index 00000000..7adf2e41 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/frontend-static-pages.php @@ -0,0 +1,267 @@ +links_model = &$polylang->links_model; + $this->links = &$polylang->links; + + add_action( 'pll_language_defined', array( $this, 'pll_language_defined' ) ); + add_action( 'pll_home_requested', array( $this, 'pll_home_requested' ) ); + + // Manages the redirection of the homepage + add_filter( 'redirect_canonical', array( $this, 'redirect_canonical' ), 10, 2 ); + + add_filter( 'pll_pre_translation_url', array( $this, 'pll_pre_translation_url' ), 10, 3 ); + add_filter( 'pll_check_canonical_url', array( $this, 'pll_check_canonical_url' ) ); + + add_filter( 'pll_set_language_from_query', array( $this, 'page_on_front_query' ), 10, 2 ); + add_filter( 'pll_set_language_from_query', array( $this, 'page_for_posts_query' ), 10, 2 ); + } + + /** + * Init the filters + * + * @since 1.8 + */ + public function pll_language_defined() { + // Translates our page on front and page for posts properties + $this->init(); + + // Translates page for posts and page on front + add_filter( 'option_page_on_front', array( $this, 'translate_page_on_front' ) ); + add_filter( 'option_page_for_posts', array( $this, 'translate_page_for_posts' ) ); + + // Support theme customizer + if ( isset( $_POST['wp_customize'], $_POST['customized'] ) ) { + add_filter( 'pre_option_page_on_front', 'pll_get_post', 20 ); + add_filter( 'pre_option_page_for_post', 'pll_get_post', 20 ); + } + } + + /** + * Translates the page_id query var when the site root page is requested + * + * @since 1.8 + */ + public function pll_home_requested() { + set_query_var( 'page_id', $this->curlang->page_on_front ); + } + + /** + * Translates page on front + * + * @since 1.8 + * + * @param int $v page on front page id + * @return int + */ + public function translate_page_on_front( $v ) { + // returns the current page if there is no translation to avoid ugly notices + return isset( $this->curlang->page_on_front ) ? $this->curlang->page_on_front : $v; + } + + /** + * Manages canonical redirection of the homepage when using page on front + * + * @since 0.1 + * + * @param string $redirect_url + * @param string $requested_url + * @return bool|string modified url, false if redirection is canceled + */ + public function redirect_canonical( $redirect_url, $requested_url ) { + global $wp_query; + if ( is_page() && ! is_feed() && isset( $wp_query->queried_object ) && $wp_query->queried_object->ID == $this->curlang->page_on_front ) { + $url = is_paged() ? $this->links_model->add_paged_to_link( $this->links->get_home_url(), $wp_query->query_vars['page'] ) : $this->links->get_home_url(); + + // Don't forget additional query vars + $query = parse_url( $redirect_url, PHP_URL_QUERY ); + if ( ! empty( $query ) ) { + parse_str( $query, $query_vars ); + $query_vars = rawurlencode_deep( $query_vars ); // WP encodes query vars values + $url = add_query_arg( $query_vars, $url ); + } + + return $url; + } + + return $redirect_url; + } + + /** + * Translates the url of the page on front and page for posts + * + * @since 1.8 + * + * @param string $url not used + * @param object $language language in which we want the translation + * @param int $queried_object_id id of the queried object + * @return string + */ + public function pll_pre_translation_url( $url, $language, $queried_object_id ) { + if ( ! empty( $queried_object_id ) ) { + // Page for posts + if ( $GLOBALS['wp_query']->is_posts_page && ( $id = $this->model->post->get( $queried_object_id, $language ) ) ) { + $url = get_permalink( $id ); + } + + // Page on front + elseif ( is_front_page() && $language->page_on_front && ( $language->page_on_front == $this->model->post->get( $queried_object_id, $language ) ) ) { + $url = $language->home_url; + } + } + + return $url; + } + + /** + * Handles canonical redirection if we are on a static front page + * + * @since 1.8 + * + * @param string $redirect_url + * @return bool|string + */ + public function pll_check_canonical_url( $redirect_url ) { + if ( ! empty( $this->curlang->page_on_front ) && is_page( $this->curlang->page_on_front ) ) { + // Redirect www.mysite.fr to mysite.fr + if ( 3 === $this->options['force_lang'] ) { + foreach ( $this->options['domains'] as $lang => $domain ) { + $host = parse_url( $domain, PHP_URL_HOST ); + if ( 'www.' . $_SERVER['HTTP_HOST'] === $host || 'www.' . $host === $_SERVER['HTTP_HOST'] ) { + $language = $this->model->get_language( $lang ); + return $language->home_url; + } + } + } + + // Prevents canonical redirection made by WP from secondary language to main language + if ( $this->options['redirect_lang'] ) { + return false; + } + } + return $redirect_url; + } + + /** + * Setups query vars when requesting a static front page + * + * @since 1.8 + * + * @param bool|object $lang + * @param object $query + * @return bool|object + */ + public function page_on_front_query( $lang, $query ) { + if ( ! empty( $lang ) || ! $this->page_on_front ) { + return $lang; + } + + // The home page is requested + if ( did_action( 'home_requested' ) ) { + $query->set( 'page_id', $lang->page_on_front ); + } + + // Redirect the language page to the homepage when using a static front page + elseif ( ( $this->options['redirect_lang'] || $this->options['hide_default'] ) && ( count( $query->query ) == 1 || ( ( is_preview() || is_paged() || ! empty( $query->query['page'] ) ) && count( $query->query ) == 2 ) || ( ( is_preview() && ( is_paged() || ! empty( $query->query['page'] ) ) ) && count( $query->query ) == 3 ) ) && is_tax( 'language' ) ) { + $lang = $this->model->get_language( get_query_var( 'lang' ) ); + $query->set( 'page_id', $lang->page_on_front ); + $query->is_singular = $query->is_page = true; + $query->is_archive = $query->is_tax = false; + unset( $query->query_vars['lang'], $query->queried_object ); // Reset queried object + } + + // Fix paged static front page in plain permalinks when Settings > Reading doesn't match the default language + elseif ( ! $this->links_model->using_permalinks && count( $query->query ) === 1 && ! empty( $query->query['page'] ) ) { + $lang = $this->model->get_language( $this->options['default_lang'] ); + $query->set( 'page_id', $lang->page_on_front ); + $query->is_singular = $query->is_page = true; + $query->is_archive = $query->is_tax = false; + unset( $query->query_vars['lang'], $query->queried_object ); // Reset queried object + } + + // Set the language when requesting a static front page + else { + $page_id = $this->get_page_id( $query ); + $languages = $this->model->get_languages_list(); + $pages = wp_list_pluck( $languages, 'page_on_front' ); + + if ( ! empty( $page_id ) && false !== $n = array_search( $page_id, $pages ) ) { + $lang = $languages[ $n ]; + } + } + + // Fix for page_on_front + if ( ( $this->options['force_lang'] < 2 || ! $this->options['redirect_lang'] ) && $this->links_model->using_permalinks && ! empty( $lang ) && isset( $query->query['paged'] ) ) { + $query->set( 'page', $query->query['paged'] ); + unset( $query->query['paged'] ); + } elseif ( ! $this->links_model->using_permalinks && ! empty( $query->query['page'] ) ) { + $query->is_paged = true; + } + + return $lang; + } + + /** + * Setups query vars when requesting a posts page + * + * @since 1.8 + * + * @param bool|object $lang + * @param object $query + * @return bool|object + */ + public function page_for_posts_query( $lang, $query ) { + if ( empty( $lang ) && $this->page_for_posts ) { + $page_id = $this->get_page_id( $query ); + + if ( ! empty( $page_id ) && in_array( $page_id, $pages = $this->model->get_languages_list( array( 'fields' => 'page_for_posts' ) ) ) ) { + // Fill the cache with all pages for posts to avoid one query per page later + // The posts_per_page limit is a trick to avoid splitting the query + get_posts( array( 'posts_per_page' => 999, 'post_type' => 'page', 'post__in' => $pages, 'lang' => '' ) ); + + $lang = $this->model->post->get_language( $page_id ); + $query->is_singular = $query->is_page = false; + $query->is_home = $query->is_posts_page = true; + } + } + return $lang; + } + + /** + * Get queried page_id ( if exists ) + * If permalinks are used, WordPress does set and use $query->queried_object_id and sets $query->query_vars['page_id'] to 0 + * and does set and use $query->query_vars['page_id'] if permalinks are not used :( + * + * @since 1.5 + * + * @param object $query instance of WP_Query + * @return int page_id + */ + protected function get_page_id( $query ) { + if ( ! empty( $query->query_vars['pagename'] ) && isset( $query->queried_object_id ) ) { + return $query->queried_object_id; + } + + if ( isset( $query->query_vars['page_id'] ) ) { + return $query->query_vars['page_id']; + } + + return 0; // No page queried + } +} diff --git a/pole-sbv-content/plugins/polylang/frontend/frontend.php b/pole-sbv-content/plugins/polylang/frontend/frontend.php new file mode 100644 index 00000000..60b3a83c --- /dev/null +++ b/pole-sbv-content/plugins/polylang/frontend/frontend.php @@ -0,0 +1,185 @@ + inherited, reference to Polylang options array + * model => inherited, reference to PLL_Model object + * links_model => inherited, reference to PLL_Links_Model object + * links => reference to PLL_Links object + * static_pages => reference to PLL_Frontend_Static_Pages object + * filters_links => inherited, reference to PLL_Frontend_Filters_Links object + * choose_lang => reference to PLL_Choose_lang object + * curlang => current language + * filters => reference to PLL_Filters object + * filters_search => reference to PLL_Frontend_Filters_Search object + * nav_menu => reference to PLL_Frontend_Nav_Menu object + * auto_translate => optional, reference to PLL_Auto_Translate object + * + * @since 1.2 + */ +class PLL_Frontend extends PLL_Base { + public $curlang; + public $links, $choose_lang, $filters, $filters_search, $nav_menu, $auto_translate; + + /** + * constructor + * + * @since 1.2 + * + * @param object $links_model + */ + public function __construct( &$links_model ) { + parent::__construct( $links_model ); + + add_action( 'pll_language_defined', array( $this, 'pll_language_defined' ), 1 ); + + // avoids the language being the queried object when querying multiple taxonomies + add_action( 'parse_tax_query', array( $this, 'parse_tax_query' ), 1 ); + + // filters posts by language + add_action( 'parse_query', array( $this, 'parse_query' ), 6 ); + + // not before 'check_canonical_url' + if ( ! defined( 'PLL_AUTO_TRANSLATE' ) || PLL_AUTO_TRANSLATE ) { + add_action( 'template_redirect', array( $this, 'auto_translate' ), 7 ); + } + } + + /** + * setups the language chooser based on options + * + * @since 1.2 + */ + public function init() { + $this->links = new PLL_Frontend_Links( $this ); + + // Static front page and page for posts + if ( 'page' === get_option( 'show_on_front' ) ) { + $this->static_pages = new PLL_Frontend_Static_Pages( $this ); + } + + // setup the language chooser + $c = array( 'Content', 'Url', 'Url', 'Domain' ); + $class = 'PLL_Choose_Lang_' . $c[ $this->options['force_lang'] ]; + $this->choose_lang = new $class( $this ); + $this->choose_lang->init(); + + // need to load nav menu class early to correctly define the locations in the customizer when the language is set from the content + $this->nav_menu = new PLL_Frontend_Nav_Menu( $this ); + } + + /** + * setups filters and nav menus once the language has been defined + * + * @since 1.2 + */ + public function pll_language_defined() { + // filters + $this->filters_links = new PLL_Frontend_Filters_Links( $this ); + $this->filters = new PLL_Frontend_Filters( $this ); + $this->filters_search = new PLL_Frontend_Filters_Search( $this ); + + // Auto translate for Ajax + if ( ( ! defined( 'PLL_AUTO_TRANSLATE' ) || PLL_AUTO_TRANSLATE ) && wp_doing_ajax() ) { + $this->auto_translate(); + } + } + + /** + * when querying multiple taxonomies, makes sure that the language is not the queried object + * + * @since 1.8 + * + * @param object $query WP_Query object + */ + public function parse_tax_query( $query ) { + $pll_query = new PLL_Query( $query, $this->model ); + $queried_taxonomies = $pll_query->get_queried_taxonomies(); + + if ( ! empty( $queried_taxonomies ) && 'language' == reset( $queried_taxonomies ) ) { + $query->tax_query->queried_terms['language'] = array_shift( $query->tax_query->queried_terms ); + } + } + + /** + * modifies some query vars to "hide" that the language is a taxonomy and avoid conflicts + * + * @since 1.2 + * + * @param object $query WP_Query object + */ + public function parse_query( $query ) { + $qv = $query->query_vars; + $pll_query = new PLL_Query( $query, $this->model ); + $taxonomies = $pll_query->get_queried_taxonomies(); + + // Allow filtering recent posts and secondary queries by the current language + if ( ! empty( $this->curlang ) ) { + $pll_query->filter_query( $this->curlang ); + } + + // modifies query vars when the language is queried + if ( ! empty( $qv['lang'] ) || ( ! empty( $taxonomies ) && array( 'language' ) == array_values( $taxonomies ) ) ) { + // do we query a custom taxonomy? + $taxonomies = array_diff( $taxonomies , array( 'language', 'category', 'post_tag' ) ); + + // remove pages query when the language is set unless we do a search + // take care not to break the single page, attachment and taxonomies queries! + if ( empty( $qv['post_type'] ) && ! $query->is_search && ! $query->is_page && ! $query->is_attachment && empty( $taxonomies ) ) { + $query->set( 'post_type', 'post' ); + } + + // unset the is_archive flag for language pages to prevent loading the archive template + // keep archive flag for comment feed otherwise the language filter does not work + if ( empty( $taxonomies ) && ! $query->is_comment_feed && ! $query->is_post_type_archive && ! $query->is_date && ! $query->is_author && ! $query->is_category && ! $query->is_tag ) { + $query->is_archive = false; + } + + // unset the is_tax flag except if another custom tax is queried + if ( empty( $taxonomies ) && ($query->is_category || $query->is_tag || $query->is_author || $query->is_post_type_archive || $query->is_date || $query->is_search || $query->is_feed ) ) { + $query->is_tax = false; + unset( $query->queried_object ); // FIXME useless? + } + } + } + + /** + * auto translate posts and terms ids + * + * @since 1.2 + */ + public function auto_translate() { + $this->auto_translate = new PLL_Frontend_Auto_Translate( $this ); + } + + /** + * resets some variables when switching blog + * overrides parent method + * + * @since 1.5.1 + * + * @param int $new_blog + * @param int $old_blog + */ + public function switch_blog( $new_blog, $old_blog ) { + // need to check that some languages are defined when user is logged in, has several blogs, some without any languages + if ( parent::switch_blog( $new_blog, $old_blog ) && did_action( 'pll_language_defined' ) && $this->model->get_languages_list() ) { + static $restore_curlang; + if ( empty( $restore_curlang ) ) { + $restore_curlang = $this->curlang->slug; // to always remember the current language through blogs + } + + $lang = $this->model->get_language( $restore_curlang ); + $this->curlang = $lang ? $lang : $this->model->get_language( $this->options['default_lang'] ); + + if ( isset( $this->static_pages ) ) { + $this->static_pages->init(); + } + + $this->load_strings_translations(); + } + } +} diff --git a/pole-sbv-content/plugins/polylang/include/api.php b/pole-sbv-content/plugins/polylang/include/api.php new file mode 100644 index 00000000..3a39de59 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/api.php @@ -0,0 +1,379 @@ + displays a dropdown if set to 1, defaults to 0 + * echo => echoes the switcher if set to 1 ( default ) + * hide_if_empty => hides languages with no posts ( or pages ) if set to 1 ( default ) + * show_flags => shows flags if set to 1, defaults to 0 + * show_names => shows languages names if set to 1 ( default ) + * display_names_as => whether to display the language name or its slug, valid options are 'slug' and 'name', defaults to name + * force_home => forces linking to the home page is set to 1, defaults to 0 + * hide_if_no_translation => hides the link if there is no translation if set to 1, defaults to 0 + * hide_current => hides the current language if set to 1, defaults to 0 + * post_id => if not null, link to translations of post defined by post_id, defaults to null + * raw => set this to true to build your own custom language switcher, defaults to 0 + * item_spacing => whether to preserve or discard whitespace between list items, valid options are 'preserve' and 'discard', defaults to preserve + * + * @since 0.5 + * + * @param array $args optional + * @return null|string|array null if displaying, array if raw is requested, string otherwise + */ +function pll_the_languages( $args = '' ) { + if ( PLL() instanceof PLL_Frontend ) { + $switcher = new PLL_Switcher; + return $switcher->the_languages( PLL()->links, $args ); + } + return ''; +} + +/** + * Returns the current language on frontend + * Returns the language set in admin language filter on backend ( false if set to all languages ) + * + * @since 0.8.1 + * + * @param string $field Optional, the language field to return ( see PLL_Language ), defaults to 'slug' + * @return string|bool The requested field for the current language + */ +function pll_current_language( $field = 'slug' ) { + return isset( PLL()->curlang->$field ) ? PLL()->curlang->$field : false; +} + +/** + * Returns the default language + * + * @since 1.0 + * + * @param string $field Optional, the language field to return ( see PLL_Language ), defaults to 'slug' + * @return string The requested field for the default language + */ +function pll_default_language( $field = 'slug' ) { + return isset( PLL()->options['default_lang'] ) && ( $lang = PLL()->model->get_language( PLL()->options['default_lang'] ) ) && isset( $lang->$field ) ? $lang->$field : false; +} + +/** + * Among the post and its translations, returns the id of the post which is in the language represented by $slug + * + * @since 0.5 + * + * @param int $post_id post id + * @param string $slug optional language code, defaults to current language + * @return int|false|null post id of the translation if exists, false otherwise, null if the current language is not defined yet + */ +function pll_get_post( $post_id, $slug = '' ) { + return ( $slug = $slug ? $slug : pll_current_language() ) ? PLL()->model->post->get( $post_id, $slug ) : null; +} + +/** + * Among the term and its translations, returns the id of the term which is in the language represented by $slug + * + * @since 0.5 + * + * @param int $term_id term id + * @param string $slug optional language code, defaults to current language + * @return int|false|null term id of the translation if exists, false otherwise, null if the current language is not defined yet + */ +function pll_get_term( $term_id, $slug = '' ) { + return ( $slug = $slug ? $slug : pll_current_language() ) ? PLL()->model->term->get( $term_id, $slug ) : null; +} + +/** + * Returns the home url in the current language + * + * @since 0.8 + * + * @param string $lang language code ( optional on frontend ) + * @return string + */ +function pll_home_url( $lang = '' ) { + if ( empty( $lang ) ) { + $lang = pll_current_language(); + } + + return empty( $lang ) ? home_url( '/' ) : PLL()->links->get_home_url( $lang ); +} + +/** + * Registers a string for translation in the "strings translation" panel + * + * @since 0.6 + * + * @param string $name a unique name for the string + * @param string $string the string to register + * @param string $context optional the group in which the string is registered, defaults to 'polylang' + * @param bool $multiline optional wether the string table should display a multiline textarea or a single line input, defaults to single line + */ +function pll_register_string( $name, $string, $context = 'polylang', $multiline = false ) { + if ( PLL() instanceof PLL_Admin_Base ) { + PLL_Admin_Strings::register_string( $name, $string, $context, $multiline ); + } +} + +/** + * Translates a string ( previously registered with pll_register_string ) + * + * @since 0.6 + * + * @param string $string the string to translate + * @return string the string translation in the current language + */ +function pll__( $string ) { + return is_scalar( $string ) ? __( $string, 'pll_string' ) : $string; +} + +/** + * Translates a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML output. + * + * @since 2.1 + * + * @param string $string the string to translate + * @return string translation in the current language + */ +function pll_esc_html__( $string ) { + return esc_html( pll__( $string ) ); +} + +/** + * Translates a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML attributes. + * + * @since 2.1 + * + * @param string $string The string to translate + * @return string + */ +function pll_esc_attr__( $string ) { + return esc_attr( pll__( $string ) ); +} + +/** + * Echoes a translated string ( previously registered with pll_register_string ) + * + * @since 0.6 + * + * @param string $string The string to translate + */ +function pll_e( $string ) { + echo pll__( $string ); +} + +/** + * Echoes a translated string ( previously registered with pll_register_string ) and escapes it for safe use in HTML output. + * + * @since 2.1 + * + * @param string $string The string to translate + */ +function pll_esc_html_e( $string ) { + echo pll_esc_html__( $string ); +} + +/** + * Echoes a translated a string ( previously registered with pll_register_string ) and escapes it for safe use in HTML attributes. + * + * @since 2.1 + * + * @param string $string The string to translate + */ +function pll_esc_attr_e( $string ) { + echo pll_esc_attr__( $string ); +} + +/** + * Translates a string ( previously registered with pll_register_string ) + * + * @since 1.5.4 + * + * @param string $string the string to translate + * @param string $lang language code + * @return string the string translation in the requested language + */ +function pll_translate_string( $string, $lang ) { + if ( PLL() instanceof PLL_Frontend && pll_current_language() == $lang ) { + return pll__( $string ); + } + + if ( ! is_scalar( $string ) ) { + return $string; + } + + static $cache; // Cache object to avoid loading the same translations object several times + + if ( empty( $cache ) ) { + $cache = new PLL_Cache(); + } + + if ( false === $mo = $cache->get( $lang ) ) { + $mo = new PLL_MO(); + $mo->import_from_db( PLL()->model->get_language( $lang ) ); + $cache->set( $lang, $mo ); + } + + return $mo->translate( $string ); +} + +/** + * Returns true if Polylang manages languages and translations for this post type + * + * @since 1.0.1 + * + * @param string $post_type Post type name + * @return bool + */ +function pll_is_translated_post_type( $post_type ) { + return PLL()->model->is_translated_post_type( $post_type ); +} + +/** + * Returns true if Polylang manages languages and translations for this taxonomy + * + * @since 1.0.1 + * + * @param string $tax Taxonomy name + * @return bool + */ +function pll_is_translated_taxonomy( $tax ) { + return PLL()->model->is_translated_taxonomy( $tax ); +} + +/** + * Returns the list of available languages + * + * List of parameters accepted in $args: + * + * hide_empty => hides languages with no posts if set to true ( defaults to false ) + * fields => return only that field if set ( see PLL_Language for a list of fields ) + * + * @since 1.5 + * + * @param array $args list of parameters + * @return array + */ +function pll_languages_list( $args = array() ) { + $args = wp_parse_args( $args, array( 'fields' => 'slug' ) ); + return PLL()->model->get_languages_list( $args ); +} + +/** + * Set the post language + * + * @since 1.5 + * + * @param int $id post id + * @param string $lang language code + */ +function pll_set_post_language( $id, $lang ) { + PLL()->model->post->set_language( $id, $lang ); +} + +/** + * Set the term language + * + * @since 1.5 + * + * @param int $id term id + * @param string $lang language code + */ +function pll_set_term_language( $id, $lang ) { + PLL()->model->term->set_language( $id, $lang ); +} + +/** + * Save posts translations + * + * @since 1.5 + * + * @param array $arr an associative array of translations with language code as key and post id as value + */ +function pll_save_post_translations( $arr ) { + PLL()->model->post->save_translations( reset( $arr ), $arr ); +} + +/** + * Save terms translations + * + * @since 1.5 + * + * @param array $arr an associative array of translations with language code as key and term id as value + */ +function pll_save_term_translations( $arr ) { + PLL()->model->term->save_translations( reset( $arr ), $arr ); +} + +/** + * Returns the post language + * + * @since 1.5.4 + * + * @param int $post_id + * @param string $field Optional, the language field to return ( see PLL_Language ), defaults to 'slug' + * @return bool|string The requested field for the post language, false if no language is associated to that post + */ +function pll_get_post_language( $post_id, $field = 'slug' ) { + return ( $lang = PLL()->model->post->get_language( $post_id ) ) ? $lang->$field : false; +} + +/** + * Returns the term language + * + * @since 1.5.4 + * + * @param int $term_id + * @param string $field Optional, the language field to return ( see PLL_Language ), defaults to 'slug' + * @return bool|string The requested field for the term language, false if no language is associated to that term + */ +function pll_get_term_language( $term_id, $field = 'slug' ) { + return ( $lang = PLL()->model->term->get_language( $term_id ) ) ? $lang->$field : false; +} + +/** + * Returns an array of translations of a post + * + * @since 1.8 + * + * @param int $post_id + * @return array an associative array of translations with language code as key and translation post_id as value + */ +function pll_get_post_translations( $post_id ) { + return PLL()->model->post->get_translations( $post_id ); +} + +/** + * Returns an array of translations of a term + * + * @since 1.8 + * + * @param int $term_id + * @return array an associative array of translations with language code as key and translation term_id as value + */ +function pll_get_term_translations( $term_id ) { + return PLL()->model->term->get_translations( $term_id ); +} + +/** + * Count posts in a language + * + * @since 1.5 + * + * @param string $lang language code + * @param array $args ( accepted keys: post_type, m, year, monthnum, day, author, author_name, post_format ) + * @return int posts count + */ +function pll_count_posts( $lang, $args = array() ) { + return PLL()->model->count_posts( PLL()->model->get_language( $lang ), $args ); +} + +/** + * Allows to access the Polylang instance + * It is always preferable to use API functions + * Internal methods may be changed without prior notice + * + * @since 1.8 + */ +function PLL() { + return $GLOBALS['polylang']; +} diff --git a/pole-sbv-content/plugins/polylang/include/base.php b/pole-sbv-content/plugins/polylang/include/base.php new file mode 100644 index 00000000..66ef339b --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/base.php @@ -0,0 +1,126 @@ +links_model = &$links_model; + $this->model = &$links_model->model; + $this->options = &$this->model->options; + + $GLOBALS['l10n_unloaded']['pll_string'] = true; // Short-circuit _load_textdomain_just_in_time() for 'pll_string' domain in WP 4.6+ + + add_action( 'widgets_init', array( $this, 'widgets_init' ) ); + + // User defined strings translations + add_action( 'pll_language_defined', array( $this, 'load_strings_translations' ), 5 ); + add_action( 'change_locale', array( $this, 'load_strings_translations' ) ); // Since WP 4.7 + + // Switch_to_blog + add_action( 'switch_blog', array( $this, 'switch_blog' ), 10, 2 ); + } + + /** + * Registers our widgets + * + * @since 0.1 + */ + public function widgets_init() { + register_widget( 'PLL_Widget_Languages' ); + + // Overwrites the calendar widget to filter posts by language + if ( ! defined( 'PLL_WIDGET_CALENDAR' ) || PLL_WIDGET_CALENDAR ) { + unregister_widget( 'WP_Widget_Calendar' ); + register_widget( 'PLL_Widget_Calendar' ); + } + } + + /** + * Loads user defined strings translations + * + * @since 1.2 + * @since 2.1.3 $locale parameter added. + * + * @param string $locale Locale. Defaults to current locale. + */ + public function load_strings_translations( $locale = '' ) { + if ( empty( $locale ) ) { + $locale = get_locale(); + } + + $language = $this->model->get_language( $locale ); + + if ( ! empty( $language ) ) { + $mo = new PLL_MO(); + $mo->import_from_db( $language ); + $GLOBALS['l10n']['pll_string'] = &$mo; + } else { + unset( $GLOBALS['l10n']['pll_string'] ); + } + } + + /** + * Resets some variables when switching blog + * Applies only if Polylang is active on the new blog + * + * @since 1.5.1 + * + * @param int $new_blog + * @param int $old_blog + * @return bool not used by WP but by child class + */ + public function switch_blog( $new_blog, $old_blog ) { + $plugins = ( $sitewide_plugins = get_site_option( 'active_sitewide_plugins' ) ) && is_array( $sitewide_plugins ) ? array_keys( $sitewide_plugins ) : array(); + $plugins = array_merge( $plugins, get_option( 'active_plugins', array() ) ); + + // 2nd test needed when Polylang is not networked activated + // 3rd test needed when Polylang is networked activated and a new site is created + if ( $new_blog != $old_blog && in_array( POLYLANG_BASENAME, $plugins ) && get_option( 'polylang' ) ) { + $this->options = get_option( 'polylang' ); // Needed for menus + $this->links_model = $this->model->get_links_model(); + return true; + } + return false; + } + + /** + * Some backward compatibility with Polylang < 1.2 + * Allows for example to call $polylang->get_languages_list() instead of $polylang->model->get_languages_list() + * This works but should be slower than the direct call, thus an error is triggered in debug mode + * + * @since 1.2 + * + * @param string $func function name + * @param array $args function arguments + */ + public function __call( $func, $args ) { + foreach ( $this as $prop => &$obj ) { + if ( is_object( $obj ) && method_exists( $obj, $func ) ) { + if ( WP_DEBUG ) { + $debug = debug_backtrace(); + $i = 1 + empty( $debug[1]['line'] ); // The file and line are in $debug[2] if the function was called using call_user_func + trigger_error( sprintf( + '%1$s was called incorrectly in %3$s on line %4$s: the call to $polylang->%1$s() has been deprecated in Polylang 1.2, use PLL()->%2$s->%1$s() instead.' . "\nError handler", + $func, $prop, $debug[ $i ]['file'], $debug[ $i ]['line'] + ) ); + } + return call_user_func_array( array( $obj, $func ), $args ); + } + } + + $debug = debug_backtrace(); + trigger_error( sprintf( 'Call to undefined function PLL()->%1$s() in %2$s on line %3$s' . "\nError handler", $func, $debug[0]['file'], $debug[0]['line'] ), E_USER_ERROR ); + } +} diff --git a/pole-sbv-content/plugins/polylang/include/cache.php b/pole-sbv-content/plugins/polylang/include/cache.php new file mode 100644 index 00000000..971df9c3 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/cache.php @@ -0,0 +1,72 @@ +blog_id = get_current_blog_id(); + add_action( 'switch_blog', array( $this, 'switch_blog' ) ); + } + + /** + * Called when switching blog + * + * @since 1.7 + * + * @param int $new_blog + */ + public function switch_blog( $new_blog ) { + $this->blog_id = $new_blog; + } + + /** + * Add a value in cache + * + * @since 1.7 + * + * @param string $key + * @param mixed $data + */ + public function set( $key, $data ) { + $this->cache[ $this->blog_id ][ $key ] = $data; + } + + /** + * Get value from cache + * + * @since 1.7 + * + * @param string $key + * @return mixed $data + */ + public function get( $key ) { + return isset( $this->cache[ $this->blog_id ][ $key ] ) ? $this->cache[ $this->blog_id ][ $key ] : false; + } + + /** + * Clean the cache (for this blog only) + * + * @since 1.7 + * + * @param string $key + */ + public function clean( $key = '' ) { + if ( empty( $key ) ) { + unset( $this->cache[ $this->blog_id ] ); + } + else { + unset( $this->cache[ $this->blog_id ][ $key ] ); + } + } +} diff --git a/pole-sbv-content/plugins/polylang/include/class-polylang.php b/pole-sbv-content/plugins/polylang/include/class-polylang.php new file mode 100644 index 00000000..4f5f07ce --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/class-polylang.php @@ -0,0 +1,222 @@ +is_deactivation() ) { + return; + } + + // Plugin initialization + // Take no action before all plugins are loaded + add_action( 'plugins_loaded', array( $this, 'init' ), 1 ); + + // Override load text domain waiting for the language to be defined + // Here for plugins which load text domain as soon as loaded :( + if ( ! defined( 'PLL_OLT' ) || PLL_OLT ) { + PLL_OLT_Manager::instance(); + } + + // Extra code for compatibility with some plugins + // Loaded as soon as possible as we may need to act before other plugins are loaded + if ( ! defined( 'PLL_PLUGINS_COMPAT' ) || PLL_PLUGINS_COMPAT ) { + PLL_Plugins_Compat::instance(); + } + } + + /** + * Autoload classes + * + * @since 1.2 + * + * @param string $class + */ + public function autoload( $class ) { + // Not a Polylang class + if ( 0 !== strncmp( 'PLL_', $class, 4 ) ) { + return; + } + + $class = str_replace( '_', '-', strtolower( substr( $class, 4 ) ) ); + $to_find = array( 'media', 'share', 'slug', 'slugs', 'sync', 'translate', 'wpml', 'xdata', 'rest' ); + $dir = implode( '-', array_intersect( explode( '-', $class ), $to_find ) ); + + $dirs = array( + PLL_FRONT_INC, + PLL_MODULES_INC, + PLL_MODULES_INC . "/$dir", + PLL_MODULES_INC . '/plugins', + PLL_INSTALL_INC, + PLL_ADMIN_INC, + PLL_SETTINGS_INC, + PLL_INC, + ); + + foreach ( $dirs as $dir ) { + if ( file_exists( $file = "$dir/$class.php" ) ) { + require_once $file; + return; + } + } + } + + /** + * Tells whether the current request is an ajax request on frontend or not + * + * @since 2.2 + * + * @return bool + */ + static public function is_ajax_on_front() { + // Special test for plupload which does not use jquery ajax and thus does not pass our ajax prefilter + // Special test for customize_save done in frontend but for which we want to load the admin + $in = isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], array( 'upload-attachment', 'customize_save' ) ); + return wp_doing_ajax() && empty( $_REQUEST['pll_ajax_backend'] ) && ! $in; + } + + /** + * Defines constants + * May be overriden by a plugin if set before plugins_loaded, 1 + * + * @since 1.6 + */ + static public function define_constants() { + // Cookie name. no cookie will be used if set to false + if ( ! defined( 'PLL_COOKIE' ) ) { + define( 'PLL_COOKIE', 'pll_language' ); + } + + // Avoid loading polylang admin for frontend ajax requests + if ( ! defined( 'PLL_AJAX_ON_FRONT' ) ) { + define( 'PLL_AJAX_ON_FRONT', self::is_ajax_on_front() ); + } + + // Admin + if ( ! defined( 'PLL_ADMIN' ) ) { + define( 'PLL_ADMIN', defined( 'DOING_CRON' ) || ( is_admin() && ! PLL_AJAX_ON_FRONT ) ); + } + + // Settings page whatever the tab + if ( ! defined( 'PLL_SETTINGS' ) ) { + define( 'PLL_SETTINGS', is_admin() && ( ( isset( $_GET['page'] ) && 0 === strpos( $_GET['page'], 'mlang' ) ) || ! empty( $_REQUEST['pll_ajax_settings'] ) ) ); + } + } + + /** + * Polylang initialization + * setups models and separate admin and frontend + * + * @since 1.2 + */ + public function init() { + global $polylang; + + self::define_constants(); + $options = get_option( 'polylang' ); + + // Plugin upgrade + if ( $options && version_compare( $options['version'], POLYLANG_VERSION, '<' ) ) { + $upgrade = new PLL_Upgrade( $options ); + if ( ! $upgrade->upgrade() ) { // If the version is too old + return; + } + } + + // Make sure that this filter is *always* added before PLL_Model::get_languages_list() is called for the first time + add_filter( 'pll_languages_list', array( 'PLL_Static_Pages', 'pll_languages_list' ), 2, 2 ); // Before PLL_Links_Model + + /** + * Filter the model class to use + * /!\ this filter is fired *before* the $polylang object is available + * + * @since 1.5 + * + * @param string $class either PLL_Model or PLL_Admin_Model + */ + $class = apply_filters( 'pll_model', PLL_SETTINGS ? 'PLL_Admin_Model' : 'PLL_Model' ); + $model = new $class( $options ); + $links_model = $model->get_links_model(); + + if ( PLL_SETTINGS ) { + $polylang = new PLL_Settings( $links_model ); + } + elseif ( PLL_ADMIN ) { + $polylang = new PLL_Admin( $links_model ); + } + // Do nothing on frontend if no language is defined + elseif ( $model->get_languages_list() && empty( $_GET['deactivate-polylang'] ) ) { + $polylang = new PLL_Frontend( $links_model ); + } + + if ( ! $model->get_languages_list() ) { + /** + * Fires when no language has been defined yet + * Used to load overriden textdomains + * + * @since 1.2 + */ + do_action( 'pll_no_language_defined' ); + } + + if ( ! empty( $polylang ) ) { + /** + * Fires after the $polylang object is created and before the API is loaded + * + * @since 2.0 + * + * @param object $polylang + */ + do_action_ref_array( 'pll_pre_init', array( &$polylang ) ); + + require_once PLL_INC . '/api.php'; // Loads the API + + if ( ! defined( 'PLL_WPML_COMPAT' ) || PLL_WPML_COMPAT ) { + PLL_WPML_Compat::instance(); // WPML API + PLL_WPML_Config::instance(); // wpml-config.xml + } + + $polylang->init(); + + /** + * Fires after the $polylang object and the API is loaded + * + * @since 1.7 + * + * @param object $polylang + */ + do_action_ref_array( 'pll_init', array( &$polylang ) ); + } + } +} + +new Polylang(); diff --git a/pole-sbv-content/plugins/polylang/include/filters-links.php b/pole-sbv-content/plugins/polylang/include/filters-links.php new file mode 100644 index 00000000..e7c55013 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/filters-links.php @@ -0,0 +1,167 @@ +links = &$polylang->links; + $this->links_model = &$polylang->links_model; + $this->model = &$polylang->model; + $this->options = &$polylang->options; + $this->curlang = &$polylang->curlang; + + // Low priority on links filters to come after any other modifications + if ( $this->options['force_lang'] ) { + add_filter( 'post_link', array( $this, 'post_type_link' ), 20, 2 ); + add_filter( '_get_page_link', array( $this, '_get_page_link' ), 20, 2 ); + } + + add_filter( 'post_type_link', array( $this, 'post_type_link' ), 20, 2 ); + add_filter( 'term_link', array( $this, 'term_link' ), 20, 3 ); + + if ( $this->options['force_lang'] > 0 ) { + add_filter( 'attachment_link', array( $this, 'attachment_link' ), 20, 2 ); + } + + if ( 3 === $this->options['force_lang'] ) { + add_filter( 'preview_post_link', array( $this, 'preview_post_link' ), 20 ); + } + + // Rewrites post types archives links to filter them by language + add_filter( 'post_type_archive_link', array( $this, 'post_type_archive_link' ), 20, 2 ); + } + + /** + * Modifies page links + * + * @since 1.7 + * + * @param string $link post link + * @param int $post_id post ID + * @return string modified post link + */ + public function _get_page_link( $link, $post_id ) { + // /!\ WP does not use pretty permalinks for preview + return false !== strpos( $link, 'preview=true' ) && false !== strpos( $link, 'page_id=' ) ? $link : $this->links_model->switch_language_in_link( $link, $this->model->post->get_language( $post_id ) ); + } + + /** + * Modifies attachment links + * + * @since 1.6.2 + * + * @param string $link attachment link + * @param int $post_id attachment link + * @return string modified attachment link + */ + public function attachment_link( $link, $post_id ) { + return wp_get_post_parent_id( $post_id ) ? $link : $this->links_model->switch_language_in_link( $link, $this->model->post->get_language( $post_id ) ); + } + + /** + * Modifies custom posts links + * + * @since 1.6 + * + * @param string $link post link + * @param object $post post object + * @return string modified post link + */ + public function post_type_link( $link, $post ) { + // /!\ WP does not use pretty permalinks for preview + if ( ( false === strpos( $link, 'preview=true' ) || false === strpos( $link, 'p=' ) ) && $this->model->is_translated_post_type( $post->post_type ) ) { + $lang = $this->model->post->get_language( $post->ID ); + $link = $this->options['force_lang'] ? $this->links_model->switch_language_in_link( $link, $lang ) : $link; + + /** + * Filter a post or custom post type link + * + * @since 1.6 + * + * @param string $link the post link + * @param object $lang the current language + * @param object $post the post object + */ + $link = apply_filters( 'pll_post_type_link', $link, $lang, $post ); + } + + return $link; + } + + /** + * Modifies term link + * + * @since 0.7 + * + * @param string $link term link + * @param object $term term object + * @param string $tax taxonomy name + * @return string modified term link + */ + public function term_link( $link, $term, $tax ) { + if ( $this->model->is_translated_taxonomy( $tax ) ) { + $lang = $this->model->term->get_language( $term->term_id ); + $link = $this->options['force_lang'] ? $this->links_model->switch_language_in_link( $link, $lang ) : $link; + + /** + * Filter a term link + * + * @since 1.6 + * + * @param string $link the term link + * @param object $lang the current language + * @param object $term the term object + */ + return apply_filters( 'pll_term_link', $link, $lang, $term ); + } + + // in case someone calls get_term_link for the 'language' taxonomy + if ( 'language' === $tax ) { + return $this->links_model->home_url( $term ); + } + + return $link; + } + + /** + * FIXME: keeps the preview post link on default domain when using multiple domains + * + * @since 1.6.1 + * + * @param string $url + * @return string modified url + */ + public function preview_post_link( $url ) { + return $this->links_model->remove_language_from_link( $url ); + } + + /** + * Modifies the post type archive links to add the language parameter + * only if the post type is translated + * + * The filter was originally only on frontend but is needed on admin too for + * compatibility with the archive link of the ACF link field since ACF 5.4.0 + * + * @since 1.7.6 + * + * @param string $link + * @param string $post_type + * @return string modified link + */ + public function post_type_archive_link( $link, $post_type ) { + return $this->model->is_translated_post_type( $post_type ) && 'post' !== $post_type ? $this->links_model->switch_language_in_link( $link, $this->curlang ) : $link; + } +} + diff --git a/pole-sbv-content/plugins/polylang/include/filters.php b/pole-sbv-content/plugins/polylang/include/filters.php new file mode 100644 index 00000000..f7da7cc6 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/filters.php @@ -0,0 +1,227 @@ +links_model = &$polylang->links_model; + $this->model = &$polylang->model; + $this->options = &$polylang->options; + $this->curlang = &$polylang->curlang; + + // Filters the comments according to the current language + add_action( 'parse_comment_query', array( $this, 'parse_comment_query' ) ); + add_filter( 'comments_clauses', array( $this, 'comments_clauses' ), 10, 2 ); + + // Filters the get_pages function according to the current language + add_filter( 'get_pages', array( $this, 'get_pages' ), 10, 2 ); + + // Converts the locale to a valid W3C locale + add_filter( 'language_attributes', array( $this, 'language_attributes' ) ); + + // Prevents deleting all the translations of the default category + add_filter( 'map_meta_cap', array( $this, 'fix_delete_default_category' ), 10, 4 ); + + // Translate the site title in emails sent to users + add_filter( 'password_change_email', array( $this, 'translate_user_email' ) ); + add_filter( 'email_change_email', array( $this, 'translate_user_email' ) ); + } + + /** + * Get the language to filter a comments query + * + * @since 2.0 + * + * @param object $query + * @return object|bool the language(s) to use in the filter, false otherwise + */ + protected function get_comments_queried_language( $query ) { + // Don't filter comments if comment ids or post ids are specified + $plucked = wp_array_slice_assoc( $query->query_vars, array( 'comment__in', 'parent', 'post_id', 'post__in', 'post_parent' ) ); + $fields = array_filter( $plucked ); + if ( ! empty( $fields ) ) { + return false; + } + + // Don't filter comments if a non translated post type is specified + if ( ! empty( $query->query_vars['post_type'] ) && ! $this->model->is_translated_post_type( $query->query_vars['post_type'] ) ) { + return false; + } + + return empty( $query->query_vars['lang'] ) ? $this->curlang : $this->model->get_language( $query->query_vars['lang'] ); + } + + /** + * Adds language dependent cache domain when querying comments + * Useful as the 'lang' parameter is not included in cache key by WordPress + * Needed since WP 4.6 as comments have been added to persistent cache. See #36906, #37419 + * + * @since 2.0 + * + * @param object $query + */ + public function parse_comment_query( $query ) { + if ( $lang = $this->get_comments_queried_language( $query ) ) { + $key = '_' . ( is_array( $lang ) ? implode( ',', $lang ) : $this->model->get_language( $lang )->slug ); + $query->query_vars['cache_domain'] = empty( $query->query_vars['cache_domain'] ) ? 'pll' . $key : $query->query_vars['cache_domain'] . $key; + } + } + + /** + * Filters the comments according to the current language + * Used by the recent comments widget and admin language filter + * + * @since 0.2 + * + * @param array $clauses sql clauses + * @param object $query WP_Comment_Query object + * @return array modified $clauses + */ + public function comments_clauses( $clauses, $query ) { + global $wpdb; + + $lang = $this->get_comments_queried_language( $query ); + + if ( ! empty( $lang ) ) { + // If this clause is not already added by WP + if ( ! strpos( $clauses['join'], '.ID' ) ) { + $clauses['join'] .= " JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID"; + } + + $clauses['join'] .= $this->model->post->join_clause(); + $clauses['where'] .= $this->model->post->where_clause( $lang ); + } + return $clauses; + } + + /** + * Filters get_pages per language + * + * @since 1.4 + * + * @param array $pages an array of pages already queried + * @param array $args get_pages arguments + * @return array modified list of pages + */ + public function get_pages( $pages, $args ) { + if ( isset( $args['lang'] ) && empty( $args['lang'] ) ) { + return $pages; + } + + $language = empty( $args['lang'] ) ? $this->curlang : $this->model->get_language( $args['lang'] ); + + if ( empty( $language ) || empty( $pages ) || ! $this->model->is_translated_post_type( $args['post_type'] ) ) { + return $pages; + } + + static $once = false; + + // Obliged to redo the get_pages query if we want to get the right number + if ( ! empty( $args['number'] ) && ! $once ) { + $once = true; // avoid infinite loop + + $r = array( + 'lang' => 0, // So this query is not filtered + 'numberposts' => -1, + 'nopaging' => true, + 'post_type' => $args['post_type'], + 'fields' => 'ids', + 'tax_query' => array( + array( + 'taxonomy' => 'language', + 'field' => 'term_taxonomy_id', // Since WP 3.5 + 'terms' => $language->term_taxonomy_id, + 'operator' => 'NOT IN', + ), + ), + ); + + $args['exclude'] = array_merge( $args['exclude'], get_posts( $r ) ); + $pages = get_pages( $args ); + } + + $ids = wp_list_pluck( $pages, 'ID' ); + + // Filters the queried list of pages by language + if ( ! $once ) { + $ids = array_intersect( $ids, $this->model->post->get_objects_in_language( $language ) ); + + foreach ( $pages as $key => $page ) { + if ( ! in_array( $page->ID, $ids ) ) { + unset( $pages[ $key ] ); + } + } + + $pages = array_values( $pages ); // In case 3rd parties suppose the existence of $pages[0] + } + + // Not done by WP but extremely useful for performance when manipulating taxonomies + update_object_term_cache( $ids, $args['post_type'] ); + + $once = false; // In case get_pages is called another time + return $pages; + } + + /** + * Converts WordPress locale to valid W3 locale in html language attributes + * + * @since 1.8 + * + * @param string $output language attributes + * @return string + */ + public function language_attributes( $output ) { + if ( $language = $this->model->get_language( get_locale() ) ) { + $output = str_replace( '"' . get_bloginfo( 'language' ) . '"', '"' . $language->get_locale( 'display' ) . '"', $output ); + } + return $output; + } + + + /** + * Prevents deleting all the translations of the default category + * + * @since 2.1 + * + * @param array $caps The user's actual capabilities. + * @param string $cap Capability name. + * @param int $user_id The user ID. + * @param array $args Adds the context to the cap. The category id. + * @return array + */ + public function fix_delete_default_category( $caps, $cap, $user_id, $args ) { + if ( 'delete_term' === $cap && array_intersect( $args, $this->model->term->get_translations( get_option( 'default_category' ) ) ) ) { + $caps[] = 'do_not_allow'; + } + + return $caps; + } + + /** + * Translates the site title in emails sent to the user (change email, reset password) + * It is necessary to filter the email because WP evaluates the site title before calling switch_to_locale() + * + * @since 2.1.3 + * + * @param array $email + * @return array + */ + function translate_user_email( $email ) { + $blog_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); + $email['subject'] = sprintf( $email['subject'], $blog_name ); + $email['message'] = str_replace( '###SITENAME###', $blog_name, $email['message'] ); + return $email; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/functions.php b/pole-sbv-content/plugins/polylang/include/functions.php new file mode 100644 index 00000000..ab555743 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/functions.php @@ -0,0 +1,84 @@ + id of term in 'language' taxonomy + * name => language name. Ex: English + * slug => language code used in url. Ex: en + * term_group => order of the language when displayed in a list of languages + * term_taxonomy_id => term taxonomy id in 'language' taxonomy + * taxonomy => 'language' + * description => language locale for backward compatibility + * parent => 0 / not used + * count => number of posts and pages in that language + * tl_term_id => id of the term in 'term_language' taxonomy + * tl_term_taxonomy_id => term taxonomy id in 'term_language' taxonomy + * tl_count => number of terms in that language ( not used by Polylang ) + * locale => WordPress language locale. Ex: en_US + * is_rtl => 1 if the language is rtl + * flag_code => code of the flag + * flag_url => url of the flag + * flag => html img of the flag + * custom_flag_url => url of the custom flag if exists, internal use only, moves to flag_url on frontend + * custom_flag => html img of the custom flag if exists, internal use only, moves to flag on frontend + * home_url => home url in this language + * search_url => home url to use in search forms + * host => host of this language + * mo_id => id of the post storing strings translations + * page_on_front => id of the page on front in this language ( set from pll_languages_list filter ) + * page_for_posts => id of the page for posts in this language ( set from pll_languages_list filter ) + * + * @since 1.2 + */ +class PLL_Language { + public $term_id, $name, $slug, $term_group, $term_taxonomy_id, $taxonomy, $description, $parent, $count; + public $tl_term_id, $tl_term_taxonomy_id, $tl_count; + public $locale, $is_rtl; + public $flag_url, $flag; + public $home_url, $search_url; + public $host, $mo_id; + public $page_on_front, $page_for_posts; + + /** + * constructor: builds a language object given its two corresponding terms in language and term_language taxonomies + * + * @since 1.2 + * + * @param object|array $language 'language' term or language object properties stored as an array + * @param object $term_language Corresponding 'term_language' term + */ + public function __construct( $language, $term_language = null ) { + // build the object from all properties stored as an array + if ( empty( $term_language ) ) { + foreach ( $language as $prop => $value ) { + $this->$prop = $value; + } + } + + // build the object from taxonomies + else { + foreach ( $language as $prop => $value ) { + $this->$prop = in_array( $prop, array( 'term_id', 'term_taxonomy_id', 'count' ) ) ? (int) $language->$prop : $language->$prop; + } + + // although it would be convenient here, don't assume the term is shared between taxonomies as it may not be the case in future + // http://make.wordpress.org/core/2013/07/28/potential-roadmap-for-taxonomy-meta-and-post-relationships/ + $this->tl_term_id = (int) $term_language->term_id; + $this->tl_term_taxonomy_id = (int) $term_language->term_taxonomy_id; + $this->tl_count = (int) $term_language->count; + + // the description field can contain any property + // backward compatibility for is_rtl + $description = maybe_unserialize( $language->description ); + foreach ( $description as $prop => $value ) { + 'rtl' == $prop ? $this->is_rtl = $value : $this->$prop = $value; + } + + $this->description = &$this->locale; // backward compatibility with Polylang < 1.2 + + $this->mo_id = PLL_MO::get_id( $this ); + } + } + + /** + * sets flag_url and flag properties + * + * @since 1.2 + */ + public function set_flag() { + $flags['flag']['url'] = ''; + + // Polylang builtin flags + if ( ! empty( $this->flag_code ) && file_exists( POLYLANG_DIR . ( $file = '/flags/' . $this->flag_code . '.png' ) ) ) { + $flags['flag']['url'] = esc_url_raw( plugins_url( $file, POLYLANG_FILE ) ); + + // if base64 encoded flags are preferred + if ( ! defined( 'PLL_ENCODED_FLAGS' ) || PLL_ENCODED_FLAGS ) { + $flags['flag']['src'] = 'data:image/png;base64,' . base64_encode( file_get_contents( POLYLANG_DIR . $file ) ); + } else { + $flags['flag']['src'] = esc_url( plugins_url( $file, POLYLANG_FILE ) ); + } + } + + // custom flags ? + if ( file_exists( PLL_LOCAL_DIR . ( $file = '/' . $this->locale . '.png' ) ) || file_exists( PLL_LOCAL_DIR . ( $file = '/' . $this->locale . '.jpg' ) ) ) { + $url = content_url( '/polylang' . $file ); + $flags['custom_flag']['url'] = esc_url_raw( $url ); + $flags['custom_flag']['src'] = esc_url( $url ); + } + + /** + * Filter the flag title attribute + * Defaults to the language name + * + * @since 0.7 + * + * @param string $title the flag title attribute + * @param string $slug the language code + * @param string $locale the language locale + */ + $title = apply_filters( 'pll_flag_title', $this->name, $this->slug, $this->locale ); + + foreach ( $flags as $key => $flag ) { + $this->{$key . '_url'} = empty( $flag['url'] ) ? '' : $flag['url']; + + /** + * Filter the html markup of a flag + * + * @since 1.0.2 + * + * @param string $flag html markup of the flag or empty string + * @param string $slug language code + */ + $this->{$key} = apply_filters( 'pll_get_flag', empty( $flag['src'] ) ? '' : + sprintf( + '%s', + $flag['src'], + esc_attr( $title ), + esc_attr( $this->name ) + ), + $this->slug + ); + } + } + + /** + * replace flag by custom flag + * takes care of url scheme + * + * @since 1.7 + */ + public function set_custom_flag() { + // overwrite with custom flags on frontend only + if ( ! empty( $this->custom_flag ) ) { + $this->flag = $this->custom_flag; + $this->flag_url = $this->custom_flag_url; + unset( $this->custom_flag, $this->custom_flag_url ); // hide this + } + + // set url scheme, also for default flags + if ( is_ssl() ) { + $this->flag = str_replace( 'http://', 'https://', $this->flag ); + $this->flag_url = str_replace( 'http://', 'https://', $this->flag_url ); + } else { + $this->flag = str_replace( 'https://', 'http://', $this->flag ); + $this->flag_url = str_replace( 'https://', 'http://', $this->flag_url ); + } + } + + /** + * updates post and term count + * + * @since 1.2 + */ + public function update_count() { + wp_update_term_count( $this->term_taxonomy_id, 'language' ); // posts count + wp_update_term_count( $this->tl_term_taxonomy_id, 'term_language' ); // terms count + } + + /** + * set home_url and search_url properties + * + * @since 1.3 + * + * @param string $search_url + * @param string $home_url + */ + public function set_home_url( $search_url, $home_url ) { + $this->search_url = $search_url; + $this->home_url = $home_url; + } + + /** + * set home_url scheme + * this can't be cached across pages + * + * @since 1.6.4 + */ + public function set_home_url_scheme() { + if ( is_ssl() ) { + $this->home_url = str_replace( 'http://', 'https://', $this->home_url ); + $this->search_url = str_replace( 'http://', 'https://', $this->search_url ); + } + + else { + $this->home_url = str_replace( 'https://', 'http://', $this->home_url ); + $this->search_url = str_replace( 'https://', 'http://', $this->search_url ); + } + } + + /** + * returns the language locale + * converts WP locales to W3C valid locales for display + * @see #33511 + * + * @since 1.8 + * + * @param string $filter either 'display' or 'raw', defaults to raw + * @return string + */ + public function get_locale( $filter = 'raw' ) { + if ( 'display' == $filter ) { + static $valid_locales = array( + 'bel' => 'be', + 'bre' => 'br', + 'de_CH_informal' => 'de_CH', + 'de_DE_formal' => 'de_DE', + 'dzo' => 'dz', + 'ido' => 'io', + 'kin' => 'rw', + 'oci' => 'oc', + 'mri' => 'mi', + 'nl_NL_formal' => 'nl_NL', + 'roh' => 'rm', + 'srd' => 'sc', + 'tuk' => 'tk', + ); + $locale = isset( $valid_locales[ $this->locale ] ) ? $valid_locales[ $this->locale ] : $this->locale; + return str_replace( '_', '-', $locale ); + } + return $this->locale; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/license.php b/pole-sbv-content/plugins/polylang/include/license.php new file mode 100644 index 00000000..80e48bb3 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/license.php @@ -0,0 +1,171 @@ +id = sanitize_title( $item_name ); + $this->file = $file; + $this->name = $item_name; + $this->version = $version; + $this->author = $author; + $this->api_url = empty( $api_url ) ? $this->api_url : $api_url; + + $licenses = get_option( 'polylang_licenses' ); + $this->license_key = empty( $licenses[ $this->id ]['key'] ) ? '' : $licenses[ $this->id ]['key']; + if ( ! empty( $licenses[ $this->id ]['data'] ) ) { + $this->license_data = $licenses[ $this->id ]['data']; + } + + // Updater + add_action( 'admin_init', array( $this, 'auto_updater' ), 0 ); + + // Register settings + add_filter( 'pll_settings_licenses', array( $this, 'settings' ) ); + + // Weekly schedule + if ( ! wp_next_scheduled( 'polylang_check_licenses' ) ) { + wp_schedule_event( time(), 'weekly', 'polylang_check_licenses' ); + } + + add_action( 'polylang_check_licenses', array( $this, 'check_license' ) ); + } + + /** + * Auto updater + * + * @since 1.9 + */ + public function auto_updater() { + $args = array( + 'version' => $this->version, + 'license' => $this->license_key, + 'author' => $this->author, + 'item_name' => $this->name, + ); + + // Setup the updater + new PLL_Plugin_Updater( $this->api_url, $this->file, $args ); + } + + /** + * Registers the licence in the Settings + * + * @since 1.9 + * + * @param array $items + * @return array + */ + public function settings( $items ) { + $items[ $this->id ] = $this; + return $items; + } + + /** + * Activate the license key + * + * @since 1.9 + * + * @param string $license_key activation key + * @return object updated $this + */ + public function activate_license( $license_key ) { + $this->license_key = $license_key; + $this->api_request( 'activate_license' ); + + // Tell WordPress to look for updates + set_site_transient( 'update_plugins', null ); + return $this; + } + + + /** + * Deactivate the license key + * + * @since 1.9 + * + * @return object updated $this + */ + public function deactivate_license() { + $this->api_request( 'deactivate_license' ); + return $this; + } + + /** + * Check if license key is valid + * + * @since 1.9 + * + * @return object updated $this + */ + public function check_license() { + $this->api_request( 'check_license' ); + return $this; + } + + /** + * Sends an api request to check, activate or deactivate the license + * Updates the licenses option according to the status + * + * @since 1.9 + * + * @param string $request check_license | activate_license | deactivate_license + */ + private function api_request( $request ) { + $licenses = get_option( 'polylang_licenses' ); + unset( $licenses[ $this->id ], $this->license_data ); + + if ( ! empty( $this->license_key ) ) { + // Data to send in our API request + $api_params = array( + 'edd_action' => $request, + 'license' => $this->license_key, + 'item_name' => urlencode( $this->name ), + 'url' => home_url(), + ); + + // Call the API + $response = wp_remote_post( + $this->api_url, + array( + 'timeout' => 15, + 'sslverify' => false, + 'body' => $api_params, + ) + ); + + // Update the option only if we got a response + if ( is_wp_error( $response ) ) { + return; + } + + // Save new license info + $licenses[ $this->id ] = array( 'key' => $this->license_key ); + $data = json_decode( wp_remote_retrieve_body( $response ) ); + + if ( 'deactivated' !== $data->license ) { + $licenses[ $this->id ]['data'] = $this->license_data = $data; + } + } + + update_option( 'polylang_licenses', $licenses ); // FIXME called multiple times when saving all licenses + } +} diff --git a/pole-sbv-content/plugins/polylang/include/links-abstract-domain.php b/pole-sbv-content/plugins/polylang/include/links-abstract-domain.php new file mode 100644 index 00000000..04404e7e --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/links-abstract-domain.php @@ -0,0 +1,68 @@ +home_url( $language ); + $language->set_home_url( $home_url, $home_url ); // Search url and home url are the same + } + + /** + * Returns the current site url + * + * @since 1.8 + * + * @param string $url + * @return string + */ + public function site_url( $url ) { + $lang = $this->get_language_from_url(); + $lang = $this->model->get_language( $lang ); + return $this->add_language_to_link( $url, $lang ); + } + + /** + * Fix the domain for upload directory + * + * @since 2.0.6 + * + * @param array $uploads + * @return array + */ + public function upload_dir( $uploads ) { + $lang = $this->get_language_from_url(); + $lang = $this->model->get_language( $lang ); + $uploads['url'] = $this->add_language_to_link( $uploads['url'], $lang ); + $uploads['baseurl'] = $this->add_language_to_link( $uploads['baseurl'], $lang ); + return $uploads; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/links-default.php b/pole-sbv-content/plugins/polylang/include/links-default.php new file mode 100644 index 00000000..ba2e2175 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/links-default.php @@ -0,0 +1,100 @@ +options['hide_default'] && $this->options['default_lang'] == $lang->slug ) ? $url : add_query_arg( 'lang', $lang->slug, $url ); + } + + /** + * Removes the language information from an url + * links_model interface + * + * @since 1.2 + * + * @param string $url url to modify + * @return string modified url + */ + public function remove_language_from_link( $url ) { + return remove_query_arg( 'lang', $url ); + } + + /** + * Returns the link to the first page + * links_model interface + * + * @since 1.2 + * + * @param string $url url to modify + * @return string modified url + */ + function remove_paged_from_link( $url ) { + return remove_query_arg( 'paged', $url ); + } + + /** + * Returns the link to the paged page when using pretty permalinks + * + * @since 1.5 + * + * @param string $url url to modify + * @param int $page + * @return string modified url + */ + public function add_paged_to_link( $url, $page ) { + return add_query_arg( array( 'paged' => $page ), $url ); + } + + /** + * Gets the language slug from the url if present + * links_model interface + * + * @since 1.2 + * @since 2.0 add $url argument + * + * @param string $url optional, defaults to current url + * @return string language slug + */ + public function get_language_from_url( $url = '' ) { + if ( empty( $url ) ) { + $url = $_SERVER['REQUEST_URI']; + } + + $pattern = '#lang=(' . implode( '|', $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) . ')#'; + return preg_match( $pattern, trailingslashit( $url ), $matches ) ? $matches[1] : ''; // $matches[1] is the slug of the requested language + } + + /** + * Returns the static front page url + * + * @since 1.8 + * + * @param object $lang + * @return string + */ + public function front_page_url( $lang ) { + if ( $this->options['hide_default'] && $lang->slug == $this->options['default_lang'] ) { + return trailingslashit( $this->home ); + } + $url = home_url( '/?page_id=' . $lang->page_on_front ); + return $this->options['force_lang'] ? $this->add_language_to_link( $url, $lang ) : $url; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/links-directory.php b/pole-sbv-content/plugins/polylang/include/links-directory.php new file mode 100644 index 00000000..9ac48180 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/links-directory.php @@ -0,0 +1,254 @@ +init(); + } else { + add_action( 'pll_init', array( $this, 'init' ) ); + } + } + + /** + * Called only at first object creation to avoid duplicating filters when switching blog + * + * @since 1.6 + */ + public function init() { + if ( did_action( 'setup_theme' ) ) { + $this->add_permastruct(); + } else { + add_action( 'setup_theme', array( $this, 'add_permastruct' ), 2 ); + } + + // Make sure to prepare rewrite rules when flushing + add_action( 'pre_option_rewrite_rules', array( $this, 'prepare_rewrite_rules' ) ); + } + + /** + * Adds the language code in url + * links_model interface + * + * @since 1.2 + * + * @param string $url url to modify + * @param object $lang language + * @return string modified url + */ + public function add_language_to_link( $url, $lang ) { + if ( ! empty( $lang ) ) { + $base = $this->options['rewrite'] ? '' : 'language/'; + $slug = $this->options['default_lang'] == $lang->slug && $this->options['hide_default'] ? '' : $base . $lang->slug . '/'; + if ( false === strpos( $url, $this->home . '/' . $this->root . $slug ) ) { + return str_replace( $this->home . '/' . $this->root, $this->home . '/' . $this->root . $slug, $url ); + } + } + return $url; + } + + /** + * Returns the url without language code + * links_model interface + * + * @since 1.2 + * + * @param string $url url to modify + * @return string modified url + */ + function remove_language_from_link( $url ) { + foreach ( $this->model->get_languages_list() as $language ) { + if ( ! $this->options['hide_default'] || $this->options['default_lang'] != $language->slug ) { + $languages[] = $language->slug; + } + } + + if ( ! empty( $languages ) ) { + $pattern = str_replace( '/', '\/', $this->home . '/' . $this->root ); + $pattern = '#' . $pattern . ( $this->options['rewrite'] ? '' : 'language\/' ) . '(' . implode( '|', $languages ) . ')(\/|$)#'; + $url = preg_replace( $pattern, $this->home . '/' . $this->root, $url ); + } + return $url; + } + + /** + * Returns the language based on language code in url + * links_model interface + * + * @since 1.2 + * @since 2.0 add $url argument + * + * @param string $url optional, defaults to current url + * @return string language slug + */ + public function get_language_from_url( $url = '' ) { + if ( empty( $url ) ) { + $path = $_SERVER['REQUEST_URI']; + } else { + $path = parse_url( $url, PHP_URL_PATH ); + } + + $pattern = parse_url( $this->home . '/' . $this->root . ( $this->options['rewrite'] ? '' : 'language/' ), PHP_URL_PATH ); + $pattern = str_replace( '/', '\/', $pattern ); + $pattern = '#' . $pattern . '(' . implode( '|', $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) . ')(\/|$)#'; + return preg_match( $pattern, trailingslashit( $path ), $matches ) ? $matches[1] : ''; // $matches[1] is the slug of the requested language + } + + /** + * Returns the home url + * links_model interface + * + * @since 1.3.1 + * + * @param object $lang PLL_Language object + * @return string + */ + public function home_url( $lang ) { + $base = $this->options['rewrite'] ? '' : 'language/'; + $slug = $this->options['default_lang'] == $lang->slug && $this->options['hide_default'] ? '' : '/' . $this->root . $base . $lang->slug; + return trailingslashit( $this->home . $slug ); + } + + /** + * Optionaly removes 'language' in permalinks so that we get http://www.myblog/en/ instead of http://www.myblog/language/en/ + * + * @since 1.2 + */ + function add_permastruct() { + // Language information always in front of the uri ( 'with_front' => false ) + // The 3rd parameter structure has been modified in WP 3.4 + // Leads to error 404 for pages when there is no language created yet + if ( $this->model->get_languages_list() ) { + add_permastruct( 'language', $this->options['rewrite'] ? '%language%' : 'language/%language%', array( 'with_front' => false ) ); + } + } + + /** + * Prepares rewrite rules filters + * + * @since 0.8.1 + * + * @param array $pre not used + * @return unmodified $pre + */ + public function prepare_rewrite_rules( $pre ) { + // Don't modify the rules if there is no languages created yet + // Make sure to add filter only once and if all custom post types and taxonomies have been registered + if ( $this->model->get_languages_list() && did_action( 'wp_loaded' ) && ! has_filter( 'language_rewrite_rules', '__return_empty_array' ) ) { + // Suppress the rules created by WordPress for our taxonomy + add_filter( 'language_rewrite_rules', '__return_empty_array' ); + + foreach ( $this->get_rewrite_rules_filters() as $type ) { + add_filter( $type . '_rewrite_rules', array( $this, 'rewrite_rules' ) ); + } + + add_filter( 'rewrite_rules_array', array( $this, 'rewrite_rules' ) ); // needed for post type archives + } + return $pre; + } + + /** + * The rewrite rules ! + * always make sure the default language is at the end in case the language information is hidden for default language + * thanks to brbrbr http://wordpress.org/support/topic/plugin-polylang-rewrite-rules-not-correct + * + * @since 0.8.1 + * + * @param array $rules rewrite rules + * @return array modified rewrite rules + */ + public function rewrite_rules( $rules ) { + $filter = str_replace( '_rewrite_rules', '', current_filter() ); + + global $wp_rewrite; + $newrules = array(); + + $languages = $this->model->get_languages_list( array( 'fields' => 'slug' ) ); + if ( $this->options['hide_default'] ) { + $languages = array_diff( $languages, array( $this->options['default_lang'] ) ); + } + + if ( ! empty( $languages ) ) { + $slug = $wp_rewrite->root . ( $this->options['rewrite'] ? '' : 'language/' ) . '(' . implode( '|', $languages ) . ')/'; + } + + // For custom post type archives + $cpts = array_intersect( $this->model->get_translated_post_types(), get_post_types( array( '_builtin' => false ) ) ); + $cpts = $cpts ? '#post_type=(' . implode( '|', $cpts ) . ')#' : ''; + + foreach ( $rules as $key => $rule ) { + // Special case for translated post types and taxonomies to allow canonical redirection + if ( $this->options['force_lang'] && in_array( $filter, array_merge( $this->model->get_translated_post_types(), $this->model->get_translated_taxonomies() ) ) ) { + + /** + * Filters the rewrite rules to modify + * + * @since 1.9.1 + * + * @param bool $modify whether to modify or not the rule, defaults to true + * @param array $rule original rewrite rule + * @param string $filter current set of rules being modified + * @param string|bool $archive custom post post type archive name or false if it is not a cpt archive + */ + if ( isset( $slug ) && apply_filters( 'pll_modify_rewrite_rule', true, array( $key => $rule ), $filter, false ) ) { + $newrules[ $slug . str_replace( $wp_rewrite->root, '', ltrim( $key, '^' ) ) ] = str_replace( + array( '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '[1]', '?' ), + array( '[9]', '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '?lang=$matches[1]&' ), + $rule + ); // Should be enough! + } + + $newrules[ $key ] = $rule; + } + + // Rewrite rules filtered by language + elseif ( in_array( $filter, $this->always_rewrite ) || in_array( $filter, $this->model->get_filtered_taxonomies() ) || ( $cpts && preg_match( $cpts, $rule, $matches ) && ! strpos( $rule, 'name=' ) ) || ( 'rewrite_rules_array' != $filter && $this->options['force_lang'] ) ) { + + /** This filter is documented in include/links-directory.php */ + if ( apply_filters( 'pll_modify_rewrite_rule', true, array( $key => $rule ), $filter, empty( $matches[1] ) ? false : $matches[1] ) ) { + if ( isset( $slug ) ) { + $newrules[ $slug . str_replace( $wp_rewrite->root, '', ltrim( $key, '^' ) ) ] = str_replace( + array( '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '[1]', '?' ), + array( '[9]', '[8]', '[7]', '[6]', '[5]', '[4]', '[3]', '[2]', '?lang=$matches[1]&' ), + $rule + ); // Should be enough! + } + + if ( $this->options['hide_default'] ) { + $newrules[ $key ] = str_replace( '?', '?lang=' . $this->options['default_lang'] . '&', $rule ); + } + } else { + $newrules[ $key ] = $rule; + } + } + + // Unmodified rules + else { + $newrules[ $key ] = $rule; + } + } + + // The home rewrite rule + if ( 'root' == $filter && isset( $slug ) ) { + $newrules[ $slug . '?$' ] = $wp_rewrite->index . '?lang=$matches[1]'; + } + + return $newrules; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/links-domain.php b/pole-sbv-content/plugins/polylang/include/links-domain.php new file mode 100644 index 00000000..7984ea7d --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/links-domain.php @@ -0,0 +1,104 @@ +hosts = $this->get_hosts(); + + // Filrer the site url ( mainly to get the correct login form ) + add_filter( 'site_url', array( $this, 'site_url' ) ); + } + + + /** + * Adds the language code in url + * links_model interface + * + * @since 1.2 + * + * @param string $url url to modify + * @param object $lang language + * @return string modified url + */ + public function add_language_to_link( $url, $lang ) { + if ( ! empty( $lang ) && ! empty( $this->hosts[ $lang->slug ] ) ) { + $url = preg_replace( '#:\/\/(' . parse_url( $this->home, PHP_URL_HOST ) . ')($|\/.*)#', '://' . $this->hosts[ $lang->slug ] . '$2', $url ); + } + return $url; + } + + /** + * Returns the url without language code + * links_model interface + * + * @since 1.2 + * + * @param string $url url to modify + * @return string modified url + */ + public function remove_language_from_link( $url ) { + if ( ! empty( $this->hosts ) ) { + $url = preg_replace( '#:\/\/(' . implode( '|', $this->hosts ) . ')($|\/.*)#', '://' . parse_url( $this->home, PHP_URL_HOST ) . '$2', $url ); + } + return $url; + } + + /** + * Returns the language based on language code in url + * links_model interface + * + * @since 1.2 + * @since 2.0 add $url argument + * + * @param string $url optional, defaults to current url + * @return string language slug + */ + public function get_language_from_url( $url = '' ) { + $host = empty( $url ) ? $_SERVER['HTTP_HOST'] : parse_url( $url, PHP_URL_HOST ); + return ( $lang = array_search( $host , $this->hosts ) ) ? $lang : ''; + } + + /** + * Returns the home url + * links_model interface + * + * @since 1.3.1 + * + * @param object $lang PLL_Language object + * @return string + */ + function home_url( $lang ) { + return trailingslashit( empty( $this->options['domains'][ $lang->slug ] ) ? $this->home : $this->options['domains'][ $lang->slug ] ); + } + + /** + * Get hosts managed on the website + * + * @since 1.5 + * + * @return array list of hosts + */ + public function get_hosts() { + $hosts = array(); + foreach ( $this->options['domains'] as $lang => $domain ) { + $hosts[ $lang ] = parse_url( $domain, PHP_URL_HOST ); + } + return $hosts; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/links-model.php b/pole-sbv-content/plugins/polylang/include/links-model.php new file mode 100644 index 00000000..6e850616 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/links-model.php @@ -0,0 +1,133 @@ +model = &$model; + $this->options = &$model->options; + + $this->home = home_url(); + + add_filter( 'pll_languages_list', array( $this, 'pll_languages_list' ), 4 ); // after PLL_Static_Pages + add_filter( 'pll_after_languages_cache', array( $this, 'pll_after_languages_cache' ) ); + + // adds our domains or subdomains to allowed hosts for safe redirection + add_filter( 'allowed_redirect_hosts', array( $this, 'allowed_redirect_hosts' ) ); + } + + /** + * Changes the language code in url + * + * @since 1.5 + * + * @param string $url url to modify + * @param object $lang language + * @return string modified url + */ + public function switch_language_in_link( $url, $lang ) { + $url = $this->remove_language_from_link( $url ); + return $this->add_language_to_link( $url, $lang ); + } + + /** + * Get hosts managed on the website + * + * @since 1.5 + * + * @return array list of hosts + */ + public function get_hosts() { + return array( parse_url( $this->home, PHP_URL_HOST ) ); + } + + /** + * Returns the home url + * + * @since 1.3.1 + * + * @param object $lang PLL_Language object + * @return string + */ + public function home_url( $lang ) { + $url = trailingslashit( $this->home ); + return $this->options['hide_default'] && $lang->slug == $this->options['default_lang'] ? $url : $this->add_language_to_link( $url, $lang ); + } + + /** + * Sets the home urls + * + * @since 1.8 + * + * @param object $language + */ + protected function set_home_url( $language ) { + $search_url = $this->home_url( $language ); + $home_url = empty( $language->page_on_front ) || $this->options['redirect_lang'] ? $search_url : $this->front_page_url( $language ); + $language->set_home_url( $search_url, $home_url ); + } + + /** + * Sets the home urls and flags before the languages are persistently cached + * + * @since 1.8 + * + * @param array $languages array of PLL_Language objects + * @return array + */ + public function pll_languages_list( $languages ) { + foreach ( $languages as $language ) { + $this->set_home_url( $language ); + $language->set_flag(); + } + return $languages; + } + + /** + * Sets the home urls when not cached + * Sets the home urls scheme + * + * @since 1.8 + * + * @param array $languages array of PLL_Language objects + * @return array + */ + public function pll_after_languages_cache( $languages ) { + foreach ( $languages as $language ) { + // Get the home urls when not cached + if ( ( defined( 'PLL_CACHE_LANGUAGES' ) && ! PLL_CACHE_LANGUAGES ) || ( defined( 'PLL_CACHE_HOME_URL' ) && ! PLL_CACHE_HOME_URL ) ) { + $this->set_home_url( $language ); + } + + // Ensures that the ( possibly cached ) home url uses the right scheme http or https + $language->set_home_url_scheme(); + } + return $languages; + } + + /** + * Adds our domains or subdomains to allowed hosts for safe redirection + * + * @since 1.4.3 + * + * @param array $hosts allowed hosts + * @return array + */ + public function allowed_redirect_hosts( $hosts ) { + return array_unique( array_merge( $hosts, array_values( $this->get_hosts() ) ) ); + } +} diff --git a/pole-sbv-content/plugins/polylang/include/links-permalinks.php b/pole-sbv-content/plugins/polylang/include/links-permalinks.php new file mode 100644 index 00000000..17489e20 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/links-permalinks.php @@ -0,0 +1,120 @@ +root = preg_match( '#^/*' . $this->index . '#', $permalink_structure ) ? $this->index . '/' : ''; + $this->use_trailing_slashes = ( '/' == substr( $permalink_structure, -1, 1 ) ); + } + + /** + * Returns the link to the first page when using pretty permalinks + * + * @since 1.2 + * + * @param string $url url to modify + * @return string modified url + */ + public function remove_paged_from_link( $url ) { + /** + * Filter an url after the paged part has been removed + * + * @since 2.0.6 + * + * @param string $modified_url The link to the first page + * @param string $orginal_url The link to the original paged page + */ + return apply_filters( 'pll_remove_paged_from_link', preg_replace( '#\/page\/[0-9]+\/?#', $this->use_trailing_slashes ? '/' : '', $url ), $url ); + } + + /** + * Returns the link to the paged page when using pretty permalinks + * + * @since 1.5 + * + * @param string $url url to modify + * @param int $page + * @return string modified url + */ + public function add_paged_to_link( $url, $page ) { + /** + * Filter an url after the paged part has been added + * + * @since 2.0.6 + * + * @param string $modified_url The link to the paged page + * @param string $orginal_url The link to the original first page + * @param int $page The page number + */ + return apply_filters( 'pll_add_paged_to_link', user_trailingslashit( trailingslashit( $url ) . 'page/' . $page, 'paged' ), $url, $page ); + } + + /** + * Returns the home url + * + * @since 1.3.1 + * + * @param object $lang PLL_Language object + * @return string + */ + public function home_url( $lang ) { + return trailingslashit( parent::home_url( $lang ) ); + } + + /** + * Returns the static front page url + * + * @since 1.8 + * + * @param object $lang + * @return string + */ + public function front_page_url( $lang ) { + if ( $this->options['hide_default'] && $lang->slug == $this->options['default_lang'] ) { + return trailingslashit( $this->home ); + } + $url = home_url( $this->root . get_page_uri( $lang->page_on_front ) ); + $url = $this->use_trailing_slashes ? trailingslashit( $url ) : untrailingslashit( $url ); + return $this->options['force_lang'] ? $this->add_language_to_link( $url, $lang ) : $url; + } + + /** + * Prepares rewrite rules filters + * + * @since 1.6 + */ + public function get_rewrite_rules_filters() { + // Make sure we have the right post types and taxonomies + $types = array_values( array_merge( $this->model->get_translated_post_types(), $this->model->get_translated_taxonomies(), $this->model->get_filtered_taxonomies() ) ); + $types = array_merge( $this->always_rewrite, $types ); + + /** + * Filter the list of rewrite rules filters to be used by Polylang + * + * @since 0.8.1 + * + * @param array $types the list of filters (without '_rewrite_rules' at the end) + */ + return apply_filters( 'pll_rewrite_rules', $types ); + } +} diff --git a/pole-sbv-content/plugins/polylang/include/links-subdomain.php b/pole-sbv-content/plugins/polylang/include/links-subdomain.php new file mode 100644 index 00000000..76a467e4 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/links-subdomain.php @@ -0,0 +1,95 @@ +www = ( false === strpos( $this->home, '://www.' ) ) ? '://' : '://www.'; + } + + /** + * Adds the language code in url + * links_model interface + * + * @since 1.2 + * + * @param string $url url to modify + * @param object $lang language + * @return string modified url + */ + public function add_language_to_link( $url, $lang ) { + if ( ! empty( $lang ) && false === strpos( $url, '://' . $lang->slug . '.' ) ) { + $url = $this->options['default_lang'] == $lang->slug && $this->options['hide_default'] ? $url : str_replace( $this->www, '://' . $lang->slug . '.', $url ); + } + return $url; + } + + /** + * Returns the url without language code + * links_model interface + * + * @since 1.2 + * + * @param string $url url to modify + * @return string modified url + */ + public function remove_language_from_link( $url ) { + foreach ( $this->model->get_languages_list() as $language ) { + if ( ! $this->options['hide_default'] || $this->options['default_lang'] != $language->slug ) { + $languages[] = $language->slug; + } + } + + if ( ! empty( $languages ) ) { + $url = preg_replace( '#:\/\/(' . implode( '|', $languages ) . ')\.#', $this->www, $url ); + } + + return $url; + } + + /** + * Returns the language based on language code in url + * links_model interface + * + * @since 1.2 + * @since 2.0 add $url argument + * + * @param string $url optional, defaults to current url + * @return string language slug + */ + public function get_language_from_url( $url = '' ) { + $host = empty( $url ) ? $_SERVER['HTTP_HOST'] : parse_url( $url, PHP_URL_HOST ); + $pattern = '#(' . implode( '|', $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) . ')\.#'; + return preg_match( $pattern, trailingslashit( $host ), $matches ) ? $matches[1] : ''; // $matches[1] is the slug of the requested language + } + + /** + * Get hosts managed on the website + * + * @since 1.5 + * + * @return array list of hosts + */ + public function get_hosts() { + $hosts = array(); + foreach ( $this->model->get_languages_list() as $lang ) { + $hosts[] = parse_url( $this->home_url( $lang ), PHP_URL_HOST ); + } + return $hosts; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/links.php b/pole-sbv-content/plugins/polylang/include/links.php new file mode 100644 index 00000000..879d04d8 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/links.php @@ -0,0 +1,65 @@ +links_model = &$polylang->links_model; + $this->model = &$polylang->model; + $this->options = &$polylang->options; + } + + /** + * Returns the home url in the requested language + * + * @since 1.3 + * + * @param object|string $language + * @param bool $is_search optional wether we need the home url for a search form, defaults to false + */ + public function get_home_url( $language, $is_search = false ) { + $language = is_object( $language ) ? $language : $this->model->get_language( $language ); + return $is_search ? $language->search_url : $language->home_url; + } + + /** + * Checks if the current user can read the post + * + * @since 1.5 + * + * @param int $post_id + * @return bool + */ + public function current_user_can_read( $post_id ) { + $post = get_post( $post_id ); + + if ( 'inherit' === $post->post_status && $post->post_parent ) { + $post = get_post( $post->post_parent ); + } + + if ( 'inherit' === $post->post_status || in_array( $post->post_status, get_post_stati( array( 'public' => true ) ) ) ) { + return true; + } + + // Follow WP practices, which shows links to private posts ( when readable ), but not for draft posts ( ex: get_adjacent_post_link() ) + if ( in_array( $post->post_status, get_post_stati( array( 'private' => true ) ) ) ) { + $post_type_object = get_post_type_object( $post->post_type ); + $user = wp_get_current_user(); + return is_user_logged_in() && ( current_user_can( $post_type_object->cap->read_private_posts ) || $user->ID == $post->post_author ); // Comparison must not be strict! + } + + return false; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/mo.php b/pole-sbv-content/plugins/polylang/include/mo.php new file mode 100644 index 00000000..d307b30f --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/mo.php @@ -0,0 +1,105 @@ + __( 'Strings translations', 'polylang' ) ); + register_post_type( 'polylang_mo', array( 'labels' => $labels, 'rewrite' => false, 'query_var' => false, '_pll' => true ) ); + + add_action( 'pll_add_language', array( $this, 'clean_cache' ) ); + } + } + + /** + * Writes a PLL_MO object into a custom post meta + * + * @since 1.2 + * + * @param object $lang The language in which we want to export strings + */ + public function export_to_db( $lang ) { + $this->add_entry( $this->make_entry( '', '' ) ); // Empty string translation, just in case + + // Would be convenient to store the whole object but it would take a huge space in DB + // So let's keep only the strings in an array + $strings = array(); + foreach ( $this->entries as $entry ) { + $strings[] = array( $entry->singular, $this->translate( $entry->singular ) ); + } + + $strings = wp_slash( $strings ); // Avoid breaking slashed strings in update_post_meta. See https://codex.wordpress.org/Function_Reference/update_post_meta#Character_Escaping + + if ( empty( $lang->mo_id ) ) { + $post = array( + 'post_title' => 'polylang_mo_' . $lang->term_id, + 'post_status' => 'private', // To avoid a conflict with WP Super Cache. See https://wordpress.org/support/topic/polylang_mo-and-404s-take-2 + 'post_type' => 'polylang_mo', + ); + $mo_id = wp_insert_post( $post ); + update_post_meta( $mo_id, '_pll_strings_translations', $strings ); + } else { + update_post_meta( $lang->mo_id, '_pll_strings_translations', $strings ); + } + } + + /** + * Reads a PLL_MO object from a custom post meta + * + * @since 1.2 + * + * @param object $lang The language in which we want to get strings + */ + public function import_from_db( $lang ) { + if ( ! empty( $lang->mo_id ) ) { + $strings = get_post_meta( $lang->mo_id, '_pll_strings_translations', true ); + if ( is_array( $strings ) ) { + foreach ( $strings as $msg ) { + $this->add_entry( $this->make_entry( $msg[0], $msg[1] ) ); + } + } + } + } + + /** + * Returns the post id of the post storing the strings translations + * + * @since 1.4 + * + * @param object $lang + * @return int + */ + public static function get_id( $lang ) { + global $wpdb; + + $ids = wp_cache_get( 'polylang_mo_ids' ); + + if ( empty( $ids ) ) { + $ids = $wpdb->get_results( "SELECT post_title, ID FROM $wpdb->posts WHERE post_type='polylang_mo'", OBJECT_K ); + wp_cache_add( 'polylang_mo_ids', $ids ); + } + + // The mo id for a language can be transiently empty + return isset( $ids[ 'polylang_mo_' . $lang->term_id ] ) ? $ids[ 'polylang_mo_' . $lang->term_id ]->ID : null; + } + + /** + * Invalidate the cache when adding a new language + * + * @since 2.0.5 + */ + public function clean_cache() { + wp_cache_delete( 'polylang_mo_ids' ); + } +} diff --git a/pole-sbv-content/plugins/polylang/include/model.php b/pole-sbv-content/plugins/polylang/include/model.php new file mode 100644 index 00000000..14a124ad --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/model.php @@ -0,0 +1,608 @@ +options = &$options; + + $this->cache = new PLL_Cache(); + $this->post = new PLL_Translated_Post( $this ); // translated post sub model + $this->term = new PLL_Translated_Term( $this ); // translated term sub model + + // we need to clean languages cache when editing a language and when modifying the permalink structure + add_action( 'edited_term_taxonomy', array( $this, 'clean_languages_cache' ), 10, 2 ); + add_action( 'update_option_permalink_structure', array( $this, 'clean_languages_cache' ) ); + add_action( 'update_option_siteurl', array( $this, 'clean_languages_cache' ) ); + add_action( 'update_option_home', array( $this, 'clean_languages_cache' ) ); + + // just in case someone would like to display the language description ;- ) + add_filter( 'language_description', '__return_empty_string' ); + } + + /** + * Returns the list of available languages + * caches the list in a db transient ( except flags ), unless PLL_CACHE_LANGUAGES is set to false + * caches the list ( with flags ) in the private property $languages + * + * list of parameters accepted in $args: + * + * hide_empty => hides languages with no posts if set to true ( defaults to false ) + * fields => return only that field if set ( see PLL_Language for a list of fields ) + * + * @since 0.1 + * + * @param array $args + * @return array|string|int list of PLL_Language objects or PLL_Language object properties + */ + public function get_languages_list( $args = array() ) { + if ( false === $languages = $this->cache->get( 'languages' ) ) { + + // create the languages from taxonomies + if ( ( defined( 'PLL_CACHE_LANGUAGES' ) && ! PLL_CACHE_LANGUAGES ) || false === ( $languages = get_transient( 'pll_languages_list' ) ) ) { + $languages = get_terms( 'language', array( 'hide_empty' => false, 'orderby' => 'term_group' ) ); + $languages = empty( $languages ) || is_wp_error( $languages ) ? array() : $languages; + + $term_languages = get_terms( 'term_language', array( 'hide_empty' => false ) ); + $term_languages = empty( $term_languages ) || is_wp_error( $term_languages ) ? + array() : array_combine( wp_list_pluck( $term_languages, 'slug' ), $term_languages ); + + if ( ! empty( $languages ) && ! empty( $term_languages ) ) { + // don't use array_map + create_function to instantiate an autoloaded class as it breaks badly in old versions of PHP + foreach ( $languages as $k => $v ) { + $languages[ $k ] = new PLL_Language( $v, $term_languages[ 'pll_' . $v->slug ] ); + } + + // we will need the languages list to allow its access in the filter below + $this->cache->set( 'languages', $languages ); + + /** + * Filter the list of languages *before* it is stored in the persistent cache + * /!\ this filter is fired *before* the $polylang object is available + * + * @since 1.7.5 + * + * @param array $languages the list of language objects + * @param object $model PLL_Model object + */ + $languages = apply_filters( 'pll_languages_list', $languages, $this ); + + // don't store directly objects as it badly break with some hosts ( GoDaddy ) due to race conditions when using object cache + // thanks to captin411 for catching this! + // see https://wordpress.org/support/topic/fatal-error-pll_model_languages_list?replies=8#post-6782255; + set_transient( 'pll_languages_list', array_map( 'get_object_vars', $languages ) ); + } + else { + $languages = array(); // in case something went wrong + } + } + + // create the languages directly from arrays stored in transients + else { + foreach ( $languages as $k => $v ) { + $languages[ $k ] = new PLL_Language( $v ); + } + } + + // custom flags + if ( ! PLL_ADMIN ) { + foreach ( $languages as $language ) { + $language->set_custom_flag(); + } + } + + /** + * Filter the list of languages *after* it is stored in the persistent cache + * /!\ this filter is fired *before* the $polylang object is available + * + * @since 1.8 + * + * @param array $languages the list of language objects + */ + $languages = apply_filters( 'pll_after_languages_cache', $languages ); + $this->cache->set( 'languages', $languages ); + } + + $args = wp_parse_args( $args, array( 'hide_empty' => false ) ); + + // remove empty languages if requested + if ( $args['hide_empty'] ) { + $languages = wp_list_filter( $languages, array( 'count' => 0 ), 'NOT' ); + } + + return empty( $args['fields'] ) ? $languages : wp_list_pluck( $languages, $args['fields'] ); + } + + /** + * Cleans language cache + * can be called directly with no parameter + * called by the 'edited_term_taxonomy' filter with 2 parameters when count needs to be updated + * + * @since 1.2 + * + * @param int $term not used + * @param string $taxonomy taxonomy name + */ + public function clean_languages_cache( $term = 0, $taxonomy = null ) { + if ( empty( $taxonomy ) || 'language' == $taxonomy ) { + delete_transient( 'pll_languages_list' ); + $this->cache->clean(); + } + } + + /** + * Returns the language by its term_id, tl_term_id, slug or locale + * + * @since 0.1 + * + * @param int|string $value term_id, tl_term_id, slug or locale of the queried language + * @return object|bool PLL_Language object, false if no language found + */ + public function get_language( $value ) { + if ( is_object( $value ) ) { + return $value instanceof PLL_Language ? $value : $this->get_language( $value->term_id ); // will force cast to PLL_Language + } + + if ( false === $return = $this->cache->get( 'language:' . $value ) ) { + foreach ( $this->get_languages_list() as $lang ) { + $this->cache->set( 'language:' . $lang->term_id, $lang ); + $this->cache->set( 'language:' . $lang->tl_term_id, $lang ); + $this->cache->set( 'language:' . $lang->slug, $lang ); + $this->cache->set( 'language:' . $lang->locale, $lang ); + } + $return = $this->cache->get( 'language:' . $value ); + } + + return $return; + } + + /** + * Adds terms clauses to get_terms to filter them by languages - used in both frontend and admin + * + * @since 1.2 + * + * @param array $clauses the list of sql clauses in terms query + * @param object $lang PLL_Language object + * @return array modifed list of clauses + */ + public function terms_clauses( $clauses, $lang ) { + if ( ! empty( $lang ) && false === strpos( $clauses['join'], 'pll_tr' ) ) { + $clauses['join'] .= $this->term->join_clause(); + $clauses['where'] .= $this->term->where_clause( $lang ); + } + return $clauses; + } + + /** + * Returns post types that need to be translated + * the post types list is cached for better better performance + * wait for 'after_setup_theme' to apply the cache to allow themes adding the filter in functions.php + * + * @since 1.2 + * + * @param bool $filter true if we should return only valid registered post types + * @return array post type names for which Polylang manages languages and translations + */ + public function get_translated_post_types( $filter = true ) { + if ( false === $post_types = $this->cache->get( 'post_types' ) ) { + $post_types = array( 'post' => 'post', 'page' => 'page' ); + + if ( ! empty( $this->options['media_support'] ) ) { + $post_types['attachment'] = 'attachment'; + } + + if ( ! empty( $this->options['post_types'] ) && is_array( $this->options['post_types'] ) ) { + $post_types = array_merge( $post_types, array_combine( $this->options['post_types'], $this->options['post_types'] ) ); + } + + /** + * Filter the list of post types available for translation. + * The default are post types which have the parameter ‘public’ set to true. + * The filter must be added soon in the WordPress loading process: + * in a function hooked to ‘plugins_loaded’ or directly in functions.php for themes. + * + * @since 0.8 + * + * @param array $post_types list of post type names + * @param bool $is_settings true when displaying the list of custom post types in Polylang settings + */ + $post_types = apply_filters( 'pll_get_post_types', $post_types, false ); + + if ( did_action( 'after_setup_theme' ) ) { + $this->cache->set( 'post_types', $post_types ); + } + } + + return $filter ? array_intersect( $post_types, get_post_types() ) : $post_types; + } + + /** + * Returns true if Polylang manages languages and translations for this post type + * + * @since 1.2 + * + * @param string|array $post_type post type name or array of post type names + * @return bool + */ + public function is_translated_post_type( $post_type ) { + $post_types = $this->get_translated_post_types( false ); + return ( is_array( $post_type ) && array_intersect( $post_type, $post_types ) || in_array( $post_type, $post_types ) || 'any' === $post_type && ! empty( $post_types ) ); + } + + /** + * Return taxonomies that need to be translated + * + * @since 1.2 + * + * @param bool $filter true if we should return only valid registered taxonmies + * @return array array of registered taxonomy names for which Polylang manages languages and translations + */ + public function get_translated_taxonomies( $filter = true ) { + if ( false === $taxonomies = $this->cache->get( 'taxonomies' ) ) { + $taxonomies = array( 'category' => 'category', 'post_tag' => 'post_tag' ); + + if ( ! empty( $this->options['taxonomies'] ) && is_array( $this->options['taxonomies'] ) ) { + $taxonomies = array_merge( $taxonomies, array_combine( $this->options['taxonomies'], $this->options['taxonomies'] ) ); + } + + /** + * Filter the list of taxonomies available for translation. + * The default are taxonomies which have the parameter ‘public’ set to true. + * The filter must be added soon in the WordPress loading process: + * in a function hooked to ‘plugins_loaded’ or directly in functions.php for themes. + * + * @since 0.8 + * + * @param array $taxonomies list of taxonomy names + * @param bool $is_settings true when displaying the list of custom taxonomies in Polylang settings + */ + $taxonomies = apply_filters( 'pll_get_taxonomies', $taxonomies, false ); + if ( did_action( 'after_setup_theme' ) ) { + $this->cache->set( 'taxonomies', $taxonomies ); + } + } + + return $filter ? array_intersect( $taxonomies, get_taxonomies() ) : $taxonomies; + } + + /** + * Returns true if Polylang manages languages and translations for this taxonomy + * + * @since 1.2 + * + * @param string|array $tax taxonomy name or array of taxonomy names + * @return bool + */ + public function is_translated_taxonomy( $tax ) { + $taxonomies = $this->get_translated_taxonomies( false ); + return ( is_array( $tax ) && array_intersect( $tax, $taxonomies ) || in_array( $tax, $taxonomies ) ); + } + + /** + * Return taxonomies that need to be filtered ( post_format like ) + * + * @since 1.7 + * + * @param bool $filter true if we should return only valid registered taxonomies + * @return array array of registered taxonomy names + */ + public function get_filtered_taxonomies( $filter = true ) { + if ( did_action( 'after_setup_theme' ) ) { + static $taxonomies = null; + } + + if ( empty( $taxonomies ) ) { + $taxonomies = array( 'post_format' => 'post_format' ); + + /** + * Filter the list of taxonomies not translatable but filtered by language. + * Includes only the post format by default + * The filter must be added soon in the WordPress loading process: + * in a function hooked to ‘plugins_loaded’ or directly in functions.php for themes. + * + * @since 1.7 + * + * @param array $taxonomies list of taxonomy names + * @param bool $is_settings true when displaying the list of custom taxonomies in Polylang settings + */ + $taxonomies = apply_filters( 'pll_filtered_taxonomies', $taxonomies, false ); + } + + return $filter ? array_intersect( $taxonomies, get_taxonomies() ) : $taxonomies; + } + + /** + * Returns true if Polylang filters this taxonomy per language + * + * @since 1.7 + * + * @param string|array $tax taxonomy name or array of taxonomy names + * @return bool + */ + public function is_filtered_taxonomy( $tax ) { + $taxonomies = $this->get_filtered_taxonomies( false ); + return ( is_array( $tax ) && array_intersect( $tax, $taxonomies ) || in_array( $tax, $taxonomies ) ); + } + + /** + * Returns the query vars of all filtered taxonomies + * + * @since 1.7 + * + * @return array + */ + public function get_filtered_taxonomies_query_vars() { + $query_vars = array(); + foreach ( $this->get_filtered_taxonomies() as $filtered_tax ) { + $tax = get_taxonomy( $filtered_tax ); + $query_vars[] = $tax->query_var; + } + return $query_vars; + } + + /** + * Create a default category for a language + * + * @since 1.2 + * + * @param object|string|int $lang language + */ + public function create_default_category( $lang ) { + $lang = $this->get_language( $lang ); + + // create a new category + // FIXME this is translated in admin language when we would like it in $lang + $cat_name = __( 'Uncategorized' ); + $cat_slug = sanitize_title( $cat_name . '-' . $lang->slug ); + $cat = wp_insert_term( $cat_name, 'category', array( 'slug' => $cat_slug ) ); + + // check that the category was not previously created ( in case the language was deleted and recreated ) + $cat = isset( $cat->error_data['term_exists'] ) ? $cat->error_data['term_exists'] : $cat['term_id']; + + // set language + $this->term->set_language( (int) $cat, $lang ); + + // this is a translation of the default category + $default = (int) get_option( 'default_category' ); + $translations = $this->term->get_translations( $default ); + if ( empty( $translations ) ) { + if ( $lg = $this->term->get_language( $default ) ) { + $translations[ $lg->slug ] = $default; + } + else { + $translations = array(); + } + } + + $this->term->save_translations( (int) $cat, $translations ); + } + + /** + * It is possible to have several terms with the same name in the same taxonomy ( one per language ) + * but the native term_exists will return true even if only one exists + * so here the function adds the language parameter + * + * @since 1.4 + * + * @param string $term_name the term name + * @param string $taxonomy taxonomy name + * @param int $parent parent term id + * @param string|object $language the language slug or object + * @return null|int the term_id of the found term + */ + public function term_exists( $term_name, $taxonomy, $parent, $language ) { + global $wpdb; + + $term_name = trim( wp_unslash( $term_name ) ); + + $select = "SELECT t.term_id FROM $wpdb->terms AS t"; + $join = " INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id"; + $join .= $this->term->join_clause(); + $where = $wpdb->prepare( ' WHERE tt.taxonomy = %s AND t.name = %s', $taxonomy, $term_name ); + $where .= $this->term->where_clause( $this->get_language( $language ) ); + + if ( $parent > 0 ) { + $where .= $wpdb->prepare( ' AND tt.parent = %d', $parent ); + } + + return $wpdb->get_var( $select . $join . $where ); + } + + /** + * Gets the number of posts per language in a date, author or post type archive + * + * @since 1.2 + * + * @param object $lang + * @param array $q WP_Query arguments ( accepted: post_type, m, year, monthnum, day, author, author_name, post_format ) + * @return int + */ + public function count_posts( $lang, $q = array() ) { + global $wpdb; + + $q = wp_parse_args( $q, array( 'post_type' => 'post' ) ); + + if ( ! is_array( $q['post_type'] ) ) { + $q['post_type'] = array( $q['post_type'] ); + } + + foreach ( $q['post_type'] as $key => $type ) { + if ( ! post_type_exists( $type ) ) { + unset( $q['post_type'][ $key ] ); + } + } + + if ( empty( $q['post_type'] ) ) { + $q['post_type'] = array( 'post' ); // we *need* a post type + } + + $cache_key = md5( serialize( $q ) ); + $counts = wp_cache_get( $cache_key, 'pll_count_posts' ); + + if ( false === $counts ) { + $select = "SELECT pll_tr.term_taxonomy_id, COUNT( * ) AS num_posts FROM {$wpdb->posts}"; + $join = $this->post->join_clause(); + $where = " WHERE post_status = 'publish'"; + $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_type IN ( '%s' )", join( "', '", $q['post_type'] ) ); + $where .= $this->post->where_clause( $this->get_languages_list() ); + $groupby = ' GROUP BY pll_tr.term_taxonomy_id'; + + if ( ! empty( $q['m'] ) ) { + $q['m'] = '' . preg_replace( '|[^0-9]|', '', $q['m'] ); + $where .= $wpdb->prepare( " AND YEAR( {$wpdb->posts}.post_date ) = %d", substr( $q['m'], 0, 4 ) ); + if ( strlen( $q['m'] ) > 5 ) { + $where .= $wpdb->prepare( " AND MONTH( {$wpdb->posts}.post_date ) = %d", substr( $q['m'], 4, 2 ) ); + } + if ( strlen( $q['m'] ) > 7 ) { + $where .= $wpdb->prepare( " AND DAYOFMONTH( {$wpdb->posts}.post_date ) = %d", substr( $q['m'], 6, 2 ) ); + } + } + + if ( ! empty( $q['year'] ) ) { + $where .= $wpdb->prepare( " AND YEAR( {$wpdb->posts}.post_date ) = %d", $q['year'] ); + } + + if ( ! empty( $q['monthnum'] ) ) { + $where .= $wpdb->prepare( " AND MONTH( {$wpdb->posts}.post_date ) = %d", $q['monthnum'] ); + } + + if ( ! empty( $q['day'] ) ) { + $where .= $wpdb->prepare( " AND DAYOFMONTH( {$wpdb->posts}.post_date ) = %d", $q['day'] ); + } + + if ( ! empty( $q['author_name'] ) ) { + $author = get_user_by( 'slug', sanitize_title_for_query( $q['author_name'] ) ); + if ( $author ) { + $q['author'] = $author->ID; + } + } + + if ( ! empty( $q['author'] ) ) { + $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_author = %d", $q['author'] ); + } + + // filtered taxonomies ( post_format ) + foreach ( $this->get_filtered_taxonomies_query_vars() as $tax_qv ) { + + if ( ! empty( $q[ $tax_qv ] ) ) { + $join .= " INNER JOIN {$wpdb->term_relationships} AS tr ON tr.object_id = {$wpdb->posts}.ID"; + $join .= " INNER JOIN {$wpdb->term_taxonomy} AS tt ON tt.term_taxonomy_id = tr.term_taxonomy_id"; + $join .= " INNER JOIN {$wpdb->terms} AS t ON t.term_id = tt.term_id"; + $where .= $wpdb->prepare( ' AND t.slug = %s', $q[ $tax_qv ] ); + } + } + + $res = $wpdb->get_results( $select . $join . $where . $groupby, ARRAY_A ); + foreach ( (array) $res as $row ) { + $counts[ $row['term_taxonomy_id'] ] = $row['num_posts']; + } + + wp_cache_set( $cache_key, $counts, 'pll_count_posts' ); + } + + return empty( $counts[ $lang->term_taxonomy_id ] ) ? 0 : $counts[ $lang->term_taxonomy_id ]; + } + + /** + * Setup the links model based on options + * + * @since 1.2 + * + * @return object implementing "links_model interface" + */ + public function get_links_model() { + $c = array( 'Directory', 'Directory', 'Subdomain', 'Domain' ); + $class = get_option( 'permalink_structure' ) ? 'PLL_Links_' . $c[ $this->options['force_lang'] ] : 'PLL_Links_Default'; + + /** + * Filter the links model class to use + * /!\ this filter is fired *before* the $polylang object is available + * + * @since 2.1.1 + * + * @param string $class A class name: PLL_Links_Default, PLL_Links_Directory, PLL_Links_Subdomain, PLL_Links_Domain + */ + $class = apply_filters( 'pll_links_model', $class ); + + return new $class( $this ); + } + + /** + * Some backward compatibility with Polylang < 1.8 + * allows for example to call $polylang->model->get_post_languages( $post_id ) instead of $polylang->model->post->get_language( $post_id ) + * this works but should be slower than the direct call, thus an error is triggered in debug mode + * + * @since 1.8 + * + * @param string $func Function name + * @param array $args Function arguments + */ + public function __call( $func, $args ) { + $f = $func; + + switch ( $func ) { + case 'get_object_term': + $o = ( false === strpos( $args[1], 'term' ) ) ? 'post' : 'term'; + break; + + case 'save_translations': + case 'delete_translation': + case 'get_translations': + case 'get_translation': + case 'join_clause': + $o = ( 'post' == $args[0] || $this->is_translated_post_type( $args[0] ) ) ? 'post' : ( 'term' == $args[0] || $this->is_translated_taxonomy( $args[0] ) ? 'term' : false ); + unset( $args[0] ); + break; + + case 'set_post_language': + case 'get_post_language': + case 'set_term_language': + case 'get_term_language': + case 'delete_term_language': + case 'get_post': + case 'get_term': + $str = explode( '_', $func ); + $f = empty( $str[2] ) ? $str[0] : $str[0] . '_' . $str[2]; + $o = $str[1]; + break; + + case 'where_clause': + case 'get_objects_in_language': + $o = $args[1]; + unset( $args[1] ); + break; + } + + if ( ! empty( $o ) && is_object( $this->$o ) && method_exists( $this->$o, $f ) ) { + if ( WP_DEBUG ) { + $debug = debug_backtrace(); + $i = 1 + empty( $debug[1]['line'] ); // the file and line are in $debug[2] if the function was called using call_user_func + + trigger_error( sprintf( + '%1$s was called incorrectly in %4$s on line %5$s: the call to $polylang->model->%1$s() has been deprecated in Polylang 1.8, use PLL()->model->%2$s->%3$s() instead.' . "\nError handler", + $func, $o, $f, $debug[ $i ]['file'], $debug[ $i ]['line'] + ) ); + } + return call_user_func_array( array( $this->$o, $f ), $args ); + } + + $debug = debug_backtrace(); + trigger_error( sprintf( 'Call to undefined function PLL()->model->%1$s() in %2$s on line %3$s' . "\nError handler", $func, $debug[0]['file'], $debug[0]['line'] ), E_USER_ERROR ); + } +} diff --git a/pole-sbv-content/plugins/polylang/include/nav-menu.php b/pole-sbv-content/plugins/polylang/include/nav-menu.php new file mode 100644 index 00000000..23b80fe4 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/nav-menu.php @@ -0,0 +1,79 @@ +model = &$polylang->model; + $this->options = &$polylang->options; + + // integration with WP customizer + add_action( 'customize_register', array( $this, 'create_nav_menu_locations' ), 5 ); + } + + /** + * create temporary nav menu locations ( one per location and per language ) for all non-default language + * to do only one time + * + * @since 1.2 + */ + public function create_nav_menu_locations() { + static $once; + global $_wp_registered_nav_menus; + + if ( isset( $_wp_registered_nav_menus ) && ! $once ) { + foreach ( $_wp_registered_nav_menus as $loc => $name ) { + foreach ( $this->model->get_languages_list() as $lang ) { + $arr[ $this->combine_location( $loc, $lang ) ] = $name . ' ' . $lang->name; + } + } + + $_wp_registered_nav_menus = $arr; + $once = true; + } + } + + /** + * creates a temporary nav menu location from a location and a language + * + * @since 1.8 + * + * @param string $loc nav menu location + * @param object $lang + * @return string + */ + public function combine_location( $loc, $lang ) { + return $loc . ( strpos( $loc, '___' ) || $this->options['default_lang'] === $lang->slug ? '' : '___' . $lang->slug ); + } + + /** + * get nav menu locations and language from a temporary locaction + * + * @since 1.8 + * + * @param string $loc temporary location + * @return array + * 'location' => nav menu location + * 'lang' => language slug + */ + public function explode_location( $loc ) { + $infos = explode( '___', $loc ); + if ( 1 == count( $infos ) ) { + $infos[] = $this->options['default_lang']; + } + return array_combine( array( 'location', 'lang' ), $infos ); + } +} diff --git a/pole-sbv-content/plugins/polylang/include/olt-manager.php b/pole-sbv-content/plugins/polylang/include/olt-manager.php new file mode 100644 index 00000000..7ebf9a8d --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/olt-manager.php @@ -0,0 +1,245 @@ +default_locale = get_locale(); + + // Filters for text domain management + add_filter( 'load_textdomain_mofile', array( $this, 'load_textdomain_mofile' ), 10, 2 ); + add_filter( 'gettext', array( $this, 'gettext' ), 10, 3 ); + add_filter( 'gettext_with_context', array( $this, 'gettext_with_context' ), 10, 4 ); + + // Loads text domains + add_action( 'pll_language_defined', array( $this, 'load_textdomains' ), 2 ); // After PLL_Frontend::pll_language_defined + add_action( 'pll_no_language_defined', array( $this, 'load_textdomains' ) ); + } + + /** + * Access to the single instance of the class + * + * @since 1.7 + * + * @return object + */ + static public function instance() { + if ( empty( self::$instance ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Loads text domains + * + * @since 0.1 + */ + public function load_textdomains() { + // Our load_textdomain_mofile filter has done its job. let's remove it before calling load_textdomain + remove_filter( 'load_textdomain_mofile', array( $this, 'load_textdomain_mofile' ), 10, 2 ); + remove_filter( 'gettext', array( $this, 'gettext' ), 10, 3 ); + remove_filter( 'gettext_with_context', array( $this, 'gettext_with_context' ), 10, 4 ); + $new_locale = get_locale(); + + // Don't try to save time for en_US as some users have theme written in another language + // Now we can load all overriden text domains with the right language + if ( ! empty( $this->list_textdomains ) ) { + + // Since WP 4.7 we need to reset the internal cache of _get_path_to_translation when switching from any locale to en_US + // See WP_Locale_Switcher::changle_locale() + // FIXME test _get_path_to_translation for backward compatibility with WP < 4.7 + if ( function_exists( '_get_path_to_translation' ) ) { + _get_path_to_translation( null, true ); + } + + foreach ( $this->list_textdomains as $textdomain ) { + // Since WP 4.6, plugins translations are first loaded from wp-content/languages + if ( ! load_textdomain( $textdomain['domain'], str_replace( "{$this->default_locale}.mo", "$new_locale.mo", $textdomain['mo'] ) ) ) { + // Since WP 3.5 themes may store languages files in /wp-content/languages/themes + if ( ! load_textdomain( $textdomain['domain'], WP_LANG_DIR . "/themes/{$textdomain['domain']}-$new_locale.mo" ) ) { + // Since WP 3.7 plugins may store languages files in /wp-content/languages/plugins + load_textdomain( $textdomain['domain'], WP_LANG_DIR . "/plugins/{$textdomain['domain']}-$new_locale.mo" ); + } + } + } + } + + // First remove taxonomies and post_types labels that we don't need to translate + $taxonomies = get_taxonomies( array( '_pll' => true ) ); + $post_types = get_post_types( array( '_pll' => true ) ); + + // We don't need to translate core taxonomies and post types labels when setting the language from the url + // As they will be translated when registered the second time + if ( ! did_action( 'setup_theme' ) ) { + $taxonomies = array_merge( get_taxonomies( array( '_builtin' => true ) ), $taxonomies ); + $post_types = array_merge( get_post_types( array( '_builtin' => true ) ), $post_types ); + } + + // Translate labels of post types and taxonomies + foreach ( array_diff_key( $GLOBALS['wp_taxonomies'], array_flip( $taxonomies ) ) as $tax ) { + $this->translate_labels( $tax ); + } + foreach ( array_diff_key( $GLOBALS['wp_post_types'], array_flip( $post_types ) ) as $pt ) { + $this->translate_labels( $pt ); + } + + // Act only if the language has not been set early ( before default textdomain loading and $wp_locale creation ) + if ( did_action( 'after_setup_theme' ) ) { + // Reinitializes wp_locale for weekdays and months + unset( $GLOBALS['wp_locale'] ); + $GLOBALS['wp_locale'] = new WP_Locale(); + } + + /** + * Fires after the post types and taxonomies labels have been translated + * This allows plugins to translate text the same way we do for post types and taxonomies labels + * + * @since 1.2 + * + * @param array $labels list of strings to trnaslate + */ + do_action_ref_array( 'pll_translate_labels', array( &$this->labels ) ); + + // Free memory + unset( $this->default_locale, $this->list_textdomains, $this->labels ); + } + + /** + * FIXME: Backward compatibility with Polylang for WooCommerce < 0.3.4 + * To remove in Polylang 2.1 + * + * @since 0.1 + * + * @param bool $bool not used + * @param string $domain text domain name + * @param string $mofile translation file name + * @return bool + */ + public function mofile( $bool, $domain, $mofile ) { + return $bool; + } + + /** + * Saves all text domains in a table for later usage + * It replaces the 'override_load_textdomain' filter used since 0.1 + * + * @since 2.0.4 + * + * @param string $mofile translation file name + * @param string $domain text domain name + * @return bool + */ + public function load_textdomain_mofile( $mofile, $domain ) { + // On multisite, 2 files are sharing the same domain so we need to distinguish them + if ( 'default' === $domain && false !== strpos( $mofile, '/ms-' ) ) { + $this->list_textdomains['ms-default'] = array( 'mo' => $mofile, 'domain' => $domain ); + } else { + $this->list_textdomains[ $domain ] = array( 'mo' => $mofile, 'domain' => $domain ); + } + return ''; // Hack to prevent WP loading text domains as we will load them all later + } + + /** + * Saves post types and taxonomies labels for a later usage + * + * @since 0.9 + * + * @param string $translation not used + * @param string $text string to translate + * @param string $domain text domain + * @return string unmodified $translation + */ + public function gettext( $translation, $text, $domain ) { + if ( is_string( $text ) ) { // Avoid a warning with some buggy plugins which pass an array + $this->labels[ $text ] = array( 'domain' => $domain ); + } + return $translation; + } + + /** + * Saves post types and taxonomies labels for a later usage + * + * @since 0.9 + * + * @param string $translation not used + * @param string $text string to translate + * @param string $context some comment to describe the context of string to translate + * @param string $domain text domain + * @return string unmodified $translation + */ + public function gettext_with_context( $translation, $text, $context, $domain ) { + $this->labels[ $text ] = array( 'domain' => $domain, 'context' => $context ); + return $translation; + } + + /** + * Translates post types and taxonomies labels once the language is known + * + * @since 0.9 + * + * @param object $type either a post type or a taxonomy + */ + public function translate_labels( $type ) { + // Use static array to avoid translating several times the same ( default ) labels + static $translated = array(); + + foreach ( $type->labels as $key => $label ) { + if ( is_string( $label ) && isset( $this->labels[ $label ] ) ) { + if ( empty( $translated[ $label ] ) ) { + $type->labels->$key = $translated[ $label ] = isset( $this->labels[ $label ]['context'] ) ? + _x( $label, $this->labels[ $label ]['context'], $this->labels[ $label ]['domain'] ) : + __( $label, $this->labels[ $label ]['domain'] ); + } + else { + $type->labels->$key = $translated[ $label ]; + } + } + } + } + + /** + * Allows Polylang to be the first plugin loaded ;- ) + * + * @since 1.2 + * + * @param array $plugins list of active plugins + * @return array list of active plugins + */ + public function make_polylang_first( $plugins ) { + if ( $key = array_search( POLYLANG_BASENAME, $plugins ) ) { + unset( $plugins[ $key ] ); + array_unshift( $plugins, POLYLANG_BASENAME ); + } + return $plugins; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/pointer.php b/pole-sbv-content/plugins/polylang/include/pointer.php new file mode 100644 index 00000000..82e8442d --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/pointer.php @@ -0,0 +1,110 @@ + required, unique identifier of the pointer + * id => required, the pointer will be attached to this html id + * position => optional array, if used both sub parameters are required + * edge => 'top' or 'bottom' + * align => 'right' or 'left' + * width => optional, the width in px + * title => required, title + * content => required, content + * buttons => optional array of arrays, by default the pointer uses the standard dismiss button offered by WP + * label => the label of the button + * link => optional link for the button. By default, the button just dismisses the pointer + * + * @since 1.7.7 + * + * @param array $args + */ + public function __construct( $args ) { + $this->args = $args; + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); + } + + /** + * enqueue javascripts and styles if the pointer has not been dismissed + * + * @since 1.7.7 + */ + public function enqueue_scripts() { + $dismissed = explode( ',', get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ); + if ( in_array( $this->args['pointer'], $dismissed ) || ! current_user_can( 'manage_options' ) ) { + return; + } + + // Add pointer javascript + add_action( 'admin_print_footer_scripts', array( $this, 'print_js' ) ); + + wp_enqueue_style( 'wp-pointer' ); + wp_enqueue_script( 'wp-pointer' ); + } + + /** + * adds the javascript of our pointer to the page + * + * @since 1.7.7 + */ + public function print_js() { + + // add optional buttons + if ( ! empty( $this->args['buttons'] ) ) { + $b = " + var widget = pointer.pointer( 'widget' ); + var buttons = $( '.wp-pointer-buttons', widget ); + $( 'a.close', widget ).remove();"; // removes the WP button + + // all the buttons use the standard WP ajax action to remember the pointer has been dismissed + foreach ( $this->args['buttons'] as $button ) { + $b .= sprintf( " + $( '' ).addClass( '%s' ).html( '%s' ).css( 'margin-left', '10px' ).click( function() { + $.post( ajaxurl, { + pointer: '%s', + action: 'dismiss-wp-pointer' + }, function( response ) { + %s + } ); + } ).appendTo( buttons );", + empty( $button['link'] ) ? 'button' : 'button button-primary', + esc_html( $button['label'] ), + $this->args['pointer'], + empty( $button['link'] ) ? "pointer.pointer( 'close' )" : sprintf( "location.href = '%s'", $button['link'] ) + ); + } + } + + $js = sprintf( " + //", + $this->args['id'], + sprintf( '

%s

%s

', esc_html( $this->args['title'] ), esc_html( $this->args['content'] ) ), + empty( $this->args['position'] ) ? '' : sprintf( 'position: {edge: "%s", align: "%s",},', $this->args['position']['edge'], $this->args['position']['align'] ), + empty( $this->args['width'] ) ? '' : sprintf( 'pointerWidth: %d,', $this->args['width'] ), + empty( $b ) ? '' : $b + ); + echo ''; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/query.php b/pole-sbv-content/plugins/polylang/include/query.php new file mode 100644 index 00000000..406ffe4c --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/query.php @@ -0,0 +1,169 @@ +query = &$query; + $this->model = &$model; + } + + /** + * Check if translated taxonomy is queried + * Compatible with nested queries introduced in WP 4.1 + * @see https://wordpress.org/support/topic/tax_query-bug + * + * @since 1.7 + * + * @param array $tax_queries + * @return bool + */ + protected function have_translated_taxonomy( $tax_queries ) { + if ( is_array( $tax_queries ) ) { + foreach ( $tax_queries as $tax_query ) { + if ( isset( $tax_query['taxonomy'] ) && $this->model->is_translated_taxonomy( $tax_query['taxonomy'] ) && ! ( isset( $tax_query['operator'] ) && 'NOT IN' === $tax_query['operator'] ) ) { + return true; + } + + // Nested queries + elseif ( is_array( $tax_query ) && $this->have_translated_taxonomy( $tax_query ) ) { + return true; + } + } + } + + return false; + } + + /** + * Get queried taxonomies + * + * @since 2.2 + * + * @return array queried taxonomies + */ + public function get_queried_taxonomies() { + return isset( $this->query->tax_query->queried_terms ) ? array_keys( wp_list_filter( $this->query->tax_query->queried_terms, array( 'operator' => 'NOT IN' ), 'NOT' ) ) : array(); + } + + /** + * Sets the language in query + * Optimized for ( needs ) WP 3.5+ + * + * @since 2.2 + * + * @param object $lang + */ + public function set_language( $lang ) { + // Defining directly the tax_query ( rather than setting 'lang' avoids transforming the query by WP ) + $this->query->query_vars['tax_query'][] = array( + 'taxonomy' => 'language', + 'field' => 'term_taxonomy_id', // Since WP 3.5 + 'terms' => $lang->term_taxonomy_id, + 'operator' => 'IN', + ); + } + + /** + * Add the language in query after it has checked that it won't conflict with other query vars + * + * @since 2.2 + * + * @param object $lang Language + */ + public function filter_query( $lang ) { + $qvars = &$this->query->query_vars; + + if ( ! isset( $qvars['lang'] ) ) { + // Do not filter the query if the language is already specified in another way + foreach ( self::$excludes as $k ) { + if ( ! empty( $qvars[ $k ] ) ) { + return; + } + } + + // Specific case for 'cat' as it can contain negative values + if ( ! empty( $qvars['cat'] ) ) { + foreach ( explode( ',', $qvars['cat'] ) as $cat ) { + if ( $cat > 0 ) { + return; + } + } + } + + $taxonomies = array_intersect( $this->model->get_translated_taxonomies(), get_taxonomies( array( '_builtin' => false ) ) ); + + foreach ( $taxonomies as $tax ) { + $tax = get_taxonomy( $tax ); + if ( ! empty( $qvars[ $tax->query_var ] ) ) { + return; + } + } + + if ( ! empty( $qvars['tax_query'] ) && $this->have_translated_taxonomy( $qvars['tax_query'] ) ) { + return; + } + + // Filter queries according to the requested language + if ( ! empty( $lang ) ) { + $taxonomies = $this->get_queried_taxonomies(); + + if ( $taxonomies && ( empty( $qvars['post_type'] ) || 'any' === $qvars['post_type'] ) ) { + foreach ( $taxonomies as $taxonomy ) { + $tax_object = get_taxonomy( $taxonomy ); + if ( $this->model->is_translated_post_type( $tax_object->object_type ) ) { + $this->set_language( $lang ); + break; + } + } + } elseif ( empty( $qvars['post_type'] ) || $this->model->is_translated_post_type( $qvars['post_type'] ) ) { + $this->set_language( $lang ); + } + } + } else { + // Do not filter untranslatable post types such as nav_menu_item + if ( isset( $qvars['post_type'] ) && ! $this->model->is_translated_post_type( $qvars['post_type'] ) && ( empty( $qvars['tax_query'] ) || ! $this->have_translated_taxonomy( $qvars['tax_query'] ) ) ) { + unset( $qvars['lang'] ); + } + + // Unset 'all' query var (mainly for admin language filter). + if ( isset( $qvars['lang'] ) && 'all' === $qvars['lang'] ) { + unset( $qvars['lang'] ); + } + } + } +} diff --git a/pole-sbv-content/plugins/polylang/include/static-pages.php b/pole-sbv-content/plugins/polylang/include/static-pages.php new file mode 100644 index 00000000..f18b1298 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/static-pages.php @@ -0,0 +1,102 @@ +model = &$polylang->model; + $this->options = &$polylang->options; + $this->curlang = &$polylang->curlang; + + $this->init(); + + // Modifies the page link in case the front page is not in the default language + add_filter( 'page_link', array( $this, 'page_link' ), 20, 2 ); + + // clean the languages cache when editing page of front, page for posts + add_action( 'update_option_show_on_front', array( $this->model, 'clean_languages_cache' ) ); + add_action( 'update_option_page_on_front', array( $this->model, 'clean_languages_cache' ) ); + add_action( 'update_option_page_for_posts', array( $this->model, 'clean_languages_cache' ) ); + + // refresh rewrite rules when the page on front is modified + add_action( 'update_option_page_on_front', 'flush_rewrite_rules' ); + } + + /** + * stores the page on front and page for posts ids + * + * @since 1.8 + */ + public function init() { + if ( 'page' == get_option( 'show_on_front' ) ) { + $this->page_on_front = get_option( 'page_on_front' ); + $this->page_for_posts = get_option( 'page_for_posts' ); + } + + else { + $this->page_on_front = 0; + $this->page_for_posts = 0; + } + } + + /** + * Modifies the page link in case the front page is not in the default language + * + * @since 0.7.2 + * + * @param string $link link to the page + * @param int $id post id of the page + * @return string modified link + */ + public function page_link( $link, $id ) { + if ( ( $lang = $this->model->post->get_language( $id ) ) && $id == $lang->page_on_front ) { + return $lang->home_url; + } + return $link; + } + + /** + * adds page_on_front and page_for_posts properties to the language objects + * + * @since 1.8 + * + * @param array $languages + * @param object $model + */ + public static function pll_languages_list( $languages, $model ) { + if ( 'page' === get_option( 'show_on_front' ) ) { + foreach ( $languages as $k => $language ) { + $languages[ $k ]->page_on_front = $model->post->get( get_option( 'page_on_front' ), $language ); + $languages[ $k ]->page_for_posts = $model->post->get( get_option( 'page_for_posts' ), $language ); + } + } + + return $languages; + } + + /** + * Translates page for posts + * + * @since 1.8 + * + * @param int $v page for posts page id + * @return int + */ + public function translate_page_for_posts( $v ) { + // Returns the current page if there is no translation to avoid ugly notices + return isset( $this->curlang->page_for_posts ) ? $this->curlang->page_for_posts : $v; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/switcher.php b/pole-sbv-content/plugins/polylang/include/switcher.php new file mode 100644 index 00000000..98a5cd29 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/switcher.php @@ -0,0 +1,216 @@ + array( 'string' => __( 'Displays as dropdown', 'polylang' ), 'default' => 0 ), + 'show_names' => array( 'string' => __( 'Displays language names', 'polylang' ), 'default' => 1 ), + 'show_flags' => array( 'string' => __( 'Displays flags', 'polylang' ), 'default' => 0 ), + 'force_home' => array( 'string' => __( 'Forces link to front page', 'polylang' ), 'default' => 0 ), + 'hide_current' => array( 'string' => __( 'Hides the current language', 'polylang' ), 'default' => 0 ), + 'hide_if_no_translation' => array( 'string' => __( 'Hides languages with no translation', 'polylang' ), 'default' => 0 ), + ); + + return wp_list_pluck( $options, $key ); + } + + /** + * Get the language elements for use in a walker + * + * List of parameters accepted in $args: + * @see PLL_Switcher::the_languages + * + * @since 1.2 + * + * @param object $links instance of PLL_Frontend_Links + * @param array $args + * @return array + */ + protected function get_elements( $links, $args ) { + + $first = true; + + foreach ( $links->model->get_languages_list( array( 'hide_empty' => $args['hide_if_empty'] ) ) as $language ) { + $id = (int) $language->term_id; + $order = (int) $language->term_group; + $slug = $language->slug; + $locale = $language->get_locale( 'display' ); + $classes = array( 'lang-item', 'lang-item-' . $id, 'lang-item-' . esc_attr( $slug ) ); + $url = null; // Avoids potential notice + + if ( $first ) { + $classes[] = 'lang-item-first'; + $first = false; + } + + if ( $current_lang = $links->curlang->slug == $slug ) { + if ( $args['hide_current'] && ! ( $args['dropdown'] && ! $args['raw'] ) ) { + continue; // Hide current language except for dropdown + } + else { + $classes[] = 'current-lang'; + } + } + + if ( null !== $args['post_id'] && ( $tr_id = $links->model->post->get( $args['post_id'], $language ) ) && $links->current_user_can_read( $tr_id ) ) { + $url = get_permalink( $tr_id ); + } elseif ( null === $args['post_id'] ) { + $url = $links->get_translation_url( $language ); + } + + if ( $no_translation = empty( $url ) ) { + $classes[] = 'no-translation'; + } + + /** + * Filter the link in the language switcher + * + * @since 0.7 + * + * @param string $url the link + * @param string $slug language code + * @param string $locale language locale + */ + $url = apply_filters( 'pll_the_language_link', $url, $slug, $language->locale ); + + // Hide if no translation exists + if ( empty( $url ) && $args['hide_if_no_translation'] ) { + continue; + } + + $url = empty( $url ) || $args['force_home'] ? $links->get_home_url( $language ) : $url ; // If the page is not translated, link to the home page + + $name = $args['show_names'] || ! $args['show_flags'] || $args['raw'] ? ( 'slug' == $args['display_names_as'] ? $slug : $language->name ) : ''; + $flag = $args['raw'] && ! $args['show_flags'] ? $language->flag_url : ( $args['show_flags'] ? $language->flag : '' ); + + $out[ $slug ] = compact( 'id', 'order', 'slug', 'locale', 'name', 'url', 'flag', 'current_lang', 'no_translation', 'classes' ); + } + + return empty( $out ) ? array() : $out; + } + + /** + * Displays a language switcher + * or returns the raw elements to build a custom language switcher + * + * List of parameters accepted in $args: + * + * dropdown => the list is displayed as dropdown if set, defaults to 0 + * echo => echoes the list if set to 1, defaults to 1 + * hide_if_empty => hides languages with no posts ( or pages ) if set to 1, defaults to 1 + * show_flags => displays flags if set to 1, defaults to 0 + * show_names => show language names if set to 1, defaults to 1 + * display_names_as => whether to display the language name or its slug, valid options are 'slug' and 'name', defaults to name + * force_home => will always link to home in translated language if set to 1, defaults to 0 + * hide_if_no_translation => hide the link if there is no translation if set to 1, defaults to 0 + * hide_current => hide the current language if set to 1, defaults to 0 + * post_id => returns links to translations of post defined by post_id if set, defaults not set + * raw => return a raw array instead of html markup if set to 1, defaults to 0 + * item_spacing => whether to preserve or discard whitespace between list items, valid options are 'preserve' and 'discard', defaults to preserve + * + * @since 0.1 + * + * @param object $links instance of PLL_Frontend_Links + * @param array $args + * @return string|array either the html markup of the switcher or the raw elements to build a custom language switcher + */ + public function the_languages( $links, $args = '' ) { + $defaults = array( + 'dropdown' => 0, // display as list and not as dropdown + 'echo' => 1, // echoes the list + 'hide_if_empty' => 1, // hides languages with no posts ( or pages ) + 'menu' => 0, // not for nav menu ( this argument is deprecated since v1.1.1 ) + 'show_flags' => 0, // don't show flags + 'show_names' => 1, // show language names + 'display_names_as' => 'name', // valid options are slug and name + 'force_home' => 0, // tries to find a translation + 'hide_if_no_translation' => 0, // don't hide the link if there is no translation + 'hide_current' => 0, // don't hide current language + 'post_id' => null, // if not null, link to translations of post defined by post_id + 'raw' => 0, // set this to true to build your own custom language switcher + 'item_spacing' => 'preserve', // 'preserve' or 'discard' whitespace between list items + ); + $args = wp_parse_args( $args, $defaults ); + + /** + * Filter the arguments of the 'pll_the_languages' template tag + * + * @since 1.5 + * + * @param array $args + */ + $args = apply_filters( 'pll_the_languages_args', $args ); + + // Prevents showing empty options in dropdown + if ( $args['dropdown'] ) { + $args['show_names'] = 1; + } + + $elements = $this->get_elements( $links, $args ); + + if ( $args['raw'] ) { + return $elements; + } + + if ( $args['dropdown'] ) { + $args['name'] = 'lang_choice_' . $args['dropdown']; + $walker = new PLL_Walker_Dropdown(); + $args['selected'] = $links->curlang->slug; + } + else { + $walker = new PLL_Walker_List(); + } + + /** + * Filter the whole html markup returned by the 'pll_the_languages' template tag + * + * @since 0.8 + * + * @param string $html html returned/outputed by the template tag + * @param array $args arguments passed to the template tag + */ + $out = apply_filters( 'pll_the_languages', $walker->walk( $elements, $args ), $args ); + + // Javascript to switch the language when using a dropdown list + if ( $args['dropdown'] ) { + foreach ( $links->model->get_languages_list() as $language ) { + $url = $links->get_translation_url( $language ); + $urls[ $language->slug ] = $args['force_home'] || empty( $url ) ? $links->get_home_url( $language ) : $url; + } + + // Accept only few valid characters for the urls_x variable name ( as the widget id includes '-' which is invalid ) + $out .= sprintf( ' + ', + 'urls_' . preg_replace( '#[^a-zA-Z0-9]#', '', $args['dropdown'] ), json_encode( $urls ), esc_js( $args['name'] ) + ); + } + + if ( $args['echo'] ) { + echo $out; + } + return $out; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/translated-object.php b/pole-sbv-content/plugins/polylang/include/translated-object.php new file mode 100644 index 00000000..db68a4a0 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/translated-object.php @@ -0,0 +1,272 @@ +model = &$model; + + // register our taxonomies as soon as possible + // this is early registration, not ready for rewrite rules as wp_rewrite will be setup later + $args = array( 'label' => false, 'public' => false, 'query_var' => false, 'rewrite' => false, '_pll' => true ); + register_taxonomy( $this->tax_language, $this->object_type, $args ); + $args['update_count_callback'] = '_update_generic_term_count'; // count *all* posts to avoid deleting in clean_translations_terms + register_taxonomy( $this->tax_translations, $this->object_type, $args ); + } + + /** + * Wrap wp_get_object_terms to cache it and return only one object + * inspired by the function get_the_terms + * + * @since 1.2 + * + * @param int $object_id post_id or term_id + * @param string $taxonomy Polylang taxonomy depending if we are looking for a post ( or term ) language ( or translation ) + * @return bool|object the term associated to the object in the requested taxonomy if exists, false otherwise + */ + public function get_object_term( $object_id, $taxonomy ) { + if ( empty( $object_id ) || is_wp_error( $object_id ) ) { + return false; + } + + $object_id = (int) $object_id; + $term = get_object_term_cache( $object_id, $taxonomy ); + + if ( false === $term ) { + // query language and translations at the same time + $taxonomies = array( $this->tax_language, $this->tax_translations ); + + // query terms + foreach ( wp_get_object_terms( $object_id, $taxonomies, array( 'update_term_meta_cache' => false ) ) as $t ) { + $terms[ $t->taxonomy ] = $t; + if ( $t->taxonomy == $taxonomy ) { + $term = $t; + } + } + + // store it the way WP wants it + // set an empty cache if no term found in the taxonomy + foreach ( $taxonomies as $tax ) { + wp_cache_add( $object_id, empty( $terms[ $tax ] ) ? array() : array( $terms[ $tax ] ), $tax . '_relationships' ); + } + } + else { + $term = reset( $term ); + } + + return empty( $term ) ? false : $term; + } + + /** + * Tells wether to store a translation term + * + * @since 1.8 + * + * @param array $translations an associative array of translations with language code as key and translation id as value + */ + protected function keep_translation_group( $translations ) { + return count( $translations ) > 1; + } + + /** + * Saves translations for posts or terms + * + * @since 0.5 + * + * @param int $id post id or term id + * @param array $translations an associative array of translations with language code as key and translation id as value + */ + public function save_translations( $id, $translations ) { + $id = (int) $id; + + if ( ( $lang = $this->get_language( $id ) ) && isset( $translations ) && is_array( $translations ) ) { + // sanitize the translations array + $translations = array_map( 'intval', $translations ); + $translations = array_merge( array( $lang->slug => $id ), $translations ); // make sure this object is in translations + $translations = array_diff( $translations, array( 0 ) ); // don't keep non translated languages + $translations = array_intersect_key( $translations, array_flip( $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) ); // keep only valid languages slugs as keys + + // unlink removed translations + $old_translations = $this->get_translations( $id ); + foreach ( array_diff_assoc( $old_translations, $translations ) as $object_id ) { + $this->delete_translation( $object_id ); + } + + // don't create a translation group for untranslated posts as it is useless + // but we need one for terms to allow relationships remap when importing from a WXR file + if ( $this->keep_translation_group( $translations ) ) { + $terms = wp_get_object_terms( $translations, $this->tax_translations ); + $term = reset( $terms ); + + // create a new term if necessary + if ( empty( $term ) ) { + wp_insert_term( $group = uniqid( 'pll_' ), $this->tax_translations, array( 'description' => serialize( $translations ) ) ); + } + else { + // take care not to overwrite extra data stored in description field, if any + $d = unserialize( $term->description ); + $d = is_array( $d ) ? array_diff_key( $d, $old_translations ) : array(); // remove old translations + $d = array_merge( $d, $translations ); // add new one + wp_update_term( $group = (int) $term->term_id, $this->tax_translations, array( 'description' => serialize( $d ) ) ); + } + + // link all translations to the new term + foreach ( $translations as $p ) { + wp_set_object_terms( $p, $group, $this->tax_translations ); + } + + // clean now unused translation groups + foreach ( wp_list_pluck( $terms, 'term_id' ) as $term_id ) { + $term = get_term( $term_id, $this->tax_translations ); + if ( empty( $term->count ) ) { + wp_delete_term( $term_id, $this->tax_translations ); + } + } + } + } + } + + /** + * Deletes a translation of a post or term + * + * @since 0.5 + * + * @param int $id post id or term id + */ + public function delete_translation( $id ) { + $id = (int) $id; + $term = $this->get_object_term( $id, $this->tax_translations ); + + if ( ! empty( $term ) ) { + $d = unserialize( $term->description ); + $slug = array_search( $id, $this->get_translations( $id ) ); // in case some plugin stores the same value with different key + unset( $d[ $slug ] ); + + if ( empty( $d ) ) { + wp_delete_term( (int) $term->term_id, $this->tax_translations ); + } + else { + wp_update_term( (int) $term->term_id, $this->tax_translations, array( 'description' => serialize( $d ) ) ); + } + } + } + + /** + * Returns an array of translations of a post or term + * + * @since 0.5 + * + * @param int $id post id or term id + * @return array an associative array of translations with language code as key and translation id as value + */ + public function get_translations( $id ) { + $term = $this->get_object_term( $id, $this->tax_translations ); + $translations = empty( $term ) ? array() : unserialize( $term->description ); + + // make sure we return only translations ( thus we allow plugins to store other informations in the array ) + if ( is_array( $translations ) ) { + $translations = array_intersect_key( $translations, array_flip( $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) ); + } + + // make sure to return at least the passed post or term in its translation array + if ( empty( $translations ) && $lang = $this->get_language( $id ) ) { + $translations = array( $lang->slug => $id ); + } + + return $translations; + } + + /** + * Returns the id of the translation of a post or term + * + * @since 0.5 + * + * @param int $id post id or term id + * @param object|string $lang object or slug + * @return bool|int post id or term id of the translation, false if there is none + */ + public function get_translation( $id, $lang ) { + if ( ! $lang = $this->model->get_language( $lang ) ) { + return false; + } + + $translations = $this->get_translations( $id ); + + return isset( $translations[ $lang->slug ] ) ? $translations[ $lang->slug ] : false; + } + + /** + * Among the object and its translations, returns the id of the object which is in $lang + * + * @since 0.1 + * + * @param int $id post id or term id + * @param int|string|object $lang language ( term_id or slug or object ) + * @return bool|int the translation post id or term id if exists, otherwise the post id or term id, false if the post has no language + */ + public function get( $id, $lang ) { + $obj_lang = $this->get_language( $id ); // FIXME is this necessary? + if ( ! $lang || ! $obj_lang ) { + return false; + } + + $lang = $this->model->get_language( $lang ); + return $obj_lang->term_id == $lang->term_id ? $id : $this->get_translation( $id, $lang ); + } + + /** + * A where clause to add to sql queries when filtering by language is needed directly in query + * + * @since 1.2 + * + * @param object|array|string $lang a PLL_Language object or a comma separated list of languag slug or an array of language slugs + * @return string where clause + */ + public function where_clause( $lang ) { + global $wpdb; + $tt_id = $this->tax_tt; + + // $lang is an object + // generally the case if the query is coming from Polylang + if ( is_object( $lang ) ) { + return $wpdb->prepare( ' AND pll_tr.term_taxonomy_id = %d', $lang->$tt_id ); + } + + // $lang is a comma separated list of slugs ( or an array of slugs ) + // generally the case is the query is coming from outside with 'lang' parameter + $slugs = is_array( $lang ) ? $lang : explode( ',', $lang ); + foreach ( $slugs as $slug ) { + $languages[] = (int) $this->model->get_language( $slug )->$tt_id; + } + + return ' AND pll_tr.term_taxonomy_id IN ( ' . implode( ',', $languages ) . ' )'; + } + + /** + * Returns ids of objects in a language similarly to get_objects_in_term for a taxonomy + * faster than get_objects_in_term as it avoids a JOIN + * + * @since 1.4 + * + * @param object $lang a PLL_Language object + * @return array + */ + public function get_objects_in_language( $lang ) { + global $wpdb; + $tt_id = $this->tax_tt; + return $wpdb->get_col( $wpdb->prepare( "SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $lang->$tt_id ) ); + } +} diff --git a/pole-sbv-content/plugins/polylang/include/translated-post.php b/pole-sbv-content/plugins/polylang/include/translated-post.php new file mode 100644 index 00000000..785b889e --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/translated-post.php @@ -0,0 +1,140 @@ +object_type = null; + $this->tax_language = 'language'; + $this->tax_translations = 'post_translations'; + $this->tax_tt = 'term_taxonomy_id'; + + parent::__construct( $model ); + + // registers completely the language taxonomy + add_action( 'setup_theme', array( $this, 'register_taxonomy' ), 1 ); + + // setups post types to translate + add_action( 'registered_post_type', array( $this, 'registered_post_type' ) ); + + // forces updating posts cache + add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) ); + } + + /** + * Store the post language in the database + * + * @since 0.6 + * + * @param int $post_id post id + * @param int|string|object $lang language ( term_id or slug or object ) + */ + public function set_language( $post_id, $lang ) { + wp_set_post_terms( (int) $post_id, $lang ? $this->model->get_language( $lang )->slug : '', 'language' ); + } + + /** + * Returns the language of a post + * + * @since 0.1 + * + * @param int $post_id post id + * @return bool|object PLL_Language object, false if no language is associated to that post + */ + public function get_language( $post_id ) { + $lang = $this->get_object_term( $post_id, 'language' ); + return ( $lang ) ? $this->model->get_language( $lang ) : false; + } + + /** + * Deletes a translation + * + * @since 0.5 + * + * @param int $id post id + */ + public function delete_translation( $id ) { + parent::delete_translation( $id ); + wp_set_object_terms( $id, null, $this->tax_translations ); + } + + /** + * A join clause to add to sql queries when filtering by language is needed directly in query + * + * @since 1.2 + * + * @param string $alias Alias for $wpdb->posts table + * @return string join clause + */ + public function join_clause( $alias = '' ) { + global $wpdb; + if ( empty( $alias ) ) { + $alias = $wpdb->posts; + } + return " INNER JOIN $wpdb->term_relationships AS pll_tr ON pll_tr.object_id = $alias.ID"; + } + + /** + * Register the language taxonomy + * + * @since 1.2 + */ + public function register_taxonomy() { + register_taxonomy( 'language', $this->model->get_translated_post_types(), array( + 'labels' => array( + 'name' => __( 'Languages', 'polylang' ), + 'singular_name' => __( 'Language', 'polylang' ), + 'all_items' => __( 'All languages', 'polylang' ), + ), + // FIXME backward compatibility with WP 4.4.x: we must keep public to true for WP to accept our query var + 'public' => version_compare( $GLOBALS['wp_version'], '4.4', '>=' ) && version_compare( $GLOBALS['wp_version'], '4.5', '<' ), + 'show_ui' => false, // hide the taxonomy on admin side, needed for WP 4.4.x + 'show_in_nav_menus' => false, // no metabox for nav menus, needed for WP 4.4.x + 'publicly_queryable' => true, // since WP 4.5 + 'query_var' => 'lang', + 'rewrite' => $this->model->options['force_lang'] < 2, // no rewrite for domains and sub-domains + '_pll' => true, // polylang taxonomy + ) ); + } + + /** + * Check if registered post type must be translated + * + * @since 1.2 + * + * @param string $post_type post type name + */ + public function registered_post_type( $post_type ) { + if ( $this->model->is_translated_post_type( $post_type ) ) { + register_taxonomy_for_object_type( 'language', $post_type ); + register_taxonomy_for_object_type( 'post_translations', $post_type ); + } + } + + /** + * Forces calling 'update_object_term_cache' when querying posts or pages + * this is especially useful for nav menus with a lot of pages + * without doing this, we would have one query per page in the menu to get the page language for the permalink + * + * @since 1.8 + * + * @param object $query reference to the query object + */ + public function pre_get_posts( $query ) { + if ( ! empty( $query->query['post_type'] ) && $this->model->is_translated_post_type( $query->query['post_type'] ) ) { + $query->query_vars['update_post_term_cache'] = true; + } + } +} diff --git a/pole-sbv-content/plugins/polylang/include/translated-term.php b/pole-sbv-content/plugins/polylang/include/translated-term.php new file mode 100644 index 00000000..c7d5dfb6 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/translated-term.php @@ -0,0 +1,182 @@ +object_type = 'term'; + $this->tax_language = 'term_language'; + $this->tax_translations = 'term_translations'; + $this->tax_tt = 'tl_term_taxonomy_id'; + + parent::__construct( $model ); + + // Filters to prime terms cache + add_filter( 'get_terms', array( $this, '_prime_terms_cache' ), 10, 2 ); + add_filter( 'wp_get_object_terms', array( $this, 'wp_get_object_terms' ), 10, 3 ); + + add_action( 'clean_term_cache', array( $this, 'clean_term_cache' ) ); + } + + /** + * Stores the term language in the database + * + * @since 0.6 + * + * @param int $term_id term id + * @param int|string|object $lang language ( term_id or slug or object ) + */ + public function set_language( $term_id, $lang ) { + $term_id = (int) $term_id; + wp_set_object_terms( $term_id, $lang ? $this->model->get_language( $lang )->tl_term_id : '', 'term_language' ); + + // Add translation group for correct WXR export + $translations = $this->get_translations( $term_id ); + if ( $slug = array_search( $term_id, $translations ) ) { + unset( $translations[ $slug ] ); + } + + $this->save_translations( $term_id, $translations ); + } + + /** + * Removes the term language in database + * + * @since 0.5 + * + * @param int $term_id term id + */ + public function delete_language( $term_id ) { + wp_delete_object_term_relationships( $term_id, 'term_language' ); + } + + /** + * Returns the language of a term + * + * @since 0.1 + * + * @param int|string $value term id or term slug + * @param string $taxonomy optional taxonomy needed when the term slug is passed as first parameter + * @return bool|object PLL_Language object, false if no language is associated to that term + */ + public function get_language( $value, $taxonomy = '' ) { + if ( is_numeric( $value ) ) { + $term_id = $value; + } + + // get_term_by still not cached in WP 3.5.1 but internally, the function is always called by term_id + elseif ( is_string( $value ) && $taxonomy ) { + $term_id = wpcom_vip_get_term_by( 'slug', $value , $taxonomy )->term_id; + } + + // Get the language and make sure it is a PLL_Language object + return isset( $term_id ) && ( $lang = $this->get_object_term( $term_id, 'term_language' ) ) ? $this->model->get_language( $lang->term_id ) : false; + } + + /** + * Tells the parent class to always store a translation term + * + * @since 1.8 + * + * @param array $translations An associative array of translations with language code as key and translation id as value + */ + protected function keep_translation_group( $translations ) { + return true; + } + + /** + * Deletes a translation + * + * @since 0.5 + * + * @param int $id term id + */ + public function delete_translation( $id ) { + global $wpdb; + $slug = array_search( $id, $this->get_translations( $id ) ); // in case some plugin stores the same value with different key + + parent::delete_translation( $id ); + wp_delete_object_term_relationships( $id, 'term_translations' ); + + if ( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( * ) FROM $wpdb->terms WHERE term_id = %d;", $id ) ) ) { + // Always keep a group for terms to allow relationships remap when importing from a WXR file + $translations[ $slug ] = $id; + wp_insert_term( $group = uniqid( 'pll_' ), 'term_translations', array( 'description' => serialize( $translations ) ) ); + wp_set_object_terms( $id, $group, 'term_translations' ); + } + } + + /** + * A join clause to add to sql queries when filtering by language is needed directly in query + * + * @since 1.2 + * + * @return string join clause + */ + public function join_clause() { + global $wpdb; + return " INNER JOIN $wpdb->term_relationships AS pll_tr ON pll_tr.object_id = t.term_id"; + } + + /** + * Cache language and translations when terms are queried by get_terms + * + * @since 1.2 + * + * @param array $terms queried terms + * @param array $taxonomies queried taxonomies + * @return array unmodified $terms + */ + public function _prime_terms_cache( $terms, $taxonomies ) { + if ( is_array( $terms ) && $this->model->is_translated_taxonomy( $taxonomies ) ) { + foreach ( $terms as $term ) { + $term_ids[] = is_object( $term ) ? $term->term_id : (int) $term; + } + } + + if ( ! empty( $term_ids ) ) { + update_object_term_cache( array_unique( $term_ids ), 'term' ); // Adds language and translation of terms to cache + } + return $terms; + } + + /** + * When terms are found for posts, add their language and translations to cache + * + * @since 1.2 + * + * @param array $terms terms found + * @param array $object_ids not used + * @param array $taxonomies terms taxonomies + * @return array unmodified $terms + */ + public function wp_get_object_terms( $terms, $object_ids, $taxonomies ) { + $taxonomies = explode( "', '", trim( $taxonomies, "'" ) ); + if ( ! in_array( 'term_translations', $taxonomies ) ) { + $this->_prime_terms_cache( $terms, $taxonomies ); + } + return $terms; + } + + /** + * When the term cache is cleaned, clean the object term cache too + * + * @since 2.0 + * + * @param array $ids An array of term IDs. + */ + function clean_term_cache( $ids ) { + clean_object_term_cache( $ids, 'term' ); + } +} diff --git a/pole-sbv-content/plugins/polylang/include/walker-dropdown.php b/pole-sbv-content/plugins/polylang/include/walker-dropdown.php new file mode 100644 index 00000000..f85a2978 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/walker-dropdown.php @@ -0,0 +1,94 @@ + 'parent', 'id' => 'id' ); + + /** + * Outputs one element + * + * @since 1.2 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $element The data object. + * @param int $depth Depth of the item. + * @param array $args An array of additional arguments. + * @param int $current_object_id ID of the current item. + */ + function start_el( &$output, $element, $depth = 0, $args = array(), $current_object_id = 0 ) { + $value = $args['value']; + $output .= sprintf( + "\t" . '' . "\n", + esc_attr( $element->$value ), + method_exists( $element, 'get_locale' ) ? sprintf( ' lang="%s"', esc_attr( $element->get_locale( 'display' ) ) ) : '', + isset( $args['selected'] ) && $args['selected'] === $element->$value ? ' selected="selected"' : '', + esc_html( $element->name ) + ); + } + + /** + * Overrides Walker::display_element as expects an object with a parent property + * + * @since 1.2 + * + * @param object $element Data object. + * @param array $children_elements List of elements to continue traversing. + * @param int $max_depth Max depth to traverse. + * @param int $depth Depth of current element. + * @param array $args An array of arguments. + * @param string $output Passed by reference. Used to append additional content. + */ + function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) { + $element = (object) $element; // Make sure we have an object + $element->parent = $element->id = 0; // Don't care about this + parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); + } + + /** + * Starts the output of the dropdown list + * + * @since 1.2 + * + * List of parameters accepted in $args: + * + * flag => display the selected language flag in front of the dropdown if set to 1, defaults to 0 + * value => the language field to use as value attribute, defaults to 'slug' + * selected => the selected value, mandatory + * name => the select name attribute, defaults to 'lang_choice' + * id => the select id attribute, defaults to $args['name'] + * class => the class attribute + * disabled => disables the dropdown if set to 1 + * + * @param array $elements elements to display + * @param array $args + * @return string + */ + function walk( $elements, $args = array() ) { + $output = ''; + $args = wp_parse_args( $args, array( 'value' => 'slug', 'name' => 'lang_choice' ) ); + + if ( ! empty( $args['flag'] ) ) { + $current = wp_list_filter( $elements, array( $args['value'] => $args['selected'] ) ); + $lang = reset( $current ); + $output = sprintf( + '%s', + empty( $lang->flag ) ? esc_html( $lang->slug ) : $lang->flag + ); + } + + $output .= sprintf( + '' . "\n", + $name = esc_attr( $args['name'] ), + isset( $args['id'] ) && ! $args['id'] ? '' : ' id="' . ( empty( $args['id'] ) ? $name : esc_attr( $args['id'] ) ) . '"', + empty( $args['class'] ) ? '' : ' class="' . esc_attr( $args['class'] ) . '"', + empty( $args['disabled'] ) ? '' : ' disabled="disabled"', + parent::walk( $elements, -1, $args ) + ); + + return $output; + } +} diff --git a/pole-sbv-content/plugins/polylang/include/walker-list.php b/pole-sbv-content/plugins/polylang/include/walker-list.php new file mode 100644 index 00000000..c2418595 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/walker-list.php @@ -0,0 +1,65 @@ + 'parent', 'id' => 'id' ); + + /** + * Outputs one element + * + * @since 1.2 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $element The data object. + * @param int $depth Depth of the item. + * @param array $args An array of additional arguments. + * @param int $current_object_id ID of the current item. + */ + function start_el( &$output, $element, $depth = 0, $args = array(), $current_object_id = 0 ) { + $output .= sprintf( + '%6$s
  • %4$s%5$s
  • %7$s', + esc_attr( implode( ' ', $element->classes ) ), + esc_attr( $element->locale ), + esc_url( $element->url ), + $element->flag, + $args['show_flags'] && $args['show_names'] ? '' . esc_html( $element->name ) . '' : esc_html( $element->name ), + 'discard' === $args['item_spacing'] ? '' : "\t", + 'discard' === $args['item_spacing'] ? '' : "\n" + ); + } + + /** + * Overrides Walker::display_element as it expects an object with a parent property + * + * @since 1.2 + * + * @param object $element Data object. + * @param array $children_elements List of elements to continue traversing. + * @param int $max_depth Max depth to traverse. + * @param int $depth Depth of current element. + * @param array $args An array of arguments. + * @param string $output Passed by reference. Used to append additional content. + */ + function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) { + $element = (object) $element; // Make sure we have an object + $element->parent = $element->id = 0; // Don't care about this + parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); + } + + /** + * Overrides Walker:walk to set depth argument + * + * @since 1.2 + * + * @param array $elements elements to display + * @param array $args + * @return string + */ + function walk( $elements, $args = array() ) { + return parent::walk( $elements, -1, $args ); + } +} diff --git a/pole-sbv-content/plugins/polylang/include/widget-calendar.php b/pole-sbv-content/plugins/polylang/include/widget-calendar.php new file mode 100644 index 00000000..14b1b1d2 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/widget-calendar.php @@ -0,0 +1,265 @@ + not very efficient (add 4 to 5 sql queries) + * method used since 0.5: remove the WP widget and replace it by our own -> our language filter will not work if get_calendar is called directly by a theme + * + * @since 0.5 + */ +class PLL_Widget_Calendar extends WP_Widget_Calendar { + + /** + * displays the widget + * modified version of the parent function to call our own get_calendar function + * + * @since 0.5 + * + * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget. + * @param array $instance The settings for the particular instance of the widget + */ + function widget( $args, $instance ) { + /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ + $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? ' ' : $instance['title'], $instance, $this->id_base ); + echo $args['before_widget']; + if ( $title ) { + echo $args['before_title'] . $title . $args['after_title']; + } + echo '
    '; + empty( PLL()->curlang ) ? get_calendar() : self::get_calendar(); #modified# + echo '
    '; + echo $args['after_widget']; + } + + /** + * modified version of WP get_calendar function to filter the query + * + * @since 0.5 + * + * @param bool $initial Optional, default is true. Use initial calendar names. + * @param bool $echo Optional, default is true. Set to false for return. + * @return string|null String when retrieving, null when displaying. + */ + static function get_calendar( $initial = true, $echo = true ) { + global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; + + $join_clause = PLL()->model->post->join_clause(); #added# + $where_clause = PLL()->model->post->where_clause( PLL()->curlang ); #added# + + $key = md5( PLL()->curlang->slug . $m . $monthnum . $year ); #modified# + $cache = wp_cache_get( 'get_calendar', 'calendar' ); + + if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { + /** This filter is documented in wp-includes/general-template.php */ + $output = apply_filters( 'get_calendar', $cache[ $key ] ); + + if ( $echo ) { + echo $output; + return; + } + + return $output; + } + + if ( ! is_array( $cache ) ) { + $cache = array(); + } + + // Quick check. If we have no posts at all, abort! + if ( ! $posts ) { + $gotsome = $wpdb->get_var("SELECT 1 as test FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1"); + if ( ! $gotsome ) { + $cache[ $key ] = ''; + wp_cache_set( 'get_calendar', $cache, 'calendar' ); + return; + } + } + + if ( isset( $_GET['w'] ) ) { + $w = (int) $_GET['w']; + } + // week_begins = 0 stands for Sunday + $week_begins = (int) get_option( 'start_of_week' ); + $ts = current_time( 'timestamp' ); + + // Let's figure out when we are + if ( ! empty( $monthnum ) && ! empty( $year ) ) { + $thismonth = zeroise( intval( $monthnum ), 2 ); + $thisyear = (int) $year; + } elseif ( ! empty( $w ) ) { + // We need to get the month from MySQL + $thisyear = (int) substr( $m, 0, 4 ); + //it seems MySQL's weeks disagree with PHP's + $d = ( ( $w - 1 ) * 7 ) + 6; + $thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('{$thisyear}0101', INTERVAL $d DAY) ), '%m')"); + } elseif ( ! empty( $m ) ) { + $thisyear = (int) substr( $m, 0, 4 ); + if ( strlen( $m ) < 6 ) { + $thismonth = '01'; + } else { + $thismonth = zeroise( (int) substr( $m, 4, 2 ), 2 ); + } + } else { + $thisyear = gmdate( 'Y', $ts ); + $thismonth = gmdate( 'm', $ts ); + } + + $unixmonth = mktime( 0, 0 , 0, $thismonth, 1, $thisyear ); + $last_day = date( 't', $unixmonth ); + + // Get the next and previous month and year with at least one post + $previous = $wpdb->get_row( "SELECT MONTH( post_date ) AS month, YEAR( post_date ) AS year + FROM $wpdb->posts $join_clause + WHERE post_date < '$thisyear-$thismonth-01' + AND post_type = 'post' AND post_status = 'publish' $where_clause + ORDER BY post_date DESC + LIMIT 1" ); #modified# + $next = $wpdb->get_row( "SELECT MONTH( post_date ) AS month, YEAR( post_date ) AS year + FROM $wpdb->posts $join_clause + WHERE post_date > '$thisyear-$thismonth-{$last_day} 23:59:59' + AND post_type = 'post' AND post_status = 'publish' $where_clause + ORDER BY post_date ASC + LIMIT 1" ); #modified# + + /* translators: Calendar caption: 1: month name, 2: 4-digit year */ + $calendar_caption = _x( '%1$s %2$s', 'calendar caption' ); + $calendar_output = ' + + + '; + + $myweek = array(); + + for ( $wdcount = 0; $wdcount <= 6; $wdcount++ ) { + $myweek[] = $wp_locale->get_weekday( ( $wdcount + $week_begins ) % 7 ); + } + + foreach ( $myweek as $wd ) { + $day_name = $initial ? $wp_locale->get_weekday_initial( $wd ) : $wp_locale->get_weekday_abbrev( $wd ); + $wd = esc_attr( $wd ); + $calendar_output .= "\n\t\t"; + } + + $calendar_output .= ' + + + + + '; + + if ( $previous ) { + $calendar_output .= "\n\t\t".''; + } else { + $calendar_output .= "\n\t\t".''; + } + + $calendar_output .= "\n\t\t".''; + + if ( $next ) { + $calendar_output .= "\n\t\t".''; + } else { + $calendar_output .= "\n\t\t".''; + } + + $calendar_output .= ' + + + + + '; + + $daywithpost = array(); + + // Get days with posts + $dayswithposts = $wpdb->get_results( "SELECT DISTINCT DAYOFMONTH( post_date ) + FROM $wpdb->posts $join_clause + WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' + AND post_type = 'post' AND post_status = 'publish' $where_clause + AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59'", ARRAY_N ); #modified# + if ( $dayswithposts ) { + foreach ( (array) $dayswithposts as $daywith ) { + $daywithpost[] = $daywith[0]; + } + } + + // See how much we should pad in the beginning + $pad = calendar_week_mod( date( 'w', $unixmonth ) - $week_begins ); + if ( 0 != $pad ) { + $calendar_output .= "\n\t\t".''; + } + + $newrow = false; + $daysinmonth = (int) date( 't', $unixmonth ); + + for ( $day = 1; $day <= $daysinmonth; ++$day ) { + if ( isset($newrow) && $newrow ) { + $calendar_output .= "\n\t\n\t\n\t\t"; + } + $newrow = false; + + if ( $day == gmdate( 'j', $ts ) && + $thismonth == gmdate( 'm', $ts ) && + $thisyear == gmdate( 'Y', $ts ) ) { + $calendar_output .= ''; + + if ( 6 == calendar_week_mod( date( 'w', mktime(0, 0 , 0, $thismonth, $day, $thisyear ) ) - $week_begins ) ) { + $newrow = true; + } + } + + $pad = 7 - calendar_week_mod( date( 'w', mktime( 0, 0 , 0, $thismonth, $day, $thisyear ) ) - $week_begins ); + if ( $pad != 0 && $pad != 7 ) { + $calendar_output .= "\n\t\t".''; + } + $calendar_output .= "\n\t\n\t\n\t
    ' . sprintf( + $calendar_caption, + $wp_locale->get_month( $thismonth ), + date( 'Y', $unixmonth ) + ) . '
    $day_name
    « ' . + $wp_locale->get_month_abbrev( $wp_locale->get_month( $previous->month ) ) . + '  ' . + $wp_locale->get_month_abbrev( $wp_locale->get_month( $next->month ) ) . + ' » 
     
    '; + } else { + $calendar_output .= ''; + } + + if ( in_array( $day, $daywithpost ) ) { + // any posts today? + $date_format = date( _x( 'F j, Y', 'daily archives date format' ), strtotime( "{$thisyear}-{$thismonth}-{$day}" ) ); + $label = sprintf( __( 'Posts published on %s' ), $date_format ); + $calendar_output .= sprintf( + '%s', + get_day_link( $thisyear, $thismonth, $day ), + esc_attr( $label ), + $day + ); + } else { + $calendar_output .= $day; + } + $calendar_output .= ' 
    "; + + $cache[ $key ] = $calendar_output; + wp_cache_set( 'get_calendar', $cache, 'calendar' ); + + if ( $echo ) { + /** + * Filter the HTML calendar output. + * + * @since 3.0.0 + * + * @param string $calendar_output HTML output of the calendar. + */ + echo apply_filters( 'get_calendar', $calendar_output ); + return; + } + /** This filter is documented in wp-includes/general-template.php */ + return apply_filters( 'get_calendar', $calendar_output ); + } +} diff --git a/pole-sbv-content/plugins/polylang/include/widget-languages.php b/pole-sbv-content/plugins/polylang/include/widget-languages.php new file mode 100644 index 00000000..60a97087 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/include/widget-languages.php @@ -0,0 +1,159 @@ + __( 'Displays a language switcher', 'polylang' ), + 'customize_selective_refresh' => true, + ) + ); + } + + /** + * Displays the widget + * + * @since 0.1 + * + * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget. + * @param array $instance The settings for the particular instance of the widget + */ + function widget( $args, $instance ) { + // Sets a unique id for dropdown + $instance['dropdown'] = empty( $instance['dropdown'] ) ? 0 : $args['widget_id']; + + if ( $list = pll_the_languages( array_merge( $instance, array( 'echo' => 0 ) ) ) ) { + $title = empty( $instance['title'] ) ? '' : $instance['title']; + /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ + $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); + + echo $args['before_widget']; + if ( $title ) { + echo $args['before_title'] . $title . $args['after_title']; + } + if ( $instance['dropdown'] ) { + echo ''; + echo $list; + } else { + echo "
      \n" . $list . "
    \n"; + } + echo $args['after_widget']; + } + } + + /** + * Updates the widget options + * + * @since 0.4 + * + * @param array $new_instance New settings for this instance as input by the user via form() + * @param array $old_instance Old settings for this instance + * @return array Settings to save or bool false to cancel saving + */ + function update( $new_instance, $old_instance ) { + $instance['title'] = strip_tags( $new_instance['title'] ); + foreach ( array_keys( PLL_Switcher::get_switcher_options( 'widget' ) ) as $key ) { + $instance[ $key ] = ! empty( $new_instance[ $key ] ) ? 1 : 0; + } + + return $instance; + } + + /** + * Displays the widget form + * + * @since 0.4 + * + * @param array $instance Current settings + */ + function form( $instance ) { + // Default values + $instance = wp_parse_args( (array) $instance, array_merge( array( 'title' => '' ), PLL_Switcher::get_switcher_options( 'widget', 'default' ) ) ); + + // Title + printf( + '

    ', + $this->get_field_id( 'title' ), + esc_html__( 'Title:', 'polylang' ), + $this->get_field_name( 'title' ), + esc_attr( $instance['title'] ) + ); + + $fields = ''; + foreach ( PLL_Switcher::get_switcher_options( 'widget' ) as $key => $str ) { + $fields .= sprintf( + '', + $this->get_field_id( $key ), + $this->get_field_name( $key ), + $instance[ $key ] ? ' checked="checked"' : '', + esc_html( $str ), + in_array( $key, array( 'show_names', 'show_flags', 'hide_current' ) ) ? ' class="no-dropdown-' . $this->id . '"' : '', + ! empty( $instance['dropdown'] ) && in_array( $key, array( 'show_names', 'show_flags', 'hide_current' ) ) ? ' style="display:none;"' : '', + 'pll-' . $key + ); + } + + echo $fields; + + // FIXME echoing script in form is not very clean + // but it does not work if enqueued properly : + // clicking save on a widget makes this code unreachable for the just saved widget ( ?! ) + $this->admin_print_script(); + } + + /** + * Add javascript to control the language switcher options + * + * @since 1.3 + */ + public function admin_print_script() { + static $done = false; + + if ( $done ) { + return; + } + + $done = true; + ?> + + plugin_basename = $plugin_basename; + + // Manages plugin activation and deactivation + register_activation_hook( $plugin_basename, array( $this, 'activate' ) ); + register_deactivation_hook( $plugin_basename, array( $this, 'deactivate' ) ); + + // Blog creation on multisite + add_action( 'wpmu_new_blog', array( $this, 'wpmu_new_blog' ), 5 ); // Before WP attempts to send mails which can break on some PHP versions + } + + /** + * Allows to detect plugin deactivation + * + * @since 1.7 + * + * @return bool true if the plugin is currently beeing deactivated + */ + public function is_deactivation() { + return isset( $_GET['action'], $_GET['plugin'] ) && 'deactivate' == $_GET['action'] && $this->plugin_basename == $_GET['plugin']; + } + + /** + * Activation or deactivation for all blogs + * + * @since 1.2 + * + * @param string $what Either 'activate' or 'deactivate' + * @param bool $networkwide + */ + protected function do_for_all_blogs( $what, $networkwide ) { + // Network + if ( is_multisite() && $networkwide ) { + global $wpdb; + + foreach ( $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ) as $blog_id ) { + switch_to_blog( $blog_id ); + 'activate' == $what ? $this->_activate() : $this->_deactivate(); + } + restore_current_blog(); + } + + // Single blog + else { + 'activate' == $what ? $this->_activate() : $this->_deactivate(); + } + } + + /** + * Plugin activation for multisite + * + * @since 1.7 + * + * @param bool $networkwide + */ + public function activate( $networkwide ) { + $this->do_for_all_blogs( 'activate', $networkwide ); + } + + /** + * Plugin activation + * + * @since 0.5 + */ + protected function _activate() { + // Can be overriden in child class + } + + /** + * Plugin deactivation for multisite + * + * @since 0.1 + * + * @param bool $networkwide + */ + public function deactivate( $networkwide ) { + $this->do_for_all_blogs( 'deactivate', $networkwide ); + } + + /** + * Plugin deactivation + * + * @since 0.5 + */ + protected function _deactivate() { + // Can be overriden in child class + } + + /** + * Blog creation on multisite ( to set default options ) + * + * @since 0.9.4 + * + * @param int $blog_id + */ + public function wpmu_new_blog( $blog_id ) { + switch_to_blog( $blog_id ); + $this->_activate(); + restore_current_blog(); + } +} diff --git a/pole-sbv-content/plugins/polylang/install/install.php b/pole-sbv-content/plugins/polylang/install/install.php new file mode 100644 index 00000000..5279218b --- /dev/null +++ b/pole-sbv-content/plugins/polylang/install/install.php @@ -0,0 +1,97 @@ +%s

    ', + /* translators: %s are WordPress version numbers */ + sprintf( esc_html__( 'You are using WordPress %s. Polylang requires at least WordPress %s.', 'polylang' ), + esc_html( $wp_version ), + PLL_MIN_WP_VERSION + ) + ) ); + } + $this->do_for_all_blogs( 'activate', $networkwide ); + } + + /** + * Get default Polylang options + * + * @since 1.8 + * + * return array + */ + static public function get_default_options() { + return array( + 'browser' => 1, // Default language for the front page is set by browser preference + 'rewrite' => 1, // Remove /language/ in permalinks ( was the opposite before 0.7.2 ) + 'hide_default' => 1, // Remove URL language information for default language ( was the opposite before 2.1.5 ) + 'force_lang' => 1, // Add URL language information ( was 0 before 1.7 ) + 'redirect_lang' => 0, // Do not redirect the language page to the homepage + 'media_support' => 1, // Support languages and translation for media by default + 'uninstall' => 0, // Do not remove data when uninstalling Polylang + 'sync' => array(), // Synchronisation is disabled by default ( was the opposite before 1.2 ) + 'post_types' => array(), + 'taxonomies' => array(), + 'domains' => array(), + 'version' => POLYLANG_VERSION, + ); + } + + /** + * Plugin activation + * + * @since 0.5 + */ + protected function _activate() { + if ( $options = get_option( 'polylang' ) ) { + // Check if we will be able to upgrade + if ( version_compare( $options['version'], POLYLANG_VERSION, '<' ) ) { + $upgrade = new PLL_Upgrade( $options ); + $upgrade->can_activate(); + } + } + // Defines default values for options in case this is the first installation + else { + update_option( 'polylang', self::get_default_options() ); + } + + // Avoid 1 query on every pages if no wpml strings is registered + if ( ! get_option( 'polylang_wpml_strings' ) ) { + update_option( 'polylang_wpml_strings', array() ); + } + + // Don't use flush_rewrite_rules at network activation. See #32471 + // Thanks to RavanH for the trick. See https://polylang.wordpress.com/2015/06/10/polylang-1-7-6-and-multisite/ + // Rewrite rules are created at next page load :) + delete_option( 'rewrite_rules' ); + } + + /** + * Plugin deactivation + * + * @since 0.5 + */ + protected function _deactivate() { + delete_option( 'rewrite_rules' ); // Don't use flush_rewrite_rules at network activation. See #32471 + } +} diff --git a/pole-sbv-content/plugins/polylang/install/plugin-updater.php b/pole-sbv-content/plugins/polylang/install/plugin-updater.php new file mode 100644 index 00000000..5fa7ea21 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/install/plugin-updater.php @@ -0,0 +1,482 @@ +api_url = trailingslashit( $_api_url ); + $this->api_data = $_api_data; + $this->name = plugin_basename( $_plugin_file ); + $this->slug = basename( $_plugin_file, '.php' ); + $this->version = $_api_data['version']; + $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false; + $this->beta = ! empty( $this->api_data['beta'] ) ? true : false; + $this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ); + + $edd_plugin_data[ $this->slug ] = $this->api_data; + + // Set up hooks. + $this->init(); + + } + + /** + * Set up WordPress filters to hook into WP's update process. + * + * @uses add_filter() + * + * @return void + */ + public function init() { + + add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) ); + add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 ); + remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 ); + add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 ); + add_action( 'admin_init', array( $this, 'show_changelog' ) ); + + } + + /** + * Check for Updates at the defined API endpoint and modify the update array. + * + * This function dives into the update API just when WordPress creates its update array, + * then adds a custom API call and injects the custom plugin data retrieved from the API. + * It is reassembled from parts of the native WordPress plugin update code. + * See wp-includes/update.php line 121 for the original wp_update_plugins() function. + * + * @uses api_request() + * + * @param array $_transient_data Update array build by WordPress. + * @return array Modified update array with custom plugin data. + */ + public function check_update( $_transient_data ) { + + global $pagenow; + + if ( ! is_object( $_transient_data ) ) { + $_transient_data = new stdClass; + } + + if ( 'plugins.php' == $pagenow && is_multisite() ) { + return $_transient_data; + } + + if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) { + return $_transient_data; + } + + $version_info = $this->get_cached_version_info(); + + if ( false === $version_info ) { + $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) ); + + $this->set_version_info_cache( $version_info ); + + } + + if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) { + + if ( version_compare( $this->version, $version_info->new_version, '<' ) ) { + + $_transient_data->response[ $this->name ] = $version_info; + + } + + $_transient_data->last_checked = current_time( 'timestamp' ); + $_transient_data->checked[ $this->name ] = $this->version; + + } + + return $_transient_data; + } + + /** + * show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise! + * + * @param string $file + * @param array $plugin + */ + public function show_update_notification( $file, $plugin ) { + + if ( is_network_admin() ) { + return; + } + + if( ! current_user_can( 'update_plugins' ) ) { + return; + } + + if( ! is_multisite() ) { + return; + } + + if ( $this->name != $file ) { + return; + } + + // Remove our filter on the site transient + remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 ); + + $update_cache = get_site_transient( 'update_plugins' ); + + $update_cache = is_object( $update_cache ) ? $update_cache : new stdClass(); + + if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) { + + $version_info = $this->get_cached_version_info(); + + if ( false === $version_info ) { + $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) ); + + $this->set_version_info_cache( $version_info ); + } + + if ( ! is_object( $version_info ) ) { + return; + } + + if ( version_compare( $this->version, $version_info->new_version, '<' ) ) { + + $update_cache->response[ $this->name ] = $version_info; + + } + + $update_cache->last_checked = current_time( 'timestamp' ); + $update_cache->checked[ $this->name ] = $this->version; + + set_site_transient( 'update_plugins', $update_cache ); + + } else { + + $version_info = $update_cache->response[ $this->name ]; + + } + + // Restore our filter + add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) ); + + if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) { + + // build a plugin list row, with update notification + $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' ); + # + echo ''; + echo ''; + echo '
    '; + + $changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' ); + + if ( empty( $version_info->download_link ) ) { + printf( + /* translators: %1$s plugin name, %3$s plugin version, %2$s and %4$s are html tags */ + esc_html__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'polylang' ), + esc_html( $version_info->name ), + '', + esc_html( $version_info->new_version ), + '' + ); + } else { + printf( + /* translators: %1$s plugin name, %3$s plugin version, %2$s, %4$s, %5$s and %6$s are html tags */ + esc_html__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s.', 'polylang' ), + esc_html( $version_info->name ), + '', + esc_html( $version_info->new_version ), + '', + '', + '' + ); + } + + do_action( "in_plugin_update_message-{$file}", $plugin, $version_info ); + + echo '
    '; + } + } + + /** + * Updates information on the "View version x.x details" page with custom data. + * + * @uses api_request() + * + * @param mixed $_data + * @param string $_action + * @param object $_args + * @return object $_data + */ + public function plugins_api_filter( $_data, $_action = '', $_args = null ) { + + if ( $_action != 'plugin_information' ) { + + return $_data; + + } + + if ( ! isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) { + + return $_data; + + } + + $to_send = array( + 'slug' => $this->slug, + 'is_ssl' => is_ssl(), + 'fields' => array( + 'banners' => array(), + 'reviews' => false + ) + ); + + $cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ); + + // Get the transient where we store the api request for this plugin for 24 hours + $edd_api_request_transient = $this->get_cached_version_info( $cache_key ); + + //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now. + if ( empty( $edd_api_request_transient ) ) { + + $api_response = $this->api_request( 'plugin_information', $to_send ); + + // Expires in 3 hours + $this->set_version_info_cache( $api_response, $cache_key ); + + if ( false !== $api_response ) { + $_data = $api_response; + } + + } else { + $_data = $edd_api_request_transient; + } + + // Convert sections into an associative array, since we're getting an object, but Core expects an array. + if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) { + $new_sections = array(); + foreach ( $_data->sections as $key => $value ) { + $new_sections[ $key ] = $value; + } + + $_data->sections = $new_sections; + } + + // Convert banners into an associative array, since we're getting an object, but Core expects an array. + if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) { + $new_banners = array(); + foreach ( $_data->banners as $key => $value ) { + $new_banners[ $key ] = $value; + } + + $_data->banners = $new_banners; + } + + return $_data; + } + + /** + * Disable SSL verification in order to prevent download update failures + * + * @param array $args + * @param string $url + * @return object $array + */ + public function http_request_args( $args, $url ) { + // If it is an https request and we are performing a package download, disable ssl verification + if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) { + $args['sslverify'] = false; + } + return $args; + } + + /** + * Calls the API and, if successfull, returns the object delivered by the API. + * + * @uses get_bloginfo() + * @uses wp_remote_post() + * @uses is_wp_error() + * + * @param string $_action The requested action. + * @param array $_data Parameters for the API action. + * @return false|object + */ + private function api_request( $_action, $_data ) { + + global $wp_version; + + $data = array_merge( $this->api_data, $_data ); + + if ( $data['slug'] != $this->slug ) { + return; + } + + if( $this->api_url == trailingslashit (home_url() ) ) { + return false; // Don't allow a plugin to ping itself + } + + $api_params = array( + 'edd_action' => 'get_version', + 'license' => ! empty( $data['license'] ) ? $data['license'] : '', + 'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false, + 'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false, + 'version' => isset( $data['version'] ) ? $data['version'] : false, + 'slug' => $data['slug'], + 'author' => $data['author'], + 'url' => home_url(), + 'beta' => ! empty( $data['beta'] ), + ); + + $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) ); + + if ( ! is_wp_error( $request ) ) { + $request = json_decode( wp_remote_retrieve_body( $request ) ); + } + + if ( $request && isset( $request->sections ) ) { + $request->sections = maybe_unserialize( $request->sections ); + } else { + $request = false; + } + + if ( $request && isset( $request->banners ) ) { + $request->banners = maybe_unserialize( $request->banners ); + } + + if( ! empty( $request->sections ) ) { + foreach( $request->sections as $key => $section ) { + $request->$key = (array) $section; + } + } + + return $request; + } + + public function show_changelog() { + + global $edd_plugin_data; + + if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) { + return; + } + + if( empty( $_REQUEST['plugin'] ) ) { + return; + } + + if( empty( $_REQUEST['slug'] ) ) { + return; + } + + if( ! current_user_can( 'update_plugins' ) ) { + wp_die( __( 'You do not have permission to install plugin updates', 'polylang' ), __( 'Error', 'polylang' ), array( 'response' => 403 ) ); + } + + $data = $edd_plugin_data[ $_REQUEST['slug'] ]; + $beta = ! empty( $data['beta'] ) ? true : false; + $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' ); + $version_info = $this->get_cached_version_info( $cache_key ); + + if( false === $version_info ) { + + $api_params = array( + 'edd_action' => 'get_version', + 'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false, + 'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false, + 'slug' => $_REQUEST['slug'], + 'author' => $data['author'], + 'url' => home_url(), + 'beta' => ! empty( $data['beta'] ) + ); + + $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) ); + + if ( ! is_wp_error( $request ) ) { + $version_info = json_decode( wp_remote_retrieve_body( $request ) ); + } + + + if ( ! empty( $version_info ) && isset( $version_info->sections ) ) { + $version_info->sections = maybe_unserialize( $version_info->sections ); + } else { + $version_info = false; + } + + if( ! empty( $version_info ) ) { + foreach( $version_info->sections as $key => $section ) { + $version_info->$key = (array) $section; + } + } + + $this->set_version_info_cache( $version_info, $cache_key ); + + } + + if( ! empty( $version_info ) && isset( $version_info->sections['changelog'] ) ) { + echo '
    ' . $version_info->sections['changelog'] . '
    '; + } + + exit; + } + + public function get_cached_version_info( $cache_key = '' ) { + + if( empty( $cache_key ) ) { + $cache_key = $this->cache_key; + } + + $cache = get_option( $cache_key ); + + if( empty( $cache['timeout'] ) || current_time( 'timestamp' ) > $cache['timeout'] ) { + return false; // Cache is expired + } + + return json_decode( $cache['value'] ); + + } + + public function set_version_info_cache( $value = '', $cache_key = '' ) { + + if( empty( $cache_key ) ) { + $cache_key = $this->cache_key; + } + + $data = array( + 'timeout' => strtotime( '+3 hours', current_time( 'timestamp' ) ), + 'value' => json_encode( $value ) + ); + + update_option( $cache_key, $data ); + + } + +} diff --git a/pole-sbv-content/plugins/polylang/install/upgrade.php b/pole-sbv-content/plugins/polylang/install/upgrade.php new file mode 100644 index 00000000..fa6f7293 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/install/upgrade.php @@ -0,0 +1,598 @@ +options = &$options; + } + + /** + * Check if upgrade is possible otherwise die to avoid activation + * + * @since 1.2 + */ + public function can_activate() { + if ( ! $this->can_upgrade() ) { + ob_start(); + $this->admin_notices(); // FIXME the error message is displayed two times + die( ob_get_contents() ); + } + } + + /** + * Upgrades if possible otherwise returns false to stop Polylang loading + * + * @since 1.2 + * + * @return bool true if upgrade is possible, false otherwise + */ + public function upgrade() { + if ( ! $this->can_upgrade() ) { + add_action( 'all_admin_notices', array( $this, 'admin_notices' ) ); + return false; + } + + add_action( 'admin_init', array( $this, '_upgrade' ) ); + return true; + } + + + /** + * Check if we the previous version is not too old + * Upgrades if OK + * /!\ never start any upgrade before admin_init as it is likely to conflict with some other plugins + * + * @since 1.2 + * + * @return bool true if upgrade is possible, false otherwise + */ + public function can_upgrade() { + // Don't manage upgrade from version < 0.8 + return version_compare( $this->options['version'], '0.8', '>=' ); + } + + /** + * Displays a notice when ugrading from a too old version + * + * @since 1.0 + */ + public function admin_notices() { + load_plugin_textdomain( 'polylang', false, basename( POLYLANG_DIR ) . '/languages' ); + printf( + '

    %s

    %s

    ', + esc_html__( 'Polylang has been deactivated because you upgraded from a too old version.', 'polylang' ), + sprintf( + /* translators: %s are Polylang version numbers */ + esc_html__( 'Please upgrade first to %s before ugrading to %s.', 'polylang' ), + '0.9.8', + POLYLANG_VERSION + ) + ); + } + + /** + * Upgrades the plugin depending on the previous version + * + * @since 1.2 + */ + public function _upgrade() { + foreach ( array( '0.9', '1.0', '1.1', '1.2', '1.2.1', '1.2.3', '1.3', '1.4', '1.4.1', '1.4.4', '1.5', '1.6', '1.7.4', '1.8', '2.0.8', '2.1', '2.2' ) as $version ) { + if ( version_compare( $this->options['version'], $version, '<' ) ) { + call_user_func( array( $this, 'upgrade_' . str_replace( '.', '_', $version ) ) ); + } + } + + $delete_pre_1_2_data = get_transient( 'pll_upgrade_1_4' ); + if ( false !== $delete_pre_1_2_data && absint( $delete_pre_1_2_data ) < time() ) { + $this->delete_pre_1_2_data(); + } + + $this->options['previous_version'] = $this->options['version']; // Remember the previous version of Polylang since v1.7.7 + $this->options['version'] = POLYLANG_VERSION; + update_option( 'polylang', $this->options ); + } + + /** + * Upgrades if the previous version is < 0.9 + * + * @since 1.2 + */ + protected function upgrade_0_9() { + $this->options['sync'] = defined( 'PLL_SYNC' ) && ! PLL_SYNC ? 0 : 1; // The option replaces PLL_SYNC in 0.9 + } + + /** + * Upgrades if the previous version is < 1.0 + * + * @since 1.2 + */ + protected function upgrade_1_0() { + // The option replaces PLL_MEDIA_SUPPORT in 1.0 + $this->options['media_support'] = defined( 'PLL_MEDIA_SUPPORT' ) && ! PLL_MEDIA_SUPPORT ? 0 : 1; + + // Split the synchronization options in 1.0 + $this->options['sync'] = empty( $this->options['sync'] ) ? array() : array_keys( PLL_Settings_Sync::list_metas_to_sync() ); + + // Set default values for post types and taxonomies to translate + $this->options['post_types'] = array_values( get_post_types( array( '_builtin' => false, 'show_ui' => true ) ) ); + $this->options['taxonomies'] = array_values( get_taxonomies( array( '_builtin' => false, 'show_ui' => true ) ) ); + update_option( 'polylang', $this->options ); + + flush_rewrite_rules(); // Rewrite rules have been modified in 1.0 + } + + /** + * Upgrades if the previous version is < 1.1 + * + * @since 1.2 + */ + protected function upgrade_1_1() { + // Update strings register with icl_register_string + $strings = get_option( 'polylang_wpml_strings' ); + if ( $strings ) { + foreach ( $strings as $key => $string ) { + $strings[ $key ]['icl'] = 1; + } + update_option( 'polylang_wpml_strings', $strings ); + } + + // Move polylang_widgets options + if ( $widgets = get_option( 'polylang_widgets' ) ) { + $this->options['widgets'] = $widgets; + delete_option( 'polylang_widgets' ); + } + } + + /** + * Upgrades if the previous version is < 1.2 + * + * @since 1.2 + */ + protected function upgrade_1_2() { + $this->options['domains'] = array(); // Option added in 1.2 + + // Need to register the taxonomies + foreach ( array( 'language', 'term_language', 'post_translations', 'term_translations' ) as $taxonomy ) { + register_taxonomy( $taxonomy, null , array( 'label' => false, 'public' => false, 'query_var' => false, 'rewrite' => false ) ); + } + + // Abort if the db upgrade has already been done previously + if ( get_terms( 'term_language', array( 'hide_empty' => 0 ) ) ) { + return; + } + + set_time_limit( 0 ); // In case we upgrade a huge site + + // Upgrade old model based on metas to new model based on taxonomies + global $wpdb; + $wpdb->termmeta = $wpdb->prefix . 'termmeta'; // Registers the termmeta table in wpdb + $languages = get_terms( 'language', array( 'hide_empty' => 0 ) ); // Don't use get_languages_list which can't work with the old model + + foreach ( $languages as $lang ) { + // First update language with new storage for locale and text direction + $text_direction = get_metadata( 'term', $lang->term_id, '_rtl', true ); + $desc = serialize( array( 'locale' => $lang->description, 'rtl' => $text_direction ) ); + wp_update_term( (int) $lang->term_id, 'language', array( 'description' => $desc ) ); + + // Add language to new 'term_language' taxonomy + $term_lang = wp_insert_term( $lang->name, 'term_language', array( 'slug' => 'pll_' . $lang->slug ) ); + $lang_tt_ids[ $lang->term_id ] = $term_lang['term_taxonomy_id']; // Keep the term taxonomy id for future + } + + // Get all terms with a language defined + $terms = $wpdb->get_results( "SELECT term_id, meta_value FROM $wpdb->termmeta WHERE meta_key = '_language'" ); + foreach ( $terms as $key => $term ) { + $terms[ $key ] = $wpdb->prepare( '( %d, %d )', $term->term_id, $lang_tt_ids[ $term->meta_value ] ); + } + + $terms = array_unique( $terms ); + + // Assign language to each term + if ( ! empty( $terms ) ) { + $wpdb->query( "INSERT INTO $wpdb->term_relationships ( object_id, term_taxonomy_id ) VALUES " . implode( ',', $terms ) ); + } + + // Translations + foreach ( array( 'post', 'term' ) as $type ) { + $table = $type . 'meta'; + $terms = $slugs = $tts = $trs = array(); + + // Get all translated objects + $objects = $wpdb->get_col( "SELECT DISTINCT meta_value FROM {$wpdb->$table} WHERE meta_key = '_translations'" ); + + if ( empty( $objects ) ) { + continue; + } + + foreach ( $objects as $obj ) { + $term = uniqid( 'pll_' ); // The term name + $terms[] = $wpdb->prepare( '( "%s", "%s" )', $term, $term ); + $slugs[] = $wpdb->prepare( '"%s"', $term ); + $translations = maybe_unserialize( maybe_unserialize( $obj ) ); // 2 unserialize due to an old storage bug + $description[ $term ] = serialize( $translations ); + } + + $terms = array_unique( $terms ); + + // Insert terms + if ( ! empty( $terms ) ) { + $wpdb->query( "INSERT INTO $wpdb->terms ( slug, name ) VALUES " . implode( ',', $terms ) ); + } + + // Get all terms with their term_id + $terms = $wpdb->get_results( "SELECT term_id, slug FROM $wpdb->terms WHERE slug IN ( " . implode( ',', $slugs ) . ' )' ); + + // Prepare terms taxonomy relationship + foreach ( $terms as $term ) { + $tts[] = $wpdb->prepare( '( %d, "%s", "%s" )', $term->term_id, $type . '_translations', $description[ $term->slug ] ); + } + + $tts = array_unique( $tts ); + + // Insert term_taxonomy + if ( ! empty( $tts ) ) { + $wpdb->query( "INSERT INTO $wpdb->term_taxonomy ( term_id, taxonomy, description ) VALUES " . implode( ',', $tts ) ); + } + + // Get all terms with term_taxonomy_id + $terms = get_terms( $type . '_translations', array( 'hide_empty' => false ) ); + + // Prepare objects relationships + foreach ( $terms as $term ) { + $translations = unserialize( $term->description ); + foreach ( $translations as $object_id ) { + if ( ! empty( $object_id ) ) { + $trs[] = $wpdb->prepare( '( %d, %d )', $object_id, $term->term_taxonomy_id ); + } + } + } + + $trs = array_unique( $trs ); + + // Insert term_relationships + if ( ! empty( $trs ) ) { + $wpdb->query( "INSERT INTO $wpdb->term_relationships ( object_id, term_taxonomy_id ) VALUES " . implode( ',', $trs ) ); + } + } + + // Upgrade of string translations is now in upgrade_1_2_1 + // Upgrade of nav menus is now in upgrade_1_2_3 + } + + /** + * Upgrades if the previous version is < 1.2.1 + * + * @since 1.2.1 + */ + protected function upgrade_1_2_1() { + // Strings translations + foreach ( get_terms( 'language', array( 'hide_empty' => 0 ) ) as $lang ) { + if ( $strings = get_option( 'polylang_mo' . $lang->term_id ) ) { + $mo = new PLL_MO(); + foreach ( $strings as $msg ) { + $mo->add_entry( $mo->make_entry( $msg[0], $msg[1] ) ); + } + $mo->export_to_db( $lang ); + } + } + } + + /** + * Upgrades if the previous version is < 1.2.3 + * Uprades multilingual menus depending on the old version due to multiple changes in menus management + * + * @since 1.2.3 + */ + public function upgrade_1_2_3() { + // Old version < 1.1 + // Multilingal locations and switcher item were stored in a dedicated option + if ( version_compare( $this->options['version'], '1.1', '<' ) ) { + if ( $menu_lang = get_option( 'polylang_nav_menus' ) ) { + foreach ( $menu_lang as $location => $arr ) { + if ( ! in_array( $location, array_keys( get_registered_nav_menus() ) ) ) { + continue; + } + + $switch_options = array_slice( $arr, -5, 5 ); + $translations = array_diff_key( $arr, $switch_options ); + $has_switcher = array_shift( $switch_options ); + + foreach ( get_terms( 'language', array( 'hide_empty' => 0 ) ) as $lang ) { + // Move nav menus locations + if ( ! empty( $translations[ $lang->slug ] ) ) { + $locations[ $location ][ $lang->slug ] = $translations[ $lang->slug ]; + } + + // Create the menu items for the language switcher + if ( ! empty( $has_switcher ) ) { + $menu_item_db_id = wp_update_nav_menu_item( $translations[ $lang->slug ], 0, array( + 'menu-item-title' => __( 'Language switcher', 'polylang' ), + 'menu-item-url' => '#pll_switcher', + 'menu-item-status' => 'publish', + ) ); + + update_post_meta( $menu_item_db_id, '_pll_menu_item', $switch_options ); + } + } + } + + if ( ! empty( $locations ) ) { + $this->options['nav_menus'][ get_option( 'stylesheet' ) ] = $locations; + } + + delete_option( 'polylang_nav_menus' ); + } + } + + elseif ( empty( $this->options['nav_menus'] ) ) { + $menus = get_theme_mod( 'nav_menu_locations' ); + + if ( is_array( $menus ) ) { + // If old version < 1.2 + // Clean the WP option as it was a bad idea to pollute it + if ( version_compare( $this->options['version'], '1.2', '<' ) ) { + foreach ( $menus as $loc => $menu ) { + if ( $pos = strpos( $loc, '#' ) ) { + unset( $menus[ $loc ] ); + } + } + + set_theme_mod( 'nav_menu_locations', $menus ); + } + + // Get the multilingual locations + foreach ( $menus as $loc => $menu ) { + foreach ( get_terms( 'language', array( 'hide_empty' => 0 ) ) as $lang ) { + $arr[ $loc ][ $lang->slug ] = pll_get_term( $menu, $lang ); + } + } + + if ( ! empty( $arr ) ) { + $this->options['nav_menus'][ get_option( 'stylesheet' ) ] = $arr; + } + } + } + } + + /** + * Upgrades if the previous version is < 1.3 + * Moves the user biographies in default language to the 'description' user meta + * + * @since 1.3 + */ + protected function upgrade_1_3() { + $usermeta = 'description_' . $this->options['default_lang']; + $query = new WP_User_Query( array( 'blog_id' => $GLOBALS['blog_id'], 'meta_key' => $usermeta ) ); + + foreach ( $query->get_results() as $user ) { + $desc = get_user_meta( $user->ID, $usermeta, true ); + if ( ! empty( $desc ) ) { + update_user_meta( $user->ID, 'description', $desc ); + delete_user_meta( $user->ID, $usermeta ); + } + } + } + + /** + * Upgrades if the previous version is < 1.4 + * Sets a transient to delete old model data + * Deletes language cache (due to bug correction in home urls in 1.3.1 and added mo_id in 1.4) + * + * @since 1.4 + */ + protected function upgrade_1_4() { + set_transient( 'pll_upgrade_1_4', time() + 60 * 24 * 60 * 60 ); // 60 days + delete_transient( 'pll_languages_list' ); + } + + /** + * Old data were not deleted in 1.2, just in case... + * Delete them at first upgrade at least 60 days after upgrade to 1.4 + * + * @since 1.4 + */ + protected function delete_pre_1_2_data() { + // Suppress data of the old model < 1.2 + global $wpdb; + $wpdb->termmeta = $wpdb->prefix . 'termmeta'; // registers the termmeta table in wpdb in case WP < 4.4 + + // Do nothing if the termmeta table does not exists + if ( count( $wpdb->get_results( "SHOW TABLES LIKE '$wpdb->termmeta'" ) ) ) { + $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_translations'" ); + $wpdb->query( "DELETE FROM $wpdb->termmeta WHERE meta_key = '_language'" ); + $wpdb->query( "DELETE FROM $wpdb->termmeta WHERE meta_key = '_rtl'" ); + $wpdb->query( "DELETE FROM $wpdb->termmeta WHERE meta_key = '_translations'" ); + } + + // Delete the strings translations + $languages = get_terms( 'language', array( 'hide_empty' => false ) ); + foreach ( $languages as $lang ) { + delete_option( 'polylang_mo' . $lang->term_id ); + } + + delete_transient( 'pll_upgrade_1_4' ); + } + + /** + * Upgrades if the previous version is < 1.4.1 + * Disables the browser detection when using multiple domains + * + * @since 1.4.1 + */ + protected function upgrade_1_4_1() { + if ( 3 == $this->options['force_lang'] ) { + $this->options['browser'] = $this->options['hide_default'] = 0; + } + } + + /** + * Upgrades if the previous version is < 1.4.4 + * Uprades widgets options for language filter + * + * @since 1.4.4 + */ + protected function upgrade_1_4_4() { + foreach ( $GLOBALS['wp_registered_widgets'] as $widget ) { + if ( ! empty( $this->options['widgets'][ $widget['id'] ] ) && ! empty( $widget['callback'][0] ) && ! empty( $widget['params'][0]['number'] ) ) { + $obj = $widget['callback'][0]; + if ( is_object( $obj ) && method_exists( $obj, 'get_settings' ) && method_exists( $obj, 'save_settings' ) ) { + $settings = $obj->get_settings(); + $settings[ $widget['params'][0]['number'] ]['pll_lang'] = $this->options['widgets'][ $widget['id'] ]; + $obj->save_settings( $settings ); + } + } + } + unset( $this->options['widgets'] ); + } + + /** + * Upgrades if the previous version is < 1.5 + * Deletes language cache (due to host property added and bug on search url) + * + * @since 1.5 + */ + protected function upgrade_1_5() { + delete_transient( 'pll_languages_list' ); + } + + /** + * Upgrades if the previous version is < 1.6 + * Upgrades core language files to get the .po file (only for WP 4.0+) + * + * @since 1.6 + */ + protected function upgrade_1_6() { + if ( version_compare( $GLOBALS['wp_version'], '4.0', '>=' ) ) { + self::download_language_packs(); + } + } + + /** + * Downloads language packs + * Intended to be used only one time (at upgrade to Polylang 1.6 or first upgrade of WP 4.0 or later) + * Adapted from wp_download_language_pack + * Rewritten because wp_download_language_pack checks the existence of .mo and I need to download .po + * + * @since 1.6 + */ + static function download_language_packs() { + $languages = pll_languages_list( array( 'fields' => 'locale' ) ); + + // Prevents upgrade if the .po file is already here. Let WP manage the upgrades :) + foreach ( $languages as $key => $locale ) { + if ( file_exists( WP_LANG_DIR . "/$locale.po" ) ) { + unset( $languages[ $key ] ); + } + } + + if ( empty( $languages ) ) { + return; + } + + require_once ABSPATH . 'wp-admin/includes/translation-install.php'; + $translations = wp_get_available_translations(); + if ( ! $translations ) { + return; + } + + foreach ( $translations as $translation ) { + if ( in_array( $translation['language'], $languages ) ) { + $translation['type'] = 'core'; + $translations_to_load[] = (object) $translation; + } + } + + if ( ! empty( $translations_to_load ) ) { + require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + $upgrader = new Language_Pack_Upgrader( new Automatic_Upgrader_Skin ); + $upgrader->bulk_upgrade( $translations_to_load, array( 'clear_update_cache' => false ) ); + } + } + + /** + * Upgrades if the previous version is < 1.7.4 + * + * @since 1.7.4 + */ + protected function upgrade_1_7_4() { + delete_transient( 'pll_languages_list' ); // Deletes language cache (due to flag properties added in 1.7, page on front removed in 1.7.2, home url fixes in 1.7.4) + flush_rewrite_rules(); // Flush rewrite rules due to custom taxonomy rewrite rule bug fix + } + + /** + * Upgrades if the previous version is < 1.8 + * + * @since 1.8 + */ + protected function upgrade_1_8() { + // Adds the flag code in languages stored in DB + include PLL_SETTINGS_INC . '/languages.php'; + + $terms = get_terms( 'language', array( 'hide_empty' => 0 ) ); + + foreach ( $terms as $lang ) { + $description = maybe_unserialize( $lang->description ); + if ( isset( $languages[ $description['locale'] ] ) ) { + $description['flag_code'] = $languages[ $description['locale'] ][4]; + $description = serialize( $description ); + wp_update_term( (int) $lang->term_id, 'language', array( 'description' => $description ) ); + } + } + + delete_transient( 'pll_languages_list' ); + } + + /** + * Upgrades if the previous version is < 2.0.8 + * Changes the user meta 'user_lang' to 'locale' to match WP 4.7 choice + * + * @since 2.0.8 + */ + protected function upgrade_2_0_8() { + global $wpdb; + $wpdb->update( $wpdb->usermeta, array( 'meta_key' => 'locale' ), array( 'meta_key' => 'user_lang' ) ); + } + + /** + * Upgrades if the previous version is < 2.1 + * Moves strings translations from polylang_mo post_content to post meta _pll_strings_translations + * + * @since 2.1 + */ + protected function upgrade_2_1() { + foreach ( get_terms( 'language', array( 'hide_empty' => 0 ) ) as $lang ) { + $mo_id = PLL_MO::get_id( $lang ); + $meta = get_post_meta( $mo_id, '_pll_strings_translations', true ); + + if ( empty( $meta ) ) { + $post = get_post( $mo_id, OBJECT ); + $strings = unserialize( $post->post_content ); + if ( is_array( $strings ) ) { + update_post_meta( $mo_id, '_pll_strings_translations', $strings ); + } + } + } + } + + /** + * Upgrades if the previous version is < 2.2 + * + * @since 2.2 + */ + protected function upgrade_2_2() { + delete_transient( 'pll_languages_list' ); // Deletes language cache (due to 'redirect_lang' option removed for subdomains and multiple domains) + } +} diff --git a/pole-sbv-content/plugins/polylang/js/admin.js b/pole-sbv-content/plugins/polylang/js/admin.js new file mode 100644 index 00000000..fc12c603 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/js/admin.js @@ -0,0 +1,191 @@ +jQuery( document ).ready(function( $ ) { + var transitionTimeout; + + // languages list table + // accessibility to row actions on focus + // mainly copy paste of WP code from common.js + $( 'table.languages' ).on({ // restricted to languages list table + focusin: function() { + clearTimeout( transitionTimeout ); + focusedRowActions = $( this ).find( '.row-actions' ); + // transitionTimeout is necessary for Firefox, but Chrome won't remove the CSS class without a little help. + $( '.row-actions' ).not( this ).removeClass( 'visible' ); + focusedRowActions.addClass( 'visible' ); + }, + focusout: function() { + // Tabbing between post title and .row-actions links needs a brief pause, otherwise + // the .row-actions div gets hidden in transit in some browsers ( ahem, Firefox ). + transitionTimeout = setTimeout(function() { + focusedRowActions.removeClass( 'visible' ); + }, 30 ); + } + }, 'tr' ); // acts on the whole tr instead of single td as we have actions links in several columns + + // extends selectmenu to add flags in menu items + $.widget( "custom.iconselectmenu", $.ui.selectmenu, { + _renderItem: function( ul, item ) { + var li = $( "
  • ", { text: item.label } ); + + if ( item.value ) { + $( "", { + src: pll_flag_base_url + item.value + '.png', + "class": "ui-icon" + }).appendTo( li ); + } + + return li.appendTo( ul ); + } + }); + + // allows to display the flag for the selected menu item + function add_icon( event, ui ) { + var value = $( this ).val(); + if ( value ) { + var txt = $( this ).iconselectmenu( "widget" ).children( ":last" ); + var img = $( '' ).appendTo( txt ); + img.attr( "src", pll_flag_base_url + value + '.png' ); + } + } + + // overrides the flag dropdown list with our customized jquery ui selectmenu + $( "#flag_list" ).iconselectmenu({ + create: add_icon, + select: add_icon, + }); + + // languages form + // fills the fields based on the language dropdown list choice + $( '#lang_list' ).change(function() { + var value = $( this ).val().split( ':' ); + var selected = $( "select option:selected" ).text().split( ' - ' ); + $( '#lang_slug' ).val( value[0] ); + $( '#lang_locale' ).val( value[1] ); + $( 'input[name="rtl"]' ).val( [value[2]] ); + $( '#lang_name' ).val( selected[0] ); + $( '#flag_list option[value="' + value[3] + '"]' ).attr( 'selected', 'selected' ); + + // recreate the jquery ui selectmenu + $( "#flag_list" ).iconselectmenu( 'destroy' ).iconselectmenu({ + create: add_icon, + select: add_icon, + }) + }); + + // strings translations + // save translations when pressing enter + $( '.translation input' ).keypress(function( event ){ + if ( 13 === event.keyCode ) { + event.preventDefault(); + $( '#submit' ).click(); + } + }); + + // settings page + // click on configure link + $( '#the-list' ).on( 'click', '.configure>a', function(){ + $( '.pll-configure' ).hide().prev().show(); + $( this ).closest( 'tr' ).hide().next().show(); + return false; + }); + + // cancel + $( '#the-list' ).on( 'click', '.cancel', function(){ + $( this ).closest( 'tr' ).hide().prev().show(); + }); + + // save settings + $( '#the-list' ).on( 'click', '.save', function(){ + var tr = $( this ).closest( 'tr' ); + var parts = tr.attr( 'id' ).split( '-' ); + + var data = { + action: 'pll_save_options', + pll_ajax_settings: true, + module: parts[parts.length - 1], + _pll_nonce: $( '#_pll_nonce' ).val() + } + + data = tr.find( ':input' ).serialize() + '&' + $.param( data ); + + $.post( ajaxurl, data, function( response ) { + var res = wpAjax.parseAjaxResponse( response, 'ajax-response' ); + $.each( res.responses, function() { + switch ( this.what ) { + case 'license-update': + $( '#pll-license-' + this.data ).replaceWith( this.supplemental.html ); + break; + case 'success': + tr.hide().prev().show(); // close only if there is no error + case 'error': + $( '.settings-error' ).remove(); // remove previous messages if any + $( 'h1' ).after( this.data ); + + // Make notices dismissible + // copy paste of common.js from WP 4.2.2 + $( '.notice.is-dismissible' ).each(function() { + var $this = $( this ), + $button = $( '' ), + btnText = commonL10n.dismiss || ''; + + // Ensure plain text + $button.find( '.screen-reader-text' ).text( btnText ); + + $this.append( $button ); + + $button.on( 'click.wp-dismiss-notice', function( event ) { + event.preventDefault(); + $this.fadeTo( 100 , 0, function() { + $( this ).slideUp( 100, function() { + $( this ).remove(); + }); + }); + }); + }); + break; + } + }); + }); + }); + + // act when pressing enter or esc in configurations + $( '.pll-configure' ).keypress(function( event ){ + if ( 13 === event.keyCode ) { + event.preventDefault(); + $( this ).find( '.save' ).click(); + } + + if ( 27 === event.keyCode ) { + event.preventDefault(); + $( this ).find( '.cancel' ).click(); + } + }); + + // settings URL modifications + // manages visibility of fields + $( "input[name='force_lang']" ).change(function() { + function pll_toggle( a, test ) { + test ? a.show() : a.hide(); + } + + var value = $( this ).val(); + pll_toggle( $( '#pll-domains-table' ), 3 == value ); + pll_toggle( $( "#pll-hide-default" ), 3 > value ); + pll_toggle( $( "#pll-rewrite" ), 2 > value ); + pll_toggle( $( "#pll-redirect-lang" ), 2 > value ); + }); + + // settings license + // deactivate button + $( '.pll-deactivate-license' ).on( 'click', function() { + var data = { + action: 'pll_deactivate_license', + pll_ajax_settings: true, + id: $( this ).attr( 'id' ), + _pll_nonce: $( '#_pll_nonce' ).val() + } + $.post( ajaxurl, data , function( response ){ + $( '#pll-license-' + response.id ).replaceWith( response.html ); + }); + }); + +}); diff --git a/pole-sbv-content/plugins/polylang/js/admin.min.js b/pole-sbv-content/plugins/polylang/js/admin.min.js new file mode 100644 index 00000000..5fdff77e --- /dev/null +++ b/pole-sbv-content/plugins/polylang/js/admin.min.js @@ -0,0 +1 @@ +jQuery(document).ready(function(e){function t(){var t=e(this).val();if(t){var n=e(this).iconselectmenu("widget").children(":last"),i=e('').appendTo(n);i.attr("src",pll_flag_base_url+t+".png")}}var n;e("table.languages").on({focusin:function(){clearTimeout(n),focusedRowActions=e(this).find(".row-actions"),e(".row-actions").not(this).removeClass("visible"),focusedRowActions.addClass("visible")},focusout:function(){n=setTimeout(function(){focusedRowActions.removeClass("visible")},30)}},"tr"),e.widget("custom.iconselectmenu",e.ui.selectmenu,{_renderItem:function(t,n){var i=e("
  • ",{text:n.label});return n.value&&e("",{src:pll_flag_base_url+n.value+".png","class":"ui-icon"}).appendTo(i),i.appendTo(t)}}),e("#flag_list").iconselectmenu({create:t,select:t}),e("#lang_list").change(function(){var n=e(this).val().split(":"),i=e("select option:selected").text().split(" - ");e("#lang_slug").val(n[0]),e("#lang_locale").val(n[1]),e('input[name="rtl"]').val([n[2]]),e("#lang_name").val(i[0]),e('#flag_list option[value="'+n[3]+'"]').attr("selected","selected"),e("#flag_list").iconselectmenu("destroy").iconselectmenu({create:t,select:t})}),e(".translation input").keypress(function(t){13===t.keyCode&&(t.preventDefault(),e("#submit").click())}),e("#the-list").on("click",".configure>a",function(){return e(".pll-configure").hide().prev().show(),e(this).closest("tr").hide().next().show(),!1}),e("#the-list").on("click",".cancel",function(){e(this).closest("tr").hide().prev().show()}),e("#the-list").on("click",".save",function(){var t=e(this).closest("tr"),n=t.attr("id").split("-"),i={action:"pll_save_options",pll_ajax_settings:!0,module:n[n.length-1],_pll_nonce:e("#_pll_nonce").val()};i=t.find(":input").serialize()+"&"+e.param(i),e.post(ajaxurl,i,function(n){var i=wpAjax.parseAjaxResponse(n,"ajax-response");e.each(i.responses,function(){switch(this.what){case"license-update":e("#pll-license-"+this.data).replaceWith(this.supplemental.html);break;case"success":t.hide().prev().show();case"error":e(".settings-error").remove(),e("h1").after(this.data),e(".notice.is-dismissible").each(function(){var t=e(this),n=e(''),i=commonL10n.dismiss||"";n.find(".screen-reader-text").text(i),t.append(n),n.on("click.wp-dismiss-notice",function(n){n.preventDefault(),t.fadeTo(100,0,function(){e(this).slideUp(100,function(){e(this).remove()})})})})}})})}),e(".pll-configure").keypress(function(t){13===t.keyCode&&(t.preventDefault(),e(this).find(".save").click()),27===t.keyCode&&(t.preventDefault(),e(this).find(".cancel").click())}),e("input[name='force_lang']").change(function(){function t(e,t){t?e.show():e.hide()}var n=e(this).val();t(e("#pll-domains-table"),3==n),t(e("#pll-hide-default"),3>n),t(e("#pll-rewrite"),2>n),t(e("#pll-redirect-lang"),2>n)}),e(".pll-deactivate-license").on("click",function(){var t={action:"pll_deactivate_license",pll_ajax_settings:!0,id:e(this).attr("id"),_pll_nonce:e("#_pll_nonce").val()};e.post(ajaxurl,t,function(t){e("#pll-license-"+t.id).replaceWith(t.html)})})}); diff --git a/pole-sbv-content/plugins/polylang/js/media.js b/pole-sbv-content/plugins/polylang/js/media.js new file mode 100644 index 00000000..794dedbb --- /dev/null +++ b/pole-sbv-content/plugins/polylang/js/media.js @@ -0,0 +1,6 @@ +// when clicking on attach link, filters find post list per media language +(function( $ ){ + $.ajaxPrefilter(function ( options, originalOptions, jqXHR ) { + options.data = 'pll_post_id=' + $( '#affected' ).val() + '&' + options.data; + }); +})( jQuery ) diff --git a/pole-sbv-content/plugins/polylang/js/media.min.js b/pole-sbv-content/plugins/polylang/js/media.min.js new file mode 100644 index 00000000..050f6bb7 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/js/media.min.js @@ -0,0 +1 @@ +!function(a){a.ajaxPrefilter(function(t){t.data="pll_post_id="+a("#affected").val()+"&"+t.data})}(jQuery); diff --git a/pole-sbv-content/plugins/polylang/js/nav-menu.js b/pole-sbv-content/plugins/polylang/js/nav-menu.js new file mode 100644 index 00000000..c549883f --- /dev/null +++ b/pole-sbv-content/plugins/polylang/js/nav-menu.js @@ -0,0 +1,68 @@ +jQuery( document ).ready(function( $ ) { + $( '#update-nav-menu' ).bind( 'click', function( e ) { + if ( e.target && e.target.className && -1 != e.target.className.indexOf( 'item-edit' ) ) { + $( "input[value='#pll_switcher'][type=text]" ).parent().parent().parent().each(function(){ + var item = $( this ).attr( 'id' ).substring( 19 ); + $( this ).children( 'p:not( .field-move )' ).remove(); // remove default fields we don't need + + h = $( '' ).attr({ + type: 'hidden', + id: 'edit-menu-item-title-' + item, + name: 'menu-item-title[' + item + ']', + value: pll_data.title + }); + $( this ).append( h ); + + h = $( '' ).attr({ + type: 'hidden', + id: 'edit-menu-item-url-' + item, + name: 'menu-item-url[' + item + ']', + value: '#pll_switcher' + }); + $( this ).append( h ); + + // a hidden field which exits only if our jQuery code has been executed + h = $( '' ).attr({ + type: 'hidden', + id: 'edit-menu-item-pll-detect-' + item, + name: 'menu-item-pll-detect[' + item + ']', + value: 1 + }); + $( this ).append( h ); + + ids = Array( 'hide_if_no_translation', 'hide_current', 'force_home', 'show_flags', 'show_names', 'dropdown' ); // reverse order + + // add the fields + for ( var i = 0; i < ids.length; i++ ) { + p = $( '

    ' ).attr( 'class', 'description' ); + $( this ).prepend( p ); + label = $( '

    ' + r + '

    ' ); + $( 'a', r ).click(function(){ + tagBox.flushTags( $( this ).closest( '.inside' ).children( '.tagsdiv' ), this ); + return false; + }); + + // add an if else condition to allow modifying the tags outputed when switching the language + if ( v = $( '.the-tagcloud' ).css( 'display' ) ) { + $( '.the-tagcloud' ).replaceWith( r ); + $( '.the-tagcloud' ).css( 'display', v ); + } + else { + $( '#' + id ).after( r ); + } + }); + } +})( jQuery ); + +// quick edit +(function( $ ) { + $( document ).bind( 'DOMNodeInserted', function( e ) { + var t = $( e.target ); + + // WP inserts the quick edit from + if ( 'inline-edit' == t.attr( 'id' ) ) { + var post_id = t.prev().attr( 'id' ).replace( "post-", "" ); + + if ( post_id > 0 ) { + // language dropdown + var select = t.find( ':input[name="inline_lang_choice"]' ); + var lang = $( '#lang_' + post_id ).html(); + select.val( lang ); // populates the dropdown + + filter_terms( lang ); // initial filter for category checklist + filter_pages( lang ); // initial filter for parent dropdown + + // modify category checklist an parent dropdown on language change + select.change(function() { + filter_terms( $( this ).val() ); + filter_pages( $( this ).val() ); + }); + } + } + + // filter category checklist + function filter_terms( lang ) { + if ( "undefined" != typeof( pll_term_languages ) ) { + $.each( pll_term_languages, function( lg, term_tax ) { + $.each( term_tax, function( tax, terms ) { + $.each( terms, function( i ) { + id = '#' + tax + '-' + pll_term_languages[ lg ][ tax ][ i ]; + lang == lg ? $( id ).show() : $( id ).hide(); + }); + }); + }); + } + } + + // filter parent page dropdown list + function filter_pages( lang ) { + if ( "undefined" != typeof( pll_page_languages ) ) { + $.each( pll_page_languages, function( lg, pages ) { + $.each( pages, function( i ) { + v = $( '#post_parent option[value="' + pll_page_languages[ lg ][ i ] + '"]' ); + lang == lg ? v.show() : v.hide(); + }); + }); + } + } + }); +})( jQuery ); + +// update rows of translated posts when the language is modified in quick edit +// acts on ajaxSuccess event +(function( $ ) { + $( document ).ajaxSuccess(function( event, xhr, settings ) { + function update_rows( post_id ) { + // collect old translations + var translations = new Array; + $( '.translation_' + post_id ).each(function() { + translations.push( $( this ).parent().parent().attr( 'id' ).substring( 5 ) ); + }); + + var data = { + action: 'pll_update_post_rows', + post_id: post_id, + translations: translations.join( ',' ), + post_type: $( "input[name='post_type']" ).val(), + screen: $( "input[name='screen']" ).val(), + _pll_nonce: $( "input[name='_inline_edit']" ).val() // reuse quick edit nonce + } + + // get the modified rows in ajax and update them + $.post( ajaxurl, data, function( response ) { + if ( response ) { + var res = wpAjax.parseAjaxResponse( response, 'ajax-response' ); + $.each( res.responses, function() { + if ( 'row' == this.what ) { + $( "#post-" + this.supplemental.post_id ).replaceWith( this.data ); + } + }); + } + }); + } + + var data = wpAjax.unserialize( settings.data ); // what were the data sent by the ajax request? + if ( 'undefined' != typeof( data['action'] ) && 'inline-save' == data['action'] ) { + update_rows( data['post_ID'] ); + } + }); +})( jQuery ); + +jQuery( document ).ready(function( $ ) { + // collect taxonomies - code partly copied from WordPress + var taxonomies = new Array(); + $( '.categorydiv' ).each(function(){ + var this_id = $( this ).attr( 'id' ), taxonomyParts, taxonomy; + + taxonomyParts = this_id.split( '-' ); + taxonomyParts.shift(); + taxonomy = taxonomyParts.join( '-' ); + taxonomies.push( taxonomy ); // store the taxonomy for future use + + // add our hidden field in the new category form - for each hierarchical taxonomy + // to set the language when creating a new category + $( '#' + taxonomy + '-add-submit' ).before( $( '' ) + .attr( 'type', 'hidden' ) + .attr( 'id', taxonomy + '-lang' ) + .attr( 'name', 'term_lang_choice' ) + .attr( 'value', $( '.post_lang_choice' ).val() ) + ); + }); + + // ajax for changing the post's language in the languages metabox + $( '.post_lang_choice' ).change(function() { + var value = $( this ).val(); + var lang = $( this ).children( 'option[value="' + value + '"]' ).attr( 'lang' ); + var dir = $( '.pll-translation-column > span[lang="' + lang + '"]' ).attr( 'dir' ); + + var data = { + action: 'post_lang_choice', + lang: value, + post_type: $( '#post_type' ).val(), + taxonomies: taxonomies, + post_id: $( '#post_ID' ).val(), + _pll_nonce: $( '#_pll_nonce' ).val() + } + + $.post( ajaxurl, data , function( response ) { + var res = wpAjax.parseAjaxResponse( response, 'ajax-response' ); + $.each( res.responses, function() { + switch ( this.what ) { + case 'translations': // translations fields + $( '.translations' ).html( this.data ); + init_translations(); + break; + case 'taxonomy': // categories metabox for posts + var tax = this.data; + $( '#' + tax + 'checklist' ).html( this.supplemental.all ); + $( '#' + tax + 'checklist-pop' ).html( this.supplemental.populars ); + $( '#new' + tax + '_parent' ).replaceWith( this.supplemental.dropdown ); + $( '#' + tax + '-lang' ).val( $( '.post_lang_choice' ).val() ); // hidden field + break; + case 'pages': // parent dropdown list for pages + $( '#parent_id' ).html( this.data ); + break; + case 'flag': // flag in front of the select dropdown + $( '.pll-select-flag' ).html( this.data ); + break; + case 'permalink': // Sample permalink + var div = $( '#edit-slug-box' ); + if ( '-1' != this.data && div.children().length ) { + div.html( this.data ); + } + break; + } + }); + + // modifies the language in the tag cloud + $( '.tagcloud-link' ).each(function() { + var id = $( this ).attr( 'id' ); + tagBox.get( id ); + }); + + // Modifies the text direction + $( 'body' ).removeClass( 'pll-dir-rtl' ).removeClass( 'pll-dir-ltr' ).addClass( 'pll-dir-' + dir ); + $( '#content_ifr' ).contents().find( 'html' ).attr( 'lang', lang ).attr( 'dir', dir ); + $( '#content_ifr' ).contents().find( 'body' ).attr( 'dir', dir ); + }); + }); + + // translations autocomplete input box + function init_translations() { + $( '.tr_lang' ).each(function(){ + var tr_lang = $( this ).attr( 'id' ).substring( 8 ); + var td = $( this ).parent().parent().siblings( '.pll-edit-column' ); + + $( this ).autocomplete({ + minLength: 0, + + source: ajaxurl + '?action=pll_posts_not_translated' + + '&post_language=' + $( '.post_lang_choice' ).val() + + '&translation_language=' + tr_lang + + '&post_type=' + $( '#post_type' ).val() + + '&_pll_nonce=' + $( '#_pll_nonce' ).val(), + + select: function( event, ui ) { + $( '#htr_lang_' + tr_lang ).val( ui.item.id ); + td.html( ui.item.link ); + }, + }); + + // when the input box is emptied + $( this ).blur(function() { + if ( ! $( this ).val() ) { + $( '#htr_lang_' + tr_lang ).val( 0 ); + td.html( td.siblings( '.hidden' ).children().clone() ); + } + }); + }); + } + + init_translations(); +}); diff --git a/pole-sbv-content/plugins/polylang/js/post.min.js b/pole-sbv-content/plugins/polylang/js/post.min.js new file mode 100644 index 00000000..6f10ccf6 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/js/post.min.js @@ -0,0 +1 @@ +!function(t){t.ajaxPrefilter(function(a){"string"!=typeof a.data||-1===a.url.indexOf("action=ajax-tag-search")&&-1===a.data.indexOf("action=ajax-tag-search")||!(lang=t(".post_lang_choice").val())&&!(lang=t(':input[name="inline_lang_choice"]').val())||(a.data="lang="+lang+"&"+a.data)})}(jQuery),function(t){tagBox.get=function(a){var n=a.substr(a.indexOf("-")+1),e={action:"get-tagcloud",lang:t(".post_lang_choice").val(),tax:n};t.post(ajaxurl,e,function(e,i){0!=e&&"success"==i||(e=wpAjax.broken),e=t('

    '+e+"

    "),t("a",e).click(function(){return tagBox.flushTags(t(this).closest(".inside").children(".tagsdiv"),this),!1}),(v=t(".the-tagcloud").css("display"))?(t(".the-tagcloud").replaceWith(e),t(".the-tagcloud").css("display",v)):t("#"+a).after(e)})}}(jQuery),function(t){t(document).bind("DOMNodeInserted",function(a){function n(a){"undefined"!=typeof pll_term_languages&&t.each(pll_term_languages,function(n,e){t.each(e,function(e,i){t.each(i,function(i){id="#"+e+"-"+pll_term_languages[n][e][i],a==n?t(id).show():t(id).hide()})})})}function e(a){"undefined"!=typeof pll_page_languages&&t.each(pll_page_languages,function(n,e){t.each(e,function(e){v=t('#post_parent option[value="'+pll_page_languages[n][e]+'"]'),a==n?v.show():v.hide()})})}var i=t(a.target);if("inline-edit"==i.attr("id")){var l=i.prev().attr("id").replace("post-","");if(l>0){var s=i.find(':input[name="inline_lang_choice"]'),o=t("#lang_"+l).html();s.val(o),n(o),e(o),s.change(function(){n(t(this).val()),e(t(this).val())})}}})}(jQuery),function(t){t(document).ajaxSuccess(function(a,n,e){function i(a){var n=new Array;t(".translation_"+a).each(function(){n.push(t(this).parent().parent().attr("id").substring(5))});var e={action:"pll_update_post_rows",post_id:a,translations:n.join(","),post_type:t("input[name='post_type']").val(),screen:t("input[name='screen']").val(),_pll_nonce:t("input[name='_inline_edit']").val()};t.post(ajaxurl,e,function(a){if(a){var n=wpAjax.parseAjaxResponse(a,"ajax-response");t.each(n.responses,function(){"row"==this.what&&t("#post-"+this.supplemental.post_id).replaceWith(this.data)})}})}var l=wpAjax.unserialize(e.data);"undefined"!=typeof l.action&&"inline-save"==l.action&&i(l.post_ID)})}(jQuery),jQuery(document).ready(function(t){function a(){t(".tr_lang").each(function(){var a=t(this).attr("id").substring(8),n=t(this).parent().parent().siblings(".pll-edit-column");t(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_posts_not_translated&post_language="+t(".post_lang_choice").val()+"&translation_language="+a+"&post_type="+t("#post_type").val()+"&_pll_nonce="+t("#_pll_nonce").val(),select:function(e,i){t("#htr_lang_"+a).val(i.item.id),n.html(i.item.link)}}),t(this).blur(function(){t(this).val()||(t("#htr_lang_"+a).val(0),n.html(n.siblings(".hidden").children().clone()))})})}var n=new Array;t(".categorydiv").each(function(){var a,e,i=t(this).attr("id");a=i.split("-"),a.shift(),e=a.join("-"),n.push(e),t("#"+e+"-add-submit").before(t("").attr("type","hidden").attr("id",e+"-lang").attr("name","term_lang_choice").attr("value",t(".post_lang_choice").val()))}),t(".post_lang_choice").change(function(){var e=t(this).val(),i=t(this).children('option[value="'+e+'"]').attr("lang"),l=t('.pll-translation-column > span[lang="'+i+'"]').attr("dir"),s={action:"post_lang_choice",lang:e,post_type:t("#post_type").val(),taxonomies:n,post_id:t("#post_ID").val(),_pll_nonce:t("#_pll_nonce").val()};t.post(ajaxurl,s,function(n){var e=wpAjax.parseAjaxResponse(n,"ajax-response");t.each(e.responses,function(){switch(this.what){case"translations":t(".translations").html(this.data),a();break;case"taxonomy":var n=this.data;t("#"+n+"checklist").html(this.supplemental.all),t("#"+n+"checklist-pop").html(this.supplemental.populars),t("#new"+n+"_parent").replaceWith(this.supplemental.dropdown),t("#"+n+"-lang").val(t(".post_lang_choice").val());break;case"pages":t("#parent_id").html(this.data);break;case"flag":t(".pll-select-flag").html(this.data);break;case"permalink":var e=t("#edit-slug-box");"-1"!=this.data&&e.children().length&&e.html(this.data)}}),t(".tagcloud-link").each(function(){var a=t(this).attr("id");tagBox.get(a)}),t("body").removeClass("pll-dir-rtl").removeClass("pll-dir-ltr").addClass("pll-dir-"+l),t("#content_ifr").contents().find("html").attr("lang",i).attr("dir",l),t("#content_ifr").contents().find("body").attr("dir",l)})}),a()}); diff --git a/pole-sbv-content/plugins/polylang/js/term.js b/pole-sbv-content/plugins/polylang/js/term.js new file mode 100644 index 00000000..1e080408 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/js/term.js @@ -0,0 +1,167 @@ +// quick edit +(function( $ ) { + $( document ).bind( 'DOMNodeInserted', function( e ) { + var t = $( e.target ); + + // WP inserts the quick edit from + if ( 'inline-edit' == t.attr( 'id' ) ) { + var term_id = t.prev().attr( 'id' ).replace( "tag-", "" ); + + if ( term_id > 0 ) { + // language dropdown + var select = t.find( ':input[name="inline_lang_choice"]' ); + var lang = $( '#lang_' + term_id ).html(); + select.val( lang ); // populates the dropdown + + // disable the language dropdown for default categories + var default_cat = $( '#default_cat_' + term_id ).html(); + if ( term_id == default_cat ) { + select.prop( 'disabled', true ); + } + } + } + }); +})( jQuery ); + + +// update rows of translated terms when adding / deleting a translation or when the language is modified in quick edit +// acts on ajaxSuccess event +(function( $ ) { + $( document ).ajaxSuccess(function( event, xhr, settings ) { + function update_rows( term_id ) { + // collect old translations + var translations = new Array; + $( '.translation_' + term_id ).each(function() { + translations.push( $( this ).parent().parent().attr( 'id' ).substring( 4 ) ); + }); + + var data = { + action: 'pll_update_term_rows', + term_id: term_id, + translations: translations.join( ',' ), + taxonomy: $( "input[name='taxonomy']" ).val(), + post_type: $( "input[name='post_type']" ).val(), + screen: $( "input[name='screen']" ).val(), + _pll_nonce: $( '#_pll_nonce' ).val() + } + + // get the modified rows in ajax and update them + $.post( ajaxurl, data, function( response ) { + if ( response ) { + var res = wpAjax.parseAjaxResponse( response, 'ajax-response' ); + $.each( res.responses, function() { + if ( 'row' == this.what ) { + $( "#tag-" + this.supplemental.term_id ).replaceWith( this.data ); + } + }); + } + }); + } + + var data = wpAjax.unserialize( settings.data ); // what were the data sent by the ajax request? + if ( 'undefined' != typeof( data['action'] ) ) { + switch ( data['action'] ) { + // when adding a term, the new term_id is in the ajax response + case 'add-tag': + res = wpAjax.parseAjaxResponse( xhr.responseXML, 'ajax-response' ); + $.each( res.responses, function() { + if ( 'term' == this.what ) { + update_rows( this.supplemental.term_id ); + } + }); + + // and also reset translations hidden input fields + $( '.htr_lang' ).val( 0 ); + break; + + // when deleting a term + case 'delete-tag': + update_rows( data['tag_ID'] ); + break; + + // in case the language is modified in quick edit and breaks translations + case 'inline-save-tax': + update_rows( data['tax_ID'] ); + break; + } + } + }); +})( jQuery ); + +jQuery( document ).ready(function( $ ) { + // translations autocomplete input box + function init_translations() { + $( '.tr_lang' ).each(function(){ + var tr_lang = $( this ).attr( 'id' ).substring( 8 ); + var td = $( this ).parent().parent().siblings( '.pll-edit-column' ); + + $( this ).autocomplete({ + minLength: 0, + + source: ajaxurl + '?action=pll_terms_not_translated' + + '&term_language=' + $( '#term_lang_choice' ).val() + + '&term_id=' + $( "input[name='tag_ID']" ).val() + + '&taxonomy=' + $( "input[name='taxonomy']" ).val() + + '&translation_language=' + tr_lang + + '&post_type=' + typenow + + '&_pll_nonce=' + $( '#_pll_nonce' ).val(), + + select: function( event, ui ) { + $( '#htr_lang_' + tr_lang ).val( ui.item.id ); + td.html( ui.item.link ); + }, + }); + + // when the input box is emptied + $( this ).blur(function() { + if ( ! $( this ).val() ) { + $( '#htr_lang_' + tr_lang ).val( 0 ); + td.html( td.siblings( '.hidden' ).children().clone() ); + } + }); + }); + } + + init_translations(); + + // ajax for changing the term's language + $( '#term_lang_choice' ).change(function() { + var value = $( this ).val(); + var lang = $( this ).children( 'option[value="' + value + '"]' ).attr( 'lang' ); + var dir = $( '.pll-translation-column > span[lang="' + lang + '"]' ).attr( 'dir' ); + + var data = { + action: 'term_lang_choice', + lang: value, + from_tag: $( "input[name='from_tag']" ).val(), + term_id: $( "input[name='tag_ID']" ).val(), + taxonomy: $( "input[name='taxonomy']" ).val(), + post_type: typenow, + _pll_nonce: $( '#_pll_nonce' ).val() + } + + $.post( ajaxurl, data, function( response ) { + var res = wpAjax.parseAjaxResponse( response, 'ajax-response' ); + $.each( res.responses, function() { + switch ( this.what ) { + case 'translations': // translations fields + $( "#term-translations" ).html( this.data ); + init_translations(); + break; + case 'parent': // parent dropdown list for hierarchical taxonomies + $( '#parent' ).replaceWith( this.data ); + break; + case 'tag_cloud': // popular items + $( '.tagcloud' ).replaceWith( this.data ); + break; + case 'flag': // flag in front of the select dropdown + $( '.pll-select-flag' ).html( this.data ); + break; + } + }); + + // Modifies the text direction + $( 'body' ).removeClass( 'pll-dir-rtl' ).removeClass( 'pll-dir-ltr' ).addClass( 'pll-dir-' + dir ); + }); + }); +}); diff --git a/pole-sbv-content/plugins/polylang/js/term.min.js b/pole-sbv-content/plugins/polylang/js/term.min.js new file mode 100644 index 00000000..5f62a105 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/js/term.min.js @@ -0,0 +1 @@ +!function(a){a(document).bind("DOMNodeInserted",function(t){var n=a(t.target);if("inline-edit"==n.attr("id")){var e=n.prev().attr("id").replace("tag-","");if(e>0){var l=n.find(':input[name="inline_lang_choice"]'),i=a("#lang_"+e).html();l.val(i);var r=a("#default_cat_"+e).html();e==r&&l.prop("disabled",!0)}}})}(jQuery),function(a){a(document).ajaxSuccess(function(t,n,e){function l(t){var n=new Array;a(".translation_"+t).each(function(){n.push(a(this).parent().parent().attr("id").substring(4))});var e={action:"pll_update_term_rows",term_id:t,translations:n.join(","),taxonomy:a("input[name='taxonomy']").val(),post_type:a("input[name='post_type']").val(),screen:a("input[name='screen']").val(),_pll_nonce:a("#_pll_nonce").val()};a.post(ajaxurl,e,function(t){if(t){var n=wpAjax.parseAjaxResponse(t,"ajax-response");a.each(n.responses,function(){"row"==this.what&&a("#tag-"+this.supplemental.term_id).replaceWith(this.data)})}})}var i=wpAjax.unserialize(e.data);if("undefined"!=typeof i.action)switch(i.action){case"add-tag":res=wpAjax.parseAjaxResponse(n.responseXML,"ajax-response"),a.each(res.responses,function(){"term"==this.what&&l(this.supplemental.term_id)}),a(".htr_lang").val(0);break;case"delete-tag":l(i.tag_ID);break;case"inline-save-tax":l(i.tax_ID)}})}(jQuery),jQuery(document).ready(function(a){function t(){a(".tr_lang").each(function(){var t=a(this).attr("id").substring(8),n=a(this).parent().parent().siblings(".pll-edit-column");a(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_terms_not_translated&term_language="+a("#term_lang_choice").val()+"&term_id="+a("input[name='tag_ID']").val()+"&taxonomy="+a("input[name='taxonomy']").val()+"&translation_language="+t+"&post_type="+typenow+"&_pll_nonce="+a("#_pll_nonce").val(),select:function(e,l){a("#htr_lang_"+t).val(l.item.id),n.html(l.item.link)}}),a(this).blur(function(){a(this).val()||(a("#htr_lang_"+t).val(0),n.html(n.siblings(".hidden").children().clone()))})})}t(),a("#term_lang_choice").change(function(){var n=a(this).val(),e=a(this).children('option[value="'+n+'"]').attr("lang"),l=a('.pll-translation-column > span[lang="'+e+'"]').attr("dir"),i={action:"term_lang_choice",lang:n,from_tag:a("input[name='from_tag']").val(),term_id:a("input[name='tag_ID']").val(),taxonomy:a("input[name='taxonomy']").val(),post_type:typenow,_pll_nonce:a("#_pll_nonce").val()};a.post(ajaxurl,i,function(n){var e=wpAjax.parseAjaxResponse(n,"ajax-response");a.each(e.responses,function(){switch(this.what){case"translations":a("#term-translations").html(this.data),t();break;case"parent":a("#parent").replaceWith(this.data);break;case"tag_cloud":a(".tagcloud").replaceWith(this.data);break;case"flag":a(".pll-select-flag").html(this.data)}}),a("body").removeClass("pll-dir-rtl").removeClass("pll-dir-ltr").addClass("pll-dir-"+l)})})}); diff --git a/pole-sbv-content/plugins/polylang/js/user.js b/pole-sbv-content/plugins/polylang/js/user.js new file mode 100644 index 00000000..b03dfcd6 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/js/user.js @@ -0,0 +1,20 @@ +jQuery( document ).ready(function( $ ) { + // biography + // FIXME there is probably a more efficient way to do this + var td = $( '#description' ).parent(); + var d = $( '#description' ).clone(); + var span = td.children( '.description' ).clone(); + td.children().remove(); + + $( '.biography' ).each(function(){ + lang = $( this ).attr( 'name' ).split( '___' ); + desc = d.clone(); + desc.attr( 'name', 'description_' + lang[0] ); + desc.html( $( this ).val() ); + td.append( '
    ' + lang[1] + '' ); + td.append( span ); +}); diff --git a/pole-sbv-content/plugins/polylang/js/user.min.js b/pole-sbv-content/plugins/polylang/js/user.min.js new file mode 100644 index 00000000..51c50b0c --- /dev/null +++ b/pole-sbv-content/plugins/polylang/js/user.min.js @@ -0,0 +1 @@ +jQuery(document).ready(function(e){var n=e("#description").parent(),d=e("#description").clone(),i=n.children(".description").clone();n.children().remove(),e(".biography").each(function(){lang=e(this).attr("name").split("___"),desc=d.clone(),desc.attr("name","description_"+lang[0]),desc.html(e(this).val()),n.append("
    "+lang[1]+""),n.append(i)}); diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-af.mo b/pole-sbv-content/plugins/polylang/languages/polylang-af.mo new file mode 100644 index 00000000..ae8552e8 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-af.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-af.po b/pole-sbv-content/plugins/polylang/languages/polylang-af.po new file mode 100644 index 00000000..f77b8f87 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-af.po @@ -0,0 +1,584 @@ +msgid "" +msgstr "" +"Project-Id-Version: polylang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-14 09:11+0100\n" +"Last-Translator: Kobus Joubert \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2: nplural=n>1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: _e;__;_x\n" +"X-Poedit-Basepath: .\n" +"X-Generator: Poedit 1.5.4\n" +"Language: af\n" +"X-Poedit-SearchPath-0: ..\n" +"X-Poedit-SearchPath-1: ../include\n" + +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang word voorsien met 'n uitgebreide %s dokumentasie %s (slegs in " +"Engels). Dit sluit inligting in oor hoe om jou veeltalige werf op te stel en " +"dit op 'n daaglikse basis te gebruik, 'n FAQ, sowel as 'n dokumentasie vir " +"programmeerders om hul plugins en temas aan te pas." + +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Jy sal ook nuttige inligting in die %s support forum %s vind. Maar moenie " +"vergeet om 'n soektog te maak voordat 'n nuwe onderwerp gepos word nie." + +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang is gratis en is vrygestel onder dieselfde lisensie as WordPress, " +"die %sGPL%s." + +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "As jy wonder hoe jy die projek kan help, %slees hierdie%s." + +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Laastens as jy van hierdie plugin hou, of as dit jou besigheid help, sal " +"donasies aan die skrywer opreg waardeer word." + +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Tale" + +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Toon taal name" + +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Toon vlae" + +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Dwing skakel na voorblad" + +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Verberg die huidige taal" + +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Toon as dropdown" + +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Filtreer inhoud volgens taal" + +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Toon alle tale" + +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Las 'n nuwe vertaling by" + +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Taal" + +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Vertalings" + +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Stel die taal" + +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Die widget is vertoon vir:" + +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Alle tale" + +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Admin taal" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPress default" + +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Instellings" + +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Opgradering van taal lêers…" + +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Oor Polylang" + +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "String vertalings" + +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "String vertaling" + +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Gee 'n geldige WordPress locale" + +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Die taal kode moet uniek wees" + +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Die taal moet 'n naam hê" + +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Die taal is geskep, maar die WordPress taallêer is nie afgelaai nie. " +"Installeer dit asseblief by hand." + +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Widget titel" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Taksonomieë" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Persoonlike velde" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Kommentaar status" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Ping status" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Sticky posts" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Gepubliseer datum" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "Post formaat" + +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Bladsy ouer" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Bladsy sjabloon" + +#: admin/settings.php:328 +msgid "Page order" +msgstr "Bladsy orde" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Featured prent" + +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Verander tale" + +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Las nuwe taal by" + +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Kies a taal" + +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "Jy kan 'n taal in die lys kies of dit direk verander hieronder." + +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Volle naam" + +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "" +"Die naam is hoe dit vertoon word op jou webwerf (byvoorbeeld: Afrikaans)." + +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Locale" + +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"WordPress Locale vir die taal (byvoorbeeld: af_ZA). Jy gaan nodig hê om die ." +"mo leêr te installeer vir die taal." + +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Taal kode" + +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Skrif rigting" + +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "links na regs" + +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "regs na links" + +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Kies die skrif rigting vir die taal" + +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Orde" + +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Posisie van die taal in die taal selektor" + +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Taal selektor" + +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Search translations" + +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Skoon stringe vertaling databasis" + +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Default taal" + +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Daar is posts, bladsye, kategorieë of tags sonder 'n taal gestel. Wil jy " +"hulle almal stel na die standaard taal?" + +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Spoor browser taal op" + +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "" +"Wanneer die voorblad besoek word, stel die taal volgens die browser se " +"voorkeur" + +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "URL veranderinge" + +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Verberg URL taal inligting vir standaard taal" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Media" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Aktiveer tale en vertalings vir media" + +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Sinkronisering" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Persoonlike post tipes" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Aktiveer tale en vertalings vir persoonlike post tipes." + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Persoonlike taksonomieë" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Aktiveer tale en vertalings vir persoonlike taksonomieë." + +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Verander" + +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Verwyder" + +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Kode" + +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Vlag" + +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Posts" + +#: admin/table-string.php:110 +msgid "Name" +msgstr "Naam" + +#: admin/table-string.php:111 +msgid "String" +msgstr "String" + +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Maak nuwe" + +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Taal Selektor" + +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Toon 'n taal selektor" + +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Titel:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "Voeg veeltalige vermoë by WordPress" + +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "Jy gebruik WordPress %s. Polylang vereis ten minste WordPress %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "" +"Polylang was gedeaktiveer omdat jy van te ou weergawe af opgegradeer het." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Gradeer asseblief eers op na %s toe voor jy opgradeer na %s toe." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Groep" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Sien alle groepe" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Jy is op die punt om hierdie taal permanent te verwyder. Is jy seker?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Gebruik hierdie om ongebruikte strings te verwyder uit die databasis uit, " +"byvoorbeeld na verwydering van 'n module." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Die sinkronisasie opsies voorsien om presies dieselfde waardes in stand te " +"hou (of vertalings in die geval van taksonomie en bladsy ouer) van meta-" +"inhoud tussen die vertalings van 'n post of bladsy." + +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Die taal kode bevat ongeldige karakters" + +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Die taal word ingestel van inhoud" + +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "Posts, bladsye, kategorieë en etikette urls is nie verander nie." + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Die taal is ingestel van die gids se naam in pretty permalinks" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Voorbeeld:" + +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Die taal word gestel uit die subdomein naam in pretty permalinks" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Die taal word gestel vanuit verskillende domians" + +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "Verwyder / taal / in pretty permalinks" + +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Hou / taal / in pretty permalinks" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "" +"Die voorblad url bevat die taal kode in plaas van die bladsy se naam of " +"bladsy id" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Voorbeeld: %s in plaas van %s" + +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Onmoontlik om die taal by te voeg." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Taal bygevoeg." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "Taal verwyder." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "Taal opgedateer." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "Vertalings opgedateer." + +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "Taal-kode - verkieslik 2-letters ISO 639-1 (byvoorbeeld: af)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" + +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "ud" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-ar.mo b/pole-sbv-content/plugins/polylang/languages/polylang-ar.mo new file mode 100644 index 00000000..d317526e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-ar.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-ar.po b/pole-sbv-content/plugins/polylang/languages/polylang-ar.po new file mode 100644 index 00000000..f5ac0048 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-ar.po @@ -0,0 +1,657 @@ +msgid "" +msgstr "" +"Project-Id-Version: Polylang v1.5\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-14 09:12+0100\n" +"Last-Translator: Anas H. Sulaiman \n" +"Language-Team: \n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: ../\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: .\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"تأتي Polylang مع %sتوثيق%s شامل (باللغة الإنكليزية فقط). يتضمن التوثيق " +"معلومات عن كيفية ضبط موقعك متعدد اللغات واستخدامه اليومي، وقسماً بالأسئلة " +"الشائعة، بالإضافة إلى توثيق خاص بالمبرمجين لضبط قوالبهم وإضافاتهم." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"ستجد معلومات مفيدة أيضاً في %sمنتدى الدعم%s. لكن لا تنس أن تبحث قبل أن تفتح " +"موضوعاً جديداً." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang إضافة مجانية، منشورة تحت رخصة ووردبرس نفسها، وهي رخصة %sGPL%s." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "إذا كنت تتسائل كيف يمكنك دعم المشروع، فقط %sاقرأ هذا%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"أخيراً، إن أعجبتك هذه الإضافة أو أنها مفيدة لأعمالك، تفضل بالتبرع لكاتبها ولك " +"كل التقدير." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "اللغات" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "يعرض أسماء اللغات" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "يعرض الأعلام" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "يجبر الرابط إلى الصفحة الأمامية" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "يخفي اللغة الحالية" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "يعرض قائمة منسدلة" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "يرشح المحتوى حسب اللغة" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "اعرض كل اللغات" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "أضف ترجمة جديدة" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "اللغة" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "الترجمات" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "يضبط اللغة" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "يعرض المربع الجانبي من أجل:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "كل اللغات" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "لغة لوحة الإشراف" + +# @ polylang +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "افتراضي ووردبرس" + +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "إعدادات" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "تحديث ملفات اللغة…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "عن Polylang" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "ترجمات الجمل" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "ترجمة الجمل" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "أدخل رمز مكان صحيح متوافق مع ووردبرس" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "يجب أن يكون رمز اللغة فريداً" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "يجب أن يكون للغة اسم" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"تم إنشاء اللغة، لكن لم يتم تحميل ملف اللغة الخاص بووردبرس. رجاءً ثبته يدوياً." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "عنوان المربع الجانبي" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "الفئات" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "حقول مخصصة" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "حالة التعليق" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "حالة التنبيه" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "مقالات مثبتة" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "تاريخ النشر" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "تنسيق المقالة" + +# @ polylang +#: admin/settings.php:326 +msgid "Page parent" +msgstr "أب الصفحة" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "قالب الصفحة" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "ترتيب الصفحة" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "الصورة المميزة" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "تحرير اللغة" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "أضف لغة جديدة" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "اختر لغة" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "يمكنك اختيار لغة من القائمة أو تحريرها مباشرة في الأسفل." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "الاسم الكامل" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "الاسم كما سيظهر على موقعك (مثلاً: العربية)." + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "المكان" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"رمز المكان الموافق لووردبرس والخاص باللغة (مثلاً: ar_SA). سيتوجب عليك تثبيت " +"ملف .mo لهذه اللغة." + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "رمز اللغة" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "جهة النص" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "من اليسر إلى اليمين" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "من اليمين إلى اليسار" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "اختر جهة النص الخاصة باللغة" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "الترتيب" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "موضع اللغة في مبدل اللغات" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "مبدل اللغات" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "ابحث في الترجمات" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "نظف قاعدة بيانات ترجمة الجمل" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "اللغة الافتراضية" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"هناك مقالات أو صفحات أو تصنيفات أو وسوم غير محددة اللغة. هل تريد تحديد اللغة " +"الافتراضية كلغة لهم؟" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "اكتشف لغة المتصفح" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "عندما زيارة الصفحة الأمامية، اضبط اللغة وفقاً لتفضيلات المتصفح" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "تعديلات الرابط" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "اخف معلومات اللغة في الرابط من أجل اللغة الافتراضية" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "الوسائط" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "فعّل اللغات والترجمات من أجل الوسائط" + +# @ polylang +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "التزامن" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "أنواع المقالة المخصصة CPT" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "فعّل اللغات والترجمات من أجل أنواع المقالة المخصصة" + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "الفئات المخصصة" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "فعل اللغات والترجمات من أجل الفئات المخصصة" + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "تحرير" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "حذف" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "الرمز" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "العلم" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "المقالات" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "الاسم" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "الجملة" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "أضف جديد" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "مبدل اللغات" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "يعرض مبدلاً للغات" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "العنوان:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "إضافة إمكانية تعدد اللغات لووردبرس" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "أنت تستخدم ووردبرس %s. تتطلب Polylang ووردبرس %s على الأقل." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "تم تعطيل Polylang لأنك حدثت من إصدار قديم جداً." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "رجاء حدّث أولاً إلى الإصدار %s قبل التحديث إلى الإصدار %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "المجموعة" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "عرض كل المجموعات" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "أنت على وشك حذف هذه اللغة إلى الأبد. هل أنت متأكد؟" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"استخدم هذا لإزالة الجمل غير المستخدمة من قاعدة البيانات. على سبيل المثال، " +"عندما تحذف أحد الإضافات." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"يسمح خيار المزامنة بالحفاظ على القيم نفسها (أو الترجمات في حالة الفئات وأب " +"الصفحة) للمحتوى التعريفي بين ترجمات مقالة أو صفحة." + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "يحتوي رمز اللغة على محارف خطأ" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "تضبط اللغة من المحتوى" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "لا تعدل روابط المقالات أو الصفحات أو التصنيفات أو الوسوم." + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "تضبط اللغة من اسم الدليل في الروابط الدائمة الجميلة" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "مثال:" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "تضبط اللغة من النطاق الفرعي في الروابط الدائمة الجميلة" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "تضبط اللغة من نطاقات مختلفة" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "احذف /language/ من الروابط الدائمة الجميلة" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "ابق على /language/ في الروابط الدائمة الجميلة" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "يتضمن رابط الصفحة الأمامية رمز اللغة بدلاً من اسم الصفحة أو رقمها" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "مثال: %s بدلاً من %s" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "من المستحيل إضافة اللغة." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "تمت إضافة اللغة." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "تم حذف اللغة." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "تم تحديث اللغة." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "تم تحديث الترجمة." + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "رمز اللغة - يفضل أن يكون حرفين حسب المعيار ISO 639-1 (مثلاً: ar)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "يجب أن تكون الصفحة الأمامية المختارة مترجمة إلى جميع اللغات." + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "نص الودجت" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "إضافات مستحسنة" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "تحدد اللغة من رمزها في الرابط" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "اخف اللغات التي ليس لها ترجمات" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-ary.mo b/pole-sbv-content/plugins/polylang/languages/polylang-ary.mo new file mode 100644 index 00000000..56fa98b7 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-ary.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-ary.po b/pole-sbv-content/plugins/polylang/languages/polylang-ary.po new file mode 100644 index 00000000..1a99924e --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-ary.po @@ -0,0 +1,705 @@ +# Translation of Stable (latest release) in Moroccan Arabic +# This file is distributed under the same license as the Stable (latest release) package. +msgid "" +msgstr "" +"PO-Revision-Date: 2015-11-12 20:53+0100\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" +"X-Generator: Poedit 1.5.4\n" +"Project-Id-Version: Stable (latest release)\n" +"POT-Creation-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" + +#: lingotek/lingotek.php:85 +msgid "Activated" +msgstr "مفعّل" + +#: lingotek/lingotek.php:85 +msgid "Activate" +msgstr "تفعيل" + +#: lingotek/lingotek.php:90 +msgid "Request Translation" +msgstr "طلب الترجمة" + +#: lingotek/lingotek.php:96 +msgid "Request Services" +msgstr "طلب خدمات" + +#: lingotek/lingotek.php:103 +msgid "Polylang is now fully integrated with Lingotek, a professional translation management system!" +msgstr "" + +#: lingotek/lingotek.php:106 +msgid "Automatically Translate My Site" +msgstr "ترجمة موقعي تلقائيا" + +#: lingotek/lingotek.php:107 +msgid "Polylang is now fully integrated with Lingotek!" +msgstr "" + +#: lingotek/lingotek.php:109 lingotek/lingotek.php:120 +msgid "Access free machine translation for your site for up to 100,000 characters." +msgstr "" + +#: lingotek/lingotek.php:110 +msgid "Machine translation is an excellent option if you're on a tight budget, looking for near-instant results, and are okay with less-than-perfect quality." +msgstr "" + +#: lingotek/lingotek.php:117 +msgid "Translation Management System" +msgstr "نظام إدارة الترجمات" + +#: lingotek/lingotek.php:118 +msgid "Do you need to connect to a professional translation management system?" +msgstr "" + +#: lingotek/lingotek.php:121 +msgid "Access an online translator workbench." +msgstr "" + +#: lingotek/lingotek.php:122 +msgid "Have linguists compare side-by-side versions of original and translated text." +msgstr "" + +#: lingotek/lingotek.php:123 +msgid "Save and re-use previously translated material (leverage translation memory (TM))." +msgstr "" + +#: lingotek/lingotek.php:130 +msgid "Professionally Translate My Site" +msgstr "" + +#: lingotek/lingotek.php:131 +msgid "Do you need to professionally translate your site?" +msgstr "" + +#: lingotek/lingotek.php:133 +msgid "Start the process of getting a professional translation bid." +msgstr "" + +#: lingotek/lingotek.php:134 +msgid "Activate account so Lingotek can get an accurate count of how many words you have on your site and which languages you wish to translate into." +msgstr "" + +#: lingotek/lingotek.php:135 +msgid "Once activated click on the request translation bid and a certified translation project manager will contact you to give a no obligations translation bid." +msgstr "" + +#: lingotek/lingotek.php:142 +msgid "Need Extra Services?" +msgstr "هل تحتاج لخدمات إضافية؟" + +#: lingotek/lingotek.php:143 +msgid "Do you need help translating your site?" +msgstr "" + +#: lingotek/lingotek.php:145 +msgid "Start the process of getting extra services." +msgstr "" + +#: lingotek/lingotek.php:146 +msgid "Do you need someone to run your localization project?" +msgstr "" + +#: lingotek/lingotek.php:147 +msgid "Do you need customized workflows?" +msgstr "" + +#: lingotek/lingotek.php:148 +msgid "Do you you have existing Translation Memories you would like to use?" +msgstr "" + +#: lingotek/lingotek.php:149 +msgid "Do you need help creating glossaries and terminologies?" +msgstr "" + +#: lingotek/lingotek.php:254 +msgid "Learn more..." +msgstr "تعلم أكثر..." + +#. Plugin Name of the plugin/theme +msgid "Polylang" +msgstr "بولي لانغ" + +#. Plugin URI of the plugin/theme +msgid "http://polylang.wordpress.com/" +msgstr "http://polylang.wordpress.com/" + +#. Description of the plugin/theme +msgid "Adds multilingual capability to WordPress" +msgstr "إضافة إمكانية تعدد اللغات لووردبرس" + +#. Author of the plugin/theme +msgid "Frédéric Demarle" +msgstr "فريديريك درمل" + +#. Author URI of the plugin/theme +msgid "http://polylang.wordpress.com" +msgstr "http://polylang.wordpress.com" + +#: admin/admin-filters-columns.php:141 admin/admin-filters-columns.php:236 +msgid "Add new translation" +msgstr "أضف ترجمة جديدة" + +#: admin/admin-filters-columns.php:161 +msgid "— No Change —" +msgstr "— لا توجد تغييرات —" + +#: admin/admin-filters-columns.php:174 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:159 admin/admin-filters-term.php:85 +#: admin/admin-filters-term.php:136 include/model.php:591 +msgid "Language" +msgstr "اللغة" + +#: admin/admin-filters-post.php:133 admin/admin.php:96 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:590 +msgid "Languages" +msgstr "اللغات" + +#: admin/admin-filters-post.php:239 +msgid "(no parent)" +msgstr "" + +#: admin/admin-filters-post.php:474 admin/admin-filters-term.php:763 +#: admin/table-languages.php:65 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "تحرير" + +#: admin/admin-filters-term.php:92 admin/admin-filters-term.php:144 +msgid "Sets the language" +msgstr "يضبط اللغة" + +#: admin/admin-filters-term.php:454 +msgid "None" +msgstr "لا يوجد" + +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "يعرض المربع الجانبي من أجل:" + +#: admin/admin-filters.php:55 include/model.php:592 +msgid "All languages" +msgstr "كل اللغات" + +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "لغة لوحة الإشراف" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "افتراضي ووردبرس" + +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "تحديث ملفات اللغة…" + +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "يجب أن تكون الصفحة الأمامية المختارة مترجمة إلى جميع اللغات." + +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "من المستحيل إضافة اللغة." + +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "تمت إضافة اللغة." + +#: admin/admin-model.php:145 +msgid "Language deleted." +msgstr "تم حذف اللغة." + +#: admin/admin-model.php:224 +msgid "Language updated." +msgstr "تم تحديث اللغة." + +#: admin/admin-model.php:241 +msgid "Enter a valid WordPress locale" +msgstr "أدخل رمز مكان صحيح متوافق مع ووردبرس" + +#: admin/admin-model.php:245 +msgid "The language code contains invalid characters" +msgstr "يحتوي رمز اللغة على محارف خطأ" + +#: admin/admin-model.php:249 +msgid "The language code must be unique" +msgstr "يجب أن يكون رمز اللغة فريداً" + +#: admin/admin-model.php:254 +msgid "The language must have a name" +msgstr "يجب أن يكون للغة اسم" + +#: admin/admin-nav-menu.php:52 admin/admin-nav-menu.php:73 +#: admin/admin-nav-menu.php:76 admin/admin-nav-menu.php:107 +#: admin/admin-nav-menu.php:169 install/upgrade.php:302 +msgid "Language switcher" +msgstr "مبدل اللغات" + +#: admin/admin-strings.php:54 +msgid "Site Title" +msgstr "عنوان الموقع" + +#: admin/admin-strings.php:55 +msgid "Tagline" +msgstr "" + +#: admin/admin-strings.php:56 +msgid "Date Format" +msgstr "شكل التاريخ" + +#: admin/admin-strings.php:57 +msgid "Time Format" +msgstr "شكل الوقت" + +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "عنوان المربع الجانبي" + +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "نص الودجت" + +#: admin/admin.php:204 admin/settings.php:102 +msgid "Settings" +msgstr "إعدادات" + +#: admin/admin.php:312 +msgid "Show all languages" +msgstr "اعرض كل اللغات" + +#: admin/admin.php:321 +msgid "Filters content by language" +msgstr "يرشح المحتوى حسب اللغة" + +#: admin/admin.php:419 admin/settings.php:183 +msgid "The language was created, but the WordPress language file was not downloaded. Please install it manually." +msgstr "تم إنشاء اللغة، لكن لم يتم تحميل ملف اللغة الخاص بووردبرس. رجاءً ثبته يدوياً." + +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "إضافات مستحسنة" + +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "عن Polylang" + +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "ترجمات الجمل" + +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "ترجمة الجمل" + +#: admin/settings.php:242 +msgid "Translations updated." +msgstr "تم تحديث الترجمة." + +#: admin/settings.php:300 +msgid "Settings saved." +msgstr "تم حفظ الاعدادات." + +#: admin/settings.php:321 +msgid "Taxonomies" +msgstr "الفئات" + +#: admin/settings.php:322 +msgid "Custom fields" +msgstr "حقول مخصصة" + +#: admin/settings.php:323 +msgid "Comment status" +msgstr "حالة التعليق" + +#: admin/settings.php:324 +msgid "Ping status" +msgstr "حالة التنبيه" + +#: admin/settings.php:325 +msgid "Sticky posts" +msgstr "مقالات مثبتة" + +#: admin/settings.php:326 +msgid "Published date" +msgstr "تاريخ النشر" + +#: admin/settings.php:327 +msgid "Post format" +msgstr "تنسيق المقالة" + +#: admin/settings.php:328 +msgid "Page parent" +msgstr "أب الصفحة" + +#: admin/settings.php:329 +msgid "Page template" +msgstr "قالب الصفحة" + +#: admin/settings.php:330 +msgid "Page order" +msgstr "ترتيب الصفحة" + +#: admin/settings.php:331 +msgid "Featured image" +msgstr "الصورة المميزة" + +#: admin/table-languages.php:70 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "أنت على وشك حذف هذه اللغة إلى الأبد. هل أنت متأكد؟" + +#: admin/table-languages.php:71 admin/table-string.php:168 +msgid "Delete" +msgstr "حذف" + +#: admin/table-languages.php:85 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "الاسم الكامل" + +#: admin/table-languages.php:86 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "المكان" + +#: admin/table-languages.php:87 +msgid "Code" +msgstr "الرمز" + +#: admin/table-languages.php:88 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "الترتيب" + +#: admin/table-languages.php:89 +msgid "Flag" +msgstr "العلم" + +#: admin/table-languages.php:90 +msgid "Posts" +msgstr "المقالات" + +#: admin/table-string.php:109 +msgid "String" +msgstr "الجملة" + +#: admin/table-string.php:110 +msgid "Name" +msgstr "الاسم" + +#: admin/table-string.php:111 +msgid "Group" +msgstr "المجموعة" + +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "الترجمات" + +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "عرض كل المجموعات" + +#: admin/table-string.php:200 +msgid "Filter" +msgstr "تصفية" + +#: admin/view-about.php:3 +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." +msgstr "تأتي Polylang مع %sتوثيق%s شامل (باللغة الإنكليزية فقط). يتضمن التوثيق معلومات عن كيفية ضبط موقعك متعدد اللغات واستخدامه اليومي، وقسماً بالأسئلة الشائعة، بالإضافة إلى توثيق خاص بالمبرمجين لضبط قوالبهم وإضافاتهم." + +#: admin/view-about.php:9 +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." +msgstr "ستجد معلومات مفيدة أيضاً في %sمنتدى الدعم%s. لكن لا تنس أن تبحث قبل أن تفتح موضوعاً جديداً." + +#: admin/view-about.php:16 +msgid "Polylang is free of charge and is released under the same license as WordPress, the %sGPL%s." +msgstr "Polylang إضافة مجانية، منشورة تحت رخصة ووردبرس نفسها، وهي رخصة %sGPL%s." + +#: admin/view-about.php:22 +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "إذا كنت تتسائل كيف يمكنك دعم المشروع، فقط %sاقرأ هذا%s." + +#: admin/view-about.php:27 +msgid "Finally if you like this plugin or if it helps your business, donations to the author are greatly appreciated." +msgstr "أخيراً، إن أعجبتك هذه الإضافة أو أنها مفيدة لأعمالك، تفضل بالتبرع لكاتبها ولك كل التقدير." + +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "تحرير اللغة" + +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:103 +msgid "Add new language" +msgstr "أضف لغة جديدة" + +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "اختر لغة" + +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "يمكنك اختيار لغة من القائمة أو تحريرها مباشرة في الأسفل." + +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "الاسم كما سيظهر على موقعك (مثلاً: العربية)." + +#: admin/view-tab-lang.php:66 +msgid "WordPress Locale for the language (for example: en_US). You will need to install the .mo file for this language." +msgstr "رمز المكان الموافق لووردبرس والخاص باللغة (مثلاً: ar_SA). سيتوجب عليك تثبيت ملف .mo لهذه اللغة." + +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "رمز اللغة" + +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "رمز اللغة - يفضل أن يكون حرفين حسب المعيار ISO 639-1 (مثلاً: ar)" + +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "جهة النص" + +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "من اليسر إلى اليمين" + +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "من اليمين إلى اليسار" + +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "اختر جهة النص الخاصة باللغة" + +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "موضع اللغة في مبدل اللغات" + +#: admin/view-tab-lang.php:103 +msgid "Update" +msgstr "تحديث" + +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "اللغة الافتراضية" + +#: admin/view-tab-settings.php:29 +msgid "There are posts, pages, categories or tags without language set. Do you want to set them all to default language ?" +msgstr "هناك مقالات أو صفحات أو تصنيفات أو وسوم غير محددة اللغة. هل تريد تحديد اللغة الافتراضية كلغة لهم؟" + +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "تعديلات الرابط" + +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "تضبط اللغة من المحتوى" + +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "لا تعدل روابط المقالات أو الصفحات أو التصنيفات أو الوسوم." + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "تضبط اللغة من اسم الدليل في الروابط الدائمة الجميلة" + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "تحدد اللغة من رمزها في الرابط" + +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:109 admin/view-tab-settings.php:118 +msgid "Example:" +msgstr "مثال:" + +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "تضبط اللغة من النطاق الفرعي في الروابط الدائمة الجميلة" + +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "تضبط اللغة من نطاقات مختلفة" + +#: admin/view-tab-settings.php:92 +msgid "Hide URL language information for default language" +msgstr "اخف معلومات اللغة في الرابط من أجل اللغة الافتراضية" + +#: admin/view-tab-settings.php:106 +msgid "Remove /language/ in pretty permalinks" +msgstr "احذف /language/ من الروابط الدائمة الجميلة" + +#: admin/view-tab-settings.php:115 +msgid "Keep /language/ in pretty permalinks" +msgstr "ابق على /language/ في الروابط الدائمة الجميلة" + +#: admin/view-tab-settings.php:130 +msgid "The front page url contains the language code instead of the page name or page id" +msgstr "يتضمن رابط الصفحة الأمامية رمز اللغة بدلاً من اسم الصفحة أو رقمها" + +#: admin/view-tab-settings.php:138 +msgid "Example: %s instead of %s" +msgstr "مثال: %s بدلاً من %s" + +#: admin/view-tab-settings.php:148 +msgid "Detect browser language" +msgstr "اكتشف لغة المتصفح" + +#: admin/view-tab-settings.php:154 +msgid "When the front page is visited, set the language according to the browser preference" +msgstr "عندما زيارة الصفحة الأمامية، اضبط اللغة وفقاً لتفضيلات المتصفح" + +#: admin/view-tab-settings.php:161 +msgid "Media" +msgstr "الوسائط" + +#: admin/view-tab-settings.php:167 +msgid "Activate languages and translations for media" +msgstr "فعّل اللغات والترجمات من أجل الوسائط" + +#: admin/view-tab-settings.php:175 +msgid "Custom post types" +msgstr "أنواع المقالة المخصصة CPT" + +#: admin/view-tab-settings.php:188 +msgid "Activate languages and translations for custom post types." +msgstr "فعّل اللغات والترجمات من أجل أنواع المقالة المخصصة" + +#: admin/view-tab-settings.php:195 +msgid "Custom taxonomies" +msgstr "الفئات المخصصة" + +#: admin/view-tab-settings.php:208 +msgid "Activate languages and translations for custom taxonomies." +msgstr "فعل اللغات والترجمات من أجل الفئات المخصصة" + +#: admin/view-tab-settings.php:214 +msgid "Synchronization" +msgstr "التزامن" + +#: admin/view-tab-settings.php:225 +msgid "The synchronization options allow to maintain exact same values (or translations in the case of taxonomies and page parent) of meta content between the translations of a post or page." +msgstr "يسمح خيار المزامنة بالحفاظ على القيم نفسها (أو الترجمات في حالة الفئات وأب الصفحة) للمحتوى التعريفي بين ترجمات مقالة أو صفحة." + +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "ابحث في الترجمات" + +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "نظف قاعدة بيانات ترجمة الجمل" + +#: admin/view-tab-strings.php:12 +msgid "Use this to remove unused strings from database, for example after a plugin has been uninstalled." +msgstr "استخدم هذا لإزالة الجمل غير المستخدمة من قاعدة البيانات. على سبيل المثال، عندما تحذف أحد الإضافات." + +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "أضف جديد" + +#: frontend/frontend-filters-search.php:80 +msgid "Search" +msgstr "البحث" + +#: include/model.php:755 +msgid "Uncategorized" +msgstr "غير مصنّف" + +#: include/plugins-compat.php:89 +msgid "Import posts, pages, comments, custom fields, categories, and tags from a WordPress export file." +msgstr "" + +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "يعرض أسماء اللغات" + +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "يعرض الأعلام" + +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "يجبر الرابط إلى الصفحة الأمامية" + +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "يخفي اللغة الحالية" + +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "اخف اللغات التي ليس لها ترجمات" + +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "يعرض قائمة منسدلة" + +#. translators: Calendar caption: 1: month name, 2: 4-digit year +#: include/widget-calendar.php:124 +msgctxt "calendar caption" +msgid "%1$s %2$s" +msgstr "%1$s %2$s" + +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "مبدل اللغات" + +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "يعرض مبدلاً للغات" + +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "العنوان:" + +#: include/widget-recent-comments.php:46 +msgid "Recent Comments" +msgstr "آخر التعليقات" + +#. translators: comments widget: 1: comment author, 2: post link +#: include/widget-recent-comments.php:84 +msgctxt "widgets" +msgid "%1$s on %2$s" +msgstr "%1$s on %2$s" + +#: include/widget-recent-posts.php:46 +msgid "Recent Posts" +msgstr "آخر المقالات" + +#: install/install.php:24 +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "أنت تستخدم ووردبرس %s. تتطلب Polylang ووردبرس %s على الأقل." + +#: install/upgrade.php:76 +msgid "Polylang has been deactivated because you upgraded from a too old version." +msgstr "تم تعطيل Polylang لأنك حدثت من إصدار قديم جداً." + +#: install/upgrade.php:78 +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "رجاء حدّث أولاً إلى الإصدار %s قبل التحديث إلى الإصدار %s." + +#: lingotek/lingotek.php:26 +msgid "You’ve just upgraded to the latest version of Polylang! Would you like to automatically translate your website for free?" +msgstr "" + +#: lingotek/lingotek.php:30 +msgid "Close" +msgstr "" + +#: lingotek/lingotek.php:33 +msgid "Learn more" +msgstr "قراءة المزيد" + +#: lingotek/lingotek.php:39 +msgid "Click on Activate Lingotek to start translating." +msgstr "" + +#: lingotek/lingotek.php:42 +msgid "Activate Lingotek" +msgstr "" + +#: lingotek/lingotek.php:54 +msgid "Congratulations!" +msgstr "ألف مبروك!" + diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-bel.mo b/pole-sbv-content/plugins/polylang/languages/polylang-bel.mo new file mode 100644 index 00000000..4b1be791 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-bel.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-bel.po b/pole-sbv-content/plugins/polylang/languages/polylang-bel.po new file mode 100644 index 00000000..364e7dec --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-bel.po @@ -0,0 +1,733 @@ +msgid "" +msgstr "" +"Project-Id-Version: polylang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Aljaksandr Markevitch \n" +"Language-Team: \n" +"Language: ru_RU\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: .\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: ..\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang забяспечаны шырокай %sдакументацыяй%s (толькі на англійскай мове). " +"У яе ўваходзіць інфармацыя пра наладу шматмоўнага блога і яго паўсядзённае " +"выкарыстанне, адказы на частыя пытанні і дакументацыя для праграмістаў." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Таксама, вы можаце знайсці карысную інфармацыю на %sфоруме%s. Зрэшты, не " +"забывайце сперш шукаць адказ, а потым пытаць." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang - бясплатны і распаўсюджваецца пад той жа ліцэнзіяй %sGPL%s, што і " +"WordPress." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "Аб тым, як вы можаце дапамагчы праекту, вы можаце прачытаць %sтут%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"І нарэшце, калі Polylang вам спадабаецца альбо дапамагае ў вашай працы, вы " +"заўседы можаце ахвяраваць грошаў аўтару праекта." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Мовы" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Паказваць назвы моў" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Паказваць сцягі" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Прымусова пераходзіць на галоўную старонку сайта пры змене мовы" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Схаваць бягучую мову" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Паказвае як выпадальны спіс" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Адбіраць змесціва паводле мовы" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Паказаць усе мовы" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Дадаць новы пераклад" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Мова" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Пераклады" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Вызначае мову" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Паказваць віджэт для" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Усе мовы" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Мова панэлі адміністратара" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "Па змаўчанню" + +# @ default +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Наладкі" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Абнаўленне моўных файлаў…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Аб Polylang" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Пераклады радкоў" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Пераклад радкоў" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Вызначце карэктную WordPress лакаль" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Код мовы павінны быць унікальным" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Мова павінна мець назву" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Мова была створана, але патрабуемые моўныя файлы не былі запампованы. Калі " +"ласка, запампуйце ды устанавіце іх самастойна." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Назва віджэту" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Таксаноміі" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Адвольныя палі" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Стан каментара" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Адказ на запыт" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Заліпаючыя запісы" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Дата публікацыі" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "Фармат запісу" + +# @ polylang +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Бацькоўская старонка" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Шаблон старонкі" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "Парадак старонак" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Выбраная выява" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Рэдагаваць мову" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Дадаць новую мову" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Выбраць мову" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "Вы можаце выбраць мову са спіса альбо дадаць яе ніжэй самастойна." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Поўная назва" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "Назва для адлюстравання на сайце (напрыклад: Беларускі)." + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Лакаль" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"Лакаль WordPress для мовы (напрыклад: be_BY). Вы павінны устанавіць файлы ." +"mo для панэлі адміністратара ды выкарыстоўваемай тэмы." + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Код мовы" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Напрамак тэксту" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "злева направа" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "справа налева" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Выберыце напрамак тэксту" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Парадак" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Месца мовы ў пераключальніку моў" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Выбар моў" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Пошук перакладаў" + +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Ачысціць базу дадзеных радкоў перакладу" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Мова па змаўчанню" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Былі знойдзены запісы, старонкі, катэгорыі ды тэгі без зазначанай мовы. " +"Вызначыць мову выкарыстання па змаўчанню?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Вызначыць мову браўзера" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "Вызначыць мову сайта паводле налад браўзера" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "Мадыфікацыі URL" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Схаваць назву мовы з URL" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Медыа" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Актывіраваць мовы і пераклады для медыа-файлаў" + +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Сінхранізацыя" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Адвольны тып запісаў" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Актывіраваць мовы і пераклады для адвольных тыпаў запісаў." + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Адвольныя таксаноміі" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Актывіраваць мовы і пераклады для адвольных таксанамій." + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Рэдагаваць" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Выдаліць" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Код" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Сцяг" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Запісы" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "Імя" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "Радок" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Дадаць новую" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Пераключальнік моў" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Паказвае пераключальнік моў" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Назва:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "Дадае магчымасць падтрымкі шматмоў'я ў WordPress" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "" +"Вы выкарыстоўваеце WordPress %s. Polylang патрабуе не менш за WordPress %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "" +"Polylang быў выключаны, таму што вы аднаўляецеся з немагчыма старой версіі." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Калі ласка, аднавіце перш да версіі %s, каб аднавіць да версіі %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Група" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Прагледзець усе групы" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Вы збіраецеся выдаліць гэтую мову. Вы ўпэўнены?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Выкарыстоўвайце гэтую функцыю, калі вам патрэбна выдаліць невыкарастаныя " +"радкі з базы дадзеных (напрыклад, пасля таго, як плагін быў выдалены)." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Налады сінхранізацыі дазваляюць падтрымліваць гэткія ж самыя значэнні (альбо " +"пераклады ў выпадку таксанаміі і бацькоўскай старонкі) мета-змесціва паміж " +"перакладамі запісу альбо старонкі." + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Код мовы ўтрымлівае нядзейныя сімвалы" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Мова наладжана згодна са змесцівам" + +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "Спасылкі запісаў, старонак, катэгорый і тэгаў не змяняюцца." + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Мова наладжана згодна з імём дырэкторыі pretty permalinks" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Напрыклад:" + +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Мова наладжана згодна з імём паддамена ў pretty permalinks" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Мова наладжана з розных даменаў" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "Выдаліць /language/ у pretty permalinks" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Захаваць /language/ у pretty permalinks" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "" +"Спасылка на галоўную старонку ўтрымлівае код мовы замест імя альбо id " +"старонкі" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Прыклад: %s заместа %s" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Немагчыма дадаць мову." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Мова дададзена." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "Мова выдалена." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "Мова аднаўлена." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "Пераклады аднаўлены." + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "" +"Код мовы - пажадана дзвюхлітарны згодна са стандартам ISO 639-1 (напрыклад: " +"en)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" +"Выбраная статычная галоўная старонка павінна быць перакладзена на ўсе мовы." + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "Тэкст віджэта" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" + +# @ polylang +#~ msgid "A translation does already exist for %s" +#~ msgstr "Пераклад для %s ужо існуе" + +# @ polylang +#~ msgid "2-letters ISO 639-1 language code (for example: en)" +#~ msgstr "Дзвюхлітарны код мовы ISO 639-1 (напрыклад: en)" + +# @ polylang +#~ msgid "Translation" +#~ msgstr "Пераклад" + +# @ polylang +#~ msgid "ID of pages in other languages:" +#~ msgstr "ID старонак на другіх мовах:" + +# @ polylang +#~ msgid "Page ID" +#~ msgstr "ID старонкі" + +# @ polylang +#~ msgid "Post ID" +#~ msgstr "ID запісу" + +# @ polylang +#~ msgid "No untranslated term" +#~ msgstr "Няма неперакладзеных слоў" + +#~ msgid "" +#~ "When using static front page, redirect the language page (example: %s) to " +#~ "the front page in the right language" +#~ msgstr "" +#~ "Пры выкарыстанні статычнай старонкі, перанакіроўваць старонку (напрыклад: " +#~ "%s) на галоўную старонку на правільнай мове." + +# @ polylang +#~ msgid "" +#~ "For some reasons, Polylang could not create a table in your database." +#~ msgstr "" +#~ "Па некаторых прычынах, Polylang не мае магчымасьці стварыць табліцу ў " +#~ "базе даных." + +# @ polylang +#~ msgid "Displays a language switcher at the end of the menu" +#~ msgstr "Паказвае пераключальнік моў" + +# @ polylang +#~ msgid "Theme locations and languages" +#~ msgstr "Разьмяшчэнне тэмы ды моў" + +# @ polylang +#~ msgid "" +#~ "Please go to the %slanguages page%s to set theme locations and languages" +#~ msgstr "" +#~ "Калі ласка, перайдзіце на %slanguages page%s для таго, каб зазначыць " +#~ "разьмяшчэнне тэмы ды моў" + +# @ polylang +#~ msgid "Menus" +#~ msgstr "Меню" + +# @ polylang +#~ msgid "Error: Restore of local flags failed!" +#~ msgstr "" +#~ "Памылка: Не атрымалася ўзнавіць карыстальніцкія іконкі-сьцягі з " +#~ "рэзэрвовай копіі!" + +# @ polylang +#, fuzzy +#~ msgid "Please move your local flags from %s to %s" +#~ msgstr "Калі ласка, перамясьціце " diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-bg_BG.mo b/pole-sbv-content/plugins/polylang/languages/polylang-bg_BG.mo new file mode 100644 index 00000000..01a6f375 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-bg_BG.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-bg_BG.po b/pole-sbv-content/plugins/polylang/languages/polylang-bg_BG.po new file mode 100644 index 00000000..b57943c9 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-bg_BG.po @@ -0,0 +1,591 @@ +msgid "" +msgstr "" +"Project-Id-Version: polylang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Pavel Sofroniev \n" +"Language-Team: Павел \n" +"Language: bg\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2: nplural=n>1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: _e;__;_x\n" +"X-Poedit-Basepath: .\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: ..\n" +"X-Poedit-SearchPath-1: ../include\n" + +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang има подробна %sдокументация на английски%s, съдържаща информация за " +"първоначалното настройване и поддръжка на многоезични уебсайтове, отговори " +"на често задавани въпроси, както и документация за разработчици за " +"интегриране на Polylang с техните разширения и теми. " + +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Освен това можете да намерите полезна информация във %sфорума за поддръжка" +"%s; но не забравяйте да потърсите дали някой вече не е задал Вашия въпрос " +"преди да изпратите запитване. " + +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang е безплатно разширение, публикувано под същия лиценз като " +"WordPress, %sGPL%s." + +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "Ако се питате как можете и Вие да помогнете, %sпрочетете това%s. " + +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Не на последно място, ако наистина харесвате това разширение и/или то помага " +"на Вашия бизнес, авторът му високо оценява всяко едно дарение." + +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Езици" + +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Показване на имената на езиците" + +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Показване на знаменца" + +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Всички връзки сочат към началната страница" + +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Скриване на текущия език" + +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Показване като падащо меню" + +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Филтриране на съдържанието по език" + +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Показване на всички езици" + +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Добавяне на нов превод" + +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Език" + +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Преводи" + +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Избор на език" + +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Джаджата се показва за:" + +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Всички езици" + +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Езика на администраторския панел" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "Езика по подразбиране" + +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Настройки" + +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Обновяване на езиковите файлове…" + +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Относно Polylang" + +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Превод на низове" + +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Превод на низове" + +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Въведете валидно (WordPress) местоположение" + +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Кодът на езика трябва да бъде уникален" + +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Кодът на езика трябва да има наименование" + +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Езикът беше добавен, но езиковият файл не може да бъде зареден. Моля " +"инсталирайте го ръчно. " + +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Заглавие на джаджата" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Таксономии" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Потребителски полета" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Статус на коментара" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Статус на ping-а" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Публикации, залепени на началната страница" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Дата на публикуване" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "Формат на публикацията" + +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Родител на страницата" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Шаблон на страницата" + +#: admin/settings.php:328 +msgid "Page order" +msgstr "Подредба на страницата" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Картинка на публикацията" + +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Редактиране на езика" + +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Добавяне на нов език" + +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Изберете език" + +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "" +"Можете да изберете език от падащото меню или да създадете нов използвайки " +"полетата по-долу. " + +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Наименование" + +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "" +"Наименованието както ще се показва в уебсайта (например: български, English)" + +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Местоположение" + +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"Местоположение според WordPress (например: bg_BG, en_GB). Ще трябва да " +"инсталирате съответния езиков файл (.mo). " + +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Код на езика" + +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Посока на писане" + +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "отляво надясно" + +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "отдясно наляво" + +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Изберете посоката на писане" + +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Подредба" + +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Кой подред ще се показва езикът в джаджата за смяна на езици" + +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Джаджа за смяна на езика" + +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Преводи за търсенето" + +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Изтриване на запазените преводи " + +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Език по подразбиране" + +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Намерени са публикации, страници, категории и етикети, за които не е посочен " +"език. Искате ли да бъдат прехвърлени към езика по подразбиране?" + +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Засичане на езика на браузъра" + +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "" +"Когато потребителят посети началната страница, езикът му да се настройва " +"според предпочитанията на браузъра. " + +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "Промени в адреса (URL)" + +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Скриване на информацията за езика от адресите за езика по подразбиране" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Файлове" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Включване на многоезичност за файловете" + +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Синхронизация" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Потребителски типове публикации" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Включване на многоезичност за потребителските типове публикации" + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Потребителски таксономии" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Включване на многоезичност за потребителските таксономии" + +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Редактиране" + +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Изтриване" + +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Код" + +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Знаменце" + +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Публикации" + +#: admin/table-string.php:110 +msgid "Name" +msgstr "Наименование" + +#: admin/table-string.php:111 +msgid "String" +msgstr "Низ" + +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Добави нов" + +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Джаджа за смяна на езика" + +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Показване на джаджа за смяна на езика" + +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Заглавие:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "Добавя многоезична функционалност към WordPress" + +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "" +"Вие използвате WordPress %s. Минималните изисквания за Polylang включват " +"WordPress %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "Polylang бе изключен, защото обновихте от твърде стара версия." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Моля първо обновете до %s, преди да обновите до %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Група" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Покажи всички групи" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Вие сте на път да изтриете необратимо този език. Сигурни ли сте?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Използвайте, за да премахнете неупотребявани низове от базата данни, " +"например след изключване на разширение (плъгин)." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Чрез синхронизацията мета съдържанието (и преводите за таксономии и " +"родителски страници) е едно и също за различните преводи на публикации и " +"страници." + +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Кодът на езика съдържа невалидни знаци" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Езикът се определя от съдържанието" + +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "" +"URL-тата на публикациите, страниците, категориите и етикетите не се променят" + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Езикът се определя от името на директорията в URL-то" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Пример:" + +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Езикът се определя от поддомейна в URL-то" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Езикът се определя от различни домейни" + +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "Премахване на /language/ от URL-то" + +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Добавяне на /language/ в URL-то" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "" +"Началната страница съдържа кода на езика вместо името или ID-то на страницата" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Пример: %s вместо %s" + +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Езикът не може да бъде добавен." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Езикът бе добавен." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "Езикът бе изтрит." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "Езикът бе обновен." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "Преводите бяха обновени." + +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "Код на езика - за предпочитане двубуквен по ISO 639-1 (например: bg)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" +"Избраната статична начална страница трябва да бъде преведена на всички езици." + +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "Текст на джаджата" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "Препоръчани разширения" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "Езикът се определя от кода в адреса (URL)" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "Скриване не езици без превод" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-cs_CZ.mo b/pole-sbv-content/plugins/polylang/languages/polylang-cs_CZ.mo new file mode 100644 index 00000000..0947d9be Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-cs_CZ.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-cs_CZ.po b/pole-sbv-content/plugins/polylang/languages/polylang-cs_CZ.po new file mode 100644 index 00000000..0bef38db --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-cs_CZ.po @@ -0,0 +1,665 @@ +msgid "" +msgstr "" +"Project-Id-Version: Polylang v1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-14 09:14+0100\n" +"Last-Translator: Přemysl Karbula\n" +"Language-Team: Přemysl Karbula \n" +"Language: cs_CZ\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: ../\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: .\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang disponuje rozsáhlou %sdokumentací%s (pouze v angličtině), která " +"obsahuje informace o nastavení vašeho vícejazyčného webu a o tom, jak jej " +"každodenně používat. Obsahuje i FAQ a dokumentaci pro programátory, kteří by " +"Polylangu chtěli přizpůsobit své pluginy a šablony." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Užitečné informace najdete také ve %sfórech%s. Nicméně nezapomeňte problém " +"nejprve zkusit vyhledat, než o něm vytvoříte nové vlákno." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang je k dispozici zdarma a je vydán pod stejnou %sGPL%s licencí jako " +"WordPress." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "" +"Pokud by Vás zajímalo, jak můžete pomoci při vývoji projektu, přečtěte si " +"%stoto%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Nakonec, pokud se Vám tento plugin líbí nebo pokud Vám pomáhá při práci, " +"jeho autor velmi ocení jakoukoliv finanční podporu." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Polylang — Jazyky" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Zobrazí názvy jazyků" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Zobrazí vlajky" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Vynutí odkaz na úvodní stránku" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Skryje aktuální jazyk" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Zobrazí jako rozbalovací seznam" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Filtruje obsah podle jazyka" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Zobrazit všechny jazyky" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Přidat nový překlad" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Jazyk" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Překlady" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Tímto nastavte jazyk." + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Widget zobrazí pro:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Všechny jazyky" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Jazyk admina" + +# @ polylang +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "Předvolené WordPress" + +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Nastavení" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Aktualizuji soubory s jazyky…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "O Polylangu" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Překlady textů" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Překlady textů" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Zadejte platný WordPress locale" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Kód jazyka musí být unikátní" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Jazyk musí mít název" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Jazyk byl vytvořen, ale WordPress jazykový soubor nebyl stažen. Prosím, " +"nainstalujte jej manuálně." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Titulek widgetu" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Taxonomie" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Uživatelská pole" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Stav komentáře" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Stav pingbacku" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Zvýrazněné příspěvky" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Datum publikování" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "Formát příspěvku" + +# @ polylang +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Nadřazená stránka" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Šablona stránky" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "Pořadí stránek" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Náhledový obrázek" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Upravit jazyk" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Přidejte nový jazyk" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Zvolte jazyk" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "Jazyk můžete vybrat ze seznamu nebo jej zde dole přímo zadat." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Celý název" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "" +"Název jazyka, jak bude zobrazen na vašem webu (např. Čeština, English)." + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Locale" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"WordPress locale tohoto jazyka (např. cs_CZ, en_US). Pro tento jazyk bude " +"potřeba nainstalovat .mo soubor." + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Kód jazyka" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Směr textu" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "zleva doprava" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "zprava doleva" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Vyberte směr textu pro daný jazyk." + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Pořadí" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Pozice jazyka v přepínači jazyků." + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Přepínač jazyků" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Vyhledat překlady" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Vyčistit databázi s překlady textů" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Výchozí jazyk" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Některé příspěvky, stránky, kategorie nebo štítky nemají nastavený jazyk. " +"Chcete jim všem nastavit výchozí jazyk?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Detekovat jazyk prohlížeče" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "Při návštěvě úvodní stránky nastavit jazyk podle předvoleb prohlížeče" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "Modifikování URL" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "U výchozího jazyka v URL skrýt jeho kód" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Média" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Zapnout jazyky a překlady u mediálních souborů" + +# @ polylang +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Synchronizace" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Vlastní typy obsahu" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Zapnout jazyky a překlady u vlastních typů obsahu" + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Vlastní taxonomie" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Zapnout jazyky a překlady u vlastních taxonomií" + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Upravit" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Smazat" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Kód" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Vlajka" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Příspěvky" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "Název" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "Řetězec" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Přidat nový" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Přepínač jazyků" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Zobrazí přepínač jazyků" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Název:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "Přidá možnosti vícejazyčnosti do WordPressu" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "Používáte WordPress %s. Polylang vyžaduje alespoň WordPress %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "" +"Polylang byl deaktivován, protože jste upgradovali z příliš staré verze." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Prosím upgradujte nejdříve na %s předtím, než budete upgradovat na %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Skupina" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Zobrazit všechny skupiny" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Tímto zcela a navždy vymažete daný jazyk. Jste si jistý?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Toto použijte, chcete-li z databáze odstranit nepoužité řetězce a překlady. " +"Například potom, co byl odinstalován nějaký plugin." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Sychronizační nastavení umožňuje udržovat stejné hodnoty (nebo překlady v " +"případě taxonomií a nadřazených stránek) meta obsahu mezi různými překlady " +"příspěvků či stránek." + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Kód jazyka obsahuje nepovolené znaky" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Jazyk nastavit podle obsahu" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "URL příspěvků, stránek, rubrik a štítků nebudou pozměněny." + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Jazyk bude nastaven podle adresáře v pěkných URL" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Příklad:" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Jazyk je nastaven podle subdomény v pěkných URL" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Jazyk bude nastaven podle odlišných domén" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "Odstranit /language/ v pěkných URL" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Ponechat /language/ v pěkných URL" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "" +"Úvodní stránka bude mít v URL jen kód jazyka a ne název stránky či její ID" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Příklad: %s namísto %s" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "" + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "" + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "" + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "" + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "" + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-et.mo b/pole-sbv-content/plugins/polylang/languages/polylang-et.mo new file mode 100644 index 00000000..6e2ff94e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-et.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-et.po b/pole-sbv-content/plugins/polylang/languages/polylang-et.po new file mode 100644 index 00000000..fff60331 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-et.po @@ -0,0 +1,668 @@ +msgid "" +msgstr "" +"Project-Id-Version: Polylang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-14 09:17+0100\n" +"Last-Translator: Ahto Naris \n" +"Language-Team: \n" +"Language: et\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: ../\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: .\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang on varustatud ulatusliku %sdokumentatsiooniga%s (ainult inglise " +"keeles). See sisaldab teavet kuidas luua ja kasutada igapäevaselt oma " +"mitmekeelset kodulehte, KKK-d ning ka dokumentatsiooni programmeerijatele " +"kuidas kohandada oma pluginad ja teemad." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Kasulikku informatsiooni on võimalik ka leida %sfoorumist%s. Paljud teemad " +"on enne foorumis juba läbi arutatud, seega kasuta enne uue teema postitamist " +"otsingut." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang on tasuta ja avaldatud sama litsentsi alusel nagu WordPress - %sGPL" +"%s." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "Kui sul on isu selles projektis abiks olla alusta %ssiit%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Kui see plugin meeldib teile või aitab teie äri kaaluge autorile annetuse " +"tegemist." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Keeled" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Näita keelte nimetusi" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Näita lippe" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Suuna viide avalehele" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Peidab hetkel kasutusel oleva keele" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Näita rippmenüüna" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Filtreerib sisu keele järgi" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Näita kõiki keeli" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Lisa uus tõlge" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Keel" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Tõlked" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Määrab keele" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Moodul kuvatakse:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Kõik keeled" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Halduri keel" + +# @ polylang +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPressi vaikimisi väärtus" + +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Sätted" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Keelefailide uuendamine…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Polylang info" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Sõnade tõlkimised" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Sõnade tõlkimine" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Sisesta määrustepärane WordPressi locale" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Keelekood peab olema unikaalne" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Keelel peab olema nimetus" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Keel loodi, aga WordPressi keelefaili allalaadimine ebaõnnestus. Palun " +"paigalda see käsitsi." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Mooduli pealkiri" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Taksonoomiad" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Kohandatud väli" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Kommentaari seis" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Ping-i seis" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Esilehepostitused" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Avaldamise kuupäev" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "Postituse vorming" + +# @ polylang +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Ülemleht" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Lehe mall" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "Lehe järjekorranr." + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Tunnuspilt" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Muuda keelt" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Lisa uus keel" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Vali keel" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "" +"Saate valida keele loendist või vahetult redigeerida allpool olevates " +"lahtrites." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Täisnimi" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "Täisnimi kuvatakse sinu lehel (näiteks: Eesti)." + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Locale" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"WordPress Locale keelele (näiteks: en_US). Peate paigaldama .mo tõlkefaili " +"selle keele jaoks." + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Keelekood" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Teksti suund" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "vasakult paremale" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "paremalt vasakule" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Vali keele teksti suund " + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Järjekord" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Keele positsioon keele vahetajas" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Keele vahetaja" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Otsi tõlkeid" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Puhasta sõnade tõlkimise andmebaas" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Vaikimisi keel" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Leidub postitusi, lehti, rubriike või silte millel pole keel määratud. Kas " +"soovite neile määrata vaikimisi keele?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Tuvasta veebilehitseja keel" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "" +"Kui külastatakse esilehte, kasuta keele määramiseks veebilehitseja eelistusi" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "aadressi (URL) modifikatsioon" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Peida keeleinfo aadressides (URL-ides), kui on kasutusel vaikekeel." + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Meedia" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Aktiveeri keeled ja tõlked meedia jaoks." + +# @ polylang +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Sünkroniseerimine" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Kohandatud postitusetüübid" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Aktiveeri keeled ja tõlked kohandatud postitusetüüpide jaoks." + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Kohandatud taksonoomiad" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Aktiveeri keeled ja tõlked kohandatud taksonoomiate jaoks." + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Muuda" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Kustuta" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Kood" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Lipp" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Postitused" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "Nimi" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "Sõna(d)" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Lisa uus" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Keele vahetaja" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Näitab keele vahetajat" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Pealkiri:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "Lisab mitmekeelsuse WordPressile" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "" +"Kasutusel on WordPress %s. Polylang vajab töötamiseks vähemalt WordPress " +"versiooni %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "Polylang on deaktiveeritud kuna uuendasite liiga vana versiooni pealt." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "" +"Palun uuendage kõigepealt versioonile %s ja alles seejärel versioonile %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Grupp" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Vaata kõiki gruppe" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Oled sa kindel, et tahad selle keele jäädavalt kustuda?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Kasutage seda kasutamata sõnade eemaldamiseks andmebaasist, näiteks pärast " +"plugina eemaldamist." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Sünkroniseerimise võimalused lubavad säilitada meta seosed tõlgitud " +"postituste ja lehtede vahel. " + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Keelekood sisaldab sobimatuid tähemärke" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Keel on määratud sisust" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "Postituste, lehtede, rubriikide ja siltide aadresse (URLe) ei muudeta." + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Keel on määratud kataloogidega" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Näide:" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Keel on määratud alamdomeenidega" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Keel on määratud domeenidega" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "Eemalda /language/ ilusatest püsiviidetest" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Säilita /language/ ilusates püsiviidetes" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "Esilehe aadress (URL) sisaldab lehe nime või lehe id asemel keelekoodi" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Näide: %s asendab %s" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Seda keelt pole võimalik lisada." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Keel lisatud." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "Keel kustutatud." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "Keel uuendatud." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "Tõlked uuendatud." + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "" +"Keelekood - soovitatavalt ISO 639-1 standardile vastav 2-täheline (näiteks: " +"et)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-he_IL.mo b/pole-sbv-content/plugins/polylang/languages/polylang-he_IL.mo new file mode 100644 index 00000000..1cee0a71 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-he_IL.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-he_IL.po b/pole-sbv-content/plugins/polylang/languages/polylang-he_IL.po new file mode 100644 index 00000000..fd189a41 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-he_IL.po @@ -0,0 +1,655 @@ +msgid "" +msgstr "" +"Project-Id-Version: polylang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Ariel Klikstein \n" +"Language-Team: Pojo Team \n" +"Language: he\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: .\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.7.4\n" +"X-Poedit-SearchPath-0: ..\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"התוסף מסופק עם %sתיעוד מסודר%s (באנגלית בלבד). התיעוד כולל מידע על הקמת אתר " +"רב לשוני והשתמשות בו על בסיס יומיומי, שאלות נפוצות, וכן תיעוד עבור מפתחים " +"להתאמת תוספים וערכות נושא לתוסף." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"תוכלו למצוא מידע שימושי ב %sפורום תמיכה%s של התוסף. רק אל תשכחו לחפש לפני " +"שאתם שואלים." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"התוסף ללא תשלום והוא משוחרר לשימוש חופשי ברישיון %sGPL%s בדומה לוורדפרס." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "אם הינכם מעוניינים לעזור לפרויקט הזה %sקראו כאן%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"אם אתם ממש אוהבים את התוסף הזה או שזה עוזר לעסק שלכם, אני מאוד אעריך אם " +"תתמכו בי." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "שפות" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "הצגת שם שפה" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "הצגת דגלים" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "לקשר תמיד לעמוד הבית" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "הסתרת שפה נוכחית" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "תצוגה בתפריט נפתח" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "סינון תוכן לפי שפה" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "הצגת כל השפות" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "הוספת תרגום חדש" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "שפה" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "תרגומים" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "הגדרות שפה" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "וידגט' זה יוצג בשפה:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "כל השפות" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "שפת פאנל ניהול" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "ברירת מחדל" + +# @ default +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "הגדרות" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "עדכון קבצי שפה…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "אודות התוסף" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "מחרוזות תרגומים" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "מחרוזות תרגום" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "יש להזין מקום שתקף בוורדפרס" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "קוד שפה חייב להיות ייחודי" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "שם שפה חובה" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"השפה נוצרה, אבל את הקובץ שפה של וורדפרס לא היה ניתן להוריד. יש להתקין את " +"הקבצים באופן ידני." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "וידג'ט טקסט" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "טקסונומיות" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "שדות מיוחדים" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "סטטוס תגובה" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "סטטוס פינג" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "פוסטים דביקים" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "תאריך פרסום" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "סוג תוכן" + +# @ default +#: admin/settings.php:326 +msgid "Page parent" +msgstr "עמוד אב" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "תבנית עמוד" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "סידור עמוד" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "תמונה ראשית" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "עריכת שפה" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "הוספת שפה חדשה" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "בחירת שפה" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "אפשר לבחור שפה מהרשימה או ישירות לערוך אותה בהמשך." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "שם מלא" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "השם שיוצג באתר שלך (לדוגמא: עברית)" + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "מיקום" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"קבצי שפה של וורדפרס (לדוגמא he_IL ). חייב להיות קובץ .MO בשביל הגדרת שפה" + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "קוד שפה" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "כיוון טקסט" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "שמאל לימין" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "ימין לשמאל" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "בחירת כיווניות טקסט עבור השפה" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "סידור" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "מיקום שפה במחליף השפות" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "מחליף שפות" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "חיפוש תרגומים" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "ניקוי מחרוזות תרגום מהדטא בייס" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "שפת ברירת מחדל" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"יש הודעות, דפים, קטגוריות או תגיות שאינם מוגדרים בשפה מסויימת. האם להגדיר את " +"כולם שפת ברירת המחדל? " + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "זיהוי שפת דפדפן" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "כאשר הגולש הגיע לעמוד הבית, להציג את השפה על פי שפת הדפדפן של הגולש" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "שינויי URL" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "הסרת שינוי כתובת עבור שפת ברירת מחדל" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "מדיה" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "הפעלת תרגום שפות עבור מערכת המדיה" + +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "סנכרון" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "סוגי פוסטים מותאמים אישית" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "הפעלת תרגום שפות עבור סוגי פוסטים מותאמים אישית" + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "טקסונומיות מותאמות אישית" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "הפעלת תרגום שפות עבור טקסונומיות מותאמות אישית" + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "עריכה" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "מחיקה" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "קוד" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "דגל" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "פוסטים" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "שם" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "מחרוזת" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "הוספת חדש" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "מחליף שפות" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "הצגת מחליף השפות" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "כותרת:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "הוספת יכולות שפות מרובה בוורדפרס" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "המערכת על וורדפרס גרסה %s. התוסף דורש לכל הפחות וורדפרס גרסה %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "תוסף השפות (Polylang) בוטל בגלל ששדרגת מגרסה ישנה מידי" + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "אנא שדרגו ראשית כל ל %s לפני שאתם משדרגים ל %s" + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "קבוצה" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "הצגת כל הקבוצות" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "השפה עומדת להמחק לצמיתות. האם למחוק בכל זאת?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"יש להשתמש באפשרוית זו כדי להסיר מחרוזות שאינן בשימוש ממסד הנתונים, לדוגמא: " +"לאחר הסרת התוסף מהמערכת." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"אפשרויות הסנכרון תאפשר לשמור על אותם ערכים מדויקים (או תרגומים במקרה של " +"טקסונומיות ועמודי אב) של תוכן מטא בין התרגומים של הפוסט או העמוד." + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "קוד השפה מכיל תווים לא חוקיים" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "השפה מוגדרת רק בתוכן" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "ה URL של הפוסטים, העמודים, הקטגוריות והתגיות אינו משתנה. " + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "במבנה הקישורים השפה מופיעה כתיקיה" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "לדוגמא:" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "במבנה הקישורים השפה מופיעה כסאב דומיין" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "השפות מופיעות בדומיינים שונים" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "למחוק /language/ לפני שם השפה במבנה הקישורים" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "לשמור /language/ לפני שם השפה במבנה הקישורים" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "כתובת עמוד הבית מכילה את קוד השפה במקום שם העמוד או ID העמוד" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "לדוגמא: %s במקום%s" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "לא ניתן להוסיף את השפה." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "שדה נוספה." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "שפה נמחקה." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "שפה מעודכנת." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "תרגומים מעודכנים." + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "קוד שפה - רצוי 2 אותיות ISO 639-1 (לדוגמא: he)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "עמוד סטטי שנבחר לעמוד בית חיב להיות מתורגם לעל השפות." + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "וידג'ט טקסט" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "תוספים מומלצים" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "השפה מוגדרת מהקוד של של ה URL" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "להסתיר שפות ללא תרגום" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-hu_HU.mo b/pole-sbv-content/plugins/polylang/languages/polylang-hu_HU.mo new file mode 100644 index 00000000..5d2b0d24 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-hu_HU.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-hu_HU.po b/pole-sbv-content/plugins/polylang/languages/polylang-hu_HU.po new file mode 100644 index 00000000..b9487290 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-hu_HU.po @@ -0,0 +1,586 @@ +msgid "" +msgstr "" +"Project-Id-Version: polylang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Erdei Csaba \n" +"Language-Team: Csaba Erdei \n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2: nplural=n>1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: _e;__;_x\n" +"X-Poedit-Basepath: .\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: ..\n" +"X-Poedit-SearchPath-1: ../include\n" + +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"A bővítményhez részletes %sdokumentáció%s áll rendelkezésre (angol nyelven), " +"amely tartalmazza a telepítéshez és a mindennapos használathoz szükséges " +"leírásokat, és a fejlesztők számára szükséges információkat is." + +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Továbbá a %stámogató fórumban%s is találhatók hasznos információk, de új " +"téma indítása előtt érdemes a keresést is használni." + +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang bővítmény ingyen használható és a WordPress-el azonos, %sGPL%s " +"licensz alatt lett kiadva." + +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "" +"Ha hasznosnak bizonyult a bővítmény, akkor %sfejlesztéssel, teszteléssel " +"vagy fórum válaszokkal%s is lehet segíteni folyamatos fejlődését." + +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Vagy a lentebbi gombra kattintva adományozással is hozzá lehet járulni a " +"fejlesztéséhez, amit ez úton is köszönünk!" + +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Nyelvek" + +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Nyelvek nevének mutatása" + +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Nyelv zászlók mutatása" + +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Főoldal linkje tartalmazza a nyelvet is" + +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Aktuális nyelv elrejtése" + +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Megjelenítés legördülő menüként" + +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Tartalom szűrése nyelv szerint" + +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Minden nyelv" + +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Új fordítás hozzáadása" + +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Nyelv" + +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Fordítások" + +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Nyelvek beállítása" + +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Widget megjelenítése ennél a nyelvnél:" + +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Minden nyelv" + +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Adminisztrációs felület nyelve" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPress alapértelmezett" + +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Beállítások" + +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Nyelv fájlok frissítése…" + +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Polylang bővítményről" + +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Szöveg fordítások" + +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Szöveg fordítások" + +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "WordPress nyelvkód (pl. hu_HU)" + +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "A nyelvkódnak egyedinek kell lennie" + +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Nevet is kell adni a nyelvnek" + +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"A nyelv hozzá lett adva, de a WordPress fordítások (.mo fájlok) ehhez a " +"nyelvhez nem lettek letöltve, ezt kézzel kell megtenni." + +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Widget címe" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Taxonómiák (kategóriák, címkék)" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Egyedi mezők" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Hozzászólás állapot" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Értesítés (ping) állapot" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Ragadós bejegyzések" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Közzététel időpontja" + +#: admin/settings.php:325 +msgid "Post format" +msgstr "Formátum" + +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Szülő oldal" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Oldal sablonminta" + +#: admin/settings.php:328 +msgid "Page order" +msgstr "Oldal sorrend" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Kiemelt kép" + +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Nyelv szerkesztése" + +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Új nyelv hozzáadása" + +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Nyelv kiválasztása" + +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "Kiválasztható egy nyelv, vagy lentebb megadhatók a részletei:" + +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Nyelv teljes neve" + +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "A nyelv teljes neve, ahogy majd a honlapon is megjelenik (pl. Magyar)" + +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "WP nyelvkód" + +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"WordPress nyelvkód (pl. hu_HU). A nyelvhez tartozó .mo fordítás fájlt kézzel " +"kell telepíteni." + +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Nyelvkód" + +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Nyelv írásmódja" + +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "balról jobbra" + +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "jobbról balra" + +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Nyelv írásmódjának kiválasztása" + +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Sorrend" + +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Hányadikként jelenjen meg a nyelv" + +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Nyelv választó" + +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Fordítás keresése" + +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Szöveg fordítások törlése" + +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Alapértelmezett nyelv" + +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Vannak bejegyzések, oldalak, kategóriák és címkék, amelyekhez még nincs " +"nyelv megadva. Ezek használják az alapértelmezett nyelvet." + +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Böngésző nyelvének használata" + +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "" +"Amikor meglátogatják a honlapot, akkor a látogató böngészőjének nyelvét " +"vegyük alapul." + +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "Linkek módosítása" + +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Nyelvkód eltávolítása a linkekből az alapértelmezett nyelv esetén" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Média" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Médiák fordításának bekapcsolása" + +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Szinkronizálás" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Egyedi bejegyzés típusok" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Egyedi bejegyzés típusok fordításának bekapcsolása." + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Egyedi taxonómiák (kategóriák, címkék)" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Egyedi taxonómiák (kategóriák, címkék) fordításának bekapcsolása." + +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Szerkesztés" + +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Törlés" + +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Nyelvkód" + +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Zászló" + +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Bejegyzések" + +#: admin/table-string.php:110 +msgid "Name" +msgstr "Név" + +#: admin/table-string.php:111 +msgid "String" +msgstr "Szöveg" + +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Új hozzáadása" + +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Nyelv választó" + +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Nyelv választó elhelyezése" + +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Cím:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "Többnyelvű tartalom, fordítások kezelése." + +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "" +"Jelenleg a WordPress %s verziója van használva. Polylang bővítmény " +"használatához legalább WordPress %s verzió szükséges." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "" +"Polylang bővítmény ki lett kapcsolva, mert túl régi verzióról lett frissítve." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "" +"Először a(z) %s verzióra kell elvégezni a frissítést, majd csak utána lehet " +"a(z) %s verzióra is." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Csoport" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Összes csoport" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Valóban töröljük véglegesen ezt a nyelvet?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Már nem használt szöveg fordítások törlése adatbázisból, pl. eltávolított " +"bővítményhez tartozó szövegek fordításai." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"A szinkronizálás segítségével az oldalakhoz vagy bejegyzésekhez tartozó " +"metadatok a fordítások esetén is ugyanazokat az értékeket veszik fel." + +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Nyelvkód hibás karaktert tartalmaz." + +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "A nyelvet a tartalom nyelve határozza meg." + +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "Bejegyzés, oldal, kategória és címke linkek nem módosulnak." + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "A nyelvet a linkben található mappanév határozza meg." + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Példa:" + +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "A nyelvet a linkben található aldomén határozza meg." + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "A nyelvet a linkben található domén határozza meg." + +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "/language/ eltávolítása a linkekből." + +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "/language/ megtartása a linkekben." + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "" +"A főoldal linkje a nyelv kódját tartalmazza az oldal neve vagy azonosítója " +"helyett." + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Például: %s (%s helyett)" + +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Nem lehetséges a nyelv hozzáadása." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Nyelv hozzáadva." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "Nyelv törölve." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "Nyelv frissítve." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "Fordítások frissítve." + +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "Nyelvkód - 2 karakteres ISO 639-1 nyelvkód (pl. hu)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" + +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-id_ID.mo b/pole-sbv-content/plugins/polylang/languages/polylang-id_ID.mo new file mode 100644 index 00000000..fa97dcce Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-id_ID.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-id_ID.po b/pole-sbv-content/plugins/polylang/languages/polylang-id_ID.po new file mode 100644 index 00000000..fb48550a --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-id_ID.po @@ -0,0 +1,701 @@ +# Translation of Stable (latest release) in Indonesian +# This file is distributed under the same license as the Stable (latest release) package. +msgid "" +msgstr "" +"PO-Revision-Date: 2015-10-09 08:56:35+0000\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: GlotPress/1.0-alpha-1100\n" +"Project-Id-Version: Stable (latest release)\n" + +#: lingotek/lingotek.php:85 +msgid "Activated" +msgstr "" + +#: lingotek/lingotek.php:85 +msgid "Activate" +msgstr "" + +#: lingotek/lingotek.php:90 +msgid "Request Translation" +msgstr "" + +#: lingotek/lingotek.php:96 +msgid "Request Services" +msgstr "" + +#: lingotek/lingotek.php:103 +msgid "Polylang is now fully integrated with Lingotek, a professional translation management system!" +msgstr "" + +#: lingotek/lingotek.php:106 +msgid "Automatically Translate My Site" +msgstr "" + +#: lingotek/lingotek.php:107 +msgid "Polylang is now fully integrated with Lingotek!" +msgstr "" + +#: lingotek/lingotek.php:109 lingotek/lingotek.php:120 +msgid "Access free machine translation for your site for up to 100,000 characters." +msgstr "" + +#: lingotek/lingotek.php:110 +msgid "Machine translation is an excellent option if you're on a tight budget, looking for near-instant results, and are okay with less-than-perfect quality." +msgstr "" + +#: lingotek/lingotek.php:117 +msgid "Translation Management System" +msgstr "" + +#: lingotek/lingotek.php:118 +msgid "Do you need to connect to a professional translation management system?" +msgstr "" + +#: lingotek/lingotek.php:121 +msgid "Access an online translator workbench." +msgstr "" + +#: lingotek/lingotek.php:122 +msgid "Have linguists compare side-by-side versions of original and translated text." +msgstr "" + +#: lingotek/lingotek.php:123 +msgid "Save and re-use previously translated material (leverage translation memory (TM))." +msgstr "" + +#: lingotek/lingotek.php:130 +msgid "Professionally Translate My Site" +msgstr "" + +#: lingotek/lingotek.php:131 +msgid "Do you need to professionally translate your site?" +msgstr "" + +#: lingotek/lingotek.php:133 +msgid "Start the process of getting a professional translation bid." +msgstr "" + +#: lingotek/lingotek.php:134 +msgid "Activate account so Lingotek can get an accurate count of how many words you have on your site and which languages you wish to translate into." +msgstr "" + +#: lingotek/lingotek.php:135 +msgid "Once activated click on the request translation bid and a certified translation project manager will contact you to give a no obligations translation bid." +msgstr "" + +#: lingotek/lingotek.php:142 +msgid "Need Extra Services?" +msgstr "" + +#: lingotek/lingotek.php:143 +msgid "Do you need help translating your site?" +msgstr "" + +#: lingotek/lingotek.php:145 +msgid "Start the process of getting extra services." +msgstr "" + +#: lingotek/lingotek.php:146 +msgid "Do you need someone to run your localization project?" +msgstr "" + +#: lingotek/lingotek.php:147 +msgid "Do you need customized workflows?" +msgstr "" + +#: lingotek/lingotek.php:148 +msgid "Do you you have existing Translation Memories you would like to use?" +msgstr "" + +#: lingotek/lingotek.php:149 +msgid "Do you need help creating glossaries and terminologies?" +msgstr "" + +#: lingotek/lingotek.php:254 +msgid "Learn more..." +msgstr "" + +#. Plugin Name of the plugin/theme +msgid "Polylang" +msgstr "" + +#. Plugin URI of the plugin/theme +msgid "http://polylang.wordpress.com/" +msgstr "" + +#. Description of the plugin/theme +msgid "Adds multilingual capability to WordPress" +msgstr "Tambahkan kapabilitas multi-bahasa pada WordPress" + +#. Author of the plugin/theme +msgid "Frédéric Demarle" +msgstr "" + +#. Author URI of the plugin/theme +msgid "http://polylang.wordpress.com" +msgstr "" + +#: admin/admin-filters-columns.php:141 admin/admin-filters-columns.php:236 +msgid "Add new translation" +msgstr "Tambahkan terjemahan baru" + +#: admin/admin-filters-columns.php:161 +msgid "— No Change —" +msgstr "" + +#: admin/admin-filters-columns.php:174 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:159 admin/admin-filters-term.php:85 +#: admin/admin-filters-term.php:136 include/model.php:591 +msgid "Language" +msgstr "Bahasa" + +#: admin/admin-filters-post.php:133 admin/admin.php:96 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:590 +msgid "Languages" +msgstr "Bahasa" + +#: admin/admin-filters-post.php:239 +msgid "(no parent)" +msgstr "" + +#: admin/admin-filters-post.php:474 admin/admin-filters-term.php:763 +#: admin/table-languages.php:65 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Sunting" + +#: admin/admin-filters-term.php:92 admin/admin-filters-term.php:144 +msgid "Sets the language" +msgstr "Setel bahasa" + +#: admin/admin-filters-term.php:454 +msgid "None" +msgstr "" + +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Widget tersebut ditampilkan untuk:" + +#: admin/admin-filters.php:55 include/model.php:592 +msgid "All languages" +msgstr "Semua bahasa" + +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Bahasa untuk Admin" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "Bawaan WordPress (default)" + +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Memperbarui berkas-berkas bahasa…" + +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "Halaman depan statis terpilih harus diterjemahkan ke dalam semua bahasa." + +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Tidak dimungkinkan menambah bahasa." + +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Bahasa ditambahkan." + +#: admin/admin-model.php:145 +msgid "Language deleted." +msgstr "Bahasa dihapus." + +#: admin/admin-model.php:224 +msgid "Language updated." +msgstr "Bahasa diperbarui." + +#: admin/admin-model.php:241 +msgid "Enter a valid WordPress locale" +msgstr "Masukkan lokala (locale) WordPress yang valid." + +#: admin/admin-model.php:245 +msgid "The language code contains invalid characters" +msgstr "Kode bahasa berisi karakter yang tidak valid" + +#: admin/admin-model.php:249 +msgid "The language code must be unique" +msgstr "Kode bahasa harus unik" + +#: admin/admin-model.php:254 +msgid "The language must have a name" +msgstr "Bahasa harus memiliki nama" + +#: admin/admin-nav-menu.php:52 admin/admin-nav-menu.php:73 +#: admin/admin-nav-menu.php:76 admin/admin-nav-menu.php:107 +#: admin/admin-nav-menu.php:169 install/upgrade.php:302 +msgid "Language switcher" +msgstr "Pengalih Bahasa" + +#: admin/admin-strings.php:54 +msgid "Site Title" +msgstr "" + +#: admin/admin-strings.php:55 +msgid "Tagline" +msgstr "" + +#: admin/admin-strings.php:56 +msgid "Date Format" +msgstr "" + +#: admin/admin-strings.php:57 +msgid "Time Format" +msgstr "" + +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Judul widget" + +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "Teks widget" + +#: admin/admin.php:204 admin/settings.php:102 +msgid "Settings" +msgstr "Pengaturan" + +#: admin/admin.php:312 +msgid "Show all languages" +msgstr "Tampilkan semua bahasa" + +#: admin/admin.php:321 +msgid "Filters content by language" +msgstr "Pilah konten sesuai bahasa" + +#: admin/admin.php:419 admin/settings.php:183 +msgid "The language was created, but the WordPress language file was not downloaded. Please install it manually." +msgstr "Bahasa telah dibuat, namun file bahasa untuk WordPress belum terunduh. Silahkan menginstalnya secara manual." + +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "Daftar plugin yang disarankan" + +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Tentang Polylang" + +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Terjemahan string" + +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Penerjemahan string" + +#: admin/settings.php:242 +msgid "Translations updated." +msgstr "Terjemahan diperbarui." + +#: admin/settings.php:300 +msgid "Settings saved." +msgstr "" + +#: admin/settings.php:321 +msgid "Taxonomies" +msgstr "Taksonomi" + +#: admin/settings.php:322 +msgid "Custom fields" +msgstr "Bidang kustom (custom fields)" + +#: admin/settings.php:323 +msgid "Comment status" +msgstr "Status komentar" + +#: admin/settings.php:324 +msgid "Ping status" +msgstr "Status ping" + +#: admin/settings.php:325 +msgid "Sticky posts" +msgstr "Tulisan-tulisan lekat (sticky posts)" + +#: admin/settings.php:326 +msgid "Published date" +msgstr "Tanggal terbit" + +#: admin/settings.php:327 +msgid "Post format" +msgstr "Format pos" + +#: admin/settings.php:328 +msgid "Page parent" +msgstr "Induk halaman" + +#: admin/settings.php:329 +msgid "Page template" +msgstr "Templet halaman" + +#: admin/settings.php:330 +msgid "Page order" +msgstr "Urutan halaman" + +#: admin/settings.php:331 +msgid "Featured image" +msgstr "Gambar fitur (featured image)" + +#: admin/table-languages.php:70 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Anda akan menghapus permanen bahasa ini. Anda yakin?" + +#: admin/table-languages.php:71 admin/table-string.php:168 +msgid "Delete" +msgstr "Hapus" + +#: admin/table-languages.php:85 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Nama bahasa" + +#: admin/table-languages.php:86 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Lokala (locale)" + +#: admin/table-languages.php:87 +msgid "Code" +msgstr "Kode" + +#: admin/table-languages.php:88 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Urutan" + +#: admin/table-languages.php:89 +msgid "Flag" +msgstr "Bendera" + +#: admin/table-languages.php:90 +msgid "Posts" +msgstr "Tulisan (posts)" + +#: admin/table-string.php:109 +msgid "String" +msgstr "String" + +#: admin/table-string.php:110 +msgid "Name" +msgstr "Nama" + +#: admin/table-string.php:111 +msgid "Group" +msgstr "Grup" + +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Terjemahan" + +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Tampilkan semua grup" + +#: admin/table-string.php:200 +msgid "Filter" +msgstr "" + +#: admin/view-about.php:3 +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." +msgstr "Polylang disediakan beserta %sdokumentasi%s yang lengkap (tapi dalam Bahasa Inggris). Dokumentasi tersebut meliputi informasi tentang cara mengatur situs multi-bahasa Anda dan menggunakannya sehari-hari, sebuah FAQ, serta dokumentasi untuk para programer untuk mengadaptasi plugin dan theme buatan mereka." + +#: admin/view-about.php:9 +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." +msgstr "Anda juga akan menemukan informasi bermanfaat di dalam %sforum pendukung (support forum)%s. Walaupun demikian, lakukan terlebih dahulu pencarian mengenai topik Anda yang inginkan sebelum membuat topik baru di forum tersebut." + +#: admin/view-about.php:16 +msgid "Polylang is free of charge and is released under the same license as WordPress, the %sGPL%s." +msgstr "Polylang disediakan gratis dan dirilis di bawah lisensi yang sama dengan WordPress, yaitu %sGPL%s." + +#: admin/view-about.php:22 +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "Jika Anda ingin tahu bagaimana agar bisa berkontribusi dalam proyek ini, silahkan %sbaca ini%s." + +#: admin/view-about.php:27 +msgid "Finally if you like this plugin or if it helps your business, donations to the author are greatly appreciated." +msgstr "Akhir kata, jika Anda menyukai plugin ini ataupun merasa bahwa plugin ini membantu bisnis Anda, donasi kepada pengembangnya sangat dihargai." + +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Sunting bahasa" + +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:103 +msgid "Add new language" +msgstr "Tambahkan bahasa baru" + +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Pilih sebuah bahasa" + +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "Anda dapat memilih satu bahasa dari daftar yang ada atau langsung menyuntingnya di bawah ini." + +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "Sebutan tersebut sebagai nama bahasa yang akan ditampilkan pada situs Anda (contohnya: Bahasa Indonesia)" + +#: admin/view-tab-lang.php:66 +msgid "WordPress Locale for the language (for example: en_US). You will need to install the .mo file for this language." +msgstr "Lokala WordPress untuk bahasa tersebut (contohnya: id_ID). Anda harus menginstal file .mo untuk bahasa ini." + +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Kode bahasa" + +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "Kode bahasa - sebaiknya 2-letters ISO 639-1 (for example: en)" + +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Arah teks" + +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "kiri ke kanan" + +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "kanan ke kiri" + +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Pilih arah teks untuk bahasa tersebut" + +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Posisi bahasa dalam Pengalih Bahasa" + +#: admin/view-tab-lang.php:103 +msgid "Update" +msgstr "" + +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Bahasa bawaan (default)" + +#: admin/view-tab-settings.php:29 +msgid "There are posts, pages, categories or tags without language set. Do you want to set them all to default language ?" +msgstr "Terdapat tulisan, halaman, kategori atau tag tanpa set bahasa. Anda ingin menyetel semua itu ke bahasa bawaan (dafault language)?" + +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "Modifikasi URL" + +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Bahasa disetel dari konten" + +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "URL untuk pos, halaman, kategori dan tag tidak berubah." + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Bahasa disetel dari nama direktori pada permalink cantik" + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "Bahasa disetel dari kode pada URL" + +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:109 admin/view-tab-settings.php:118 +msgid "Example:" +msgstr "Contoh:" + +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Bahasa disetel dari nama subdomain pada permalink cantik." + +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Bahasa disetel dari domain yang berbeda." + +#: admin/view-tab-settings.php:92 +msgid "Hide URL language information for default language" +msgstr "Sembunyikan URL informasi bahasa untuk bahasa bawaan (default language)" + +#: admin/view-tab-settings.php:106 +msgid "Remove /language/ in pretty permalinks" +msgstr "Hilangkan /language/ pada permalink cantik" + +#: admin/view-tab-settings.php:115 +msgid "Keep /language/ in pretty permalinks" +msgstr "Biarkan /language/ pada permalink cantik" + +#: admin/view-tab-settings.php:130 +msgid "The front page url contains the language code instead of the page name or page id" +msgstr "URL halaman depan berisi kode bahasa, seharusnya nama halaman atau id halaman" + +#: admin/view-tab-settings.php:138 +msgid "Example: %s instead of %s" +msgstr "Contoh: %s dan bukan %s" + +#: admin/view-tab-settings.php:148 +msgid "Detect browser language" +msgstr "Deteksi bahasa peramban (browser language)" + +#: admin/view-tab-settings.php:154 +msgid "When the front page is visited, set the language according to the browser preference" +msgstr "Saat halaman depan dikunjungi, setel bahasa sesuai preferensi peramban (browser preference)" + +#: admin/view-tab-settings.php:161 +msgid "Media" +msgstr "Media" + +#: admin/view-tab-settings.php:167 +msgid "Activate languages and translations for media" +msgstr "Aktifkan bahasa dan terjemahan untuk media" + +#: admin/view-tab-settings.php:175 +msgid "Custom post types" +msgstr "Jenis tulisan kustom (Custom post types)" + +#: admin/view-tab-settings.php:188 +msgid "Activate languages and translations for custom post types." +msgstr "Aktifkan bahasa dan terjemahan untuk jenis tulisan kustom." + +#: admin/view-tab-settings.php:195 +msgid "Custom taxonomies" +msgstr "Taksonomi kustom" + +#: admin/view-tab-settings.php:208 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Aktifkan bahasa dan terjemahan untuk taksonomi kustom." + +#: admin/view-tab-settings.php:214 +msgid "Synchronization" +msgstr "Sinkronisasi" + +#: admin/view-tab-settings.php:225 +msgid "The synchronization options allow to maintain exact same values (or translations in the case of taxonomies and page parent) of meta content between the translations of a post or page." +msgstr "Opsi-opsi sinkronisasi memungkinkan untuk menjaga nilai (atau terjemahan, jika pada taksonomi dan induk halaman) dari isi meta agar tepat sama antara terjemahan pos atau halaman." + +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Cari terjemahan" + +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Bersihkan database terjemahan semua string" + +#: admin/view-tab-strings.php:12 +msgid "Use this to remove unused strings from database, for example after a plugin has been uninstalled." +msgstr "Gunakan ini untuk menghapus string-string dari database, misalnya setelah suatu plugin baru di-uninstall." + +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Tambah yang baru" + +#: frontend/frontend-filters-search.php:80 +msgid "Search" +msgstr "" + +#: include/model.php:755 +msgid "Uncategorized" +msgstr "" + +#: include/plugins-compat.php:89 +msgid "Import posts, pages, comments, custom fields, categories, and tags from a WordPress export file." +msgstr "" + +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Tampilkan nama-nama bahasa" + +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Tampilkan bendera" + +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Paksa tautan ke halaman depan" + +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Sembunyikan bahasa saat ini" + +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "Sembunyikan bahasa yang tak memiliki terjemahan" + +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Tampilkan sebagai dropdown" + +#. translators: Calendar caption: 1: month name, 2: 4-digit year +#: include/widget-calendar.php:124 +msgctxt "calendar caption" +msgid "%1$s %2$s" +msgstr "" + +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Pengalih Bahasa" + +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Tampilkan sebuah Pengalih Bahasa" + +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Judul:" + +#: include/widget-recent-comments.php:46 +msgid "Recent Comments" +msgstr "" + +#. translators: comments widget: 1: comment author, 2: post link +#: include/widget-recent-comments.php:84 +msgctxt "widgets" +msgid "%1$s on %2$s" +msgstr "" + +#: include/widget-recent-posts.php:46 +msgid "Recent Posts" +msgstr "" + +#: install/install.php:24 +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "Anda menggunakan WordPress %s. Polylang memerlukan setidaknya WordPress %s." + +#: install/upgrade.php:76 +msgid "Polylang has been deactivated because you upgraded from a too old version." +msgstr "Polylang telah dinonaktifkan karena Anda meningkatkannya dari versi yang sangat lama." + +#: install/upgrade.php:78 +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Mohon tingkatkan dahulu ke %s sebelum meningkatkannya ke %s." + +#: lingotek/lingotek.php:26 +msgid "You’ve just upgraded to the latest version of Polylang! Would you like to automatically translate your website for free?" +msgstr "" + +#: lingotek/lingotek.php:30 +msgid "Close" +msgstr "Tutup" + +#: lingotek/lingotek.php:33 +msgid "Learn more" +msgstr "" + +#: lingotek/lingotek.php:39 +msgid "Click on Activate Lingotek to start translating." +msgstr "" + +#: lingotek/lingotek.php:42 +msgid "Activate Lingotek" +msgstr "" + +#: lingotek/lingotek.php:54 +msgid "Congratulations!" +msgstr "" \ No newline at end of file diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-ka_GE.mo b/pole-sbv-content/plugins/polylang/languages/polylang-ka_GE.mo new file mode 100644 index 00000000..ea3fdcb8 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-ka_GE.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-ka_GE.po b/pole-sbv-content/plugins/polylang/languages/polylang-ka_GE.po new file mode 100644 index 00000000..20125a82 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-ka_GE.po @@ -0,0 +1,658 @@ +msgid "" +msgstr "" +"Project-Id-Version: Polylang v1.6beta1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-15 11:50+0100\n" +"Last-Translator: \n" +"Language-Team: Rusudan Tsiskreli \n" +"Language: ka_GE\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: ../\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: .\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang -ს მოყვება ფართო %sdocumentation%s (მხოლოდ ინგლისურად). ეს შეიცავს " +"ინფორმაციას, თუ როგორ უნდა გამართოთ მრავალენოვანი საიტი და გამოიყენოთ იგი " +"ყოველდღიურად, ხდკ და ასევე დოკუმენტაცია პროგრამისტებისთვის, თემისა და სხვა " +"პლაგინების მოსარგებად." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"სასარგებლო ინფორმაციის ნახვა ასევე შეგიძლიათ %ssupport forum%s. თუმცა ჯერ " +"დაგუგლეთ, მერე დაპოსტეთ." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "პოლილანგი უნასია და იგივე ლიცენზიითაა რაც WordPress %sGPL%s." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "თუ გაინტერესებთ თუ როგორ დაეხმაროთ პროექტს, %sread this%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"თუ მოგწონთ პლაგინი და ის გეხმარებათ ბიზნესში, ავტორი მადლობელი იქნება " +"შემოწირულობისთვის." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "ენები" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "ენის სახელს ასახავს" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "დროშებს ასახავს" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "ბმულით სათაო გვერდზე გადასვლა" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "მიმდინარე ენის დამალვა" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "ჩამოსაშლელად ასახავს" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "შიგთავსის ენის მიხედვით ფილტრაცია" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "ყველა ენის ჩვენება" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "ახალი თარგმანის დამატება" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "ენა" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "თარგმანები" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "ენას აყენებს" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "ვიდჯეტი აისახება:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "ყველა ენა" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "ადმინისტრატორის ენა" + +# @ polylang +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPress ნაგულისხმევი" + +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "პარამეტრები" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "ენის ფაილების განახლება…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Polylang-ის შესახებ" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "სტრიქონების თარგმნა" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "სტრიქონების თარგმნა" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "შეიყვანეთ მართებული WordPress locale" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "ენის კოდი უნიკალური უნდა იყოს" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "ენას სახელი უნდა ჰქონდეს" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"ენა შეიქმნა, მაგრამ WordPress-ის ფაილები არ იყო ჩამოტვირთული. გთხოვთ ხელით " +"დააყენოთ." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "ვიჯეტის სახელი" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "ტაქსონომიები" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "დამატებითი ველები" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "კომენტარების სტატუსი" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "პინგის სტატუსი" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "მიმაგრებული პოსტი" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "გამოქვეყნების თარიღი" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "პოსტის ფორმატი" + +# @ polylang +#: admin/settings.php:326 +msgid "Page parent" +msgstr "გვერდის მშობელი" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "გვერდის თარგი" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "გვერდის მიმდევრობა" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "მთავარი გამოსახულება" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "ენის რედაქტირება" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "ახალი ენის დამატება" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "ენის არჩევა" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "ენის არჩევა შეგიძლიათ სიაში, ან პირდაპირ დაამატეთ იგი ქვემოთ." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "სრული სახელი" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "სახელი, თუ როგორ გამოჩნდება იგი ვებ გვერდზე (მაგ. ქართული)." + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "ლოკალური" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"WordPress ლოკალური ენისთვის (მაგალითად: ka_GE). თქვენ უნდა დააყენოთ .mo ამ " +"ენისთვის." + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "ენის კოდი" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "ტექსტის მიმართულება" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "მარცხნიდან მარჯვნის" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "მარჯვნიდან მარცხნივ" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "ენისთვის აირჩიეთ ტექსტის მიმართულება" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "თანმიმდევრობა" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "ენის მდებარეობა ენების გადამრთველში" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "ენების გადამრთველი" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "თარგმანების ძებნა" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "სტრიქონების თარგმნის ბაზის წაშლა" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "ნაგულისხმევი ენა" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"ჩვენ გვაქვს გვერდები, პოსტები, კატეგორიები მინიჭებული ენის გარეშე. გსურთ " +"მათთვის ყველასთვის ნაგულისხმევი ენის მინიჭება?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "ბრაუზერის ენის აღმოჩენა" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "სათაო გვერდზე ბრაუზერის პარამეტრებში მითითებული ენის დაყენება" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "URL მოდიფიკაცია" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "ენის URL დამალვა ძირითადი ენისთვის" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "მედია" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "მედიისთვის ენების და თარგმანების აქტივაცია" + +# @ polylang +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "სინქრონიზაცია" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "პოსტების დამატებითი ტიპები" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "პოსტების დამატებითი ტიპებისთვის ენების და თარგმანების აქტივაცია" + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "დამატებითი ტაქსონომიები" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "დამატებითი ტაქსონომიებისთვის ენების და თარგმანების აქტივაცია" + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "რედაქტირება" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "წაშლა" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "კოდი" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "დროშა" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "პოსტები" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "სახელი" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "სტრიქონი" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "ახლის დამატება" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "ენების გადამრთველი" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "ენების გადამრთველის ჩვენება" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "სათაური:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "WordPress-სთვის მრავალენოვანი შესაძლებლობის დამატება" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "თქვენ იყენებთ WordPress %s. Polylang მოითხოვს მინიმუმ WordPress %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "Polylang გამოირთო, რადგან თქვენ ძალიან ძველი ვერსია გაახლეთ" + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "გთხოვთ ჯერ გაახლეთ %s -მდე და მერე %s-მდე." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "ჯგუფი" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "ყველა ჯგუფის ნახვა" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "თქვენ აპირებთ ენის სამუდამოდ წაშლას. დარწმუნებული ხართ?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"ეს გამოიყენეთ ბაზიდან გამოუყენებელი სტრიქონების წასაშლელად, მაგალითად " +"პლაგინის წაშლის შემდეგ" + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"სინქრონიზაციის პარამეტრი საშუალებას ეძლევა ერთი პარამეტრი გამოიყენოთ ყველა " +"თარგმნილ ვარიანტში." + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "ენის კოდი არასწორ სიმბოლოებს შეიცავს" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "ენა შიგთავსიდანაა დაყენებული" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "პოსტების, გვერდების, კატეგორიების და ჭდეების მისამართები არ შეცვლილა." + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "ენა დაყენებულია დირექტორიის სახელიდან pretty permalinks-ში" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "მაგალითი:" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "ენა დაყენებულია ქვედომეინის სახელიდან pretty permalinks-ში" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "ენა სხვადასხვა დომეინებიდან არის დაყენებული" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "Pretty permalink-ებიდან /language/ წაშლა" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Pretty permalink-ში /language/ -ის ჩვენება" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "" +"თავფურცელის მისამართი შეიცავს ენის კოდს გვერდის სახელის ან აიდის ნაცვლად" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "მაგალითი: %s %s-ს ნაცვლად" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "ენის დამატება შეუძლებელია." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "ენა დამატებულია." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "ენა წაშლილია." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "ენა განახლებულია." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "თარგმანები განახლებულია." + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "ენის კოდი - სასურველია 2 ასო ISO 639-1 (მაგალითად: ka)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "არჩეული სტატიკური თავფურცელი ყველა ენაზე უნდა ითარგმნოს" + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "ვიჯეტის ტექსტი" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "რეკომენდირებული პლაგინები" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "ენა დაყენებულია URL-ს კოდიდან" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "დამალე ენები რომლებზეც არაა თარგმანები" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-lt_LT.mo b/pole-sbv-content/plugins/polylang/languages/polylang-lt_LT.mo new file mode 100644 index 00000000..39138fd5 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-lt_LT.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-lt_LT.po b/pole-sbv-content/plugins/polylang/languages/polylang-lt_LT.po new file mode 100644 index 00000000..af23a5c6 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-lt_LT.po @@ -0,0 +1,589 @@ +msgid "" +msgstr "" +"Project-Id-Version: polylang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Naglis Jonaitis \n" +"Language-Team: \n" +"Language: lt_LT\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" +"%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;__;_x\n" +"X-Poedit-Basepath: .\n" +"X-Generator: Poedit 1.7.4\n" +"X-Poedit-SearchPath-0: ..\n" +"X-Poedit-SearchPath-1: ../include\n" + +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang pateikiams su išsamia %sdokumentacija%s (tik anglų kalba). Joje " +"rasite informaciją kaip sukurti kelių kalbų svetainę bei naudotis ją " +"kasdien, D.U.K. bei dokumentaciją programuotojams, aprašančią kaip " +"pritaikyti savo įskiepius bei temas." + +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Naudingos informacijos taip pat galite rasti %spalaikymo forume%s. Tiesa, " +"nepamirškite paieškoti prieš sukurdami naują temą." + +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang yra nemokamas ir leidžiamas su ta pačia licencija kaip ir WordPress " +"- %sGPL%s." + +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "Jei norite prisidėti prie šio projekto, %sskaitykite čia%s." + +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Galiausiai, jei Jums patinka šis įskiepis arba jei jis padeda Jūsų verslui, " +"autorius labai vertintų Jūsų paramą." + +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Kalbos" + +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Rodyti kalbų pavadinimus" + +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Rodyti vėliavėles" + +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Priverstinai nukreipti į pagrindinį puslapį" + +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Nerodyti dabartinės kalbos" + +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Rodyti kaip išskleidžiamą pasirinkimą" + +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Atrenka turinį pagal kalbą" + +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Rodyti visas kalbas" + +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Pridėti naują vertimą" + +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Kalba" + +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Vertimai" + +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Nustatyti kalbą" + +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Valdiklį rodyti:" + +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Visoms kalboms" + +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Administravimo skydelio kalba" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPress numatytasis" + +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Nustatymai" + +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Atnaujinami kalbų failai…" + +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Apie Polylang" + +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Eilučių vertimas" + +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Eilučių vertimas" + +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Įveskite taisyklingą WordPress lokalę" + +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Kalbos kodas privalo būti unikalus" + +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Kalba privalo turėti vardą" + +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Kalba buvo pridėta, tačiau jos WordPress kalbos failas nebuvo parsiųstas. " +"Prašome tai padaryti rankiniu būdu." + +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Valdiklio pavadinimas" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Taksonomijos" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Pasirinktiniai laukai" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Komentarų būsena" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Ryšio patikrinimo būsena" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Nuolat pirmame puslapyje rodomi įrašai" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Paskelbimo data" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "Įrašo formatas" + +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Tėvinis puslapis" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Puslapio šablonas" + +#: admin/settings.php:328 +msgid "Page order" +msgstr "Puslapio tvarka" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Spec. paveikslėlis" + +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Redaguoti kalbą" + +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Pridėti naują kalbą" + +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Pasirinkite kalbą" + +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "" +"Galite pasirinkti kalbą iš sąrašo arba tiesiogiai redaguoti ją apačioje." + +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Pilnas vardas" + +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "Vardas, kuris bus rodomas Jūsų svetainėje (pavyzdžiui: English)." + +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Lokalė" + +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"Kalbos WordPress lokalė (pavyzdžiui: lt_LT). Jums reikės įsidiegti šios " +"kalbos .mo failą." + +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Kalbos kodas" + +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Teksto kryptis" + +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "iš kairės į dešinę" + +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "iš dešinės į kairę" + +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Pasirinkite kalbos teksto kryptį" + +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Tvarka" + +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Kalbos pozicija kalbos perjungiklyje" + +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Kalbų perjungimas" + +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Ieškoti vertimuose" + +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Išvalyti eilučių vertimų duomenų bazę" + +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Numatytoji kalba" + +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Yra įrašų, puslapių, kategorijų arba žymų, kuriems nenustatyta kalba. Ar " +"norite visiems jiems priskirti numatytąją kalbą?" + +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Nustatyti naršyklės kalbą" + +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "" +"Kai aplankomas pagrindinis puslapis, nustatyti kalbą pagal naršyklės " +"pageidavimą" + +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "URL pakeitimai" + +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Numatytajai kalbai nerodyti kalbos informacijos URL" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Failai" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Įgalinti kalbas ir vertimus failams" + +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Sinchronizavimas" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Pasirinktiniai įrašų tipai" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Įgalinti kalbas bei vertimus pasirinktiniams įrašų tipams." + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Pasirinktinės taksonomijos" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Įgalinti kalbas ir vertimus pasirinktinėms taksonomijoms." + +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Redaguoti" + +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Ištrinti" + +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Kodas" + +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Vėliava" + +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Įrašai" + +#: admin/table-string.php:110 +msgid "Name" +msgstr "Vardas" + +#: admin/table-string.php:111 +msgid "String" +msgstr "Eilutė" + +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Pridėti naują" + +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Kalbų perjungimas" + +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Leidžia pasirinkti puslapio kalbą" + +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Pavadinimas:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "Prideda daugiakalbystės funkciją WordPress sistemai" + +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "" +"Jūs naudojatės WordPress %s. Polylang reikalauja mažiausiai WordPress %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "Polylang buvo išjungtas, nes atsinaujinote iš per daug senos versijos." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Prašome atsinaujinti iki %s, prieš atnaujinant iki %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Grupė" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Peržiūrėti visas grupes" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Ketinate visam laikui ištrinti šią kalbą. Ar tikrai to norite?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Naudokite nenaudojamų eilučių pašalinimui iš duomenų bazės, pavyzdžiui po " +"įskiepio ištrynimo." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Sinchronizacijos parinktys leidžia išlaikyti pastovias vienodas turinio " +"reikšmes (ar vertimus taksonomijų ar tėvinių puslapių atveju) tarp puslapio " +"ar įrašo vertimų." + +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Kalbos kode yra neleistinų simbolių" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Kalba nustatoma pagal turinį" + +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "Įrašų, puslapių, kategorijų ir žymų adresai nekeičiami." + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Kalba nustatoma iš aplanko pavadinimo pastoviosiose nuorodose" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Pavyzdys:" + +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Kalba nustatoma iš subdomeno vardo pastoviosiose nuorodose" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Kalba nustatoma iš skirtingų domenų" + +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "Pašalinti /language/ iš pastoviųjų nuorodų" + +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Palikti /language/ pastoviosiose nuorodose" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "" +"Pradžios puslapio adrese yra kalbos kodas vietoje puslapio pavadinimo ar id" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Pavyzdys: %s vietoje %s" + +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Neįmanoma pridėti kalbos." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Kalba pridėta." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "Kalba ištrinta." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "Kalba atnaujinta." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "Vertimai atnaujinti." + +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "" +"Kalbos kodas - geriausia naudoti dviejų raidžių ISO 639-1 kodą (pvz.: lt)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" +"Pasirinktas statinis puslapis privalo būti išverstas į visas pasirinktas " +"kalbas." + +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "Valdiklio tekstas" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "Rekomenduojami įskiepiai" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "Kalba nustatoma iš URL esančio kalbos kodo" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "Nerodyti kalbų, neturinčių vertimų" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-lv.mo b/pole-sbv-content/plugins/polylang/languages/polylang-lv.mo new file mode 100644 index 00000000..43e4249a Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-lv.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-lv.po b/pole-sbv-content/plugins/polylang/languages/polylang-lv.po new file mode 100644 index 00000000..f11031c6 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-lv.po @@ -0,0 +1,668 @@ +msgid "" +msgstr "" +"Project-Id-Version: Polylang 1.5.6\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-14 09:22+0100\n" +"Last-Translator: Andis Grosšteins \n" +"Language-Team: \n" +"Language: lv_LV\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : " +"2);\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: ../\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: .\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang tiek piedāvāts ar plašu %sdokumentāciju%s (tikai angliski). Tā " +"satur informāciju par to kā uzstādīt vietni vairākās valodās un kā to lietot " +"ikdienā, BUJ, kā arī dokumentāciju programmētājiem par spraudņu un kažociņu " +"pielāgošanu." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Noderīgu informāciju varat atrast arī %satbalsata forumā%s. Ieteicams veikt " +"meklēšanu pirms atvērt jaunu foruma tematu." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang ir bezmaksas un tiek piedāvāts ar to pašu licenci kā WordPress, " +"%sGPL%s." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "Ja jūs prātojat kā varētu palīdzēt šim projektam, %sizlasiet šo%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Visbeidzot, ja jums patīk šis spraudnis vai ari tas palīdz jūsu biznesā, " +"ziedojumi autoram tiks augsti vērtēti." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Valodas" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Rāda valodu nosaukumus" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Rāda karogus" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Valodas saite ved uz sākumlapu" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Paslēpt aktīvo valodu" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Rāda kā nolaižamo izvēlni" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Filtrēt saturu pēc valodas" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Rādīt visas valodas" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Pievienot jaunu tulkojumu" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Valoda" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Tulkojumi" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Nosaka valodu" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Logdaļa tiek rādīta:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Visas valodas" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Vadības valoda" + +# @ polylang +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPress noklusējums" + +# @ default +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Uzstādījumi" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Atjaunina valodu failus…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Par Polylang" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Tekstu tulkojumi" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Tekstu tulkošana" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Lūdzu ievadiet derīgu WordPress lokāles kodu." + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Valodas kodam jābūt unikālam" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Valodai ir nepieciešams nosaukums" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Valoda tika izveidota, bet WordPress tulkojumu fails netika lejuplādēts. " +"Lūdzu uzstādiet to manuāli." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Logdaļas virsraksts" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Taksonomijas" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Lietotāja lauki" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Komentāru statuss" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Atpingu statuss" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Izceltie raksti" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Publicēšanas Datums" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "Raksta formāts" + +# @ default +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Vecāka lapa" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Lapas veidne" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "Kārtas numurs" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Satura izvēlētais attēls" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Rediģēt valodu" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Pievienot jaunu valodu" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Izvēlēties valodu" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "Jūs varat izvēlēties valodu no saraksta, vai ari rediģēt to zemāk." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Pilns nosaukums" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "Nosaukums, kādu to attēlos lapā (piemēram: Latviešu)" + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Lokāle" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"WordPress valodas lokāle šai valodai (piemēram: en_US). Jums nāksies " +"uzstādīt .mo failu šai valodai." + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Valodas kods (piem.: lv)" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Lasīšanas virziens" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "no kreisās uz labo" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "no labās uz kreiso" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Izvēlieties lasīšanas virzienu šai valodai" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Secība" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Valodas atrašanās vieta valodu izvēlnē" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Valodu izvēlne" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Meklēt tulkoumos" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Iztīrīt tulkojumu datubāzi" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Noklusētā valoda" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Ir atrasti raksti, lapas, tēmas, vai birkas bez uzstādītas valodas. Vai " +"vēlaties uzstādīt tām visām noklusēto valodu?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Noteikt pārlūka valodu" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "" +"Kad tiek apmeklēta sākumlapa, uzstāda valodu atkarībā no pārlūkprogrammas " +"uzstādījumiem" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "Saišu modifikācijas" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Paslēpt noklusētās valodas informāciju hipersaitēs" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Datnes" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Iespējot valodas un tulkošanu datnēm" + +# @ polylang +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Sinhronizācija" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Pielāgotie rakstu tipi" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Iespējot valodas un tulkošanu pielāgotajiem rakstu tipiem." + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Pielāgotās taksonomijas" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Iespējot valodas un tulkošanu pielāgotajām taksonomijām." + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Rediģēt" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Dzēst" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Kods" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Karogs" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Raksti" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "Nosaukums" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "Teksts" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Pievienot jaunu" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Valodu Izvēlne" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Parāda valodu izvēlni" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Virsraksts:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "" + +# polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "" +"Jūs lietojat WordPress %s. Polylang nepieciešama vismaz WordPress %s versija." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "" +"Polylang tika atslēgts, jo jūs atajuninājāt to no pārāk vecas versijas." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Lūdzu vispirms atjauniniet uz %s un tikai pēc tam uz %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Grupa" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Skatīt visas grupas" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Šī valoda tiks neatgriezeniski dzēsta. Vai esat pārliecināts?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Šo iespēju var lietot lai izdzēstu neizmantotos tulkojums. Piemēram pēc " +"spraudņa noņemšanas." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Sinhronizācijas iespēja ļauj uzturēt vienādas lietotāja lauku vērtības, kā " +"arī taksonomija un lapu vecākus, starp rakstu un lapu tulkojumiem." + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Ievadītais valodas kods satur neatļautus simbolus" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Valoda tiek uzstādīt no satura" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "Rakstu, lapu, kategoriju un birku saites netiek mainītas." + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Valoda tiek uzstādīta no direktorijas nosaukuma glītajās saitēs" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Piemērs:" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Valoda tiek uzstādīta no subdomēna nosaukuma" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Valoda tiek uzstādīta dažādiem domēniem" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "Nerādīt /language/ glītajās saitēs" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Rādīt /language/ glītajās saitēs" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "Sākumlapas adrese satur valodas kodu, nevis lapas nosaukumu vai id" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Piemēram: %s, nevis %s" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Neizdevās pievienot valodu." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Valoda pievienota." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "Valoda izdzēsta." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "Valoda atjaunināta." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "Tulkojums atjaunināts." + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "Valodas kods - vēlams divu burtu ISO 639-1 (piemēram: lv)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" + +#~ msgid "— No Change —" +#~ msgstr "— Bez izmaiņām —" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-my_MM.mo b/pole-sbv-content/plugins/polylang/languages/polylang-my_MM.mo new file mode 100644 index 00000000..137120ae Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-my_MM.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-my_MM.po b/pole-sbv-content/plugins/polylang/languages/polylang-my_MM.po new file mode 100644 index 00000000..9ae42032 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-my_MM.po @@ -0,0 +1,661 @@ +msgid "" +msgstr "" +"Project-Id-Version: Polylang v1.3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-14 09:22+0100\n" +"Last-Translator: Sithu Thwin \n" +"Language-Team: \n" +"Language: my_MM\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: ../\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: .\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"ပိုမိုပြည့်စုံသော %sလမ်းညွှန်ချက်စာတမ်း%s (အင်္ဂလိပ် ဘာသာြဖင့်သာလျှင်) အား Polylang မှ ပံ့ပိုးပေးထားသည်။ " +"ဤလမ်းညွှန်ချက်စာတမ်းတွင် ဘာသာစကားစုံ ဆိုဒ်တစ်ခုအား ပြင်ဆင်လွှင့်တင်ရန် နည်းလမ်းများနှင့် နေ့စဉ်သုံး လိုအပ်သော " +"အချက်အလက်များပါဝင်ပါသည်။ FAQ အပြင် ပရိုဂရမ် ရေးသားသူများအတွက် ၎င်းတို့၏ ပလပ်အင်များ " +"အခင်းအကျင်းများအား လိုအပ်သလို ပြုပြင်နိုင်သည့် နည်းလမ်းများလည်း ပါဝင်သည်။" + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"%sအကူအညီ ဖိုရမ်%s တွင်လည်း အသုံးဝင်သော အချက်အလက်များ ရှာဖွေနိုင်သည်။ သို့သော် ခေါင်းစဉ်အသစ်တစ်ခု ဖွင့်လှစ် " +"မမေမြန်းခင် အရင် ရှာဖွေကြည့်ရန် မမေ့ပါနှင့်။" + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "Polylang အား WordPress ၏ လိုင်စင်အတိုင်း %sGPL%s လိုင်စင်ဖြင့်သာ အခမဲ့ ဖြန့်ချိပါသည်။" + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "ပရောဂျက်အား မည်သို့ကူညီနိုင်မည်ကို သိလိုပါက %sဒါကိုဖတ်ပါ။%s " + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"ဒီပလပ်အင်ကို နှစ်သက်လျှင် သို့မဟုတ် သင့်လုပ်ငန်းအား အထောက်အကူဖြစ်လျှင် ရေးသူအား လှူဒါန်းမှုအား ကျေးဇူးအထူး " +"တင်ရှိမည်ဖြစ်သည်။" + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "ဘာသာစကားများ" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "ဘာသာစကားအမည်များ ဖော်ပြပါ" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "အလံများ ဖော်ပြပါ" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "လိပ်စာများအား ရှေ့စာမျက်နှာသို့ ညွှန်းပါ" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "ယခုအသုံးပြုထားသော ဘာသာစကားအား ဖျောက်ထားပါ" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "ဆွဲချဇယားအဖြစ်ပြပါ" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "အကြောင်းအရာများအား ဘာသာစကားဖြင့် စစ်ထုတ်ပါ" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "ဘာသာစကားအားလုံးပြပါ" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "ဘာသာစကားအသစ်ထည့်ရန်" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "ဘာသာစကား" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "ဘာသာပြန်များ" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "ဘာသာစကား သတ်မှတ်ရန်" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "ဝစ်ဂျစ်ဖော်ပြမှု - " + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "ဘာသာစကားအားလုံး" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "ထိန်းချုပ်ခလုပ်ခုံ ဘာသာစကား" + +# @ polylang +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPress မူလဘာသာစကား" + +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "သတ်မှတ်ချက်များ" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "ဘာသာစကားဖိုင်များ အသစ်ဖြည့်စွက်နေသည်…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Polylang အကြောင်း" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "စာကြောင်းဘာသာပြန်များ" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "စာကြောင်းဘာသာပြန်" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "သင့်လျှော်မှန်ကန်သော WordPress ဘာသာစကား သင်္ကေတကို ဖြည့်သွင်းပါ" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "ဘာသာစကားကုတ်မှာ တစ်မျိုးစီ သီးသန့်ဖြစ်ရမည်" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "ဘာသာစကားတွင် အမည်ရှိရမည်" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"ဘာသာစကားအား ဖန်တီးပြီးပါပြီ။ သို့သော် ဘာသာစကားဖိုင်များ ဆွဲချရယူမှု မပြီးမြောက်သေးပါ။ ကိုယ်တိုင် " +"ထည့်သွင်းပေးပါ။" + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "ဝစ်ဂျက်ခေါင်းစဉ်" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "ဝေါဟာရအုပ်စုများ" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "စိတ်ကြိုက်ဖြည့်ရန်" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "မှတ်ချက် အခြေအ" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "ချိတ်ဆက်မှု အခြေအ" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "ဦးစားပေးစာမူ" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "ထုတ်ဝေခဲ့သောနေ့စွဲ" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "စာမူပုံစံ" + +# @ polylang +#: admin/settings.php:326 +msgid "Page parent" +msgstr "စာမျက်နှာပင်" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "စာမျက်နှာ စံပုံစံ" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "စာမျက်နှာ အစီအစဉ်" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "သရုပ်ဖော် ရုပ်ပုံ" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "ဘာသာစကား ပြုပြင်ရန်" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "ဘာသာစကားအသစ်ထည့်ရန်" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "ဘာသာစကားရွေးရန်" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "စာရင်းအတွင်းရှိ ဘာသာစကားတစ်ခုအားရွေးပါ သို့မဟုတ် အောက်တွင် တိုက်ရိုက် ပြုပြင်ပါ။" + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "အမည်အပြည့်အစုံ" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "သင့်ဆိုဒ်တွင် ဖော်ပြမည့်အမည်။ (ဥပမာ။ ။ အင်္ဂလိပ်)။" + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "ေဒသန္တရဘာသာစကားအုပ်စု" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"WordPress ဘာသာစကားသင်္ကေတ ( ဥပမာ။ ။ my_MM ) ။ ဤဘာသာစကားအတွက် .mo ဖိုင်အား " +"ထည့်သွင်းပေးရန်လိုအပ်ပါသည်။" + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "ဘာသာစကားကုတ်" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "စာသားဦးတည်ရာ" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "ဘယ်မှ ညာ" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "ညာမှ ဘယ်" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "ဘာသာစကားအတွက် စာသားဦးတည်ရာကို ရွေးပါ" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "အစီအစဉ်" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "ဘာသာစကားပြောင်းခလုပ်ရှိ နေရာ" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "ဘာသာစကားပြောင်းခလုပ်" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "ဘာသာပြန်များရှာရန်" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "ဘာသာပြန် ဒေတာဗေ့စ်အား ရှင်းပါ" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "မူလ ဘာသာစကား" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"ဘာသာစကားသတ်မှတ်မှု မရှိသေးသော စာမူများ၊ စာမျက်နှာများ၊ ကဏ္ဍများ သို့မဟုတ် စကားစုတွဲများ " +"ရှိနေပါသည်။ မူလဘာသာစကားဖြင့် သတ်မှတ်ပေးလိုပါသလား။" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "ဘရောက်ဇာ ဘာသာစကားအား စစ်ဆေးရန်" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "" +"ပင်မစာမျက်နှာသို့ လာရောက်လည်ပတ်သောအခါ ဘရောက်ဇာသတ်မှတ်ချက်ကို မူတည်၍ ဘာသာစကားအား သတ်မှတ်ဖော်ပြပါ" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "URL ပြုပြင်ခြင်း" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "မူလဘာသာစကားအတွက် URL မှ ဘာသာစကား အချက်အလက်အား ဖျောက်ထားရန်" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "မီဒီယာ" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "မီဒီယာအတွက် ဘာသာစကားနှင့် ဘာသာပြန်များ ဖွင့်ထားရန်" + +# @ polylang +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "တိုက်ရိုက်ကူးယူချိတ်ဆက်ခြင်း" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "စိတ်ကြိုက် စာမူအမျိုးအစား" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "စိတ်ကြိုက်စာမူအများအစားများအတွက် ဘာသာစကားနှင့် ဘာသာပြန်များဖွင့်ထားရန်" + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "စိတ်ကြိုက်ဝေါဟာရများ" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "စိတ်ကြိုက်ဝေါဟာရများအတွက် ဘာသာစကားနှင့် ဘာသာပြန်များဖွင့်ရန်" + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "ပြုပြင်" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "ဖျက်" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "ကုဒ်" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "အလံ" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "စာမူများ" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "အမည်" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "စာကြောင်း" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "အသစ်" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "ဘာသာစကားပြောင်းခလုပ်" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "ဘာသာစားပြောင်းခလုပ်ဖော်ပြရန်" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "ခေါင်းစဉ် :" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "ဘာသာစကားပေါင်းစုံစနစ်အား WordPress အတွင်းထည့်သွင်းရန်" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "သင် WordPress %s အား အသုံးပြုနေသည်။ WordPress %s အား Polylang မှ လိုအပ်ပါသည်။" + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "အလွန်ဟောင်းလွန်းသော ဗားရှင်းမှ အဆင့်မြှင့်တင်ခြင်းပြုလုပ်ခဲ့သဖြင့် Polylang အား ပိတ်ထားလိုက်သည်။" + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "%sသို့ အဆင့်မြှင့်တင်ပြီးမှ %s သို့ အဆင့်မြှင့်ပါ။" + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "အုပ်စု" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "အုပ်စုအားလုံးကိုကြည့်ရန်" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "ဒီဘာသာစကားကို အပြီးဖျက်တော့မည်။ တကယ်သေချာရဲ့လား။" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"အသုံးမပြုသောစာကြောင်းများအား ဒေတာဗေ့စ်မှ ဖျက်ရန် ဒါကိုသုံးပါ။ ဥပမာ ပလပ်အင်တစ်ခုအား " +"ဖျက်ထုတ်လိုက်သောအခါ။" + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"တိုက်ရိုက်ကူးယူချိတ်ဆက်ခြင်းကိုသုံးခြင်းဖြင့် ဘာသာပြန်ထားသော စာမူသို့မဟုတ် စာမျက်နှာတစ်ခု၏ " +"မီတာအကြောင်းအရာများ၏ တန်ဖိုးများ (သို့မဟုတ် စာမျက်နှာပင်မ နှင့် ဝေါဟာရအုပ်စုများတွင် " +"ဘာသာပြန်များ)အား တူညီမှု ရှိစေရန် ထိန်းသိမ်းဆောင်ရွက်ပေးသည်။" + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "ဘာသာစကားကုဒ်တွင် သင့်လျှော်မှုမရှိသော အက္ခရာများပါဝင်နေသည်။" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "အကြောင်းအရာအပေါ်မူတည်၍ ဘာသာစကားအား သတ်မှတ်ရန်" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "စာမူများ၊ စာမျက်နှာများ၊ ကဏ္ဍများနှင့် စကားစုတွဲများအတွက် URL များအား မပြုပြင်ပါ။" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "ချိတ်ဆက်လိပ်စာတွင် တည်နေရာညွှန်းအမည်ဖြင့် ဘာသာစကားအား သတ်မှတ်ရန်" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "ဥပမာ။ ။" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "ချိတ်ဆက်လိပ်စာတွင် ဒိုမိန်းခွဲအမည်ဖြင့် ဘာသာစကားအား သတ်မှတ်ရန်" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "မတူညီသော ဒိုမိန်းများမှ ဘာသာစကားအား သတ်မှတ်သည်" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "ချိတ်ဆက်လိပ်စာမှ /language/ အား ဖယ်ရှားရန်" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "ချိတ်ဆက်လိပ်စာတွင် /language/ အား ဖော်ပြထားရန်" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "ပင်မစာမျက်နှာ URL တွင် စာမျက်နှာအမည် သို့မဟုတ် စာမျက်နှာ id အစား ဘာသာစကားကုဒ်ပါဝင်သည်" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "ဥပမာ။ ။ %s သည် %s ၏ အစားဖြစ်သည်။" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "ဘာသာစကား အသစ်ထည့်ရန် မဖြစ်နိုင်ပါ။" + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "ဘာသာစကား ထည့်ပြီးပြီ။" + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "ဘာသာစကား ဖျက်ပြီးပြီ။" + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "ဘာသာစကား အသစ်ဖြည့်စွက်ပြုပြင်ပြီးပါပြီ။" + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "ဘာသာပြန် အသစ်ဖြည့်စွက်ပြုပြင်ပြီးပါပြီ။" + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "" +"ဘာသာစကား ကုဒ်သင်္ကေတ - အက္ခရာ ၂ လုံးပါဝင်သော ISO 639-1 ဘာသာစကားကုတ် ဖြစ်သင့်ပါသည် " +"( ဥပမာ။ ။ my )" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "ရွေးချယ်ထားသော ပင်မစာမျက်နှာအား ဘာသာစကားအားလံုးသို့ ဘာသာပြန်ဆိုထားရမည်။" + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "ဝစ်ဂျက်စာသား" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-nb_NO.mo b/pole-sbv-content/plugins/polylang/languages/polylang-nb_NO.mo new file mode 100644 index 00000000..f05496f2 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-nb_NO.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-nb_NO.po b/pole-sbv-content/plugins/polylang/languages/polylang-nb_NO.po new file mode 100644 index 00000000..fdca6995 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-nb_NO.po @@ -0,0 +1,662 @@ +msgid "" +msgstr "" +"Project-Id-Version: Polylang v0.9.8\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-15 07:02+0100\n" +"Last-Translator: Tom Boersma \n" +"Language-Team: \n" +"Language: nb_NO\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: ../\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.7.4\n" +"X-Poedit-SearchPath-0: .\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang er utstyrt med omfattende %sdokumentasjon%s (bare på engelsk). Den " +"inneholder informasjon om hvordan du setter opp ditt flerspråklige nettsted " +"og bruker det på en daglig basis, en FAQ, samt dokumentasjon til " +"programmerere for å tilpasse sine plugins og temaer." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Du vil også finne nyttig informasjon i %sforumet%s. Men ikke glem å gjøre et " +"søk før du legger til et nytt emne." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang er gratis og er utgitt under samme lisens som WordPress, %sGPL%s." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "Hvis du lurer på hvordan du kan hjelpe prosjektet, %sles her%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Til slutt, hvis du liker denne plugin'en eller hvis det hjelper din bedrift: " +"donasjoner til forfatteren er verdsatt i høyeste grad." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Språk" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Viser språknavn" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Viser flagg" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Tvinger lenke til forsiden" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Skjuler nåværende språk" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Vises som dropdown" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Filtre innhold etter språk" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Vis alle språk" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Legg til ny oversettelse" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Språk" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Oversettelser" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Bestemmer språket" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Widgeten vises for:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Alle språk" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Admin språk" + +# @ polylang +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPress standard" + +# @ default +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Innstillinger" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Oppgraderer språkfiler…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Om Polylang" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "String oversettelser" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "String oversettelse" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Tast inn en gyldig WordPress Locale" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Språkkoden må være unikt" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Språket må ha et navn" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Språket ble opprettet, men WordPress språkfilen ble ikke lastet ned. " +"Vennligst installer den manuelt." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Widget tittel" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Taksonomier" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Tilpassede felt" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Kommentar status" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Ping status" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Klebrige innlegg" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Dato publisering" + +# @ default +#: admin/settings.php:325 +msgid "Post format" +msgstr "Format" + +# @ default +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Side forelder" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Sidemal" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "Side rekkefølge" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Fremhevet bilde" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Rediger språk" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Legg til nytt språk" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Velg et språk" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "Du kan velge et språk fra listen eller redigere direkte nedenfor." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Fullt navn" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "Navnet som det vises på nettstedet ditt (for eksempel: English)." + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Locale" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"WordPress Locale for språket (for eksempel: en_US). Du må installere .mo " +"filen for dette språket." + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Språkkode" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Tekstretning" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "venstre til høyre" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "høyre til venstre" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Velg tekstretning for språket" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Rekkefølge" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Språkets plasering i språkskifteren" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Språkskifter" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Søk oversettelser" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Rens string oversettelsene i databasen" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Standard språk" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Det finnes innlegg, sider, kategorier eller tags uten et valgt språk. Vil du " +"sette dem alle til standard språk?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Detekter nettleserens språkpreferance" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "Når forsiden besøkes, velg språk i henhold til nettleserens preferanse" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "URL modifikasjoner" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Skjul URL språkinformasjon for standard språk" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Media" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Aktiver språk og oversettelser for media" + +# @ polylang +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Synkronisering" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Tilpassede innleggstyper" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Aktiver språk og oversettelser for tilpassede innleggstyper." + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Tilpassede taksonomier" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Aktiver språk og oversettelser for tilpassede taksonomier." + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Rediger" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Slett" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Kode" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Flagg" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Innlegg" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "Navn" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "String" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Legg til ny" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Språkskifter" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Viser en språkskifter" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Tittel:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "Legger til flerspråklig funksjonalitet til WordPress" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "Du bruker WordPress %s. Polylang krever minst WordPress %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "" +"Polylang er blitt deaktivert fordi at du har oppgradert fra en for gammel " +"versjon." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Vennligst oppgrader først til %s før du oppgraderer til %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Gruppe" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Vis alle grupper" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Du holder på å slette dette språket permanent. Er du sikkert?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Bruk dette for å fjerne ubrukte stringer fra databasen, f.eks. når en " +"utvidelse er avinstallert." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Synkroniseringsvalgene tillater å ta vare på nøyaktig de samme verdiene " +"(eller oversettelser når det gjelder taksonomier og sideforelder) av " +"metainnhold mellom oversettelser av et innlegg eller en side." + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Språkkoden inneholder ugyldige tegn" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Språket bestemmes av innhold" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "Innlegg, sider, kategrier og stikkord urls er ikke tilpasset." + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Språket bestemmes av directory navnet i pene permalenker" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Eksempel:" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Språket bestemmes av subdomenenavn i pene permalenker" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Språket bestemmes av andre domener" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "Fjern /language/ i pene permalenker" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Behold /language/ i pene permalenker" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "Forside url inneholder språkkoden i stedet for sidenavn eller side id" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Eksempel: %s i stedet for %s" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Ikke mulig å legge til språket." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Språk lagt til." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "Språk slettet." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "Språk oppdatert." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "Oversettelser oppdatert." + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "Språkkode - helst 2-bokstav ISO 639-1 (for eksempel: en)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "Den valgte statiske forsiden må være oversettes for alle språk." + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "Widget tekst" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "Anbefalte utvidelser" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "Språket bestemmes av koden i URL'en" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "Gjemmer språk uten oversettelser" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-pl_PL.mo b/pole-sbv-content/plugins/polylang/languages/polylang-pl_PL.mo new file mode 100644 index 00000000..0bf84834 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-pl_PL.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-pl_PL.po b/pole-sbv-content/plugins/polylang/languages/polylang-pl_PL.po new file mode 100644 index 00000000..c3a1eba9 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-pl_PL.po @@ -0,0 +1,640 @@ +msgid "" +msgstr "" +"Project-Id-Version: polylang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Sebastian Janus \n" +"Language-Team: \n" +"Language: pl_PL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: .\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: ..\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang jest dostarczany z obszerną %sdokumentacją%s (tylko w języku " +"angielskim), która zawiera informacje jak skonfigurować stronę wielojęzyczną " +"i korzystać z niej w codziennej pracy, dział FAQ, oraz dokumentację dla " +"programistów o tym jak adaptować wtyczki i motywy." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Przydatne informacje znajdziesz w %sforum pomocy%s. Nie zapomnij go " +"przeszukać, zanim dodasz nowy temat." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang jest bezpłatne i opublikowane na takiej samej licencji jak " +"WordPress, czyli %sGPL%s." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "" +"Jeśli zastanawiasz się jak mógłbyś pomóc w tym projekcie, po prostu " +"%sprzeczytaj to%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Wreszcie, jeśli lubisz tę wtyczkę i pomaga Ci ona w prowadzeniu biznesu, " +"wsparcie dla jej autora będzie mile widziane." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Języki" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Wyświetla nazwy języków" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Wyświetla flagi" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Wymusza link do strony głównej" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Ukrywa aktualny język" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Wyświetla się jako menu rozwijane" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Filtrowanie treści wg języka" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Pokaż wszystkie języki" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Dodaj nowe tłumaczenie" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Język" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Tłumaczenia" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Ustawia język" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Widget wyświetlany jest dla:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Wszystkie języki" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Język administratora" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "Domyślny" + +# @ default +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Ustawienia" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Uaktualnianie pliku językowego…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "O Polylang" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Tłumaczenia ciągów tekstowych" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Tłumaczenie fraz" + +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Proszę podać prawidłowy kod lokalizacji" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Kod języka musi być unikalny" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Język musi mieć nazwę" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Język został dodany, ale plik językowy WordPress nie został załadowany. " +"Proszę zainstalować go ręcznie." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Nazwa widgeta" + +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Taksonomie" + +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Własne pola" + +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Status komentarza" + +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Status ping" + +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Przyklejone wpisy" + +#: admin/settings.php:324 +msgid "Published date" +msgstr "Data publikacji" + +#: admin/settings.php:325 +msgid "Post format" +msgstr "Format wpisu" + +# @ default +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Rodzic strony" + +#: admin/settings.php:327 +msgid "Page template" +msgstr "Szablon strony" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "Kolejność stron" + +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Zdjęcie główne" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Edytuj język" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Dodaj nowy język" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Wybierz język" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "Możesz wybrać język z listy lub edytować go bezpośrednio poniżej" + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Pełna nazwa" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "Nazwa, tak jak będzie wyświetlana na stronie (np. English)" + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Lokalizacja" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"Lokalizacja WordPress dla języka (np. en_US). Dla tego języka będziesz " +"musiał zainstalować plik .mo." + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Kod języka" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Kierunek zapisu języka" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "od lewej do prawej" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "od prawej do lewej" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Wybierz kierunek zapisu języka" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Kolejność" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Pozycja języka w przełączniku języka" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Przełącznik języka" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Szukaj tłumaczeń" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Wyczyść tłumaczenia fraz z bazy" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Domyślny język" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Istnieją wpisy, strony, kategorie i tagi bez określonego języka. Czy chcesz " +"ustawić dla nich domyślny język?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Wykryj język przeglądarki" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "" +"Przy wejściu na stronę domową, ustaw język zgodnie z ustawieniami " +"przeglądarki" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "Modyfikacje URL" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Ukryj informację o języku w URL dla domyślnego języka" + +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Media" + +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Aktywuj języki i tłumaczenia dla mediów." + +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Synchronizacja" + +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Własne typy wpisów" + +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Aktywuj języki i tłumaczenia dla własnych typów wpisów." + +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Własne taksonomie" + +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Aktywuj języki i tłumaczenia dla własnych taksonomii." + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Edytuj" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Usuń" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Kod" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Flaga" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Wpisy" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "Nazwa" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "Ciąg tekstowy" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Dodaj nowy" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Przełącznik języka" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Wyświetla przełącznik języka" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Tytuł:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "Dodaje wsparcie wielojęzykowe do WordPressa" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "Używasz WordPress %s. Polylang wymaga przynajmniej WordPress %s." + +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "" +"Polylang został wyłączony ponieważ aktualizowałeś go ze zbyt starej wersji." + +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Najpierw zaktualizuj do %s zanim wykonasz aktualizację do %s." + +#: admin/table-string.php:109 +msgid "Group" +msgstr "Grupa" + +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Zobacz wszystkie grupy" + +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Zamierzasz całkowicie usunąć ten język. Czy jesteś pewny?" + +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Użyj tego aby usunąć nieużywane frazy z bazy danych, np. po tym jak " +"odinstalowałeś wtyczkę." + +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Ustawienia synchronizacji pozwalają zachować dokładnie takie same wartości " +"(lub tłumaczenia w przypadku taksonomii i rodziców stron) meta danych " +"pomiędzy tłumaczeniami stron i wpisów." + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Kod języka zawiera nieprawidłowe znaki" + +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Język jest ustawiony na podstawie zawartości" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "Wpisy, strony, kategorie i adresy tagów nie są zmodyfikowane." + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Język jest ustawiany ze ścieżki katalogów w bezpośrednich odnośnikach" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Przykład:" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Język jest ustawiany z nazwy subdomeny w bezpośrednich odnośnikach" + +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Język jest ustawiany z różnych domen" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "Usuń /language/ z bezpośrednich odnośników" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Zatrzymaj /language/ w bezpośrednich odnośnikach" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "Adres strony głównej zawiera kod języka zamiast nazwy lub id strony." + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Przykład: %s zamiast %s" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Dodanie języka jest niemożliwe." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Dodano język." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "Usunięto język." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "Język zaktualizowany." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "Tłumaczenia zaktualizowane." + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "" +"Kod języka - preferowane 2 litery zgodnie z ISO 639-1 (na przykład: en)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" +"Wybrana statyczna strona główna musi być przetłumaczona we wszystkich " +"językach." + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "Tekst widgetu" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-ru_RU.mo b/pole-sbv-content/plugins/polylang/languages/polylang-ru_RU.mo new file mode 100644 index 00000000..67b31c2d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-ru_RU.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-ru_RU.po b/pole-sbv-content/plugins/polylang/languages/polylang-ru_RU.po new file mode 100644 index 00000000..262903c8 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-ru_RU.po @@ -0,0 +1,654 @@ +msgid "" +msgstr "" +"Project-Id-Version: polylang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: danalan \n" +"Language-Team: \n" +"Language: ru_RU\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: .\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: ..\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang предоставляется с исчерпывающей %sдокументацией%s (только на " +"английском), которая включает информацию по настройке и использованию вашего " +"многоязычного сайта, ответы на частые вопросы, а также документацию для " +"программистов для адаптации их собственных плагинов и тем." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Также вы можете найти полезную информацию на %sфоруме поддержки%s. Однако, " +"не забывайте пользоваться поиском, прежде чем создавать новые темы." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang бесплатен и предоставляется на таких же, как и WordPress условиях, " +"%sGPL%s." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "" +"Если вас интересует, как можно помочь проекту, просто %sпрочтите это%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Если же вам понравился этот плагин, или он помогает вам в бизнесе, автор " +"будет весьма признателен за любые добровольные пожертвования." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Языки" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Показывать названия языков" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Показывать флаги" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Принудительно переходить на главную страницу при смене языка" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Убрать текущий язык" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Показывать как выпадающий список" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Устанавливает язык" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Показать все языки" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Добавить новый перевод" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Язык" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Переводы" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Устанавливает язык" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Показывать виджет для" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Все языки" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Язык админ.панели" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "По умолчанию" + +# @ default +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Настройки" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Обновление языковых файлов…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "О Polylang" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Переводы строк" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Перевод строк" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Код языка должен быть уникальным" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "У языка должно быть название" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Язык был успешно создан, однако отсутствует языковой файл WordPress. " +"Пожалуйста, установите его вручную." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Название виджета" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Таксономия" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Пользовательские поля" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Статус комментария" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Статус отклика" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Прилепленные записи" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Дата опубликования" + +#: admin/settings.php:325 +msgid "Post format" +msgstr "Формат записи" + +# @ default +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Родительская страница" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Шаблон страницы" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "Порядок страниц" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Выбранный рисунок" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Редактировать язык" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Добавить новый язык" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Показать все языки" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "Выберите язык из списка или укажите сами." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Полное название" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "Название для отображения на сайте (например: Русский)." + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Локаль" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"Локаль WordPress'a для языка (например: ru_RU). Вы должны установить файлы ." +"mo для админ.панели и используемой темы." + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Код языка" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Направление текста" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "слева направо" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "справа налево" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Выберите направление текста для языка" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Порядок" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Порядок языка в переключателе языков" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Переключатель языков" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Поиск перевода" + +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Почистить базу данных переводов строк" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Язык по умолчанию" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Найдены записи, страницы, категории или метки без указанния какого-либо " +"языка. Установить им язык по-умолчанию?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Определять язык в браузере" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "Установить язык сайта согласно настройкам браузера" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "Модификации URL" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Спрятать название языка по-умолчанию из URL" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Медиа" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Активировать языки и переводы для мультимедиа материалов" + +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Синхронизация" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Пользовательские типы записей" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Активировать языки и переводы для пользовательских типов записей." + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Пользовательская таксономия" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Активировать языки и переводы для пользовательской таксономии." + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Редактировать" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Удалить" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Код" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Флаг" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Записи" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "Название" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "Строка" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Добавить новый" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Переключатель языков" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Показывает переключатель языков" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Название:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "" +"Установлен WordPress %s. Для корректной работы Polylang требуется минимум " +"WordPress %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "" +"Polylang деактивирован, потому что вы выполнили обновление со слишком старой " +"версии." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Пожалуйста, обновитесь сначала до %s перед обновлением до %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "" + +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "" + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "" + +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "" + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "" + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "" + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "" + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "" + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-sr_RS.mo b/pole-sbv-content/plugins/polylang/languages/polylang-sr_RS.mo new file mode 100644 index 00000000..4986036c Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-sr_RS.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-sr_RS.po b/pole-sbv-content/plugins/polylang/languages/polylang-sr_RS.po new file mode 100644 index 00000000..e477b4fd --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-sr_RS.po @@ -0,0 +1,680 @@ +msgid "" +msgstr "" +"Project-Id-Version: Polylang v1.3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-14 09:26+0100\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: sr_RS\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: ../\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: .\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang sadrži obimnu %sdokumentaciju%s (in English only). Ona sadrži " +"informacije kako da instališete vašu višejezičku stranicu i koristite je " +"svakodnevno, Pitanja i Odgovore (FAQ), kao i dokumentaciju za programere da " +"modifikuju njihove plugin-ove i teme." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Takođe, moći ćete da nađete korisne informacije na %ssupport forum%s. " +"Nemojte da zaboravite da prvo pretražite forum pre nego što postavite " +"pitanje." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polilang je besplatan i objavljen pod istom licencom kao WordPress, %sGPL%s." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "" +"Ako se pitate kako možete pomoći ovaj projekat, samo %spročitajte ovo%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Na kraju, ako želite ovaj plugin, ili ako vam pomaže u poslu, donacije " +"autoru će biti veoma cenjene." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Jezici" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Prikazuje imena jezika" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Prikazuje zastave" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Forsira link ka naslovnoj stranici (home page)" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Skriva trenutni jezik" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Prikazuje se u opadajućem meniju" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Filteriše sadržaj prema jeziku" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Prikaži sve jezike" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Dodaj novi prevod" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Jezik" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Prevodi" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Postavlja jezik" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Vidžet je prikazan za:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Svi jezici" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Jezik Administratora" + +# @ polylang +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "Podrazumevani (originalni) WordPress (WordPress default)" + +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Podešavanja" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Nadogradnja jezičke datoteke…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "O Polylangu" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Prevod veza (Strings translation)" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Prevod veze (Strings translation)" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Unesite važeći WordPress lokal (Enter a valid WordPress locale)" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Kod jezika mora biti jedinstven" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Jezik (novi) mora imati ime" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Jezik je kreiran, ali WordPress jezička datoteka nije preuzeta. Molimo " +"instalirajte je ručno" + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Naslov Vidžeta (Widget title)" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Taksonomije" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Prilagođena polja" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Status komentara" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Ping status" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Lepljivi članak-ci (Sticky posts)" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Datum objave" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "Format članka" + +# @ polylang +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Roditelj stranice " + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr " Izgled (šablon) stranica" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "Redosled stranica" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Odabrana slika (Featured image)" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Izmeni jezik" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Dodaj novi jezik" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Izaberite jezik" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "Možete odabrati neki od jezika u listi ili ga direktno izmenite ispod." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Puno ime" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "Ime je kako se prikazuju na vašem sajtu (na primer : engleski) " + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Lokalno" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"WordPress (lokalni) prostor za jezik (na primer: en_US ). Moraćete da " +"instalirate Mo datoteku za taj jezik" + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Jezički kod" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Pravac teksta" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "Sa leva na desno" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "Sa desna nalevo" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Odaberite smer teksta za jezik" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Redosled" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Položaj jezika u izmenjivaču redosleda jezika" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Promena jezika" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Pretraži prevode" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Očisti svojstva prevoda databaze (Clean strings translation database)" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Podrazumevani jezik " + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Postoje članci, stranice, kategorije ili tagovi-oznake bez podešenog jezika. " +"Da li želite da ih postavite na podrazumevani jezik ?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Detektuj jezik pretrživača (na pr: Google Chrome. Firefox...)" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "" +"Kada je naslovna strana posetćena , podesite jezik na osnovu preferenca " +"pretraživača - brovzera (na pr: Google Chrome. Firefox...)" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "URL izmene - modifikacije" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Sakrij Informacije URL jezika za podrazumevani jezik" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Mediji" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Aktivirajte jezike i prevode za medije" + +# @ polylang +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Sinhronizacija" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Izmenjeni članci" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "" +"Aktivirajte jezike i prevode za izmenjene tipove članka. (Activate languages " +"and translations for custom post types.)" + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Prilagođene nomenklature (Custom taxonomies)" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "" +"Aktivirajte jezike i prevode za prilagođene nomenklature. (Activate " +"languages and translations for custom taxonomies.)" + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Izmeni" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Obriši" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Kod" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Zastava" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Članak" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "Ime" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "Veza" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Dodaj nov" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Izmena/Promena jezika" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Prikazuje izmenu jezika (Displays a language switcher)" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Naslov:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "Dodaje višejezičku sposobnost za WordPress" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "Vi koristite WordPress %s. Polylang zahteva najmanje WordPress %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "Polilang je deaktiviran jer ste nadogradili sa veoma stare verzije ." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Molimo nadogradite prvo na %s pre nego nadogradite %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Grupa" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Pogledaj sve grupe" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Vi hoćete da trajno izbrišete ovaj jezik. Da li ste sigurni?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Koristite ovo za uklanjanje neiskorišćenih žica iz baze podataka, na primer " +"kada je plugin deinstaliran. (Use this to remove unused strings from " +"database, for example after a plugin has been uninstalled.)" + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Opcije sinhronizacije omogućavaju da se održe potpuno iste vrednosti (ili " +"prevode u slučaju nomenklaturama i stranice roditelja ) od meta sadržaja " +"između prevoda članka ili stranice." + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Jezički kod sadrži nevažeće znakove/slova" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Jezik je postavljen iz sadržaja (The language is set from content)" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "" +"Članci, stranice, kategorije i tagovi nisu modifikovani (Posts, pages, " +"categories and tags urls are not modified.)" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "" +"Jezik je podešen u imenu direktorijuma u lepim permalinkovima (The language " +"is set from the directory name in pretty permalinks)" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Primer:" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "" +"Jezik je namešten od sub-imena u lepim permalinkovima (The language is set " +"from the subdomain name in pretty permalinks)" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "" +"Jezik je namešten za različito web ime (The language is set from different " +"domains )" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "" +"Uklonite /ljezik/ u lepim permalinkovima ( Remove /language/ in pretty " +"permalinks) " + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Sačuvajte /jezik/ u lepim permalinkovima (in pretty permalinks)" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "" +"Url naslovne stranice sadrži jezičkii kod umesto imena stranice ili id " +"stranice" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Primer: %s umesto %s" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "" + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "" + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "" + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "" + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "" + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-tr_TR.mo b/pole-sbv-content/plugins/polylang/languages/polylang-tr_TR.mo new file mode 100644 index 00000000..1446dca9 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-tr_TR.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-tr_TR.po b/pole-sbv-content/plugins/polylang/languages/polylang-tr_TR.po new file mode 100644 index 00000000..cff42a8d --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-tr_TR.po @@ -0,0 +1,598 @@ +msgid "" +msgstr "" +"Project-Id-Version: Polylang v1.5\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-14 09:26+0100\n" +"Last-Translator: Abdullah Pazarbasi \n" +"Language-Team: \n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;" +"__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;" +"_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;" +"esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;" +"esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n" +"X-Poedit-Basepath: .\n" +"X-Loco-Target-Locale: tr_TR\n" +"X-Generator: Poedit 1.5.4\n" +"X-Language: tr_TR\n" +"X-Source-Language: C\n" +"X-Poedit-SearchPath-0: ..\n" +"X-Poedit-SearchPath-1: ../include\n" + +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang geniş bir %sdocumentation%s (sadece ingilizce) temin etmektedir. " +"Belge içerisinde; çoklu dil desteğinin kendi sitenize nasıl kurulacağı ve " +"kolay kullanımı, sık sorulan sorular ve geliştiriciler için kendi temalarını " +"ve eklentilerini uyumlu hale getirmeleri için gerekli bilgiler bulunmaktadır." + +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Ayrıca %ssupport forum%s 'dan da yararlı bilgilere ulaşabilirsiniz. Ama yeni " +"bir başlık açmadan önce arama yapmayı unutmayın." + +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang'ın kullanımı ücretsizdir ve dağıtımı WordPress ile aynı lisans " +"sözleşmesi %sGPL%s altında yapılmıştır." + +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "" +"Eğer bu projeye nasıl katkıda bulunabileceğinizi merak ediyorsanız, %sbunu " +"okuyun%s." + +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Ve son olarak bu eklentiyi beğendiyseniz veya profesyonel anlamda size " +"yararı dokunduysa, proje sahibine yapacağınız parasal destek mutlulukla " +"karşılanacaktır." + +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Dil" + +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Dil isimlerini görüntüler" + +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Bayrakları görüntüler" + +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Bağlantıyı önsayfa yapmak için zorlar" + +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Geçerli olan dili sakla" + +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Açılır menü halinde görüntüler" + +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Dile göre içerik filtreleri" + +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Tüm dilleri göster" + +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Yeni çevri ekle" + +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Dil" + +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Çevriler" + +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Dili geçerli dil olarak ayarlar." + +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Bu bileşenin görüntüleneceği dil:" + +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Tüm diller" + +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Yönetici dili" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPress varsayılanı" + +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Ayarlar" + +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Dil dosyaları güncelleştiriliyor…" + +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Polylang Hakkında" + +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Cümle çevrisi" + +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Cümle Çevrisi" + +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Geçerli bir WordPress adresi girin" + +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Dil kodu daha önce kullanılmamış olmalı" + +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Girdiğiniz dilin bir ismi olmalı" + +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Dil oluşturuldu fakat WordPress için dil dosyası indirilemedi. Lütfen elden " +"yükleyin." + +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Bileşen başlığı" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Taksonomiler" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Özel alanlar" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Yorum durumu" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Ping durumu" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Yapışkan gönderiler" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Yayımlanma tarihi" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "Gönderi formatı" + +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Sayfa ebeveyni" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Sayfa şablonu" + +#: admin/settings.php:328 +msgid "Page order" +msgstr "Sayfa sırası" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Öne çıkan görsel" + +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Dili düzenle" + +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Yeni Dil Ekle" + +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Dil Seç" + +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "" +"Listeden bir dil seçebilirsiniz ya da direk aşağıdaki bölümden " +"düzenleyebilirsiniz." + +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Tam İsim" + +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "Sitede dilin gösterileceği isim (örneğin: Türkçe)." + +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Bölge Kodu" + +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"Dil için WordPress Bölge Kodu (örneğin: tr_TR). Bu dilin .mo uzantılı dil " +"dosyasını yüklemeniz gerekiyor." + +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Dil Kodu" + +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Yazma yönü" + +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "soldan sağa" + +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "sağdan sola" + +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Dil için yazma yönünü seçin" + +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Sıralama" + +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Dilin dil değiştirici listesindeki pozisyonu" + +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Dil Değiştirici" + +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Çevrilerde ara" + +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Cümle çevri veritabanını temizle" + +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Varsayılan dil" + +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Dili belirlenmemiş yazılar, sayfalar, kategoriler ve etiketler var. " +"Varsayılan dil bunların hepsinin dili olarak ayarlansın mı?" + +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Tarayıcı dilini algıla" + +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "Anasayfa açıldığında, geçerli dili tarayıcının diline ayarla" + +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "URL dönüşümleri" + +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "URL'de varsayılan dil için dil belirtecini gizle" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Medya" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Medya için diller ve çevrileri etkinleştir" + +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Senkronizasyon" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Özel gönderi tipleri" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Özel gönderi tipleri için diller ve çevrileri etkinleştir." + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Özel taksonomiler" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Özel taksonomiler için diller ve çevrileri etkinleştir." + +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Düzenle" + +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Sil" + +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Kod" + +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Bayrak" + +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Yazılar" + +#: admin/table-string.php:110 +msgid "Name" +msgstr "İsim" + +#: admin/table-string.php:111 +msgid "String" +msgstr "Cümle" + +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Yeni ekle" + +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Dil Değiştirme Ekranı" + +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Dil değiştirme ekranını görüntüler" + +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Başlık:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "WordPress'e çokludil kabiliyeti kazandırır" + +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "" +"Siz WordPress'in %s sürümünü kullanıyorsunuz. Polylang'ı kullanabilmeniz " +"için en az WordPress %s sürümüne ihtiyacınız var." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "" +"Polylang aşırı eski bir versiyondan yükseltmenizden dolayı devredışı durumda." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Lütfen %2$s elemanını yükseltmeden önce %1$s elemanını yükseltin." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Grup" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Tüm grupları görüntüle" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Bu dili kalıcı olarak silmek üzeresiniz. Emin misiniz?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Kullanılmayan cümleleri veritabanından kaldırmak için bunu kullanın. Örneğin " +"bir eklentiyi kaldırdıktan sonra." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Senkronizasyon seçenekleri bir yazı ya da sayfanın çevrileri arasında meta " +"içeriğin değerlerinin (veya taksonomi ve sayfa ebeveynleri çevrilerinin) tam " +"olarak aynı kalmasına izin verir." + +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Dil kodu geçersiz karakterler içeriyor" + +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Dil içerik üzerinden ayarlanır" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "" +"Yazılar, sayfalar, kategoriler ve etiketlerin URL'leri dönüşüme uğramış " +"değil." + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Dil anlaşılır kalıcı bağlantılardaki dizin adı üzerinden ayarlanır" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Örnek:" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Dil anlaşılır kalıcı bağlantılardaki subdomain adı üzerinden ayarlanır" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Dil farklı domainler üzerinden ayarlanır" + +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "/language/ kısmını anlaşılır kalıcı bağlantılardan kaldır" + +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "/language/ kısmını anlaşılır kalıcı bağlantılarda koru" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "Ön sayfa URL'si sayfa adı veya sayfa ID'si yerine dil kodunu içeriyor" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Örnek: %2$s yerine %1$s" + +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Dili eklemek imkansız." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Dil eklendi." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "Dil silindi." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "Dil güncellendi." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "Çevriler güncellendi." + +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "Dil kodu - tercihen 2 harfli ISO 639-1 içinden (örneğin: tr)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "Seçilen sabit ön sayfa tüm dillere çevrilmeli." + +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "Bileşen metni" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-uk.mo b/pole-sbv-content/plugins/polylang/languages/polylang-uk.mo new file mode 100644 index 00000000..56e3f01d Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-uk.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-uk.po b/pole-sbv-content/plugins/polylang/languages/polylang-uk.po new file mode 100644 index 00000000..f0c96f9f --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-uk.po @@ -0,0 +1,661 @@ +msgid "" +msgstr "" +"Project-Id-Version: polylang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Andrii Ryzhkov \n" +"Language-Team: \n" +"Language: uk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: .\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.7.4\n" +"X-Poedit-SearchPath-0: ..\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang забезпечений обширною %sдокументацією%s (тільки англійською мовою). " +"Вона включає в себе інформацію про те, як налаштувати багатомовний сайт і " +"використовувати його на щоденній основі, запитання та відповіді, а також " +"документацію для програмістів, щоб адаптувати свої плаґіни і теми." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Ви також знайдете корисну інформацію в %sфорумі підтримки%s. Однак не " +"забувайте зробити пошук, перш ніж додавати нову тему." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang є безкоштовним і поширюється за тією ж ліцензією, як і WordPress, " +"%sGPL%s." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "" +"Якщо вам цікаво, як Ви можете допомогти проекту, просто %sпрочитайте це%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"Нарешті, якщо Вам подобається цей плаґін або, якщо це допоможе вашому " +"бізнесу, пожертвування автору вітаються." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Мови" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "Відображати назви мов" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "Відображати прапорці" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "Примусовий перехід на головну сторінку" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "Приховувати поточну мову" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "Відображати як меню, що випадає" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "Фільтрує вміст за мовою" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Показати всі мови" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Додати новий переклад" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Мова" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Переклади" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "Встановити мову" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Віджет відображається для:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Всі мови" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Адміністратор мови" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPress за замовчуванням" + +# @ default +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Налаштування" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Оновлення мовних файлів…" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Про Polylang" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Переклади рядків" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Переклад рядків" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Введіть дійсну локаль WordPress " + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Код мови повинен бути унікальним" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Мова повинна мати ім'я" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Мова була створена, але файл мовний файл WordPress не був завантажений. Будь " +"ласка, встановіть його вручну." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Назва віджету" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Таксономії" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Власні поля" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Статус коментарю" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Статус пінгу" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Прикріплені публікації" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Дата публікації" + +#: admin/settings.php:325 +msgid "Post format" +msgstr "Формат публікації" + +# @ default +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Батьківська сторінка" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Шаблон сторінки" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "Номер сторінки" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Головне зображення" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Редагувати мову" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Додати нову мову" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Вибрати мову" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "" +"Ви можете вибрати мову зі списку або безпосередньо відредагувати її нижче." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Повне ім'я" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "" +"Це ім'я, як воно відображається на вашому сайті (наприклад, Англійська)." + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Локаль" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"Локаль WordPress для мови (наприклад, en_US). Вам потрібно буде встановити " +"файл .mo для даної мови." + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Код мови" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Напрямок тексту" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "зліва направо" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "зправа наліво" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Виберіть напрямок тексту для мови" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Порядок" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Положення мови в перемикачі мов" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Перемикач мов" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Пошук перекладів" + +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Очистити базу даних перекладу строк" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Мова за замовчуванням" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Є публікації, сторінки, категорій або теґи без вибраної мови. Ви хочете " +"встановити їм мову за замовчуванням?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Визначати мову браузера" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "" +"Встановлювати мову відповідно до уподобань браузера, коли відвідується " +"головна сторінка" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "Модифікації URL " + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Приховати інформацію мови в URL для мови за замовчуванням" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Медіафайли" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Активувати мови та переклади для медіафайлів" + +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Синхронізація" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Власні типи публікації" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Активувати мови та переклади для власних типів публікацій." + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Власні таксономії" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Активувати мови та переклади для власних таксономії." + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Редагувати" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Видалити" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Код" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Прапор" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Публікації" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "Назва" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "Рядок" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Додати новий" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Перемикач мови" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "Відображає перемикач мови" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Назва:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "Додає магатомовні властивості до WordPress" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "" +"Ви використовуєте WordPress %s. Для Polylang потрібно принаймні WordPress %s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "Polylang був відключений, тому що ви оновили з занадто старої версії." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Будь ласка, оновіть спочатку до %s перед оновленням до %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Група" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Переглянути всі групи" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "Ви збираєтесь остаточно видалити цю мову. Ви впевнені?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" +"Використовуйте це, щоб видалити з бази даних рядки, які не використовуються. " +"Наприклад, після видалення плаґіну." + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"Опція синхронізації дозволяє підтримувати точно таке саме значення (або " +"переклад у випадку таксономій та батьківської сторінки) метаданих вмісту між " +"всіма перекладами публікації або сторінки." + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "Код мови містить недопустимі символи" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "Мова встановлена з вмісту" + +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "URL публікацій, сторінок, категорій та теґів не змінюються." + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "Мова встановлена з назви каталогу в постійному посиланні" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "Приклад:" + +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "Мова встановлена з субдомену в постійному посиланні" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "Мова встановлена з іншого домену" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "Вилучити /language/ в акуратних постійних посиланнях" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "Залишити /language/ в акуратних постійних посиланнях" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "" +"URL головної сторінки містить код мови замість назви сторінки або ID сторінки" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "Приклад: %s замість %s" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "Неможливо додати мову." + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "Мова додана." + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "Мова видалена." + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "Мова оновлена." + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "Переклади оновлені." + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "Код мови - бажано 2-символьний ISO 639-1 (наприклад, en)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "Вибрана статична головна сторінка має бути перекладена на всі мови." + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "Текст віджету" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "Рекомендовані плаґіни" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "Мова встановлена з коду в URL" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "Приховати мови без перекладу" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-vec.mo b/pole-sbv-content/plugins/polylang/languages/polylang-vec.mo new file mode 100644 index 00000000..7088188e Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-vec.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-vec.po b/pole-sbv-content/plugins/polylang/languages/polylang-vec.po new file mode 100644 index 00000000..f4867768 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-vec.po @@ -0,0 +1,663 @@ +msgid "" +msgstr "" +"Project-Id-Version: Polylang v1.1dev10\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-14 09:27+0100\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: ../\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"Language: vec\n" +"X-Poedit-SearchPath-0: .\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang el vien dà fora co na %sdocumentaçion%s conpleta (sol che in " +"Ingléxe). El contien anca informaçion su come métar sù un sito multiléngue e " +"su come dopararlo tuti i di, na pàxena de FAQ (domande frecuenti) e na " +"documentaçion par programaturi parché i posa adatar i so plugin e i so tèmi." + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"Te cati anca informaçion ùtiłi nel %sfòrum de suporto%s. Parò no stà " +"desmentegarte de far na riçérca prima de postar n'argoménto nóvo." + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "" +"Polylang el xe a gràtis e 'l vien dà fora sóto ła stésa łicença de " +"WordPress, ła %sGPL%s." + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "" +"Se te si drio domandarte come che te pol jutarne, basta che te %slezi cuà%s." + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"In ùltima, se te piaxe sto plugin chì o se sto cuà el te juta a guadagnar, " +"te pol far vołentiera na donaçion a l'autor." + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "Łéngue" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "El fa védar i nomi de łe łéngue" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "El fa védar łe bandiere" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "El força łe łigadure in prima pàxena" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "El scónde ła łéngua ativa" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "El vixuałixa come menù a cascada" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "El filtra el contegnùo par łéngua" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "Fa védar tute łe łéngue" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "Zónta na traduçion nóva" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "Łéngua" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "Traduçion" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "L'inposta ła łéngua" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "Ła widget ła vien vixuałixà par:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "Tute łe łéngue" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "Łéngua de l'aministrador" + +# @ polylang +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "Stàndard de WordPress" + +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "Inpostaçion" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "Agiornaménto del file de łéngua" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "Informaçion su Polylang" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "Traduçion de stringhe" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "Traduçion de stringhe" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "Miti rento na inpostaçion locałe de WordPress vàłida" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "Bexon che'l còdexe łéngua el sia ùnico" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "Ła łéngua ła ga da aver un nome" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "" +"Ła łéngua ła xe stà creà, ma el file de łéngua de WordPress no l'è mìa stà " +"tirà zo. Par favor, metìło sù a man." + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "Tìtoło de ła widget" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "Tasonomie" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "Canpi personałixai" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "Stato del coménto" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Stato de ping" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "Artìcoło evidençià" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "Data de publicaçion" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "Formato artìcoło" + +# @ polylang +#: admin/settings.php:326 +msgid "Page parent" +msgstr "Mare de ła pàxena" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "Modeło de pàxena" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "Órdene de pàxena" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "Imàxene in evidença" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "Cànbia łéngua" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "Zónta na łéngua nóva" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "Seji na łéngua" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "Te pol sèjer na łéngua da ła lista o modificarla diretamente chì sóto." + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "Nome intiero" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "" +"El nome l'è come che 'l vien mostrà 'ntel to sito (par exenpio: Ingléxe)" + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "Inpostaçion locałi" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "" +"Inpostaçion locałi par ła łéngua (par exenpio: en_US). Par sta łéngua cuà " +"bexon métar sú el file .mo." + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "Còdexe łéngua" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "Direçion testo" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "sinistra-destra" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "destra-sinistra" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "Seji n'altra direçion de testo par ła łéngua" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "Órdene" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "Poxiçion de ła łéngua 'ntel sełetor de łéngua" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "Sełetor łéngua" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "Çerca traduçion" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "Néta fora el database de traduçion stringhe" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "Łéngua de baxe" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "" +"Ghe xe artìcołi, pàxene, categorie o tag sensa łèngua inpostà. Vuto " +"inpostarle tute a ła łéngua baxe?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "Cata fora ła łéngua del navigador" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "" +"Cuando che vien vixità ła prima pàxena, inposta ła łéngua conforme łe " +"preferençe del navigador." + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "Canbiaminti de URL" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "Scundi l'informaçion lenguìstica de l'URL par ła łéngua baxe" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "Mèdia" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "Ativa łéngue e traduçion par i mèdia" + +# @ polylang +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "Sincronixaçion" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "Tipi artìcoło personałixai" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "Ativa łéngue e traduçion par tipi artìcoło personałixai" + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "Tasonomie personałixae" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "Ativa łéngue e traduçion par tasonomie personałixae" + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "Modìfica" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "Scançeła" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "Còdexe" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "Bandiera" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "Artìcoło" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "Nome" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "Stringa" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "Zónta nóvo" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "Sełetor de łéngua" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "El fa védar un sełetor de łéngua" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "Tìtoło:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "El zónta łe funçion multiłéngua a WordPress" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "" +"Te si drio doparar WordPress %s. Polylang el ga bixogno almanco de WordPress " +"%s." + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "" +"Polylang el xe stà dexativà parché te ghè fato n'agiornaménto da na version " +"masa vècia." + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "Par favor, agiórna prima a %s, vanti de agiornar a %s." + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "Grupo" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "Vidi tuti i grupi" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "" + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "" + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "" + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "" + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "" + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-zh_CN.mo b/pole-sbv-content/plugins/polylang/languages/polylang-zh_CN.mo new file mode 100644 index 00000000..e59a1154 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-zh_CN.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-zh_CN.po b/pole-sbv-content/plugins/polylang/languages/polylang-zh_CN.po new file mode 100644 index 00000000..75f83909 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-zh_CN.po @@ -0,0 +1,545 @@ +msgid "" +msgstr "" +"Project-Id-Version: zh_CN\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: 倡萌@WordPress大学 \n" +"Language-Team: 倡萌@WordPress大学 \n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.6.5\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: ..\n" + +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang 提供了一个全面的 %s帮助文档%s (英文的),它包括使用 Polylang 创建" +"你的多语言网站和如何日常使用它,以及帮助程序员如何使 Polylang 适应他们的主题" +"和插件。" + +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"你还可以在 %s支持论坛%s 获取更多有用的信息。发表新话题前,请不要忘了先搜索一" +"下。" + +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "Polylang 是免费的,它和WordPress一样基于 %sGPL%s 发布。" + +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "如果你想知道如何帮助改项目,不妨 %s阅读这里%s。" + +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"最后,如果你喜欢该插件,或者它有助于你的生意,不妨捐助作者。

    非常" +"感谢 WordPress大学 为 Polylang 提供简体中文" +"支持。" + +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "语言" + +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "显示语言名称" + +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "显示国旗" + +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "强制链接到主页" + +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "隐藏当前语言" + +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "显示下拉菜单" + +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "按语言过滤内容" + +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "显示所有语言" + +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "添加新翻译" + +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "语言" + +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "翻译" + +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "设置语言" + +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "该小工具显示为:" + +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "所有语言" + +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "管理语言" + +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPress默认" + +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "设置" + +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "升级语言文件..." + +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "关于 Polylang" + +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "字符串翻译" + +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "字符串翻译" + +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "输入一个有效的 WordPress 区域" + +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "语言代码必须是唯一的" + +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "语言必须有一个名字" + +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "语言已被创建,但是没有下载到WordPress语言包,请手动安装它。" + +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "小工具标题" + +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "分类法" + +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "自定义字段" + +#: admin/settings.php:321 +msgid "Comment status" +msgstr "评论状态" + +#: admin/settings.php:322 +msgid "Ping status" +msgstr "Ping 状态" + +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "置顶文章" + +#: admin/settings.php:324 +msgid "Published date" +msgstr "发布日期" + +#: admin/settings.php:325 +msgid "Post format" +msgstr "文章格式" + +#: admin/settings.php:326 +msgid "Page parent" +msgstr "父级页面" + +#: admin/settings.php:327 +msgid "Page template" +msgstr "页面模板" + +#: admin/settings.php:328 +msgid "Page order" +msgstr "页面顺序" + +#: admin/settings.php:329 +msgid "Featured image" +msgstr "特色图像" + +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "编辑语言" + +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "添加新语言" + +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "选择语言" + +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "你可以在列表中选择一个语言或者直接在下面编辑它。" + +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "全名" + +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "这个名字是用来在网站上显示的(例如: English)" + +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "区域" + +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "WordPress 语言区域(例如:en_US)。你需要为该语言安装 .mo 文件。" + +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "语言代码" + +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "文字方向" + +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "从左到右" + +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "从右到左" + +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "选择语言的文字方向" + +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "顺序" + +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "该语言在语言切换中的排列顺序" + +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "语言切换" + +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "搜索翻译" + +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "清除未使用的字符串翻译" + +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "默认语言" + +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "有文章、页面、分类和标签没有设置语言,你要设置它们为默认语言吗?" + +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "检测浏览器语言" + +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "当主页被访问时,根据浏览器偏好设置语言" + +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "URL修改" + +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "为默认语言隐藏 URL 语言信息" + +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "多媒体" + +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "为多媒体启用语言和翻译" + +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "同步" + +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "自定义文章类型" + +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "为自定义文章类型启用语言和翻译" + +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "自定义分类法" + +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "为自定义分类法启用语言和翻译" + +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "编辑" + +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "删除" + +#: admin/table-languages.php:76 +msgid "Code" +msgstr "代码" + +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "国旗" + +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "文章" + +#: admin/table-string.php:110 +msgid "Name" +msgstr "名称" + +#: admin/table-string.php:111 +msgid "String" +msgstr "字符串" + +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "添加新的" + +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "语言切换" + +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "显示一个语言切换" + +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "标题:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "增加多语言功能到 WordPress" + +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "你现在使用的是 WordPress %s,Polylang 要求至少为 WordPress %s。" + +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "Polylang 已经停用,因为你是从太旧的版本升级的。" + +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "在升级到 %s 前,请先升级到 %s。" + +#: admin/table-string.php:109 +msgid "Group" +msgstr "分组" + +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "查看所有分组" + +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "您将要永久删除此语言。您确定吗?" + +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "使用它从数据库中删除未使用的字符串,例如一个插件被卸载以后。" + +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"同步选项允许在一篇文章或页面的翻译之间保持相同的元数据内容的值(或分类法和页" +"面的父级)。[ The synchronization options allow to maintain exact same " +"values (or translations in the case of taxonomies and page parent) of meta " +"content between the translations of a post or page. ]" + +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "语言代码包含无效字符" + +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "语言根据内容来设置" + +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "文章、页面、分类和标签的URL不会被修改。" + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "语言根据链接的目录名来设置" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "例如:" + +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "语言根据链接的二级域名来设置" + +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "语言根据不同的域名来设置" + +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "在链接中移除 /language/" + +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "在链接中保留 /language/" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "首页的URL中包含语言代码,而不是页面名称或页面ID" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "例如:%s 代替 %s" + +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "无法添加语言" + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "语言已添加" + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "语言已删除" + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "语言已更新" + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "翻译已更新" + +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "语言代码 - 最好是2个字母的ISO 639-1(例如 en)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "所选的静态首页必须翻译为所有语言。" + +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "小工具文本" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "推荐插件" + +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "语言是从URL中的代码来设置的" + +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "隐藏没有翻译的语言" diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-zh_TW.mo b/pole-sbv-content/plugins/polylang/languages/polylang-zh_TW.mo new file mode 100644 index 00000000..2e526a63 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/languages/polylang-zh_TW.mo differ diff --git a/pole-sbv-content/plugins/polylang/languages/polylang-zh_TW.po b/pole-sbv-content/plugins/polylang/languages/polylang-zh_TW.po new file mode 100644 index 00000000..4ebd4222 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/languages/polylang-zh_TW.po @@ -0,0 +1,652 @@ +msgid "" +msgstr "" +"Project-Id-Version: Polylang v1.5\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2015-02-14 09:28+0100\n" +"Last-Translator: 張香腸 \n" +"Language-Team: 香腸炒魷魚 \n" +"Language: zh_TW\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Poedit-Basepath: ../\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SearchPath-0: .\n" + +# @ polylang +#: admin/view-about.php:3 +#, php-format +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." +msgstr "" +"Polylang 提供一個完整的 %s說明文件%s (僅提供英文)。這包含了如何設定多語言網站" +"並日常使用,常見問題說明,以及幫助程式設計師可快速套用到他們的外掛或是佈景主" +"題。" + +# @ polylang +#: admin/view-about.php:9 +#, php-format +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." +msgstr "" +"你也可以在%s支援論壇%s獲取更多有用的資訊。但別忘記,發新問題詢問前,要先搜尋" +"與爬文。" + +# @ polylang +#: admin/view-about.php:16 +#, php-format +msgid "" +"Polylang is free of charge and is released under the same license as " +"WordPress, the %sGPL%s." +msgstr "Polylang 是免費的,與 WordPress 一樣是基於 %sGPL%s 釋出。" + +# @ polylang +#: admin/view-about.php:22 +#, php-format +msgid "If you wonder how you can help the project, just %sread this%s." +msgstr "如果你想知道如何協助這個專案,請%s閱讀這篇%s。" + +# @ polylang +#: admin/view-about.php:27 +msgid "" +"Finally if you like this plugin or if it helps your business, donations to " +"the author are greatly appreciated." +msgstr "" +"最後,如果你喜歡這個外掛或是它有助於你的業務,不妨贊助作者。

    " +"Polylang 正體中文語系由 香腸" +"炒魷魚 與 阿腸網頁設計工作" +"室 翻譯提供。" + +# @ polylang +#: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70 +#: admin/settings.php:97 include/model.php:561 +msgid "Languages" +msgstr "語言" + +# @ polylang +#: include/switcher.php:22 +msgid "Displays language names" +msgstr "顯示語言名稱" + +# @ polylang +#: include/switcher.php:23 +msgid "Displays flags" +msgstr "顯示旗幟" + +# @ polylang +#: include/switcher.php:24 +msgid "Forces link to front page" +msgstr "強制鏈結到首頁" + +# @ polylang +#: include/switcher.php:25 +msgid "Hides the current language" +msgstr "隱藏當前語言" + +# @ polylang +#: include/switcher.php:30 +msgid "Displays as dropdown" +msgstr "顯示為下拉式選單" + +# @ polylang +#: admin/admin.php:267 +msgid "Filters content by language" +msgstr "透過語言過濾內容" + +# @ polylang +#: admin/admin.php:258 +msgid "Show all languages" +msgstr "顯示所有語言" + +# @ polylang +#: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230 +msgid "Add new translation" +msgstr "新增翻譯" + +# @ polylang +#: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55 +#: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75 +#: admin/admin-filters-term.php:122 include/model.php:562 +msgid "Language" +msgstr "語言" + +# @ polylang +#: admin/table-string.php:112 admin/view-translations-media.php:5 +#: admin/view-translations-post.php:5 admin/view-translations-term.php:6 +#: admin/view-translations-term.php:11 +msgid "Translations" +msgstr "翻譯" + +# @ polylang +#: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130 +msgid "Sets the language" +msgstr "設定語言" + +# @ polylang +#: admin/admin-filters.php:52 +msgid "The widget is displayed for:" +msgstr "此小工具顯示:" + +# @ polylang +#: admin/admin-filters.php:55 include/model.php:563 +msgid "All languages" +msgstr "所有語言" + +# @ polylang +#: admin/admin-filters.php:123 +msgid "Admin language" +msgstr "管理語言" + +# @ polylang +#: admin/admin-filters.php:126 +msgid "WordPress default" +msgstr "WordPress 預設" + +# @ polylang +#: admin/admin.php:167 admin/settings.php:102 +msgid "Settings" +msgstr "設定" + +# @ polylang +#: admin/admin-filters.php:160 admin/admin-filters.php:169 +msgid "Upgrading language files…" +msgstr "升級語言檔案 …" + +# @ polylang +#: admin/settings.php:62 +msgid "About Polylang" +msgstr "關於 Polylang" + +# @ polylang +#: admin/settings.php:78 +msgid "Strings translations" +msgstr "字串翻譯" + +# @ polylang +#: admin/settings.php:101 +msgid "Strings translation" +msgstr "字串翻譯" + +# @ polylang +#: admin/admin-model.php:244 +msgid "Enter a valid WordPress locale" +msgstr "輸入一個有效的 WordPress 語言環境" + +# @ polylang +#: admin/admin-model.php:252 +msgid "The language code must be unique" +msgstr "語言代碼必須是獨一無二" + +# @ polylang +#: admin/admin-model.php:256 +msgid "The language must have a name" +msgstr "這個語言必須有一個名字" + +# @ polylang +#: admin/admin.php:367 admin/settings.php:180 +msgid "" +"The language was created, but the WordPress language file was not " +"downloaded. Please install it manually." +msgstr "語言已經被建立,但是WordPress語言包並沒有下載到,請手動安裝它。" + +# @ polylang +#: admin/admin-strings.php:59 +msgid "Widget title" +msgstr "小工具標題" + +# @ polylang +#: admin/settings.php:319 +msgid "Taxonomies" +msgstr "自訂分類" + +# @ polylang +#: admin/settings.php:320 +msgid "Custom fields" +msgstr "自訂欄位" + +# @ polylang +#: admin/settings.php:321 +msgid "Comment status" +msgstr "迴響狀態" + +# @ polylang +#: admin/settings.php:322 +msgid "Ping status" +msgstr "通知狀態" + +# @ polylang +#: admin/settings.php:323 +msgid "Sticky posts" +msgstr "置頂文章" + +# @ polylang +#: admin/settings.php:324 +msgid "Published date" +msgstr "發佈日期" + +# @ polylang +#: admin/settings.php:325 +msgid "Post format" +msgstr "文章格式" + +# @ polylang +#: admin/settings.php:326 +msgid "Page parent" +msgstr "分頁上層" + +# @ polylang +#: admin/settings.php:327 +msgid "Page template" +msgstr "分頁模板" + +# @ polylang +#: admin/settings.php:328 +msgid "Page order" +msgstr "分頁順序" + +# @ polylang +#: admin/settings.php:329 +msgid "Featured image" +msgstr "特色圖片" + +# @ polylang +#: admin/view-tab-lang.php:21 +msgid "Edit language" +msgstr "編輯語言" + +# @ polylang +#: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96 +msgid "Add new language" +msgstr "新增語言" + +# @ polylang +#: admin/view-tab-lang.php:37 +msgid "Choose a language" +msgstr "選擇一個語言" + +# @ polylang +#: admin/view-tab-lang.php:51 +msgid "You can choose a language in the list or directly edit it below." +msgstr "你可以在列表內選擇一個語言或直接在這邊編輯它。" + +# @ polylang +#: admin/table-languages.php:74 admin/view-tab-lang.php:55 +msgid "Full name" +msgstr "全名" + +# @ polylang +#: admin/view-tab-lang.php:57 +msgid "The name is how it is displayed on your site (for example: English)." +msgstr "這個名字是顯示於網站上(範例: English)" + +# @ polylang +#: admin/table-languages.php:75 admin/view-tab-lang.php:61 +msgid "Locale" +msgstr "語言環境" + +# @ polylang +#: admin/view-tab-lang.php:66 +msgid "" +"WordPress Locale for the language (for example: en_US). You will need to " +"install the .mo file for this language." +msgstr "WordPress 語言環境設定(範例:en_US)。你必須安裝對應此語言的 .mo 檔案。" + +# @ polylang +#: admin/view-tab-lang.php:70 +msgid "Language code" +msgstr "語言代碼" + +# @ polylang +#: admin/view-tab-lang.php:76 +msgid "Text direction" +msgstr "文字方向" + +# @ polylang +#: admin/view-tab-lang.php:80 +msgid "left to right" +msgstr "左到右" + +# @ polylang +#: admin/view-tab-lang.php:85 +msgid "right to left" +msgstr "右到左" + +# @ polylang +#: admin/view-tab-lang.php:87 +msgid "Choose the text direction for the language" +msgstr "選擇此語言的文字方向" + +# @ polylang +#: admin/table-languages.php:77 admin/view-tab-lang.php:91 +msgid "Order" +msgstr "順序" + +# @ polylang +#: admin/view-tab-lang.php:93 +msgid "Position of the language in the language switcher" +msgstr "此語言在語言切換選項中的位置" + +# @ polylang +#: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92 +#: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126 +#: admin/admin-nav-menu.php:188 install/upgrade.php:301 +msgid "Language switcher" +msgstr "語言切換" + +# @ polylang +#: admin/view-tab-strings.php:8 +msgid "Search translations" +msgstr "搜尋翻譯" + +# @ polylang +#: admin/view-tab-strings.php:11 +msgid "Clean strings translation database" +msgstr "清除資料庫中翻譯的字串" + +# @ polylang +#: admin/view-tab-settings.php:14 +msgid "Default language" +msgstr "預設語言" + +# @ polylang +#: admin/view-tab-settings.php:29 +msgid "" +"There are posts, pages, categories or tags without language set. Do you want " +"to set them all to default language ?" +msgstr "有文章、頁面、分類或標籤尚未設置語言。你要將要全部設定為預設語言嗎?" + +# @ polylang +#: admin/view-tab-settings.php:149 +msgid "Detect browser language" +msgstr "偵測瀏覽器語言" + +# @ polylang +#: admin/view-tab-settings.php:155 +msgid "" +"When the front page is visited, set the language according to the browser " +"preference" +msgstr "當首頁被訪問時,根據瀏覽器的偏好設置語言" + +# @ polylang +#: admin/view-tab-settings.php:37 +msgid "URL modifications" +msgstr "URL 網址改寫" + +# @ polylang +#: admin/view-tab-settings.php:93 +msgid "Hide URL language information for default language" +msgstr "隱藏預設語言的 URL 訊息" + +# @ polylang +#: admin/view-tab-settings.php:162 +msgid "Media" +msgstr "媒體庫" + +# @ polylang +#: admin/view-tab-settings.php:168 +msgid "Activate languages and translations for media" +msgstr "為媒體庫啟用語言與翻譯功能" + +# @ polylang +#: admin/view-tab-settings.php:215 +msgid "Synchronization" +msgstr "同步" + +# @ polylang +#: admin/view-tab-settings.php:176 +msgid "Custom post types" +msgstr "自訂文章格式" + +# @ polylang +#: admin/view-tab-settings.php:189 +msgid "Activate languages and translations for custom post types." +msgstr "為自訂文章格式啟用語言與翻譯。" + +# @ polylang +#: admin/view-tab-settings.php:196 +msgid "Custom taxonomies" +msgstr "自定義分類" + +# @ polylang +#: admin/view-tab-settings.php:209 +msgid "Activate languages and translations for custom taxonomies." +msgstr "為自定義分類啟用語言與翻譯功能。" + +# @ polylang +#: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642 +#: admin/table-languages.php:54 admin/view-translations-media.php:21 +msgid "Edit" +msgstr "編輯" + +# @ polylang +#: admin/table-languages.php:60 admin/table-string.php:168 +msgid "Delete" +msgstr "刪除" + +# @ polylang +#: admin/table-languages.php:76 +msgid "Code" +msgstr "代碼" + +# @ polylang +#: admin/table-languages.php:78 +msgid "Flag" +msgstr "旗幟" + +# @ polylang +#: admin/table-languages.php:79 +msgid "Posts" +msgstr "文章" + +# @ polylang +#: admin/table-string.php:110 +msgid "Name" +msgstr "名稱" + +# @ polylang +#: admin/table-string.php:111 +msgid "String" +msgstr "字串" + +# @ polylang +#: admin/view-translations-media.php:30 admin/view-translations-post.php:21 +#: admin/view-translations-term.php:30 +msgid "Add new" +msgstr "新增" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Language Switcher" +msgstr "語言切換" + +# @ polylang +#: include/widget-languages.php:16 +msgid "Displays a language switcher" +msgstr "顯示語言切換工具" + +# @ polylang +#: include/widget-languages.php:75 +msgid "Title:" +msgstr "標題:" + +# @ polylang +#. translators: plugin header field 'Description' +#: polylang.php:0 +msgid "Adds multilingual capability to WordPress" +msgstr "讓WordPress增加多語言功能" + +# @ polylang +#: install/install.php:24 +#, php-format +msgid "You are using WordPress %s. Polylang requires at least WordPress %s." +msgstr "你正在使用 WordPress %s。 Polylang 最低系統需求 WordPress %s。" + +# @ polylang +#: install/upgrade.php:76 +msgid "" +"Polylang has been deactivated because you upgraded from a too old version." +msgstr "Polylang 已經停用,因為你從太舊的版本升級。" + +# @ polylang +#: install/upgrade.php:78 +#, php-format +msgid "Please upgrade first to %s before ugrading to %s." +msgstr "在升級到 %s 之前請先升級到 %s。" + +# @ polylang +#: admin/table-string.php:109 +msgid "Group" +msgstr "群組" + +# @ polylang +#: admin/table-string.php:187 +msgid "View all groups" +msgstr "檢視全部群組" + +# @ polylang +#: admin/table-languages.php:59 +msgid "You are about to permanently delete this language. Are you sure?" +msgstr "你將永遠刪除此語言。確定刪除?" + +# @ polylang +#: admin/view-tab-strings.php:12 +msgid "" +"Use this to remove unused strings from database, for example after a plugin " +"has been uninstalled." +msgstr "使用它從資料庫中刪除未使用的字串。例如在外掛被移除後。" + +# @ polylang +#: admin/view-tab-settings.php:226 +msgid "" +"The synchronization options allow to maintain exact same values (or " +"translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page." +msgstr "" +"同步的設定允許在一篇文章或是頁面(或自定義分類、上層頁面)的翻譯保存相同內容的" +"值。
    [ The synchronization options allow to maintain exact same values " +"(or translations in the case of taxonomies and page parent) of meta content " +"between the translations of a post or page.]" + +# @ polylang +#: admin/admin-model.php:248 +msgid "The language code contains invalid characters" +msgstr "語言代碼中帶有無效的字元" + +# @ polylang +#: admin/view-tab-settings.php:43 +msgid "The language is set from content" +msgstr "只針對內容作多語言設定。(網址不變更)" + +# @ polylang +#: admin/view-tab-settings.php:46 +msgid "Posts, pages, categories and tags urls are not modified." +msgstr "文章、頁面、分類與標籤的網址並不會被改寫。" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the directory name in pretty permalinks" +msgstr "語言設置是在漂亮的固定網址中加入目錄名稱" + +# @ polylang +#: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63 +#: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119 +msgid "Example:" +msgstr "範例:" + +# @ polylang +#: admin/view-tab-settings.php:60 +msgid "The language is set from the subdomain name in pretty permalinks" +msgstr "語言設置是透過子網域來設定漂亮的固定網址。" + +# @ polylang +#: admin/view-tab-settings.php:69 +msgid "The language is set from different domains" +msgstr "透過不同的網域名稱來設置不同的語言。" + +# @ polylang +#: admin/view-tab-settings.php:107 +msgid "Remove /language/ in pretty permalinks" +msgstr "在漂亮的固定網址中移除「/language/」" + +# @ polylang +#: admin/view-tab-settings.php:116 +msgid "Keep /language/ in pretty permalinks" +msgstr "在漂亮的固定網址中保留「/language/」" + +# @ polylang +#: admin/view-tab-settings.php:131 +msgid "" +"The front page url contains the language code instead of the page name or " +"page id" +msgstr "首頁URL包含語言代碼而不是頁面名稱或是頁面ID" + +# @ polylang +#: admin/view-tab-settings.php:139 +#, php-format +msgid "Example: %s instead of %s" +msgstr "範例: %s 而不是 %s" + +# @ polylang +#: admin/admin-model.php:38 +msgid "Impossible to add the language." +msgstr "無法加入此語言。" + +# @ polylang +#: admin/admin-model.php:66 +msgid "Language added." +msgstr "語言已新增。" + +# @ polylang +#: admin/admin-model.php:146 +msgid "Language deleted." +msgstr "語言已刪除。" + +# @ polylang +#: admin/admin-model.php:227 +msgid "Language updated." +msgstr "語言已更新。" + +# @ polylang +#: admin/settings.php:239 +msgid "Translations updated." +msgstr "翻譯已更新。" + +# @ polylang +#: admin/view-tab-lang.php:72 +msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)" +msgstr "語言代碼 - 2 字元語言代碼,依據 ISO 639-1 標準 (例如: en)" + +# @ polylang +#: admin/admin-filters.php:203 +msgid "The chosen static front page must be translated in all languages." +msgstr "" + +# @ polylang +#: admin/admin-strings.php:60 +msgid "Widget text" +msgstr "" + +# @ polylang +#: admin/settings.php:52 +msgid "Recommended plugins" +msgstr "" + +# @ polylang +#: admin/view-tab-settings.php:51 +msgid "The language is set from the code in the URL" +msgstr "" + +# @ polylang +#: include/switcher.php:26 +msgid "Hides languages with no translation" +msgstr "" diff --git a/pole-sbv-content/plugins/polylang/lingotek/image01.gif b/pole-sbv-content/plugins/polylang/lingotek/image01.gif new file mode 100644 index 00000000..0ae60ac5 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/lingotek/image01.gif differ diff --git a/pole-sbv-content/plugins/polylang/lingotek/image02.png b/pole-sbv-content/plugins/polylang/lingotek/image02.png new file mode 100644 index 00000000..0293bb44 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/lingotek/image02.png differ diff --git a/pole-sbv-content/plugins/polylang/lingotek/image03.png b/pole-sbv-content/plugins/polylang/lingotek/image03.png new file mode 100644 index 00000000..95ed5464 Binary files /dev/null and b/pole-sbv-content/plugins/polylang/lingotek/image03.png differ diff --git a/pole-sbv-content/plugins/polylang/lingotek/image04.png b/pole-sbv-content/plugins/polylang/lingotek/image04.png new file mode 100644 index 00000000..210a1f6a Binary files /dev/null and b/pole-sbv-content/plugins/polylang/lingotek/image04.png differ diff --git a/pole-sbv-content/plugins/polylang/lingotek/lingotek.php b/pole-sbv-content/plugins/polylang/lingotek/lingotek.php new file mode 100644 index 00000000..ea4dc21d --- /dev/null +++ b/pole-sbv-content/plugins/polylang/lingotek/lingotek.php @@ -0,0 +1,303 @@ + __( 'Close' ), + ), + array( + 'label' => __( 'Learn more', 'polylang' ), + 'link' => admin_url( 'admin.php?page=mlang&tab=lingotek' ), + ), + ); + + if ( $link = $this->get_activate_link() ) { + $content .= ' ' . __( 'Click on Activate Lingotek to start translating.', 'polylang' ); + + $buttons[] = array( + 'label' => __( 'Activate Lingotek', 'polylang' ), + 'link' => str_replace( '&', '&', $link ), // wp_nonce_url escapes the url for html display. Here we want it for js + ); + } + + $args = array( + 'pointer' => 'pll_lgt', + 'id' => empty( $options['previous_version'] ) ? 'nav-tab-lingotek' : 'wp-admin-bar-languages', + 'position' => array( + 'edge' => 'top', + 'align' => 'left', + ), + 'width' => 400, + 'title' => __( 'Congratulations!', 'polylang' ), + 'content' => $content, + 'buttons' => $buttons, + ); + + new PLL_Pointer( $args ); + } + + /** + * Adds the Lingotek tab in Polylang settings + * + * @since 1.7.7 + * + * @param array $tabs list of tabs + * @return array modified liste of tabs + */ + public function add_tab( $tabs ) { + $tabs['lingotek'] = 'Lingotek'; + return $tabs; + } + + /** + * Displays the content in the Lingotek tab + * + * @since 1.7.7 + */ + public function display_tab() { + $activate_link = $this->get_activate_link(); + + $links = array( + 'activate' => array( + 'label' => is_plugin_active( self::LINGOTEK ) ? __( 'Activated', 'polylang' ) : __( 'Activate', 'polylang' ), + 'link' => $activate_link, + 'classes' => 'button button-primary' . ( $activate_link ? '' : ' disabled' ), + ), + 'translation' => array( + 'label' => __( 'Request Translation', 'polylang' ), + 'link' => 'http://www.lingotek.com/wordpress/translation_bid', + 'new_tab' => true, + 'classes' => 'button button-primary', + ), + 'services' => array( + 'label' => __( 'Request Services', 'polylang' ), + 'link' => 'http://www.lingotek.com/wordpress/extra_services', + 'new_tab' => true, + 'classes' => 'button button-primary', + ), + ); + + printf( '

    %s

    ', esc_html__( 'Polylang is now fully integrated with Lingotek, a professional translation management system!', 'polylang' ) ); + + $this->box( + __( 'Automatically Translate My Site', 'polylang' ), + __( 'Polylang is now fully integrated with Lingotek!', 'polylang' ), + array( + __( 'Access free machine translation for your site for up to 100,000 characters.', 'polylang' ), + __( 'Machine translation is an excellent option if you\'re on a tight budget, looking for near-instant results, and are okay with less-than-perfect quality.', 'polylang' ), + ), + array_intersect_key( $links, array_flip( array( 'activate' ) ) ), + 'image01.gif' + ); + + $this->box( + __( 'Translation Management System', 'polylang' ), + __( 'Do you need to connect to a professional translation management system?', 'polylang' ), + array( + __( 'Access free machine translation for your site for up to 100,000 characters.', 'polylang' ), + __( 'Access an online translator workbench.', 'polylang' ), + __( 'Have linguists compare side-by-side versions of original and translated text.', 'polylang' ), + __( 'Save and re-use previously translated material (leverage translation memory (TM)).', 'polylang' ), + ), + array_intersect_key( $links, array_flip( array( 'activate' ) ) ), + 'image02.png' + ); + + $this->box( + __( 'Professionally Translate My Site', 'polylang' ), + __( 'Do you need to professionally translate your site?', 'polylang' ), + array( + __( 'Start the process of getting a professional translation bid.', 'polylang' ), + __( 'Activate account so Lingotek can get an accurate count of how many words you have on your site and which languages you wish to translate into.', 'polylang' ), + __( 'Once activated click on the request translation bid and a certified translation project manager will contact you to give a no obligations translation bid.', 'polylang' ), + ), + array_intersect_key( $links, array_flip( array( 'activate', 'translation' ) ) ), + 'image03.png' + ); + + $this->box( + __( 'Need Extra Services?', 'polylang' ), + __( 'Do you need help translating your site?', 'polylang' ), + array( + __( 'Start the process of getting extra services.', 'polylang' ), + __( 'Do you need someone to run your localization project?', 'polylang' ), + __( 'Do you need customized workflows?', 'polylang' ), + __( 'Do you have existing Translation Memories you would like to use?', 'polylang' ), + __( 'Do you need help creating glossaries and terminologies?', 'polylang' ), + ), + array_intersect_key( $links, array_flip( array( 'activate', 'services' ) ) ), + 'image04.png' + ); + } + + /** + * Styles the content of the Lingotek tab + * + * @since 1.7.7 + */ + public function print_css() { + ?> + + +
    +
    +
    + +
    +

    +

    + %s ', + esc_attr( $link_details['classes'] ), + esc_url( $link_details['link'] ), + empty( $link_details['new_tab'] ) ? '' : ' target = "_blank"', + esc_html( $link_details['label'] ) + ); + } + ?> +
    +
    +
      + %s', esc_html( $item ) ); + } + ?> +
    + +
    + +
    + getFileName() ) ) . '/languages' ); + + $GLOBALS['wp_import'] = new PLL_WP_Import(); + register_importer( 'wordpress', 'WordPress', __( 'Import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.', 'wordpress-importer' ), array( $GLOBALS['wp_import'], 'dispatch' ) ); // WPCS: spelling ok. + } + + /** + * WordPress Importer + * Backward Compatibility Polylang < 1.8 + * Sets the flag when importing a language and the file has been exported with Polylang < 1.8 + * + * @since 1.8 + * + * @param array $terms an array of arrays containing terms information form the WXR file + * @return array + */ + function wp_import_terms( $terms ) { + include PLL_SETTINGS_INC . '/languages.php'; + + foreach ( $terms as $key => $term ) { + if ( 'language' === $term['term_taxonomy'] ) { + $description = maybe_unserialize( $term['term_description'] ); + if ( empty( $description['flag_code'] ) && isset( $languages[ $description['locale'] ] ) ) { + $description['flag_code'] = $languages[ $description['locale'] ][4]; + $terms[ $key ]['term_description'] = serialize( $description ); + } + } + } + return $terms; + } + + /** + * YARPP + * Just makes YARPP aware of the language taxonomy ( after Polylang registered it ) + * + * @since 1.0 + */ + public function yarpp_init() { + $GLOBALS['wp_taxonomies']['language']->yarpp_support = 1; + } + + /** + * Yoast SEO + * Translate options and add specific filters and actions + * + * @since 1.6.4 + */ + public function wpseo_init() { + if ( ! defined( 'WPSEO_VERSION' ) ) { + return; + } + + if ( ! PLL() instanceof PLL_Frontend ) { + add_action( 'admin_init', array( $this, 'wpseo_register_strings' ) ); + return; + } + + add_filter( 'option_wpseo_titles', array( $this, 'wpseo_translate_titles' ) ); + + // Reloads options once the language has been defined to enable translations + // Useful only when the language is set from content + if ( did_action( 'wp_loaded' ) ) { + if ( version_compare( WPSEO_VERSION, '1.7.2', '<' ) ) { + global $wpseo_front; + } else { + $wpseo_front = WPSEO_Frontend::get_instance(); + } + + $options = version_compare( WPSEO_VERSION, '1.5', '<' ) ? get_wpseo_options_arr() : WPSEO_Options::get_option_names(); + foreach ( $options as $opt ) { + $wpseo_front->options = array_merge( $wpseo_front->options, (array) get_option( $opt ) ); + } + } + + // Filters sitemap queries to remove inactive language or to get + // one sitemap per language when using multiple domains or subdomains + // because WPSEO does not accept several domains or subdomains in one sitemap + add_filter( 'wpseo_posts_join', array( $this, 'wpseo_posts_join' ), 10, 2 ); + add_filter( 'wpseo_posts_where', array( $this, 'wpseo_posts_where' ), 10, 2 ); + add_filter( 'wpseo_typecount_join', array( $this, 'wpseo_posts_join' ), 10, 2 ); + add_filter( 'wpseo_typecount_where', array( $this, 'wpseo_posts_where' ), 10, 2 ); + + if ( PLL()->options['force_lang'] > 1 ) { + add_filter( 'wpseo_enable_xml_sitemap_transient_caching', '__return_false' ); // Disable cache! otherwise WPSEO keeps only one domain (thanks to Junaid Bhura) + add_filter( 'home_url', array( $this, 'wpseo_home_url' ) , 10, 2 ); // Fix home_url + } else { + // Get all terms in all languages when the language is set from the content or directory name + add_filter( 'get_terms_args', array( $this, 'wpseo_remove_terms_filter' ) ); + + // Add the homepages for all languages to the sitemap when the front page displays posts + if ( ! get_option( 'page_on_front' ) ) { + add_filter( 'wpseo_sitemap_post_content', array( $this, 'add_language_home_urls' ) ); + } + } + + add_filter( 'pll_home_url_white_list', array( $this, 'wpseo_home_url_white_list' ) ); + add_action( 'wpseo_opengraph', array( $this, 'wpseo_ogp' ), 2 ); + add_filter( 'wpseo_canonical', array( $this, 'wpseo_canonical' ) ); + } + + /** + * Yoast SEO + * Helper function to register strings for custom post types and custom taxonomies titles and meta descriptions + * + * @since 2.1.6 + * + * @param array $options + * @param array $titles + * @return array + */ + protected function _wpseo_register_strings( $options, $titles ) { + foreach ( $titles as $title ) { + if ( ! empty( $options[ $title ] ) ) { + pll_register_string( $title, $options[ $title ], 'wordpress-seo' ); + } + } + return $options; + } + + /** + * Yoast SEO + * Registers strings for custom post types and custom taxonomies titles and meta descriptions + * + * @since 2.0 + */ + function wpseo_register_strings() { + $options = get_option( 'wpseo_titles' ); + foreach ( get_post_types( array( 'public' => true, '_builtin' => false ) ) as $t ) { + if ( pll_is_translated_post_type( $t ) ) { + $this->_wpseo_register_strings( $options, array( 'title-' . $t, 'metadesc-' . $t ) ); + } + } + foreach ( get_post_types( array( 'has_archive' => true, '_builtin' => false ) ) as $t ) { + if ( pll_is_translated_post_type( $t ) ) { + $this->_wpseo_register_strings( $options, array( 'title-ptarchive-' . $t, 'metadesc-ptarchive-' . $t, 'bctitle-ptarchive-' . $t ) ); + } + } + foreach ( get_taxonomies( array( 'public' => true, '_builtin' => false ) ) as $t ) { + if ( pll_is_translated_taxonomy( $t ) ) { + $this->_wpseo_register_strings( $options, array( 'title-tax-' . $t, 'metadesc-tax-' . $t ) ); + } + } + } + + /** + * Yoast SEO + * Helper function to translate custom post types and custom taxonomies titles and meta descriptions + * + * @since 2.1.6 + * + * @param array $options + * @param array $titles + * @return array + */ + protected function _wpseo_translate_titles( $options, $titles ) { + foreach ( $titles as $title ) { + if ( ! empty( $options[ $title ] ) ) { + $options[ $title ] = pll__( $options[ $title ] ); + } + } + return $options; + } + + /** + * Yoast SEO + * Translates strings for custom post types and custom taxonomies titles and meta descriptions + * + * @since 2.0 + * + * @param array $options + * @return array + */ + function wpseo_translate_titles( $options ) { + if ( PLL() instanceof PLL_Frontend ) { + foreach ( get_post_types( array( 'public' => true, '_builtin' => false ) ) as $t ) { + if ( pll_is_translated_post_type( $t ) ) { + $options = $this->_wpseo_translate_titles( $options, array( 'title-' . $t, 'metadesc-' . $t ) ); + } + } + foreach ( get_post_types( array( 'has_archive' => true, '_builtin' => false ) ) as $t ) { + if ( pll_is_translated_post_type( $t ) ) { + $options = $this->_wpseo_translate_titles( $options, array( 'title-ptarchive-' . $t, 'metadesc-ptarchive-' . $t, 'bctitle-ptarchive-' . $t ) ); + } + } + foreach ( get_taxonomies( array( 'public' => true, '_builtin' => false ) ) as $t ) { + if ( pll_is_translated_taxonomy( $t ) ) { + $options = $this->_wpseo_translate_titles( $options, array( 'title-tax-' . $t, 'metadesc-tax-' . $t ) ); + } + } + } + return $options; + } + + /** + * Yoast SEO + * Fixes the home url as well as the stylesheet url + * Only when using multiple domains or subdomains + * + * @since 1.6.4 + * + * @param string $url + * @param string $path + * @return $url + */ + public function wpseo_home_url( $url, $path ) { + $uri = empty( $path ) ? ltrim( $_SERVER['REQUEST_URI'], '/' ) : $path; + + if ( 'sitemap_index.xml' === $uri || preg_match( '#([^/]+?)-sitemap([0-9]+)?\.xml|([a-z]+)?-?sitemap\.xsl#', $uri ) ) { + $url = PLL()->links_model->switch_language_in_link( $url, PLL()->curlang ); + } + + return $url; + } + + /** + * Yoast SEO + * Get active languages for the sitemaps + * + * @since 2.0 + * + * @return array list of active language slugs, empty if all languages are active + */ + protected function wpseo_get_active_languages() { + $languages = PLL()->model->get_languages_list(); + if ( wp_list_filter( $languages, array( 'active' => false ) ) ) { + return wp_list_pluck( wp_list_filter( $languages, array( 'active' => false ), 'NOT' ), 'slug' ); + } + return array(); + } + + /** + * Yoast SEO + * Modifies the sql request for posts sitemaps + * Only when using multiple domains or subdomains or if some languages are not active + * + * @since 1.6.4 + * + * @param string $sql JOIN clause + * @param string $post_type + * @return string + */ + public function wpseo_posts_join( $sql, $post_type ) { + return pll_is_translated_post_type( $post_type ) && ( PLL()->options['force_lang'] > 1 || $this->wpseo_get_active_languages() ) ? $sql . PLL()->model->post->join_clause() : $sql; + } + + /** + * Yoast SEO + * Modifies the sql request for posts sitemaps + * Only when using multiple domains or subdomains or if some languages are not active + * + * @since 1.6.4 + * + * @param string $sql WHERE clause + * @param string $post_type + * @return string + */ + public function wpseo_posts_where( $sql, $post_type ) { + if ( pll_is_translated_post_type( $post_type ) ) { + if ( PLL()->options['force_lang'] > 1 ) { + return $sql . PLL()->model->post->where_clause( PLL()->curlang ); + } + + if ( $languages = $this->wpseo_get_active_languages() ) { + return $sql . PLL()->model->post->where_clause( $languages ); + } + } + return $sql; + } + + /** + * Yoast SEO + * Removes the language filter (and remove inactive languages) for the taxonomy sitemaps + * Only when the language is set from the content or directory name + * + * @since 1.0.3 + * + * @param array $args get_terms arguments + * @return array modified list of arguments + */ + public function wpseo_remove_terms_filter( $args ) { + if ( isset( $GLOBALS['wp_query']->query['sitemap'] ) ) { + $args['lang'] = implode( ',', $this->wpseo_get_active_languages() ); + } + return $args; + } + + /** + * Yoast SEO + * Adds the home urls for all (active) languages to the sitemap + * + * @since 1.9 + * + * @param string $str additional urls to sitemap post + * @return string + */ + public function add_language_home_urls( $str ) { + global $wpseo_sitemaps; + $renderer = version_compare( WPSEO_VERSION, '3.2', '<' ) ? $wpseo_sitemaps : $wpseo_sitemaps->renderer; + + $languages = wp_list_pluck( wp_list_filter( PLL()->model->get_languages_list() , array( 'active' => false ), 'NOT' ), 'slug' ); + + foreach ( $languages as $lang ) { + if ( empty( PLL()->options['hide_default'] ) || pll_default_language() !== $lang ) { + $str .= $renderer->sitemap_url( array( + 'loc' => pll_home_url( $lang ), + 'pri' => 1, + 'chf' => apply_filters( 'wpseo_sitemap_homepage_change_freq', 'daily', pll_home_url( $lang ) ), + ) ); + } + } + return $str; + } + + /** + * Yoast SEO + * + * @since 1.1.2 + * + * @param array $arr + * @return array + */ + public function wpseo_home_url_white_list( $arr ) { + return array_merge( $arr, array( array( 'file' => 'wordpress-seo' ) ) ); + } + + /** + * Yoast SEO + * Adds opengraph support for translations + * + * @since 1.6 + */ + public function wpseo_ogp() { + global $wpseo_og; + + // WPSEO already deals with the locale + if ( did_action( 'pll_init' ) && method_exists( $wpseo_og, 'og_tag' ) ) { + foreach ( PLL()->model->get_languages_list() as $language ) { + if ( PLL()->curlang->slug !== $language->slug && PLL()->links->get_translation_url( $language ) && $fb_locale = self::get_fb_locale( $language ) ) { + $wpseo_og->og_tag( 'og:locale:alternate', $fb_locale ); + } + } + } + } + + /** + * Yoast SEO + * Fixes the canonical front page url as unlike WP, WPSEO does not add a trailing slash to the canonical front page url + * + * @since 1.7.10 + * + * @param string $url + * @return $url + */ + public function wpseo_canonical( $url ) { + return is_front_page( $url ) && get_option( 'permalink_structure' ) ? trailingslashit( $url ) : $url; + } + + /** + * Aqua Resizer + * + * @since 1.1.5 + * + * @param array $arr + * @return array + */ + public function aq_home_url_black_list( $arr ) { + return array_merge( $arr, array( array( 'function' => 'aq_resize' ) ) ); + } + + /** + * Custom field template + * Custom field template does check $_REQUEST['post'] to populate the custom fields values + * + * @since 1.0.2 + * + * @param string $post_type unused + * @param object $post current post object + */ + public function cft_copy( $post_type, $post ) { + global $custom_field_template; + if ( isset( $custom_field_template, $_REQUEST['from_post'], $_REQUEST['new_lang'] ) && ! empty( $post ) ) { + $_REQUEST['post'] = $post->ID; + } + } + + /** + * Twenty Fourteen + * Rewrites the function Featured_Content::get_featured_post_ids() + * + * @since 1.4 + * + * @param array $featured_ids featured posts ids + * @return array modified featured posts ids ( include all languages ) + */ + public function twenty_fourteen_featured_content_ids( $featured_ids ) { + if ( 'twentyfourteen' != get_template() || ! did_action( 'pll_init' ) || false !== $featured_ids ) { + return $featured_ids; + } + + $settings = Featured_Content::get_setting(); + + if ( ! $term = wpcom_vip_get_term_by( 'name', $settings['tag-name'], 'post_tag' ) ) { + return $featured_ids; + } + + // Get featured tag translations + $tags = PLL()->model->term->get_translations( $term->term_id ); + $ids = array(); + + // Query for featured posts in all languages + // One query per language to get the correct number of posts per language + foreach ( $tags as $tag ) { + $_ids = get_posts( array( + 'lang' => 0, // avoid language filters + 'fields' => 'ids', + 'numberposts' => Featured_Content::$max_posts, + 'tax_query' => array( + array( + 'taxonomy' => 'post_tag', + 'terms' => (int) $tag, + ), + ), + ) ); + + $ids = array_merge( $ids, $_ids ); + } + + $ids = array_map( 'absint', $ids ); + set_transient( 'featured_content_ids', $ids ); + + return $ids; + } + + /** + * Twenty Fourteen + * Translates the featured tag id in featured content settings + * Mainly to allow hiding it when requested in featured content options + * Acts only on frontend + * + * @since 1.4 + * + * @param array $settings featured content settings + * @return array modified $settings + */ + public function twenty_fourteen_option_featured_content( $settings ) { + if ( 'twentyfourteen' == get_template() && PLL() instanceof PLL_Frontend && $settings['tag-id'] && $tr = pll_get_term( $settings['tag-id'] ) ) { + $settings['tag-id'] = $tr; + } + + return $settings; + } + + /** + * Duplicate Post + * Avoid duplicating the 'post_translations' taxonomy + * + * @since 1.8 + * + * @param array|string $taxonomies + * @return array + */ + function duplicate_post_taxonomies_blacklist( $taxonomies ) { + if ( empty( $taxonomies ) ) { + $taxonomies = array(); // As we get an empty string when there is no taxonomy + } + + $taxonomies[] = 'post_translations'; + return $taxonomies; + } + + /** + * Jetpack + * Add filters + * + * @since 2.1 + */ + public function jetpack_init() { + if ( ! defined( 'JETPACK__VERSION' ) ) { + return; + } + + // Infinite scroll ajax url must be on the right domain + if ( did_action( 'pll_init' ) && PLL()->options['force_lang'] > 1 ) { + add_filter( 'infinite_scroll_ajax_url', array( PLL()->links_model, 'site_url' ) ); + add_filter( 'infinite_scroll_js_settings', array( $this, 'jetpack_infinite_scroll_js_settings' ) ); + } + } + + /** + * Jetpack + * Filter the Top Posts and Pages by language. + * Adapted from the same function in jetpack-3.0.2/3rd-party/wpml.php + * + * @since 1.5.4 + * + * @param array $posts Array of the most popular posts. + * @param array $post_ids Array of Post IDs. + * @param string $count Number of Top Posts we want to display. + * @return array + */ + public function jetpack_widget_get_top_posts( $posts, $post_ids, $count ) { + foreach ( $posts as $k => $post ) { + if ( pll_current_language() !== pll_get_post_language( $post['post_id'] ) ) { + unset( $posts[ $k ] ); + } + } + + return $posts; + } + + /** + * Jetpack + * Filter the HTML of the Contact Form and output the one requested by language. + * Adapted from the same function in jetpack-3.0.2/3rd-party/wpml.php + * Keeps using 'icl_translate' as the function registers the string + * + * @since 1.5.4 + * + * @param string $r Contact Form HTML output. + * @param string $field_label Field label. + * @param int|null $id Post ID. + * @return string + */ + public function grunion_contact_form_field_html_filter( $r, $field_label, $id ) { + if ( function_exists( 'icl_translate' ) ) { + if ( pll_current_language() !== pll_default_language() ) { + $label_translation = icl_translate( 'jetpack ', $field_label . '_label', $field_label ); + $r = str_replace( $field_label, $label_translation, $r ); + } + } + + return $r; + } + + /** + * Jetpack + * Adds opengraph support for locale and translations + * + * @since 1.6 + * + * @param array $tags opengraph tags to output + * @return array + */ + public function jetpack_ogp( $tags ) { + if ( did_action( 'pll_init' ) ) { + foreach ( PLL()->model->get_languages_list() as $language ) { + if ( PLL()->curlang->slug !== $language->slug && PLL()->links->get_translation_url( $language ) && $fb_locale = self::get_fb_locale( $language ) ) { + $tags['og:locale:alternate'][] = $fb_locale; + } + if ( PLL()->curlang->slug === $language->slug && $fb_locale = self::get_fb_locale( $language ) ) { + $tags['og:locale'] = $fb_locale; + } + } + } + return $tags; + } + + /** + * Jetpack + * Allows to make sure that related posts are in the correct language + * + * @since 1.8 + * + * @param array $filters Array of ElasticSearch filters based on the post_id and args. + * @param string $post_id Post ID of the post for which we are retrieving Related Posts. + * @return array + */ + function jetpack_relatedposts_filter_filters( $filters, $post_id ) { + $slug = sanitize_title( pll_get_post_language( $post_id, 'slug' ) ); + $filters[] = array( 'term' => array( 'taxonomy.language.slug' => $slug ) ); + return $filters; + } + + /** + * Jetpack + * Fixes the settings history host for infinite scroll when using subdomains or multiple domains + * + * @since 2.1 + * + * @param array $settings + * @return array + */ + public function jetpack_infinite_scroll_js_settings( $settings ) { + $settings['history']['host'] = parse_url( pll_home_url(), PHP_URL_HOST ); // Jetpack uses get_option( 'home' ) + return $settings; + } + + /** + * WP Sweep + * Add 'term_language' and 'term_translations' to excluded taxonomies otherwise terms loose their language and translation group + * + * @since 2.0 + * + * @param array $excluded_taxonomies list of taxonomies excluded from sweeping + * @return array + */ + public function wp_sweep_excluded_taxonomies( $excluded_taxonomies ) { + return array_merge( $excluded_taxonomies, array( 'term_language', 'term_translations' ) ); + } + + /** + * Twenty Seventeen + * Translates the front page panels + * + * @since 2.0.10 + */ + public function twenty_seventeen_init() { + if ( 'twentyseventeen' === get_template() && function_exists( 'twentyseventeen_panel_count' ) && did_action( 'pll_init' ) && PLL() instanceof PLL_Frontend ) { + $num_sections = twentyseventeen_panel_count(); + for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) { + add_filter( 'theme_mod_panel_' . $i, 'pll_get_post' ); + } + } + } + + /** + * Make sure No category base plugins (including Yoast SEO) get all categories when flushing rules + * + * @since 2.1 + * + * @param array $args + * @return array + */ + public function no_category_base_get_terms_args( $args ) { + if ( doing_filter( 'category_rewrite_rules' ) ) { + $args['lang'] = ''; + } + return $args; + } + + /** + * WordPress MU Domain Mapping + * Fix primary domain check which forces only one domain per blog + * Accept only known domains/subdomains for the current blog + * + * @since 2.2 + */ + public function dm_redirect_to_mapped_domain() { + // Don't redirect the main site + if ( is_main_site() ) { + return; + } + + // Don't redirect post previews + if ( isset( $_GET['preview'] ) && 'true' === $_GET['preview'] ) { + return; + } + + // Don't redirect theme customizer + if ( isset( $_POST['customize'] ) && isset( $_POST['theme'] ) && 'on' === $_POST['customize'] ) { + return; + } + + // If we can't associate the requested domain to a language, redirect to the default domain + $options = get_option( 'polylang' ); + if ( $options['force_lang'] > 1 ) { + $hosts = PLL()->links_model->get_hosts(); + $lang = array_search( $_SERVER['HTTP_HOST'], $hosts ); + + if ( empty( $lang ) ) { + $status = get_site_option( 'dm_301_redirect' ) ? '301' : '302'; // Honor status redirect option + $redirect = ( is_ssl() ? 'https://' : 'http://' ) . $hosts[ $options['default_lang'] ] . $_SERVER['REQUEST_URI']; + wp_redirect( $redirect, $status ); + exit; + } + } + } + + /** + * Correspondance between WordPress locales and Facebook locales + * @see https://translate.wordpress.org/ + * @see https://www.facebook.com/translations/FacebookLocales.xml + * + * @since 1.8.1 Update the list of locales + * @since 1.6 + * + * @param object $language + * @return bool|string Facebook locale, false if no correspondance found + */ + static public function get_fb_locale( $language ) { + static $facebook_locales = array( + 'af' => 'af_ZA', + 'ak' => 'ak_GH', + 'am' => 'am_ET', + 'ar' => 'ar_AR', + 'arq' => 'ar_AR', + 'ary' => 'ar_AR', + 'as' => 'as_IN', + 'az' => 'az_AZ', + 'bel' => 'be_BY', + 'bg_BG' => 'bg_BG', + 'bn_BD' => 'bn_IN', + 'bre' => 'br_FR', + 'bs_BA' => 'bs_BA', + 'ca' => 'ca_ES', + 'ceb' => 'cx_PH', + 'ckb' => 'cb_IQ', + 'co' => 'co_FR', + 'cs_CZ' => 'cs_CZ', + 'cy' => 'cy_GB', + 'da_DK' => 'da_DK', + 'de_CH' => 'de_DE', + 'de_DE' => 'de_DE', + 'de_DE_formal' => 'de_DE', + 'el' => 'el_GR', + 'en_AU' => 'en_US', + 'en_CA' => 'en_US', + 'en_GB' => 'en_GB', + 'en_NZ' => 'en_US', + 'en_US' => 'en_US', + 'en_ZA' => 'en_US', + 'eo' => 'eo_EO', + 'es_AR' => 'es_LA', + 'es_CL' => 'es_CL', + 'es_CO' => 'es_CO', + 'es_MX' => 'es_MX', + 'es_PE' => 'es_LA', + 'es_ES' => 'es_ES', + 'es_VE' => 'es_VE', + 'et' => 'et_EE', + 'eu' => 'eu_ES', + 'fa_IR' => 'fa_IR', + 'fi' => 'fi_FI', + 'fo' => 'fo_FO', + 'fr_CA' => 'fr_CA', + 'fr_FR' => 'fr_FR', + 'fuc' => 'ff_NG', + 'fy' => 'fy_NL', + 'ga' => 'ga_IE', + 'gl_ES' => 'gl_ES', + 'gn' => 'gn_PY', + 'gu' => 'gu_IN', + 'he_IL' => 'he_IL', + 'hi_IN' => 'hi_IN', + 'hr' => 'hr_HR', + 'hu_HU' => 'hu_HU', + 'hy' => 'hy_AM', + 'id_ID' => 'id_ID', + 'is_IS' => 'is_IS', + 'it_IT' => 'it_IT', + 'ja' => 'ja_JP', + 'jv_ID' => 'jv_ID', + 'ka_GE' => 'ka_GE', + 'kin' => 'rw_RW', + 'kk' => 'kk_KZ', + 'km' => 'km_kH', + 'kn' => 'kn_IN', + 'ko_KR' => 'ko_KR', + 'ku' => 'ku_TR', + 'ky_KY' => 'ky_KG', + 'la' => 'la_Va', + 'li' => 'li_NL', + 'lin' => 'ln_CD', + 'lo' => 'lo_LA', + 'lt_LT' => 'lt_LT', + 'lv' => 'lv_LV', + 'mg_MG' => 'mg_MG', + 'mk_MK' => 'mk_MK', + 'ml_IN' => 'ml_IN', + 'mn' => 'mn_MN', + 'mr' => 'mr_IN', + 'mri' => 'mi_NZ', + 'ms_MY' => 'ms_MY', + 'my_MM' => 'my_MM', + 'ne_NP' => 'ne_NP', + 'nb_NO' => 'nb_NO', + 'nl_BE' => 'nl_BE', + 'nl_NL' => 'nl_NL', + 'nn_NO' => 'nn_NO', + 'ory' => 'or_IN', + 'pa_IN' => 'pa_IN', + 'pl_PL' => 'pl_PL', + 'ps' => 'ps_AF', + 'pt_BR' => 'pt_BR', + 'pt_PT' => 'pt_PT', + 'ps' => 'ps_AF', + 'ro_RO' => 'ro_RO', + 'roh' => 'rm_CH', + 'ru_RU' => 'ru_RU', + 'sa_IN' => 'sa_IN', + 'si_LK' => 'si_LK', + 'sk_SK' => 'sk_SK', + 'sl_SI' => 'sl_SI', + 'so_SO' => 'so_SO', + 'sq' => 'sq_AL', + 'sr_RS' => 'sr_RS', + 'srd' => 'sc_IT', + 'sv_SE' => 'sv_SE', + 'sw' => 'sw_KE', + 'szl' => 'sz_PL', + 'ta_LK' => 'ta_IN', + 'ta_IN' => 'ta_IN', + 'te' => 'te_IN', + 'tg' => 'tg_TJ', + 'th' => 'th_TH', + 'tl' => 'tl_PH', + 'tuk' => 'tk_TM', + 'tr_TR' => 'tr_TR', + 'tt_RU' => 'tt_RU', + 'tzm' => 'tz_MA', + 'uk' => 'uk_UA', + 'ur' => 'ur_PK', + 'uz_UZ' => 'uz_UZ', + 'vi' => 'vi_VN', + 'yor' => 'yo_NG', + 'zh_CN' => 'zh_CN', + 'zh_HK' => 'zh_HK', + 'zh_TW' => 'zh_TW', + ); + + return isset( $facebook_locales[ $language->locale ] ) ? $facebook_locales[ $language->locale ] : false; + } +} diff --git a/pole-sbv-content/plugins/polylang/modules/plugins/wp-import.php b/pole-sbv-content/plugins/polylang/modules/plugins/wp-import.php new file mode 100644 index 00000000..2fc46f71 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/modules/plugins/wp-import.php @@ -0,0 +1,185 @@ +terms + foreach ( $this->terms as $term ) { + if ( 'post_translations' == $term['term_taxonomy'] ) { + $this->post_translations[] = $term; + } + if ( 'term_translations' == $term['term_taxonomy'] ) { + $term_translations[] = $term; + } + } + + parent::process_terms(); + + // update the languages list if needed + // first reset the core terms cache as WordPress Importer calls wp_suspend_cache_invalidation( true ); + wp_cache_set( 'last_changed', microtime(), 'terms' ); + PLL()->model->clean_languages_cache(); + + if ( ( $options = get_option( 'polylang' ) ) && empty( $options['default_lang'] ) && ( $languages = PLL()->model->get_languages_list() ) ) { + // assign the default language if importer created the first language + $default_lang = reset( $languages ); + $options['default_lang'] = $default_lang->slug; + update_option( 'polylang', $options ); + } + + $this->remap_terms_relations( $term_translations ); + $this->remap_translations( $term_translations, $this->processed_terms ); + } + + /** + * overrides WP_Import::process_post to remap posts translations + * also merges strings translations from the WXR file to the existing ones + * + * @since 1.2 + */ + function process_posts() { + $menu_items = $mo_posts = array(); + + // store this for future usage as parent function unset $this->posts + foreach ( $this->posts as $post ) { + if ( 'nav_menu_item' == $post['post_type'] ) { + $menu_items[] = $post; + } + + if ( 0 === strpos( $post['post_title'], 'polylang_mo_' ) ) { + $mo_posts[] = $post; + } + } + + if ( ! empty( $mo_posts ) ) { + new PLL_MO(); // just to register the polylang_mo post type before processing posts + } + + parent::process_posts(); + + PLL()->model->clean_languages_cache(); // to update the posts count in ( cached ) languages list + + $this->remap_translations( $this->post_translations, $this->processed_posts ); + unset( $this->post_translations ); + + // language switcher menu items + foreach ( $menu_items as $item ) { + foreach ( $item['postmeta'] as $meta ) { + if ( '_pll_menu_item' == $meta['key'] ) { + update_post_meta( $this->processed_menu_items[ $item['post_id'] ], '_pll_menu_item', maybe_unserialize( $meta['value'] ) ); + } + } + } + + // merge strings translations + foreach ( $mo_posts as $post ) { + $lang_id = (int) substr( $post['post_title'], 12 ); + + if ( ! empty( $this->processed_terms[ $lang_id ] ) ) { + if ( $strings = unserialize( $post['post_content'] ) ) { + $mo = new PLL_MO(); + $mo->import_from_db( $this->processed_terms[ $lang_id ] ); + foreach ( $strings as $msg ) { + $mo->add_entry_or_merge( $mo->make_entry( $msg[0], $msg[1] ) ); + } + $mo->export_to_db( $this->processed_terms[ $lang_id ] ); + } + } + // delete the now useless imported post + wp_delete_post( $this->processed_posts[ $post['post_id'] ], true ); + } + } + + /** + * remaps terms languages + * + * @since 1.2 + * + * @param array $terms array of terms in 'term_translations' taxonomy + */ + function remap_terms_relations( &$terms ) { + global $wpdb; + + foreach ( $terms as $term ) { + $translations = unserialize( $term['term_description'] ); + foreach ( $translations as $slug => $old_id ) { + if ( $old_id && ! empty( $this->processed_terms[ $old_id ] ) && $lang = PLL()->model->get_language( $slug ) ) { + // language relationship + $trs[] = $wpdb->prepare( '( %d, %d )', $this->processed_terms[ $old_id ], $lang->tl_term_taxonomy_id ); + + // translation relationship + $trs[] = $wpdb->prepare( '( %d, %d )', $this->processed_terms[ $old_id ], get_term( $this->processed_terms[ $term['term_id'] ], 'term_translations' )->term_taxonomy_id ); + } + } + } + + // insert term_relationships + if ( ! empty( $trs ) ) { + $trs = array_unique( $trs ); + + // make sure we don't attempt to insert already existing term relationships + $existing_trs = $wpdb->get_results( " + SELECT tr.object_id, tr.term_taxonomy_id FROM $wpdb->term_relationships AS tr + INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id + WHERE tt.taxonomy IN ( 'term_language', 'term_translations' ) + " ); + + foreach ( $existing_trs as $key => $tr ) { + $existing_trs[ $key ] = $wpdb->prepare( '( %d, %d )', $tr->object_id, $tr->term_taxonomy_id ); + } + + $trs = array_diff( $trs, $existing_trs ); + + if ( ! empty( $trs ) ) { + $wpdb->query( "INSERT INTO $wpdb->term_relationships ( object_id, term_taxonomy_id ) VALUES " . implode( ',', $trs ) ); + } + } + } + + /** + * remaps translations for both posts and terms + * + * @since 1.2 + * + * @param array $terms array of terms in 'post_translations' or 'term_translations' taxonomies + * @param array $processed_objects array of posts or terms processed by WordPress Importer + */ + function remap_translations( &$terms, &$processed_objects ) { + global $wpdb; + + foreach ( $terms as $term ) { + $translations = unserialize( $term['term_description'] ); + $new_translations = array(); + + foreach ( $translations as $slug => $old_id ) { + if ( $old_id && ! empty( $processed_objects[ $old_id ] ) ) { + $new_translations[ $slug ] = $processed_objects[ $old_id ]; + } + } + + if ( ! empty( $new_translations ) ) { + $u['case'][] = $wpdb->prepare( 'WHEN %d THEN %s', $this->processed_terms[ $term['term_id'] ], serialize( $new_translations ) ); + $u['in'][] = (int) $this->processed_terms[ $term['term_id'] ]; + } + } + + if ( ! empty( $u ) ) { + $wpdb->query( "UPDATE $wpdb->term_taxonomy + SET description = ( CASE term_id " . implode( ' ', $u['case'] ) . ' END ) + WHERE term_id IN ( ' . implode( ',', $u['in'] ) . ' )' ); + } + } +} diff --git a/pole-sbv-content/plugins/polylang/modules/share-slug/settings-share-slug.php b/pole-sbv-content/plugins/polylang/modules/share-slug/settings-share-slug.php new file mode 100644 index 00000000..5b9723ab --- /dev/null +++ b/pole-sbv-content/plugins/polylang/modules/share-slug/settings-share-slug.php @@ -0,0 +1,81 @@ + 'share-slugs', + 'title' => __( 'Share slugs', 'polylang' ), + 'description' => __( 'Allows to share the same url slug across languages for posts and terms.', 'polylang' ), + ) ); + + if ( class_exists( 'PLL_Share_Post_Slug', true ) && get_option( 'permalink_structure' ) ) { + add_action( 'admin_print_footer_scripts', array( $this, 'print_js' ) ); + } + } + + /** + * tells if the module is active + * + * @since 1.9 + * + * @return bool + */ + public function is_active() { + return class_exists( 'PLL_Share_Post_Slug', true ) && $this->options['force_lang'] && get_option( 'permalink_structure' ); + } + + /** + * displays upgrade message + * + * @since 1.9 + * + * @return string + */ + public function get_upgrade_message() { + return class_exists( 'PLL_Share_Post_Slug', true ) ? '' : $this->default_upgrade_message(); + } + + /** + * displays the javascript to handle dynamically the change in url modifications + * as sharing slugs is not possible when the language is set from the content + * + * @since 1.9 + */ + public function print_js() { + wp_enqueue_script( 'jquery' ); + + $activated = sprintf( '%s', $this->action_links['activated'] ); + $deactivated = sprintf( '%s', $this->action_links['deactivated'] ); + + ?> + + model = &$polylang->model; + $this->options = &$polylang->options; + + add_filter( 'wp_insert_post_parent', array( $this, 'wp_insert_post_parent' ), 10, 3 ); + add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 5, 2 ); // Before Types which populates custom fields in same hook with priority 10 + + add_action( 'pll_save_post', array( $this, 'pll_save_post' ), 10, 3 ); + add_action( 'pll_save_term', array( $this, 'pll_save_term' ), 10, 3 ); + + if ( $this->options['media_support'] ) { + add_action( 'pll_translate_media', array( $this, 'copy_taxonomies' ), 10, 3 ); + add_action( 'pll_translate_media', array( $this, 'copy_post_metas' ), 10, 3 ); + add_action( 'edit_attachment', array( $this, 'edit_attachment' ) ); + } + } + + /** + * Translate post parent if exists when using "Add new" ( translation ) + * + * @since 0.6 + * + * @param int $post_parent Post parent ID + * @param int $post_id Post ID, unused + * @param array $postarr Array of parsed post data + * @return int + */ + public function wp_insert_post_parent( $post_parent, $post_id, $postarr ) { + // Make sure not to impact media translations created at the same time + return isset( $_GET['from_post'], $_GET['new_lang'], $_GET['post_type'] ) && $_GET['post_type'] === $postarr['post_type'] && ( $id = wp_get_post_parent_id( (int) $_GET['from_post'] ) ) && ( $parent = $this->model->post->get_translation( $id, $_GET['new_lang'] ) ) ? $parent : $post_parent; + } + + /** + * Copy post metas, menu order, comment and ping status when using "Add new" ( translation ) + * formerly used dbx_post_advanced deprecated in WP 3.7 + * + * @since 1.2 + * + * @param string $post_type unused + * @param object $post current post object + */ + public function add_meta_boxes( $post_type, $post ) { + if ( 'post-new.php' == $GLOBALS['pagenow'] && isset( $_GET['from_post'], $_GET['new_lang'] ) && $this->model->is_translated_post_type( $post->post_type ) ) { + // Capability check already done in post-new.php + $from_post_id = (int) $_GET['from_post']; + $from_post = get_post( $from_post_id ); + $lang = $this->model->get_language( $_GET['new_lang'] ); + + if ( ! $from_post || ! $lang ) { + return; + } + + $this->copy_taxonomies( $from_post_id, $post->ID, $lang->slug ); + $this->copy_post_metas( $from_post_id, $post->ID, $lang->slug ); + + foreach ( array( 'menu_order', 'comment_status', 'ping_status' ) as $property ) { + $post->$property = $from_post->$property; + } + + // Copy the date only if the synchronization is activated + if ( in_array( 'post_date', $this->options['sync'] ) ) { + $post->post_date = $from_post->post_date; + $post->post_date_gmt = $from_post->post_date_gmt; + } + + if ( is_sticky( $from_post_id ) ) { + stick_post( $post->ID ); + } + } + } + + /** + * Get the list of taxonomies to copy or to synchronize + * + * @since 1.7 + * @since 2.1 The `$from`, `$to`, `$lang` parameters were added. + * + * @param bool $sync true if it is synchronization, false if it is a copy + * @param int $from id of the post from which we copy informations, optional, defaults to null + * @param int $to id of the post to which we paste informations, optional, defaults to null + * @param string $lang language slug, optional, defaults to null + * @return array list of taxonomy names + */ + public function get_taxonomies_to_copy( $sync, $from = null, $to = null, $lang = null ) { + $taxonomies = ! $sync || in_array( 'taxonomies', $this->options['sync'] ) ? $this->model->get_translated_taxonomies() : array(); + if ( ! $sync || in_array( 'post_format', $this->options['sync'] ) ) { + $taxonomies[] = 'post_format'; + } + + /** + * Filter the taxonomies to copy or synchronize + * + * @since 1.7 + * @since 2.1 The `$from`, `$to`, `$lang` parameters were added. + * + * @param array $taxonomies list of taxonomy names + * @param bool $sync true if it is synchronization, false if it is a copy + * @param int $from id of the post from which we copy informations + * @param int $to id of the post to which we paste informations + * @param string $lang language slug + */ + return array_unique( apply_filters( 'pll_copy_taxonomies', $taxonomies, $sync, $from, $to, $lang ) ); + } + + /** + * Copy or synchronize terms + * + * @since 1.8 + * + * @param int $from id of the post from which we copy informations + * @param int $to id of the post to which we paste informations + * @param string $lang language slug + * @param bool $sync true if it is synchronization, false if it is a copy, defaults to false + */ + public function copy_taxonomies( $from, $to, $lang, $sync = false ) { + // Get taxonomies to sync for this post type + $taxonomies = array_intersect( get_post_taxonomies( $from ), $this->get_taxonomies_to_copy( $sync, $from, $to, $lang ) ); + + // Update the term cache to reduce the number of queries in the loop + update_object_term_cache( $sync ? array( $from, $to ) : $from, get_post_type( $from ) ); + + // Copy or synchronize terms + // FIXME quite a lot of query in foreach + foreach ( $taxonomies as $tax ) { + $terms = get_the_terms( $from, $tax ); + + // Translated taxonomy + if ( $this->model->is_translated_taxonomy( $tax ) ) { + $newterms = array(); + if ( is_array( $terms ) ) { + foreach ( $terms as $term ) { + if ( $term_id = $this->model->term->get_translation( $term->term_id, $lang ) ) { + $newterms[] = (int) $term_id; // Cast is important otherwise we get 'numeric' tags + } + } + } + + // For some reasons, the user may have untranslated terms in the translation. don't forget them. + if ( $sync ) { + $tr_terms = get_the_terms( $to, $tax ); + if ( is_array( $tr_terms ) ) { + foreach ( $tr_terms as $term ) { + if ( ! $this->model->term->get_translation( $term->term_id, $this->model->post->get_language( $from ) ) ) { + $newterms[] = (int) $term->term_id; + } + } + } + } + + if ( ! empty( $newterms ) || $sync ) { + wp_set_object_terms( $to, $newterms, $tax ); // replace terms in translation + } + } + + // Untranslated taxonomy ( post format ) + // Don't use simple get_post_format / set_post_format to generalize the case to other taxonomies + else { + wp_set_object_terms( $to, is_array( $terms ) ? array_map( 'intval', wp_list_pluck( $terms, 'term_id' ) ) : null, $tax ); + } + } + } + + /** + * Copy or synchronize metas (custom fields) + * + * @since 0.9 + * + * @param int $from id of the post from which we copy informations + * @param int $to id of the post to which we paste informations + * @param string $lang language slug + * @param bool $sync true if it is synchronization, false if it is a copy, defaults to false + */ + public function copy_post_metas( $from, $to, $lang, $sync = false ) { + // Copy or synchronize post metas and allow plugins to do the same + $metas = get_post_custom( $from ); + $keys = array(); + + // Get public meta keys ( including from translated post in case we just deleted a custom field ) + if ( ! $sync || in_array( 'post_meta', $this->options['sync'] ) ) { + foreach ( $keys = array_unique( array_merge( array_keys( $metas ), array_keys( get_post_custom( $to ) ) ) ) as $k => $meta_key ) { + if ( is_protected_meta( $meta_key ) ) { + unset( $keys[ $k ] ); + } + } + } + + // Add page template and featured image + foreach ( array( '_wp_page_template', '_thumbnail_id' ) as $meta ) { + if ( ! $sync || in_array( $meta, $this->options['sync'] ) ) { + $keys[] = $meta; + } + } + + /** + * Filter the custom fields to copy or synchronize + * + * @since 0.6 + * @since 1.9.2 The `$from`, `$to`, `$lang` parameters were added. + * + * @param array $keys list of custom fields names + * @param bool $sync true if it is synchronization, false if it is a copy + * @param int $from id of the post from which we copy informations + * @param int $to id of the post to which we paste informations + * @param string $lang language slug + */ + $keys = array_unique( apply_filters( 'pll_copy_post_metas', $keys, $sync, $from, $to, $lang ) ); + + // And now copy / synchronize + foreach ( $keys as $key ) { + delete_post_meta( $to, $key ); // The synchronization process of multiple values custom fields is easier if we delete all metas first + if ( isset( $metas[ $key ] ) ) { + foreach ( $metas[ $key ] as $value ) { + // Important: always maybe_unserialize value coming from get_post_custom. See codex. + // Thanks to goncalveshugo http://wordpress.org/support/topic/plugin-polylang-pll_copy_post_meta + $value = maybe_unserialize( $value ); + // Special case for featured images which can be translated + add_post_meta( $to, $key, ( '_thumbnail_id' == $key && $tr_value = $this->model->post->get_translation( $value, $lang ) ) ? $tr_value : $value ); + } + } + } + } + + /** + * Synchronizes terms and metas in translations + * + * @since 1.2 + * + * @param int $post_id post id + * @param object $post post object + * @param array $translations post translations + */ + public function pll_save_post( $post_id, $post, $translations ) { + global $wpdb; + + // Prepare properties to synchronize + foreach ( array( 'comment_status', 'ping_status', 'menu_order' ) as $property ) { + if ( in_array( $property, $this->options['sync'] ) ) { + $postarr[ $property ] = $post->$property; + } + } + + if ( in_array( 'post_date', $this->options['sync'] ) ) { + // For new drafts, save the date now otherwise it is overriden by WP. Thanks to JoryHogeveen. See #32. + if ( 'post-new.php' === $GLOBALS['pagenow'] && isset( $_GET['from_post'], $_GET['new_lang'] ) ) { + $original = get_post( (int) $_GET['from_post'] ); + $wpdb->update( + $wpdb->posts, array( + 'post_date' => $original->post_date, + 'post_date_gmt' => $original->post_date_gmt, + ), + array( 'ID' => $post_id ) + ); + } else { + $postarr['post_date'] = $post->post_date; + $postarr['post_date_gmt'] = $post->post_date_gmt; + } + } + + // Synchronize terms and metas in translations + foreach ( $translations as $lang => $tr_id ) { + if ( ! $tr_id || $tr_id === $post_id ) { + continue; + } + + // Synchronize terms and metas + $this->copy_taxonomies( $post_id, $tr_id, $lang, true ); + $this->copy_post_metas( $post_id, $tr_id, $lang, true ); + + // Sticky posts + if ( in_array( 'sticky_posts', $this->options['sync'] ) ) { + isset( $_REQUEST['sticky'] ) && 'sticky' === $_REQUEST['sticky'] ? stick_post( $tr_id ) : unstick_post( $tr_id ); + } + + // Add comment status, ping status, menu order... to synchronization + $tr_arr = empty( $postarr ) ? array() : $postarr; + + if ( isset( $GLOBALS['post_type'] ) ) { + $post_type = $GLOBALS['post_type']; + } elseif ( isset( $_REQUEST['post_type'] ) ) { + $post_type = $_REQUEST['post_type']; // 2nd case for quick edit + } + + // Add post parent to synchronization + // Make sure not to impact media translations when creating them at the same time as post + // Do not udpate the translation parent if the user set a parent with no translation + if ( in_array( 'post_parent', $this->options['sync'] ) && isset( $post_type ) && $post_type === $post->post_type ) { + $post_parent = ( $parent_id = wp_get_post_parent_id( $post_id ) ) ? $this->model->post->get_translation( $parent_id, $lang ) : 0; + if ( ! ( $parent_id && ! $post_parent ) ) { + $tr_arr['post_parent'] = $post_parent; + } + } + + // Update all the row at once + // Don't use wp_update_post to avoid infinite loop + if ( ! empty( $tr_arr ) ) { + $wpdb->update( $wpdb->posts, $tr_arr, array( 'ID' => $tr_id ) ); + clean_post_cache( $tr_id ); + } + } + } + + /** + * Synchronize translations of a term in all posts + * + * @since 1.2 + * + * @param int $term_id term id + * @param string $taxonomy taxonomy name of the term + * @param array $translations translations of the term + */ + public function pll_save_term( $term_id, $taxonomy, $translations ) { + // Sync term metas + foreach ( $translations as $lang => $tr_id ) { + if ( $tr_id && $tr_id !== $term_id ) { + $this->copy_term_metas( $term_id, $tr_id, $lang, true ); + } + } + + // Check if the taxonomy is synchronized + if ( ! in_array( $taxonomy, $this->get_taxonomies_to_copy( true ) ) ) { + return; + } + + // Get all posts associated to this term + $posts = get_posts( array( + 'numberposts' => -1, + 'nopaging' => true, + 'post_type' => 'any', + 'post_status' => 'any', + 'fields' => 'ids', + 'tax_query' => array( + array( + 'taxonomy' => $taxonomy, + 'field' => 'id', + 'terms' => array_merge( array( $term_id ), array_values( $translations ) ), + 'include_children' => false, + ), + ), + ) ); + + // Associate translated term to translated post + // FIXME quite a lot of query in foreach + foreach ( $this->model->get_languages_list() as $language ) { + if ( $translated_term = $this->model->term->get( $term_id, $language ) ) { + foreach ( $posts as $post_id ) { + if ( $translated_post = $this->model->post->get( $post_id, $language ) ) { + wp_set_object_terms( $translated_post, $translated_term, $taxonomy, true ); + } + } + } + } + + // Synchronize parent in translations + // Calling clean_term_cache *after* this is mandatory otherwise the $taxonomy_children option is not correctly updated + // Before WP 3.9 clean_term_cache could be called ( efficiently ) only one time due to static array which prevented to update the option more than once + // This is the reason to use the edit_term filter and not edited_term + // Take care that $_POST contains the only valid values for the current term + // FIXME can I synchronize parent without using $_POST instead? + if ( isset( $_POST['term_tr_lang'] ) ) { + foreach ( $_POST['term_tr_lang'] as $lang => $tr_id ) { + if ( $tr_id ) { + if ( isset( $_POST['parent'] ) && -1 != $_POST['parent'] ) { // Since WP 3.1 + $term_parent = $this->model->term->get_translation( (int) $_POST['parent'], $lang ); + } + + global $wpdb; + $wpdb->update( $wpdb->term_taxonomy, + array( 'parent' => isset( $term_parent ) ? $term_parent : 0 ), + array( 'term_taxonomy_id' => get_term( (int) $tr_id, $taxonomy )->term_taxonomy_id ) + ); + + clean_term_cache( $tr_id, $taxonomy ); // OK since WP 3.9 + } + } + } + } + + /** + * Synchronizes terms and metas in translations for media + * + * @since 1.8 + * + * @param int $post_id post id + */ + public function edit_attachment( $post_id ) { + $this->pll_save_post( $post_id, get_post( $post_id ), $this->model->post->get_translations( $post_id ) ); + } + + /** + * Copy or synchronize term metas (custom fields) + * + * @since 2.2 + * + * @param int $from id of the term from which we copy informations + * @param int $to id of the term to which we paste informations + * @param string $lang language slug + * @param bool $sync true if it is synchronization, false if it is a copy, defaults to false + */ + public function copy_term_metas( $from, $to, $lang, $sync = false ) { + $metas = get_term_meta( $from ); + + /** + * Filter the term metas to copy or synchronize + * + * @since 2.2 + * + * @param array $keys list of term meta names + * @param bool $sync true if it is synchronization, false if it is a copy + * @param int $from id of the term from which we copy informations + * @param int $to id of the term to which we paste informations + * @param string $lang language slug + */ + $keys = array_unique( apply_filters( 'pll_copy_term_metas', array(), $sync, $from, $to, $lang ) ); + + // And now copy / synchronize + foreach ( $keys as $key ) { + delete_term_meta( $to, $key ); // The synchronization process of multiple values term metas is easier if we delete all metas first + if ( isset( $metas[ $key ] ) ) { + foreach ( $metas[ $key ] as $value ) { + $value = maybe_unserialize( $value ); + add_term_meta( $to, $key, $value ); + } + } + } + } +} diff --git a/pole-sbv-content/plugins/polylang/modules/sync/settings-sync.php b/pole-sbv-content/plugins/polylang/modules/sync/settings-sync.php new file mode 100644 index 00000000..291e1965 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/modules/sync/settings-sync.php @@ -0,0 +1,102 @@ + 'sync', + 'title' => __( 'Synchronization', 'polylang' ), + 'description' => __( 'The synchronization options allow to maintain exact same values (or translations in the case of taxonomies and page parent) of meta content between the translations of a post or page.', 'polylang' ), + ) ); + } + + /** + * deactivates the module + * + * @since 1.8 + */ + public function deactivate() { + $this->options['sync'] = array(); + update_option( 'polylang', $this->options ); + } + + /** + * displays the settings form + * + * @since 1.8 + */ + protected function form() { + ?> +
      + $str ) { + printf( + '
    • ', + esc_attr( $key ), + in_array( $key, $this->options['sync'] ) ? 'checked="checked"' : '', + esc_html( $str ) + ); + } + ?> +
    + options['sync'] ) ? array( 'configure' ) : array( 'configure', 'deactivate' ); + } + + /** + * list the post metas to synchronize + * + * @since 1.0 + * + * @return array + */ + static public function list_metas_to_sync() { + return array( + 'taxonomies' => __( 'Taxonomies', 'polylang' ), + 'post_meta' => __( 'Custom fields', 'polylang' ), + 'comment_status' => __( 'Comment status', 'polylang' ), + 'ping_status' => __( 'Ping status', 'polylang' ), + 'sticky_posts' => __( 'Sticky posts', 'polylang' ), + 'post_date' => __( 'Published date', 'polylang' ), + 'post_format' => __( 'Post format', 'polylang' ), + 'post_parent' => __( 'Page parent', 'polylang' ), + '_wp_page_template' => __( 'Page template', 'polylang' ), + 'menu_order' => __( 'Page order', 'polylang' ), + '_thumbnail_id' => __( 'Featured image', 'polylang' ), + ); + } +} diff --git a/pole-sbv-content/plugins/polylang/modules/translate-slugs/settings-translate-slugs.php b/pole-sbv-content/plugins/polylang/modules/translate-slugs/settings-translate-slugs.php new file mode 100644 index 00000000..7850fd61 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/modules/translate-slugs/settings-translate-slugs.php @@ -0,0 +1,45 @@ + 'translate-slugs', + 'title' => __( 'Translate slugs', 'polylang' ), + 'description' => __( 'Allows to translate custom post types and taxonomies slugs in urls.', 'polylang' ), + ) ); + } + + /** + * tells if the module is active + * + * @since 1.9 + * + * @return bool + */ + public function is_active() { + return class_exists( 'PLL_Translate_Slugs_Model', true ) && get_option( 'permalink_structure' ); + } + + /** + * displays upgrade message + * + * @since 1.9 + * + * @return string + */ + public function get_upgrade_message() { + return class_exists( 'PLL_Translate_Slugs_Model', true ) ? '' : $this->default_upgrade_message(); + } +} diff --git a/pole-sbv-content/plugins/polylang/modules/wpml/settings-wpml.php b/pole-sbv-content/plugins/polylang/modules/wpml/settings-wpml.php new file mode 100644 index 00000000..972f3fca --- /dev/null +++ b/pole-sbv-content/plugins/polylang/modules/wpml/settings-wpml.php @@ -0,0 +1,35 @@ + 'wpml', + 'title' => __( 'WPML Compatibility', 'polylang' ), + 'description' => __( 'WPML compatibility mode of Polylang', 'polylang' ), + ) ); + } + + /** + * tells if the module is active + * + * @since 1.8 + * + * @return bool + */ + public function is_active() { + return ! defined( 'PLL_WPML_COMPAT' ) || PLL_WPML_COMPAT; + } +} diff --git a/pole-sbv-content/plugins/polylang/modules/wpml/wpml-api.php b/pole-sbv-content/plugins/polylang/modules/wpml/wpml-api.php new file mode 100644 index 00000000..10b9f1ff --- /dev/null +++ b/pole-sbv-content/plugins/polylang/modules/wpml/wpml-api.php @@ -0,0 +1,246 @@ + not applicable + add_filter( 'wpml_current_language', 'pll_current_language', 10, 0 ); + add_filter( 'wpml_default_language', 'pll_default_language', 10, 0 ); + // wpml_add_language_selector => not implemented + // wpml_footer_language_selector => not applicable + add_action( 'wpml_add_language_form_field', array( $this, 'wpml_add_language_form_field' ) ); + add_filter( 'wpml_language_is_active', array( $this, 'wpml_language_is_active' ), 10, 2 ); + add_filter( 'wpml_is_rtl' , array( $this, 'wpml_is_rtl' ) ); + // wpml_language_form_input_field => See wpml_add_language_form_field + // wpml_language_has_switched => not implemented + + // Retrieving Language Information for Content + + add_filter( 'wpml_post_language_details', 'wpml_get_language_information', 10, 2 ); + // wpml_switch_language => not implemented + add_filter( 'wpml_element_language_code', array( $this, 'wpml_element_language_code' ), 10, 3 ); + // wpml_element_language_details => not applicable + + // Retrieving Localized Content + + add_filter( 'wpml_home_url', 'pll_home_url', 10, 0 ); + add_filter( 'wpml_element_link', 'icl_link_to_element' , 10, 7 ); + add_filter( 'wpml_object_id', 'icl_object_id', 10, 4 ); + add_filter( 'wpml_translate_single_string', array( $this, 'wpml_translate_single_string' ), 10, 4 ); + // wpml_translate_string => not applicable + // wpml_unfiltered_admin_string => not implemented + add_filter( 'wpml_permalink', array( $this, 'wpml_permalink' ), 10, 2 ); + // wpml_elements_without_translations => not implemented + add_filter( 'wpml_get_translated_slug', array( $this, 'wpml_get_translated_slug' ), 10, 3 ); + + // Finding the Translation State of Content + + // wpml_element_translation_type + add_filter( 'wpml_element_has_translations', array( $this, 'wpml_element_has_translations' ), 10, 3 ); + // wpml_master_post_from_duplicate => not applicable + // wpml_post_duplicates => not applicable + + // Inserting Content + + // wpml_admin_make_post_duplicates => not applicable + // wpml_make_post_duplicates => not applicable + add_action( 'wpml_register_single_string', 'icl_register_string', 10, 3 ); + // wpml_register_string => not applicable + // wpml_register_string_packages => not applicable + // wpml_delete_package_action => not applicable + // wpml_show_package_language_ui => not applicable + // wpml_set_element_language_details => not implemented + + // Miscellaneous + + // wpml_element_type => not applicable + // wpml_setting => not applicable + // wpml_sub_setting => not applicable + // wpml_editor_cf_to_display => not applicable + // wpml_tm_save_translation_cf => not implemented + // wpml_tm_xliff_export_translated_cf => not applicable + // wpml_tm_xliff_export_original_cf => not applicable + // wpml_duplicate_generic_string => not applicable + // wpml_translatable_user_meta_fields => not implemented + // wpml_cross_domain_language_data => not applicable + // wpml_get_cross_domain_language_data => not applicable + // wpml_loaded => not applicable + // wpml_st_loaded => not applicable + // wpml_tm_loaded => not applicable + // wpml_hide_management_column (3.4.1) => not applicable + } + + /** + * Get a list of the languages enabled for a site + * + * @since 2.0 + * + * @param mixed $null Not used + * @param array| string $args See arguments of icl_get_languages() + * @return array Array of arrays per language + */ + public function wpml_active_languages( $null, $args = '' ) { + return icl_get_languages( $args ); + } + + /** + * In WPML, get a language's native and translated name for display in a custom language switcher + * Since Polylang does not implement the translated name, always returns only the native name + * + * @since 2.2 + * + * @param mixed $null Not used. + * @param string $native_name The language native name. + * @param string|bool $translated_name The language translated name. Not used. + * @param bool $native_hidden Whether to hide the language native name or not. Not used. + * @param bool $translated_hidden Whether to hide the language translated name or not. Not used. + * @return string + */ + public function wpml_display_language_names( $null, $native_name, $translated_name = false, $native_hidden = false, $translated_hidden = false ) { + return $native_name; + } + + /** + * Returns an HTML hidden input field with name=”lang” and as value the current language + * + * @since 2.0 + */ + public function wpml_add_language_form_field() { + $lang = pll_current_language(); + $field = sprintf( '', esc_attr( $lang ) ); + $field = apply_filters( 'wpml_language_form_input_field', $field, $lang ); + echo $field; + } + + /** + * Find out if a specific language is enabled for the site + * + * @since 2.0 + * + * @param mixed $null Not used + * @param string $slug Language code + * @return bool + */ + public function wpml_language_is_active( $null, $slug ) { + $language = PLL()->model->get_language( $slug ); + return empty( $language->active ) || true === $language->active; + } + + /** + * Find out whether the current language text direction is RTL or not + * + * @since 2.0 + * + * @param mixed $null Not used + * @return bool + */ + public function wpml_is_rtl( $null ) { + return pll_current_language( 'is_rtl' ); + } + + /** + * Get the language code for a translatable element + * + * @since 2.0 + * + * @param mixed $language_code + * @param array $args An array with two keys element_id => post_id or term_taxonomy_id, element_type => post type or taxonomy + * @return string + */ + public function wpml_element_language_code( $language_code, $args ) { + $type = $args['element_type']; + $id = $args['element_id']; + $pll_type = ( 'post' == $type || pll_is_translated_post_type( $type ) ) ? 'post' : ( 'term' == $type || pll_is_translated_taxonomy( $type ) ? 'term' : false ); + if ( 'term' === $pll_type && $term = wpcom_vip_get_term_by( 'term_taxonomy_id', $id ) ) { + $id = $term->term_id; + } + return $pll_type ? call_user_func( "pll_get_{$pll_type}_language", $id ) : $language_code; + } + + /** + * Translates a string + * + * @since 2.0 + * + * @param string $string The string's original value + * @param string $context The string's registered context + * @param string $name The string's registered name + * @param null|string $lang Optional, return the translation in this language, defaults to current language + * @return string The translated string + */ + public function wpml_translate_single_string( $string, $context, $name, $lang = null ) { + $has_translation = null; // Passed by reference + return icl_translate( $context, $name, $string, false, $has_translation, $lang ); + } + + /** + * Converts a permalink to a language specific permalink + * + * @since 2.2 + * + * @param string $url The url to filter + * @param null|string $lang Langage code, optional, defaults to the current language + * @return string + */ + public function wpml_permalink( $url, $lang = '' ) { + $lang = PLL()->model->get_language( $lang ); + + if ( empty( $lang ) && ! empty( PLL()->curlang ) ) { + $lang = PLL()->curlang; + } + + return empty( $lang ) ? $url : PLL()->links_model->switch_language_in_link( $url, $lang ); + } + + /** + * Translates a post type slug + * + * @since 2.2 + * + * @param string $slug Post type slug + * @param string $post_type Post type name + * @param string $lang Optional language code (defaults to current language) + * @return string + */ + public function wpml_get_translated_slug( $slug, $post_type, $lang = null ) { + if ( isset( PLL()->translate_slugs ) ) { + if ( empty( $lang ) ) { + $lang = pll_current_language(); + } + + $slug = PLL()->translate_slugs->slugs_model->get_translated_slug( $post_type, $lang ); + } + return $slug; + } + + /** + * Find out whether a post type or a taxonomy term is translated + * + * @since 2.0 + * + * @param mixed $null + * @param int $id The post_id or term_id + * @param string $type The post type or taxonomy + * @return bool + */ + public function wpml_element_has_translations( $null, $id, $type ) { + $pll_type = ( 'post' == $type || pll_is_translated_post_type( $type ) ) ? 'post' : ( 'term' == $type || pll_is_translated_taxonomy( $type ) ? 'term' : false ); + return ( $pll_type && $translations = call_user_func( "pll_get_{$pll_type}_translations", $id ) ) ? count( $translations ) > 1 : false; + } +} diff --git a/pole-sbv-content/plugins/polylang/modules/wpml/wpml-compat.php b/pole-sbv-content/plugins/polylang/modules/wpml/wpml-compat.php new file mode 100644 index 00000000..07696c02 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/modules/wpml/wpml-compat.php @@ -0,0 +1,139 @@ +api = new PLL_WPML_API(); + + self::$strings = get_option( 'polylang_wpml_strings', array() ); + + add_action( 'pll_language_defined', array( $this, 'define_constants' ) ); + add_action( 'pll_no_language_defined', array( $this, 'define_constants' ) ); + add_filter( 'pll_get_strings', array( $this, 'get_strings' ) ); + } + + /** + * Access to the single instance of the class + * + * @since 1.7 + * + * @return object + */ + static public function instance() { + if ( empty( self::$instance ) ) { + self::$instance = new self(); + } + return self::$instance; + } + + /** + * Defines two WPML constants once the language has been defined + * The compatibility with WPML is not perfect on admin side as the constants are defined + * in 'setup_theme' by Polylang ( based on user info ) and 'plugins_loaded' by WPML ( based on cookie ) + * + * @since 0.9.5 + */ + public function define_constants() { + if ( ! empty( PLL()->curlang ) ) { + if ( ! defined( 'ICL_LANGUAGE_CODE' ) ) { + define( 'ICL_LANGUAGE_CODE', PLL()->curlang->slug ); + } + + if ( ! defined( 'ICL_LANGUAGE_NAME' ) ) { + define( 'ICL_LANGUAGE_NAME', PLL()->curlang->name ); + } + } elseif ( ! PLL() instanceof PLL_Frontend ) { + if ( ! defined( 'ICL_LANGUAGE_CODE' ) ) { + define( 'ICL_LANGUAGE_CODE', 'all' ); + } + + if ( ! defined( 'ICL_LANGUAGE_NAME' ) ) { + define( 'ICL_LANGUAGE_NAME', '' ); + } + } + } + + /** + * Unlike pll_register_string, icl_register_string stores the string in database + * so we need to do the same as some plugins or themes may expect this + * we use a serialized option to do this + * + * @since 1.0.2 + * + * @param string $context the group in which the string is registered, defaults to 'polylang' + * @param string $name a unique name for the string + * @param string $string the string to register + */ + public function register_string( $context, $name, $string ) { + // Registers the string if it does not exist yet (multiline as in WPML) + $to_register = array( 'context' => $context, 'name' => $name, 'string' => $string, 'multiline' => true, 'icl' => true ); + if ( ! in_array( $to_register, self::$strings ) && $to_register['string'] ) { + self::$strings[] = $to_register; + update_option( 'polylang_wpml_strings', self::$strings ); + } + } + + /** + * Removes a string from the registered strings list + * + * @since 1.0.2 + * + * @param string $context the group in which the string is registered, defaults to 'polylang' + * @param string $name a unique name for the string + */ + public function unregister_string( $context, $name ) { + foreach ( self::$strings as $key => $string ) { + if ( $string['context'] == $context && $string['name'] == $name ) { + unset( self::$strings[ $key ] ); + update_option( 'polylang_wpml_strings', self::$strings ); + } + } + } + + /** + * Adds strings registered by icl_register_string to those registered by pll_register_string + * + * @since 1.0.2 + * + * @param array $strings existing registered strings + * @return array registered strings with added strings through WPML API + */ + public function get_strings( $strings ) { + return empty( self::$strings ) ? $strings : array_merge( $strings, self::$strings ); + } + + /** + * Get a registered string by its context and name + * + * @since 2.0 + * + * @param string $context the group in which the string is registered + * @param string $name a unique name for the string + * @return bool|string the registered string, false if none was found + */ + public function get_string_by_context_and_name( $context, $name ) { + foreach ( self::$strings as $string ) { + if ( $string['context'] == $context && $string['name'] == $name ) { + return $string['string']; + } + } + return false; + } +} diff --git a/pole-sbv-content/plugins/polylang/modules/wpml/wpml-config.php b/pole-sbv-content/plugins/polylang/modules/wpml/wpml-config.php new file mode 100644 index 00000000..d6bf8bca --- /dev/null +++ b/pole-sbv-content/plugins/polylang/modules/wpml/wpml-config.php @@ -0,0 +1,271 @@ +init(); + } + } + + /** + * Access to the single instance of the class + * + * @since 1.7 + * + * @return object + */ + static public function instance() { + if ( empty( self::$instance ) ) { + self::$instance = new self(); + } + return self::$instance; + } + + /** + * Finds the wpml-config.xml files to parse and setup filters + * + * @since 1.0 + */ + public function init() { + $this->xmls = array(); + + // Plugins + // Don't forget sitewide active plugins thanks to Reactorshop http://wordpress.org/support/topic/polylang-and-yoast-seo-plugin/page/2?replies=38#post-4801829 + $plugins = ( is_multisite() && $sitewide_plugins = get_site_option( 'active_sitewide_plugins' ) ) && is_array( $sitewide_plugins ) ? array_keys( $sitewide_plugins ) : array(); + $plugins = array_merge( $plugins, get_option( 'active_plugins', array() ) ); + + foreach ( $plugins as $plugin ) { + if ( file_exists( $file = WP_PLUGIN_DIR . '/' . dirname( $plugin ) . '/wpml-config.xml' ) && false !== $xml = simplexml_load_file( $file ) ) { + $this->xmls[ dirname( $plugin ) ] = $xml; + } + } + + // Theme + if ( file_exists( $file = ( $template = get_template_directory() ) . '/wpml-config.xml' ) && false !== $xml = simplexml_load_file( $file ) ) { + $this->xmls[ get_template() ] = $xml; + } + + // Child theme + if ( ( $stylesheet = get_stylesheet_directory() ) !== $template && file_exists( $file = $stylesheet . '/wpml-config.xml' ) && false !== $xml = simplexml_load_file( $file ) ) { + $this->xmls[ get_stylesheet() ] = $xml; + } + + // Custom + if ( file_exists( $file = PLL_LOCAL_DIR . '/wpml-config.xml' ) && false !== $xml = simplexml_load_file( $file ) ) { + $this->xmls['Polylang'] = $xml; + } + + if ( ! empty( $this->xmls ) ) { + add_filter( 'pll_copy_post_metas', array( $this, 'copy_post_metas' ), 10, 2 ); + add_filter( 'pll_get_post_types', array( $this, 'translate_types' ), 10, 2 ); + add_filter( 'pll_get_taxonomies', array( $this, 'translate_taxonomies' ), 10, 2 ); + + foreach ( $this->xmls as $context => $xml ) { + foreach ( $xml->xpath( 'admin-texts/key' ) as $key ) { + $attributes = $key->attributes(); + $name = (string) $attributes['name']; + if ( PLL() instanceof PLL_Frontend ) { + $this->options[ $name ] = $key; + add_filter( 'option_' . $name, array( $this, 'translate_strings' ) ); + } else { + $this->register_string_recursive( $context, get_option( $name ), $key ); + } + } + } + } + } + + /** + * Adds custom fields to the list of metas to copy when creating a new translation + * + * @since 1.0 + * + * @param array $metas the list of custom fields to copy or synchronize + * @param bool $sync true for sync, false for copy + * @return array the list of custom fields to copy or synchronize + */ + public function copy_post_metas( $metas, $sync ) { + foreach ( $this->xmls as $xml ) { + foreach ( $xml->xpath( 'custom-fields/custom-field' ) as $cf ) { + $attributes = $cf->attributes(); + if ( 'copy' == $attributes['action'] || ( ! $sync && in_array( $attributes['action'], array( 'translate', 'copy-once' ) ) ) ) { + $metas[] = (string) $cf; + } else { + $metas = array_diff( $metas, array( (string) $cf ) ); + } + } + } + return $metas; + } + + /** + * Language and translation management for custom post types + * + * @since 1.0 + * + * @param array $types list of post type names for which Polylang manages language and translations + * @param bool $hide true when displaying the list in Polylang settings + * @return array list of post type names for which Polylang manages language and translations + */ + public function translate_types( $types, $hide ) { + foreach ( $this->xmls as $xml ) { + foreach ( $xml->xpath( 'custom-types/custom-type' ) as $pt ) { + $attributes = $pt->attributes(); + if ( 1 == $attributes['translate'] && ! $hide ) { + $types[ (string) $pt ] = (string) $pt; + } else { + unset( $types[ (string) $pt ] ); // The theme/plugin author decided what to do with the post type so don't allow the user to change this + } + } + } + return $types; + } + + /** + * Language and translation management for custom taxonomies + * + * @since 1.0 + * + * @param array $taxonomies list of taxonomy names for which Polylang manages language and translations + * @param bool $hide true when displaying the list in Polylang settings + * @return array list of taxonomy names for which Polylang manages language and translations + */ + public function translate_taxonomies( $taxonomies, $hide ) { + foreach ( $this->xmls as $xml ) { + foreach ( $xml->xpath( 'taxonomies/taxonomy' ) as $tax ) { + $attributes = $tax->attributes(); + if ( 1 == $attributes['translate'] && ! $hide ) { + $taxonomies[ (string) $tax ] = (string) $tax; + } else { + unset( $taxonomies[ (string) $tax ] ); // the theme/plugin author decided what to do with the taxonomy so don't allow the user to change this + } + } + } + return $taxonomies; + } + + /** + * Translates the strings for an option + * + * @since 1.0 + * + * @param array|string $value Either a string to translate or a list of strings to translate + * @return array|string translated string(s) + */ + public function translate_strings( $value ) { + $option = substr( current_filter(), 7 ); + return $this->translate_strings_recursive( $value, $this->options[ $option ] ); + } + + /** + * Recursively registers strings for a serialized option + * + * @since 1.0 + * + * @param string $context the group in which the strings will be registered + * @param array $options + * @param object $key XML node + */ + protected function register_string_recursive( $context, $options, $key ) { + $children = $key->children(); + if ( count( $children ) ) { + foreach ( $children as $child ) { + $attributes = $child->attributes(); + $name = (string) $attributes['name']; + if ( '*' === $name && is_array( $options ) ) { + foreach ( $options as $n => $option ) { + $this->register_wildcard_options_recursive( $context, $option, $n ); + } + } elseif ( isset( $options[ $name ] ) ) { + $this->register_string_recursive( $context, $options[ $name ], $child ); + } + } + } else { + $attributes = $key->attributes(); + pll_register_string( (string) $attributes['name'], $options, $context, true ); // Multiline as in WPML + } + } + + /** + * Recursively registers strings with a wildcard + * + * @since 2.1 + * + * @param string $context the group in which the strings will be registered + * @param array $options + * @param string $name Option name + */ + protected function register_wildcard_options_recursive( $context, $options, $name ) { + if ( is_array( $options ) ) { + foreach ( $options as $n => $option ) { + $this->register_wildcard_options_recursive( $context, $option, $n ); + } + } else { + pll_register_string( $name, $options, $context ); + } + } + + /** + * Recursively translates strings for a serialized option + * + * @since 1.0 + * + * @param array|string $values either a string to translate or a list of strings to translate + * @param object $key XML node + * @return array|string translated string(s) + */ + protected function translate_strings_recursive( $values, $key ) { + $children = $key->children(); + if ( count( $children ) ) { + foreach ( $children as $child ) { + $attributes = $child->attributes(); + $name = (string) $attributes['name']; + if ( '*' === $name && is_array( $values ) ) { + foreach ( $values as $n => $v ) { + $values[ $n ] = $this->translate_wildcard_options_recursive( $v, $n ); + } + } elseif ( isset( $values[ $name ] ) ) { + $values[ $name ] = $this->translate_strings_recursive( $values[ $name ], $child ); + } + } + } else { + $values = pll__( $values ); + } + return $values; + } + + /** + * Recursively translates strings registered by a wildcard + * + * @since 2.1 + * + * @param array|string $options Either a string to translate or a list of strings to translate + * @param string $name Option name + * @return array|string Translated string(s) + */ + protected function translate_wildcard_options_recursive( $options, $name ) { + if ( is_array( $options ) ) { + foreach ( $options as $n => $option ) { + $options[ $n ] = $this->translate_wildcard_options_recursive( $option, $n ); + } + } else { + $options = pll__( $options ); + } + return $options; + } +} diff --git a/pole-sbv-content/plugins/polylang/modules/wpml/wpml-legacy-api.php b/pole-sbv-content/plugins/polylang/modules/wpml/wpml-legacy-api.php new file mode 100644 index 00000000..eb0d28ea --- /dev/null +++ b/pole-sbv-content/plugins/polylang/modules/wpml/wpml-legacy-api.php @@ -0,0 +1,370 @@ + whether to skip missing translation or not, 0 or 1, defaults to 0 + * orderby => 'id', 'code', 'name', defaults to 'id' + * order => 'ASC' or 'DESC', defaults to 'ASC' + * link_empty_to => link to use when the translation is missing {$lang} is replaced by the language code + * + * List of parameters returned per language: + * + * id => the language id + * active => whether this is the active language or no, 0 or 1 + * native_name => the language name + * missing => wether the translation is missing or not, 0 or 1 + * translated_name => empty, does not exist in Polylang + * language_code => the language code ( slug ) + * country_flag_url => the url of the flag + * url => the url of the translation + * + * @since 1.0 + * + * @param string|array $args optional + * @return array array of arrays per language + */ + function icl_get_languages( $args = '' ) { + $args = wp_parse_args( $args, array( 'skip_missing' => 0, 'orderby' => 'id', 'order' => 'ASC' ) ); + $orderby = ( isset( $args['orderby'] ) && 'code' == $args['orderby'] ) ? 'slug' : ( isset( $args['orderby'] ) && 'name' == $args['orderby'] ? 'name' : 'id' ); + $order = ( ! empty( $args['order'] ) && 'desc' == $args['order'] ) ? 'DESC' : 'ASC'; + + $arr = array(); + + // NB: When 'skip_missing' is false, WPML returns all languages even if there is no content + $languages = PLL()->model->get_languages_list( array( 'hide_empty' => $args['skip_missing'] ) ); + + // FIXME: Backward compatibility with WP < 4.7 + if ( function_exists( 'wp_list_sort' ) ) { + $languages = wp_list_sort( $languages, $orderby, $order ); // Since WP 4.7 + } + + foreach ( $languages as $lang ) { + // We can find a translation only on frontend + if ( method_exists( PLL()->links, 'get_translation_url' ) ) { + $url = PLL()->links->get_translation_url( $lang ); + } + + // It seems that WPML does not bother of skip_missing parameter on admin side and before the $wp_query object has been filled + if ( empty( $url ) && ! empty( $args['skip_missing'] ) && ! is_admin() && did_action( 'parse_query' ) ) { + continue; + } + + $arr[ $lang->slug ] = array( + 'id' => $lang->term_id, + 'active' => isset( PLL()->curlang->slug ) && PLL()->curlang->slug == $lang->slug ? 1 : 0, + 'native_name' => $lang->name, + 'missing' => empty( $url ) ? 1 : 0, + 'translated_name' => '', // Does not exist in Polylang + 'language_code' => $lang->slug, + 'country_flag_url' => $lang->flag_url, + 'url' => ! empty( $url ) ? $url : + ( empty( $args['link_empty_to'] ) ? PLL()->links->get_home_url( $lang ) : + str_replace( '{$lang}', $lang->slug, $args['link_empty_to'] ) ), + ); + } + + // Apply undocumented WPML filter + $arr = apply_filters( 'icl_ls_languages', $arr ); + + return $arr; + } +} + +if ( ! function_exists( 'icl_link_to_element' ) ) { + /** + * Used for creating language dependent links in themes + * + * @since 1.0 + * @since 2.0 add support for arguments 6 and 7 + * + * @param int $id object id + * @param string $type optional, post type or taxonomy name of the object, defaults to 'post' + * @param string $text optional, the link text. If not specified will produce the name of the element in the current language + * @param array $args optional, an array of arguments to add to the link, defaults to empty + * @param string $anchor optional, the anchor to add to the link, defaults to empty + * @param bool $echo optional, whether to echo the link, defaults to true + * @param bool $return_original_if_missing optional, whether to return a value if the translation is missing + * @return string a language dependent link + */ + function icl_link_to_element( $id, $type = 'post', $text = '', $args = array(), $anchor = '', $echo = true, $return_original_if_missing = true ) { + if ( 'tag' == $type ) { + $type = 'post_tag'; + } + + $pll_type = ( 'post' == $type || pll_is_translated_post_type( $type ) ) ? 'post' : ( 'term' == $type || pll_is_translated_taxonomy( $type ) ? 'term' : false ); + if ( $pll_type && ( $lang = pll_current_language() ) && ( $tr_id = PLL()->model->$pll_type->get_translation( $id, $lang ) ) && PLL()->links->current_user_can_read( $tr_id ) ) { + $id = $tr_id; + } elseif ( ! $return_original_if_missing ) { + return ''; + } + + if ( post_type_exists( $type ) ) { + $link = get_permalink( $id ); + if ( empty( $text ) ) { + $text = get_the_title( $id ); + } + } elseif ( taxonomy_exists( $type ) ) { + $link = wpcom_vip_get_term_link( $id, $type ); + if ( empty( $text ) && ( $term = get_term( $id, $type ) ) && ! empty( $term ) && ! is_wp_error( $term ) ) { + $text = $term->name; + } + } + + if ( empty( $link ) || is_wp_error( $link ) ) { + return ''; + } + + if ( ! empty( $args ) ) { + $link .= ( false === strpos( $link, '?' ) ? '?' : '&' ) . http_build_query( $args ); + } + + if ( ! empty( $anchor ) ) { + $link .= '#' . $anchor; + } + + $link = sprintf( '%s', esc_url( $link ), esc_html( $text ) ); + + if ( $echo ) { + echo $link; + } + + return $link; + } +} + +if ( ! function_exists( 'icl_object_id' ) ) { + /** + * Used for calculating the IDs of objects (usually categories) in the current language + * + * @since 0.9.5 + * + * @param int $id object id + * @param string $type optional, post type or taxonomy name of the object, defaults to 'post' + * @param bool $return_original_if_missing optional, true if Polylang should return the original id if the translation is missing, defaults to false + * @param string $lang optional, language code, defaults to current language + * @return int|null the object id of the translation, null if the translation is missing and $return_original_if_missing set to false + */ + function icl_object_id( $id, $type = 'post', $return_original_if_missing = false, $lang = false ) { + $pll_type = ( 'post' === $type || pll_is_translated_post_type( $type ) ) ? 'post' : ( 'term' === $type || pll_is_translated_taxonomy( $type ) ? 'term' : false ); + return $pll_type && ( $lang = $lang ? $lang : pll_current_language() ) && ( $tr_id = PLL()->model->$pll_type->get_translation( $id, $lang ) ) ? $tr_id : + ( $return_original_if_missing ? $id : null ); + } +} + +if ( ! function_exists( 'wpml_object_id_filter' ) ) { + /** + * Undocumented alias of `icl_object_id` introduced in WPML 3.2, used by Yith WooCommerce compare + * + * @since 2.2.4 + * + * @param int $id object id + * @param string $type optional, post type or taxonomy name of the object, defaults to 'post' + * @param bool $return_original_if_missing optional, true if Polylang should return the original id if the translation is missing, defaults to false + * @param string $lang optional, language code, defaults to current language + * @return int|null the object id of the translation, null if the translation is missing and $return_original_if_missing set to false + */ + function wpml_object_id_filter( $id, $type = 'post', $return_original_if_missing = false, $lang = null ) { + return icl_object_id( $id, $type, $return_original_if_missing, $lang ); + } +} + +if ( ! function_exists( 'wpml_get_language_information' ) ) { + /** + * Undocumented function used by the theme Maya + * returns the post language + * @see original WPML code at https://wpml.org/forums/topic/canonical-urls-for-wpml-duplicated-posts/#post-52198 + * + * @since 1.8 + * + * @param null $empty optional, not used + * @param int $post_id optional, post id, defaults to current post + * @return array + */ + function wpml_get_language_information( $empty = null, $post_id = null ) { + if ( empty( $post_id ) ) { + $post_id = get_the_ID(); + } + + // FIXME WPML may return a WP_Error object + return false === ( $lang = PLL()->model->post->get_language( $post_id ) ) ? array() : array( + 'language_code' => $lang->slug, + 'locale' => $lang->locale, + 'text_direction' => (bool) $lang->is_rtl, + 'display_name' => $lang->name, // Seems to be the post language name displayed in the current language, not a feature in Polylang + 'native_name' => $lang->name, + 'different_language' => pll_current_language() !== $lang->slug, + ); + } +} + +if ( ! function_exists( 'icl_register_string' ) ) { + /** + * Registers a string for translation in the "strings translation" panel + * + * @since 0.9.3 + * + * @param string $context the group in which the string is registered, defaults to 'polylang' + * @param string $name a unique name for the string + * @param string $string the string to register + * @param bool $allow_empty_value not used + * @param string $source_lang not used by Polylang + */ + function icl_register_string( $context, $name, $string, $allow_empty_value = false, $source_lang = '' ) { + PLL_WPML_Compat::instance()->register_string( $context, $name, $string ); + } +} + +if ( ! function_exists( 'icl_unregister_string' ) ) { + /** + * Removes a string from the "strings translation" panel + * + * @since 1.0.2 + * + * @param string $context the group in which the string is registered, defaults to 'polylang' + * @param string $name a unique name for the string + */ + function icl_unregister_string( $context, $name ) { + PLL_WPML_Compat::instance()->unregister_string( $context, $name ); + } +} + +if ( ! function_exists( 'icl_t' ) ) { + /** + * Gets the translated value of a string ( previously registered with icl_register_string or pll_register_string ) + * + * @since 0.9.3 + * @since 1.9.2 argument 3 is optional + * @since 2.0 add support for arguments 4 to 6 + * + * @param string $context the group in which the string is registered + * @param string $name a unique name for the string + * @param string $string the string to translate, optional for strings registered with icl_register_string + * @param bool|null $has_translation optional, not supported in Polylang + * @param bool $bool optional, not used + * @param string|null $lang optional, return the translation in this language, defaults to current language + * @return string the translated string + */ + function icl_t( $context, $name, $string = false, &$has_translation = null, $bool = false, $lang = null ) { + return icl_translate( $context, $name, $string, false, $has_translation, $lang ); + } +} + +if ( ! function_exists( 'icl_translate' ) ) { + /** + * Undocumented function used by NextGen Gallery + * used in PLL_Plugins_Compat for Jetpack with only 3 arguments + * + * @since 1.0.2 + * @since 2.0 add support for arguments 5 and 6, strings are no more automatically registered + * + * @param string $context the group in which the string is registered + * @param string $name a unique name for the string + * @param string $string the string to translate, optional for strings registered with icl_register_string + * @param bool $bool optional, not used + * @param bool|null $has_translation optional, not supported in Polylang + * @param string|null $lang optional, return the translation in this language, defaults to current language + * @return string the translated string + */ + function icl_translate( $context, $name, $string = false, $bool = false, &$has_translation = null, $lang = null ) { + // FIXME WPML can automatically registers the string based on an option + if ( empty( $string ) ) { + $string = PLL_WPML_Compat::instance()->get_string_by_context_and_name( $context, $name ); + } + return empty( $lang ) ? pll__( $string ) : pll_translate_string( $string, $lang ); + } +} + +if ( ! function_exists( 'wpml_get_copied_fields_for_post_edit' ) ) { + /** + * Undocumented function used by Types + * FIXME: tested only with Types + * probably incomplete as Types locks the custom fields for a new post, but not when edited + * This is probably linked to the fact that WPML has always an original post in the default language and not Polylang :) + * + * @since 1.1.2 + * + * @return array + */ + function wpml_get_copied_fields_for_post_edit() { + if ( empty( $_GET['from_post'] ) ) { + return array(); + } + + // Don't know what WPML does but Polylang does copy all public meta keys by default + foreach ( $keys = array_unique( array_keys( get_post_custom( (int) $_GET['from_post'] ) ) ) as $k => $meta_key ) { + if ( is_protected_meta( $meta_key ) ) { + unset( $keys[ $k ] ); + } + } + + // Apply our filter and fill the expected output ( see /types/embedded/includes/fields-post.php ) + /** This filter is documented in modules/sync/admin-sync.php */ + $arr['fields'] = array_unique( apply_filters( 'pll_copy_post_metas', empty( $keys ) ? array() : $keys, false ) ); + $arr['original_post_id'] = (int) $_GET['from_post']; + return $arr; + } +} + +if ( ! function_exists( 'icl_get_default_language' ) ) { + /** + * Undocumented function used by Warp 6 by Yootheme + * + * @since 1.0.5 + * + * @return string default language code + */ + function icl_get_default_language() { + return pll_default_language(); + } +} + +if ( ! function_exists( 'wpml_get_default_language' ) ) { + /** + * Undocumented function reported to be used by Table Rate Shipping for WooCommerce + * @see https://wordpress.org/support/topic/add-wpml-compatibility-function + * + * @since 1.8.2 + * + * @return string default language code + */ + function wpml_get_default_language() { + return pll_default_language(); + } +} + +if ( ! function_exists( 'icl_get_current_language' ) ) { + /** + * Undocumented function used by Ultimate Member + * + * @since 2.2.4 + * + * @return string Current language code + */ + function icl_get_current_language() { + return pll_current_language(); + } +} diff --git a/pole-sbv-content/plugins/polylang/polylang.php b/pole-sbv-content/plugins/polylang/polylang.php new file mode 100644 index 00000000..ee34c83b --- /dev/null +++ b/pole-sbv-content/plugins/polylang/polylang.php @@ -0,0 +1,52 @@ + The author does not provide support on the wordpress.org forum. Support and extra features are available to [Polylang Pro](https://polylang.pro) users. + +If you wish to migrate from WPML, you can use the plugin [WPML to Polylang](https://wordpress.org/plugins/wpml-to-polylang/) + +If you wish to use a professional or automatic translation service, you can install [Lingotek Translation](https://wordpress.org/plugins/lingotek-translation/), as an addon of Polylang. Lingotek offers a complete translation management system which provides services such as translation memory or semi-automated translation processes (e.g. machine translation > human translation > legal review). + += Credits = + +Thanks a lot to all translators who [help translating Polylang](https://translate.wordpress.org/projects/wp-plugins/polylang). +Thanks a lot to [Alex Lopez](http://www.alexlopez.rocks/) for the design of the logo. +Most of the flags included with Polylang are coming from [famfamfam](http://famfamfam.com/) and are public domain. +Wherever third party code has been used, credit has been given in the code’s comments. + += Do you like Polylang? = + +Don't hesitate to [give your feedback](http://wordpress.org/support/view/plugin-reviews/polylang#postform). + +== Installation == + +1. Make sure you are using WordPress 4.0 or later and that your server is running PHP 5.2.4 or later (same requirement as WordPress itself) +1. If you tried other multilingual plugins, deactivate them before activating Polylang, otherwise, you may get unexpected results! +1. Install and activate the plugin as usual from the 'Plugins' menu in WordPress. +1. Go to the languages settings page and create the languages you need +1. Add the 'language switcher' widget to let your visitors switch the language. +1. Take care that your theme must come with the corresponding .mo files (Polylang automatically downloads them when they are available for themes and plugins in this repository). If your theme is not internationalized yet, please refer to the [Theme Handbook](https://developer.wordpress.org/themes/functionality/internationalization/) or ask the theme author to internationalize it. + +== Frequently Asked Questions == + += Where to find help ? = + +* First time users should read [Polylang - Getting started](https://polylang.pro/doc-category/getting-started/), which explains the basics with a lot of screenshots. +* Read the [documentation](https://polylang.pro/doc/). It includes a [FAQ](https://polylang.pro/doc-category/faq/) and the [documentation for developers](https://polylang.pro/doc-category/developers/). +* Search the [community support forum](https://wordpress.org/search/). You will probably find your answer here. +* Read the sticky posts in the [community support forum](http://wordpress.org/support/plugin/polylang). +* If you still have a problem, open a new thread in the [community support forum](http://wordpress.org/support/plugin/polylang). +* [Polylang Pro](https://polylang.pro) users have access to our helpdesk. + += Is Polylang compatible with WooCommerce? = + +* You need a separate addon to make Polylang and WooCommerce work together. [A Premium addon](https://polylang.pro/downloads/polylang-for-woocommerce/) is available. + += Do you need translation services? = + +* If you want to use professional or automatic translation services, install and activate the [Lingotek Translation](https://wordpress.org/plugins/lingotek-translation/) plugin. + +== Screenshots == + +1. The Polylang languages admin panel +2. The Strings translations admin panel +3. Multilingual media library +4. The Edit Post screen with the Languages metabox + +== Changelog == + += 2.2.4 (2017-10-26) = + +* Pro: Fix unknown language not redirected to default when using multiple domains +* Pro: Fix empty 'lang' query var not deactivating the language query filter +* Pro: Fix conflict with The Events Calendar and Visual Composer when used together +* Add new filter `pll_hide_archive_translation_url` #174 +* Add support for undocumented and deprecated WPML functions `wpml_object_id_filter` and `icl_get_current_language` +* Fix 'orderby' and 'order' in `wpml_active_languages`. Needs WP 4.7+ +* Fix `icl_get_languages` not returning all languages when skip_missing = 0. Props Loïc Blascos +* Fix `pll_translate_string` not working on admin #178 +* Fix PHP Warning in widget video in WP 4.9 +* Fix query using 'any' post type not filtered per language (introduced in 2.2) +* Fix untranslatable string in About metabox. Props Farhad Sakhaei +* Fix error with PHP 7.1 and Duplicate Post. Props Enea Scerba +* Fix query auto translation not active in ajax requests on frontend +* Fix query auto translation for 'postname' and 'pagename' +* Fix terms query auto translation not working for 'include' when no taxonomy is provided (WP 4.5+) + += 2.2.3 (2017-09-24) = + +* Fix editor removed on pages (introduced in 2.2.2) + += 2.2.2 (2017-09-22) = + +* Pro: Fix Duplicate post button not working when the user meta has been corrupted +* Fix PHP notice with the plugin Members #175 +* Fix page template select displayed when editing a translated page for posts +* Fix incompatibility with WP 4.8.2 (placeholder %1$s in prepare) + += 2.2.1 (2017-08-30) = + +* Pro: partially refactor REST API classes +* Pro: Fix duplicate content user meta not removed from DB when uninstalling the plugin +* Fix strings translations not removed from DB when uninstalling the plugin +* Fix incorrect translation files loaded in ajax on front when the user is logged in (WP 4.7+) +* Fix widget language dropdown removed when saving a widget (introduced in 2.2) +* Fix queries with negative values for the 'cat' parameter (introduced in 2.2 for queries made on frontend) +* Fix performance issue in combination with some plugins when the language is set from the content (introduced in 2.2) + += 2.2 (2017-08-16) = + +* Pro: Add support for the REST API +* Pro: Add integration with The Events Calendar +* Pro: Refactor ACF Pro integration for post metas and integrate term metas +* Pro: Ask confirmation if synchronizing a post overwrites an existing translation +* Pro: Separate sync post logic from interface +* Pro: Fix 'Detect browser language' option automatically deactivated +* Pro: Fix redirect to 404 when the 'page' slug translation includes non alphanumeric characters. +* Pro: Fix untranslated post type archive slug +* Pro: Fix ACF taxonomy fields not copied when the taxonomy is not translated #156 +* Pro: Fix fatal error with ACF4 +* Support a different content text direction in admin #45 +* Add support for wildcards and 'copy-once' attribute in wpml-config.xml +* Add minimal support for the filters 'wpml_display_language_names' and 'icl_ls_languages' +* Improve compatibility with the plugin WordPress MU Domain Mapping #116 +* Improve speed of the sticky posts filter #41 +* Remove redirect_lang option for multiple domains and subdomains +* Use secure cookie when using SSL +* Allow to copy/sync term metas with the filter 'pll_copy_term_metas' +* Filter ajax requests in term.php according to the term language +* Add error message in customizer when setting an untranslated static front page #47 +* Load static page class only if we are using a static front page +* Refactor parse_query filters to use the same code on frontend and admin +* Don't use add_language_to_link in filters +* Move ajaxPrefilter footer script on top +* Use wp_doing_ajax() instead of DOING_AJAX constant +* Fix queries custom tax not excluded from language filter on admin +* Fix WP translation not loaded when the language is set from the content on multisite. +* Fix the list of core post types in PLL_OLT_Manager for WP 4.7+ +* Fix post name and tag slug incorrectly sanitized for German and Danish +* Fix lang attribute in dropdowns +* Fix wpml_permalink filter #139 +* Fix WPML constants undefined on backend #151 +* Fix a conflict with the plugin Custom Permalinks #143 +* Fix menu location unexpectedly unset + +See [changelog.txt](https://plugins.svn.wordpress.org/polylang/trunk/changelog.txt) for older changelog diff --git a/pole-sbv-content/plugins/polylang/settings/flags.php b/pole-sbv-content/plugins/polylang/settings/flags.php new file mode 100644 index 00000000..affb594d --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/flags.php @@ -0,0 +1,273 @@ + __( 'Andorra', 'polylang' ), + 'ae' => __( 'United Arab Emirates', 'polylang' ), + 'af' => __( 'Afghanistan', 'polylang' ), + 'ag' => __( 'Antigua and Barbuda', 'polylang' ), + 'ai' => __( 'Anguilla', 'polylang' ), + 'al' => __( 'Albania', 'polylang' ), + 'am' => __( 'Armenia', 'polylang' ), + 'an' => __( 'Netherlands Antilles', 'polylang' ), + 'ao' => __( 'Angola', 'polylang' ), + 'ar' => __( 'Argentina', 'polylang' ), + 'arab' => __( 'Arab league', 'polylang' ), + 'as' => __( 'American Samoa', 'polylang' ), + 'at' => __( 'Austria', 'polylang' ), + 'au' => __( 'Australia', 'polylang' ), + 'aw' => __( 'Aruba', 'polylang' ), + 'ax' => __( 'Åland Islands', 'polylang' ), + 'az' => __( 'Azerbaijan', 'polylang' ), + 'ba' => __( 'Bosnia and Herzegovina', 'polylang' ), + 'basque' => __( 'Basque Country', 'polylang' ), + 'bb' => __( 'Barbados', 'polylang' ), + 'bd' => __( 'Bangladesh', 'polylang' ), + 'be' => __( 'Belgium', 'polylang' ), + 'bf' => __( 'Burkina Faso', 'polylang' ), + 'bg' => __( 'Bulgaria', 'polylang' ), + 'bh' => __( 'Bahrain', 'polylang' ), + 'bi' => __( 'Burundi', 'polylang' ), + 'bj' => __( 'Benin', 'polylang' ), + 'bm' => __( 'Bermuda', 'polylang' ), + 'bn' => __( 'Brunei', 'polylang' ), + 'bo' => __( 'Bolivia', 'polylang' ), + 'br' => __( 'Brazil', 'polylang' ), + 'bs' => __( 'Bahamas', 'polylang' ), + 'bt' => __( 'Bhutan', 'polylang' ), + 'bw' => __( 'Botswana', 'polylang' ), + 'by' => __( 'Belarus', 'polylang' ), + 'bz' => __( 'Belize', 'polylang' ), + 'ca' => __( 'Canada', 'polylang' ), + 'catalonia' => __( 'Catalonia', 'polylang' ), + 'cc' => __( 'Cocos', 'polylang' ), + 'cd' => __( 'Democratic Republic of the Congo', 'polylang' ), + 'cf' => __( 'Central African Republic', 'polylang' ), + 'cg' => __( 'Congo', 'polylang' ), + 'ch' => __( 'Switzerland', 'polylang' ), + 'ci' => __( 'Ivory Coast', 'polylang' ), + 'ck' => __( 'Cook Islands', 'polylang' ), + 'cl' => __( 'Chile', 'polylang' ), + 'cm' => __( 'Cameroon', 'polylang' ), + 'cn' => __( 'China', 'polylang' ), + 'co' => __( 'Colombia', 'polylang' ), + 'cr' => __( 'Costa Rica', 'polylang' ), + 'cu' => __( 'Cuba', 'polylang' ), + 'cv' => __( 'Cape Verde', 'polylang' ), + 'cx' => __( 'Christmas Island', 'polylang' ), + 'cy' => __( 'Cyprus', 'polylang' ), + 'cz' => __( 'Czech Republic', 'polylang' ), + 'de' => __( 'Germany', 'polylang' ), + 'dj' => __( 'Djibouti', 'polylang' ), + 'dk' => __( 'Denmark', 'polylang' ), + 'dm' => __( 'Dominica', 'polylang' ), + 'do' => __( 'Dominican Republic', 'polylang' ), + 'dz' => __( 'Algeria', 'polylang' ), + 'ec' => __( 'Ecuador', 'polylang' ), + 'ee' => __( 'Estonia', 'polylang' ), + 'eg' => __( 'Egypt', 'polylang' ), + 'eh' => __( 'Western Sahara', 'polylang' ), + 'england' => __( 'England', 'polylang' ), + 'er' => __( 'Eritrea', 'polylang' ), + 'es' => __( 'Spain', 'polylang' ), + 'esperanto' => __( 'Esperanto', 'polylang' ), + 'et' => __( 'Ethiopia', 'polylang' ), + 'fi' => __( 'Finland', 'polylang' ), + 'fj' => __( 'Fiji', 'polylang' ), + 'fk' => __( 'Falkland Islands', 'polylang' ), + 'fm' => __( 'Micronesia', 'polylang' ), + 'fo' => __( 'Faroe Islands', 'polylang' ), + 'fr' => __( 'France', 'polylang' ), + 'ga' => __( 'Gabon', 'polylang' ), + 'galicia' => __( 'Galicia', 'polylang' ), + 'gb' => __( 'United Kingdom', 'polylang' ), + 'gd' => __( 'Grenada', 'polylang' ), + 'ge' => __( 'Georgia', 'polylang' ), + 'gh' => __( 'Ghana', 'polylang' ), + 'gi' => __( 'Gibraltar', 'polylang' ), + 'gl' => __( 'Greenland', 'polylang' ), + 'gm' => __( 'Gambia', 'polylang' ), + 'gn' => __( 'Guinea', 'polylang' ), + 'gp' => __( 'Guadeloupe', 'polylang' ), + 'gq' => __( 'Equatorial Guinea', 'polylang' ), + 'gr' => __( 'Greece', 'polylang' ), + 'gs' => __( 'South Georgia and the South Sandwich Islands', 'polylang' ), + 'gt' => __( 'Guatemala', 'polylang' ), + 'gu' => __( 'Guam', 'polylang' ), + 'gw' => __( 'Guinea-Bissau', 'polylang' ), + 'gy' => __( 'Guyana', 'polylang' ), + 'hk' => __( 'Hong Kong', 'polylang' ), + 'hm' => __( 'Heard Island and McDonald Islands', 'polylang' ), + 'hn' => __( 'Honduras', 'polylang' ), + 'hr' => __( 'Croatia', 'polylang' ), + 'ht' => __( 'Haiti', 'polylang' ), + 'hu' => __( 'Hungary', 'polylang' ), + 'id' => __( 'Indonesia', 'polylang' ), + 'ie' => __( 'Republic of Ireland', 'polylang' ), + 'il' => __( 'Israel', 'polylang' ), + 'in' => __( 'India', 'polylang' ), + 'io' => __( 'British Indian Ocean Territory', 'polylang' ), + 'iq' => __( 'Iraq', 'polylang' ), + 'ir' => __( 'Iran', 'polylang' ), + 'is' => __( 'Iceland', 'polylang' ), + 'it' => __( 'Italy', 'polylang' ), + 'jm' => __( 'Jamaica', 'polylang' ), + 'jo' => __( 'Jordan', 'polylang' ), + 'jp' => __( 'Japan', 'polylang' ), + 'ke' => __( 'Kenya', 'polylang' ), + 'kg' => __( 'Kyrgyzstan', 'polylang' ), + 'kh' => __( 'Cambodia', 'polylang' ), + 'ki' => __( 'Kiribati', 'polylang' ), + 'km' => __( 'Comoros', 'polylang' ), + 'kn' => __( 'Saint Kitts and Nevis', 'polylang' ), + 'kp' => __( 'North Korea', 'polylang' ), + 'kr' => __( 'South Korea', 'polylang' ), + 'kurdistan' => __( 'Kurdistan', 'polylang' ), + 'kw' => __( 'Kuwait', 'polylang' ), + 'ky' => __( 'Cayman Islands', 'polylang' ), + 'kz' => __( 'Kazakhstan', 'polylang' ), + 'la' => __( 'Laos', 'polylang' ), + 'lb' => __( 'Lebanon', 'polylang' ), + 'lc' => __( 'Saint Lucia', 'polylang' ), + 'li' => __( 'Liechtenstein', 'polylang' ), + 'lk' => __( 'Sri Lanka', 'polylang' ), + 'lr' => __( 'Liberia', 'polylang' ), + 'ls' => __( 'Lesotho', 'polylang' ), + 'lt' => __( 'Lithuania', 'polylang' ), + 'lu' => __( 'Luxembourg', 'polylang' ), + 'lv' => __( 'Latvia', 'polylang' ), + 'ly' => __( 'Libya', 'polylang' ), + 'ma' => __( 'Morocco', 'polylang' ), + 'mc' => __( 'Monaco', 'polylang' ), + 'md' => __( 'Moldova', 'polylang' ), + 'me' => __( 'Montenegro', 'polylang' ), + 'mg' => __( 'Madagascar', 'polylang' ), + 'mh' => __( 'Marshall Islands', 'polylang' ), + 'mk' => __( 'Macedonia', 'polylang' ), + 'ml' => __( 'Mali', 'polylang' ), + 'mm' => __( 'Myanmar', 'polylang' ), + 'mn' => __( 'Mongolia', 'polylang' ), + 'mo' => __( 'Macao', 'polylang' ), + 'mp' => __( 'Northern Mariana Islands', 'polylang' ), + 'mq' => __( 'Martinique', 'polylang' ), + 'mr' => __( 'Mauritania', 'polylang' ), + 'ms' => __( 'Montserrat', 'polylang' ), + 'mt' => __( 'Malta', 'polylang' ), + 'mu' => __( 'Mauritius', 'polylang' ), + 'mv' => __( 'Maldives', 'polylang' ), + 'mw' => __( 'Malawi', 'polylang' ), + 'mx' => __( 'Mexico', 'polylang' ), + 'my' => __( 'Malaysia', 'polylang' ), + 'mz' => __( 'Mozambique', 'polylang' ), + 'na' => __( 'Namibia', 'polylang' ), + 'nc' => __( 'New Caledonia', 'polylang' ), + 'ne' => __( 'Niger', 'polylang' ), + 'nf' => __( 'Norfolk Island', 'polylang' ), + 'ng' => __( 'Nigeria', 'polylang' ), + 'ni' => __( 'Nicaragua', 'polylang' ), + 'nl' => __( 'Netherlands', 'polylang' ), + 'no' => __( 'Norway', 'polylang' ), + 'np' => __( 'Nepal', 'polylang' ), + 'nr' => __( 'Nauru', 'polylang' ), + 'nu' => __( 'Niue', 'polylang' ), + 'nz' => __( 'New Zealand', 'polylang' ), + 'occitania' => __( 'Occitania', 'polylang' ), + 'om' => __( 'Oman', 'polylang' ), + 'pa' => __( 'Panama', 'polylang' ), + 'pe' => __( 'Peru', 'polylang' ), + 'pf' => __( 'French Polynesia', 'polylang' ), + 'pg' => __( 'Papua New Guinea', 'polylang' ), + 'ph' => __( 'Philippines', 'polylang' ), + 'pk' => __( 'Pakistan', 'polylang' ), + 'pl' => __( 'Poland', 'polylang' ), + 'pm' => __( 'Saint Pierre and Miquelon', 'polylang' ), + 'pn' => __( 'Pitcairn', 'polylang' ), + 'pr' => __( 'Puerto Rico', 'polylang' ), + 'ps' => __( 'Palestinian Territory', 'polylang' ), + 'pt' => __( 'Portugal', 'polylang' ), + 'pw' => __( 'Belau', 'polylang' ), + 'py' => __( 'Paraguay', 'polylang' ), + 'qa' => __( 'Qatar', 'polylang' ), + 'quebec' => __( 'Quebec', 'polylang' ), + 'ro' => __( 'Romania', 'polylang' ), + 'rs' => __( 'Serbia', 'polylang' ), + 'ru' => __( 'Russia', 'polylang' ), + 'rw' => __( 'Rwanda', 'polylang' ), + 'sa' => __( 'Saudi Arabia', 'polylang' ), + 'sb' => __( 'Solomon Islands', 'polylang' ), + 'sc' => __( 'Seychelles', 'polylang' ), + 'scotland' => __( 'Scotland', 'polylang' ), + 'sd' => __( 'Sudan', 'polylang' ), + 'se' => __( 'Sweden', 'polylang' ), + 'sg' => __( 'Singapore', 'polylang' ), + 'sh' => __( 'Saint Helena', 'polylang' ), + 'si' => __( 'Slovenia', 'polylang' ), + 'sk' => __( 'Slovakia', 'polylang' ), + 'sl' => __( 'Sierra Leone', 'polylang' ), + 'sm' => __( 'San Marino', 'polylang' ), + 'sn' => __( 'Senegal', 'polylang' ), + 'so' => __( 'Somalia', 'polylang' ), + 'sr' => __( 'Suriname', 'polylang' ), + 'ss' => __( 'South Sudan', 'polylang' ), + 'st' => __( 'São Tomé and Príncipe', 'polylang' ), + 'sv' => __( 'El Salvador', 'polylang' ), + 'sy' => __( 'Syria', 'polylang' ), + 'sz' => __( 'Swaziland', 'polylang' ), + 'tc' => __( 'Turks and Caicos Islands', 'polylang' ), + 'td' => __( 'Chad', 'polylang' ), + 'tf' => __( 'French Southern Territories', 'polylang' ), + 'tg' => __( 'Togo', 'polylang' ), + 'th' => __( 'Thailand', 'polylang' ), + 'tibet' => __( 'Tibet', 'polylang' ), + 'tj' => __( 'Tajikistan', 'polylang' ), + 'tk' => __( 'Tokelau', 'polylang' ), + 'tl' => __( 'Timor-Leste', 'polylang' ), + 'tm' => __( 'Turkmenistan', 'polylang' ), + 'tn' => __( 'Tunisia', 'polylang' ), + 'to' => __( 'Tonga', 'polylang' ), + 'tr' => __( 'Turkey', 'polylang' ), + 'tt' => __( 'Trinidad and Tobago', 'polylang' ), + 'tv' => __( 'Tuvalu', 'polylang' ), + 'tw' => __( 'Taiwan', 'polylang' ), + 'tz' => __( 'Tanzania', 'polylang' ), + 'ua' => __( 'Ukraine', 'polylang' ), + 'ug' => __( 'Uganda', 'polylang' ), + 'us' => __( 'United States', 'polylang' ), + 'uy' => __( 'Uruguay', 'polylang' ), + 'uz' => __( 'Uzbekistan', 'polylang' ), + 'va' => __( 'Vatican', 'polylang' ), + 'vc' => __( 'Saint Vincent and the Grenadines', 'polylang' ), + 've' => __( 'Venezuela', 'polylang' ), + 'veneto' => __( 'Veneto', 'polylang' ), + 'vg' => __( 'British Virgin Islands', 'polylang' ), + 'vi' => __( 'United States Virgin Islands', 'polylang' ), + 'vn' => __( 'Vietnam', 'polylang' ), + 'vu' => __( 'Vanuatu', 'polylang' ), + 'wales' => __( 'Wales', 'polylang' ), + 'wf' => __( 'Wallis and Futuna', 'polylang' ), + 'ws' => __( 'Western Samoa', 'polylang' ), + 'ye' => __( 'Yemen', 'polylang' ), + 'yt' => __( 'Mayotte', 'polylang' ), + 'za' => __( 'South Africa', 'polylang' ), + 'zm' => __( 'Zambia', 'polylang' ), + 'zw' => __( 'Zimbabwe', 'polylang' ), +); + +/** + * Filter the list of predefined flags + * + * @since 1.8 + * + * @param array $flags + */ +$flags = apply_filters( 'pll_predefined_flags', $flags ); diff --git a/pole-sbv-content/plugins/polylang/settings/languages.php b/pole-sbv-content/plugins/polylang/settings/languages.php new file mode 100644 index 00000000..e10274ef --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/languages.php @@ -0,0 +1,145 @@ + ISO 639-1 language code + * [1] => WordPress locale + * [2] => name + * [3] => text direction + * [4] => flag code + */ +$languages = array( + 'af' => array( 'af', 'af', 'Afrikaans', 'ltr', 'za' ), + 'ar' => array( 'ar', 'ar', 'العربية', 'rtl', 'arab' ), + 'ary' => array( 'ar', 'ary', 'العربية المغربية', 'rtl', 'ma' ), + 'as' => array( 'as', 'as', 'অসমীয়া', 'ltr', 'in' ), + 'az' => array( 'az', 'az', 'Azərbaycan', 'ltr', 'az' ), + 'azb' => array( 'az', 'azb', 'گؤنئی آذربایجان', 'rtl', 'az' ), + 'bel' => array( 'be', 'bel', 'Беларуская мова', 'ltr', 'by' ), + 'bg_BG' => array( 'bg', 'bg_BG', 'български', 'ltr', 'bg' ), + 'bn_BD' => array( 'bn', 'bn_BD', 'বাংলা', 'ltr', 'bd' ), + 'bo' => array( 'bo', 'bo', 'བོད་ཡིག', 'ltr', 'tibet' ), + 'bs_BA' => array( 'bs', 'bs_BA', 'Bosanski', 'ltr', 'ba' ), + 'ca' => array( 'ca', 'ca', 'Català', 'ltr', 'catalonia' ), + 'ceb' => array( 'ceb', 'ceb', 'Cebuano', 'ltr', 'ph' ), + 'cs_CZ' => array( 'cs', 'cs_CZ', 'Čeština', 'ltr', 'cz' ), + 'cy' => array( 'cy', 'cy', 'Cymraeg', 'ltr', 'wales' ), + 'da_DK' => array( 'da', 'da_DK', 'Dansk', 'ltr', 'dk' ), + 'de_CH' => array( 'de', 'de_CH', 'Deutsch', 'ltr', 'ch' ), + 'de_CH_informal' => array( 'de', 'de_CH_informal', 'Deutsch', 'ltr', 'ch' ), + 'de_DE' => array( 'de', 'de_DE', 'Deutsch', 'ltr', 'de' ), + 'de_DE_formal' => array( 'de', 'de_DE_formal', 'Deutsch', 'ltr', 'de' ), + 'dzo' => array( 'dz', 'dzo', 'རྫོང་ཁ', 'ltr', 'bt' ), + 'el' => array( 'el', 'el', 'Ελληνικά', 'ltr', 'gr' ), + 'en_AU' => array( 'en', 'en_AU', 'English', 'ltr', 'au' ), + 'en_CA' => array( 'en', 'en_CA', 'English', 'ltr', 'ca' ), + 'en_GB' => array( 'en', 'en_GB', 'English', 'ltr', 'gb' ), + 'en_NZ' => array( 'en', 'en_NZ', 'English', 'ltr', 'nz' ), + 'en_US' => array( 'en', 'en_US', 'English', 'ltr', 'us' ), + 'en_ZA' => array( 'en', 'en_ZA', 'English', 'ltr', 'za' ), + 'eo' => array( 'eo', 'eo', 'Esperanto', 'ltr', 'esperanto' ), + 'es_AR' => array( 'es', 'es_AR', 'Español', 'ltr', 'ar' ), + 'es_CL' => array( 'es', 'es_CL', 'Español', 'ltr', 'cl' ), + 'es_CO' => array( 'es', 'es_CO', 'Español', 'ltr', 'co' ), + 'es_ES' => array( 'es', 'es_ES', 'Español', 'ltr', 'es' ), + 'es_GT' => array( 'es', 'es_GT', 'Español', 'ltr', 'gt' ), + 'es_MX' => array( 'es', 'es_MX', 'Español', 'ltr', 'mx' ), + 'es_PE' => array( 'es', 'es_PE', 'Español', 'ltr', 'pe' ), + 'es_VE' => array( 'es', 'es_VE', 'Español', 'ltr', 've' ), + 'et' => array( 'et', 'et', 'Eesti', 'ltr', 'ee' ), + 'eu' => array( 'eu', 'eu', 'Euskara', 'ltr', 'basque' ), + 'fa_AF' => array( 'fa', 'fa_AF', 'فارسی', 'rtl', 'af' ), + 'fa_IR' => array( 'fa', 'fa_IR', 'فارسی', 'rtl', 'ir' ), + 'fi' => array( 'fi', 'fi', 'Suomi', 'ltr', 'fi' ), + 'fo' => array( 'fo', 'fo', 'Føroyskt', 'ltr', 'fo' ), + 'fr_BE' => array( 'fr', 'fr_BE', 'Français', 'ltr', 'be' ), + 'fr_CA' => array( 'fr', 'fr_CA', 'Français', 'ltr', 'quebec' ), + 'fr_FR' => array( 'fr', 'fr_FR', 'Français', 'ltr', 'fr' ), + 'fy' => array( 'fy', 'fy', 'Frysk', 'ltr', 'nl' ), + 'gd' => array( 'gd', 'gd', 'Gàidhlig', 'ltr', 'scotland' ), + 'gl_ES' => array( 'gl', 'gl_ES', 'Galego', 'ltr', 'galicia' ), + 'gu' => array( 'gu', 'gu', 'ગુજરાતી', 'ltr', 'in' ), + 'haz' => array( 'haz', 'haz', 'هزاره گی', 'rtl', 'af' ), + 'he_IL' => array( 'he', 'he_IL', 'עברית', 'rtl', 'il' ), + 'hi_IN' => array( 'hi', 'hi_IN', 'हिन्दी', 'ltr', 'in' ), + 'hr' => array( 'hr', 'hr', 'Hrvatski', 'ltr', 'hr' ), + 'hu_HU' => array( 'hu', 'hu_HU', 'Magyar', 'ltr', 'hu' ), + 'hy' => array( 'hy', 'hy', 'Հայերեն', 'ltr', 'am' ), + 'id_ID' => array( 'id', 'id_ID', 'Bahasa Indonesia', 'ltr', 'id' ), + 'is_IS' => array( 'is', 'is_IS', 'Íslenska', 'ltr', 'is' ), + 'it_IT' => array( 'it', 'it_IT', 'Italiano', 'ltr', 'it' ), + 'ja' => array( 'ja', 'ja', '日本語', 'ltr', 'jp' ), + 'jv_ID' => array( 'jv', 'jv_ID', 'Basa Jawa', 'ltr', 'id' ), + 'ka_GE' => array( 'ka', 'ka_GE', 'ქართული', 'ltr', 'ge' ), + 'kab' => array( 'kab', 'kab', 'Taqbaylit', 'ltr', 'dz' ), + 'kk' => array( 'kk', 'kk', 'Қазақ тілі', 'ltr', 'kz' ), + 'km' => array( 'km', 'km', 'ភាសាខ្មែរ', 'ltr', 'kh' ), + 'ko_KR' => array( 'ko', 'ko_KR', '한국어', 'ltr', 'kr' ), + 'ckb' => array( 'ku', 'ckb', 'کوردی', 'rtl', 'kurdistan' ), + 'lo' => array( 'lo', 'lo', 'ພາສາລາວ', 'ltr', 'la' ), + 'lt_LT' => array( 'lt', 'lt_LT', 'Lietuviškai', 'ltr', 'lt' ), + 'lv' => array( 'lv', 'lv', 'Latviešu valoda', 'ltr', 'lv' ), + 'mk_MK' => array( 'mk', 'mk_MK', 'македонски јазик', 'ltr', 'mk' ), + 'ml_IN' => array( 'ml', 'ml_IN', 'മലയാളം', 'ltr', 'in' ), + 'mn' => array( 'mn', 'mn', 'Монгол хэл', 'ltr', 'mn' ), + 'mr' => array( 'mr', 'mr', 'मराठी', 'ltr', 'in' ), + 'ms_MY' => array( 'ms', 'ms_MY', 'Bahasa Melayu', 'ltr', 'my' ), + 'my_MM' => array( 'my', 'my_MM', 'ဗမာစာ', 'ltr', 'mm' ), + 'nb_NO' => array( 'nb', 'nb_NO', 'Norsk Bokmål', 'ltr', 'no' ), + 'ne_NP' => array( 'ne', 'ne_NP', 'नेपाली', 'ltr', 'np' ), + 'nl_BE' => array( 'nl', 'nl_BE', 'Nederlands', 'ltr', 'be' ), + 'nl_NL' => array( 'nl', 'nl_NL', 'Nederlands', 'ltr', 'nl' ), + 'nl_NL_formal' => array( 'nl', 'nl_NL_formal', 'Nederlands', 'ltr', 'nl' ), + 'nn_NO' => array( 'nn', 'nn_NO', 'Norsk Nynorsk', 'ltr', 'no' ), + 'oci' => array( 'oc', 'oci', 'Occitan', 'ltr', 'occitania' ), + 'pa_IN' => array( 'pa', 'pa_IN', 'ਪੰਜਾਬੀ', 'ltr', 'in' ), + 'pl_PL' => array( 'pl', 'pl_PL', 'Polski', 'ltr', 'pl' ), + 'ps' => array( 'ps', 'ps', 'پښتو', 'rtl', 'af' ), + 'pt_BR' => array( 'pt', 'pt_BR', 'Português', 'ltr', 'br' ), + 'pt_PT' => array( 'pt', 'pt_PT', 'Português', 'ltr', 'pt' ), + 'rhg' => array( 'rhg', 'rhg', 'Ruáinga', 'ltr', 'mm' ), + 'ro_RO' => array( 'ro', 'ro_RO', 'Română', 'ltr', 'ro' ), + 'ru_RU' => array( 'ru', 'ru_RU', 'Русский', 'ltr', 'ru' ), + 'sah' => array( 'sah', 'sah', 'Сахалыы', 'ltr', 'ru' ), + 'si_LK' => array( 'si', 'si_LK', 'සිංහල', 'ltr', 'lk' ), + 'sk_SK' => array( 'sk', 'sk_SK', 'Slovenčina', 'ltr', 'sk' ), + 'sl_SI' => array( 'sl', 'sl_SI', 'Slovenščina', 'ltr', 'si' ), + 'so_SO' => array( 'so', 'so_SO', 'Af-Soomaali', 'ltr', 'so' ), + 'sq' => array( 'sq', 'sq', 'Shqip', 'ltr', 'al' ), + 'sr_RS' => array( 'sr', 'sr_RS', 'Српски језик', 'ltr', 'rs' ), + 'su_ID' => array( 'su', 'su_ID', 'Basa Sunda', 'ltr', 'id' ), + 'sv_SE' => array( 'sv', 'sv_SE', 'Svenska', 'ltr', 'se' ), + 'szl' => array( 'szl', 'szl', 'Ślōnskŏ gŏdka', 'ltr', 'pl' ), + 'ta_IN' => array( 'ta', 'ta_IN', 'தமிழ்', 'ltr', 'in' ), + 'ta_LK' => array( 'ta', 'ta_LK', 'தமிழ்', 'ltr', 'lk' ), + 'tah' => array( 'ty', 'tah', 'Reo Tahiti', 'ltr', 'pf' ), + 'te' => array( 'te', 'te', 'తెలుగు', 'ltr', 'in' ), + 'th' => array( 'th', 'th', 'ไทย', 'ltr', 'th' ), + 'tl' => array( 'tl', 'tl', 'Tagalog', 'ltr', 'ph' ), + 'tr_TR' => array( 'tr', 'tr_TR', 'Türkçe', 'ltr', 'tr' ), + 'tt_RU' => array( 'tt', 'tt_RU', 'Татар теле', 'ltr', 'ru' ), + 'ug_CN' => array( 'ug', 'ug_CN', 'Uyƣurqə', 'ltr', 'cn' ), + 'uk' => array( 'uk', 'uk', 'Українська', 'ltr', 'ua' ), + 'ur' => array( 'ur', 'ur', 'اردو', 'rtl', 'pk' ), + 'uz_UZ' => array( 'uz', 'uz_UZ', 'Oʻzbek', 'ltr', 'uz' ), + 'vec' => array( 'vec', 'vec', 'Vèneto', 'ltr', 'veneto' ), + 'vi' => array( 'vi', 'vi', 'Tiếng Việt', 'ltr', 'vn' ), + 'zh_CN' => array( 'zh', 'zh_CN', '中文 (中国)', 'ltr', 'cn' ), + 'zh_HK' => array( 'zh', 'zh_HK', '中文 (香港)', 'ltr', 'hk' ), + 'zh_TW' => array( 'zh', 'zh_TW', '中文 (台灣)', 'ltr', 'tw' ), +); + +/** + * Filter the list of predefined languages + * + * @since 1.7.10 + * + * @param array $languages + */ +$languages = apply_filters( 'pll_predefined_languages', $languages ); diff --git a/pole-sbv-content/plugins/polylang/settings/settings-browser.php b/pole-sbv-content/plugins/polylang/settings/settings-browser.php new file mode 100644 index 00000000..6ac28788 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/settings-browser.php @@ -0,0 +1,90 @@ + 'browser', + 'title' => __( 'Detect browser language', 'polylang' ), + 'description' => __( 'When the front page is visited, set the language according to the browser preference', 'polylang' ), + 'active_option' => $this->is_available() ? 'browser' : false, + ) ); + + if ( ! class_exists( 'PLL_Xdata_Domain', true ) ) { + add_action( 'admin_print_footer_scripts', array( $this, 'print_js' ) ); + } + } + + /** + * Tells if the option is available + * + * @since 2.0 + * + * @return bool + */ + protected function is_available() { + return ( 3 > $this->options['force_lang'] ) || class_exists( 'PLL_Xdata_Domain', true ); + } + + /** + * Tells if the module is active + * + * @since 1.8 + * + * @return bool + */ + public function is_active() { + return $this->is_available() ? parent::is_active() : false; + } + + /** + * Displays the javascript to handle dynamically the change in url modifications + * as the preferred browser language is not used when the language is set from different domains + * + * @since 1.8 + */ + public function print_js() { + wp_enqueue_script( 'jquery' ); + + if ( parent::is_active() && 3 > $this->options['force_lang'] ) { + $func = 'removeClass( "inactive" ).addClass( "active" )'; + $link = sprintf( '%s', $this->action_links['deactivate'] ); + } + else { + $func = 'removeClass( "active" ).addClass( "inactive" )'; + $link = sprintf( '%s', $this->action_links['activate'] ); + } + + $deactivated = sprintf( '%s', $this->action_links['deactivated'] ); + + ?> + + 'cpt', + 'title' => __( 'Custom post types and Taxonomies', 'polylang' ), + 'description' => __( 'Activate the languages and translations management for the custom post types and taxonomies.', 'polylang' ), + ) ); + + // FIXME should be OK when the modules will be loaded from the settings page + $post_types = get_post_types( array( 'public' => true, '_builtin' => false ) ); + $post_types = array_diff( $post_types, get_post_types( array( '_pll' => true ) ) ); + /** This filter is documented in include/model.php */ + $this->post_types = array_unique( apply_filters( 'pll_get_post_types', $post_types, true ) ); + + $taxonomies = get_taxonomies( array( 'public' => true, '_builtin' => false ) ); + $taxonomies = array_diff( $taxonomies, get_taxonomies( array( '_pll' => true ) ) ); + /** This filter is documented in include/model.php */ + $this->taxonomies = array_unique( apply_filters( 'pll_get_taxonomies', $taxonomies , true ) ); + } + + /** + * Tells if the module is active + * + * @since 1.8 + * + * @return bool + */ + public function is_active() { + return ! empty( $this->post_types ) || ! empty( $this->taxonomies ); + } + + /** + * Displays the settings form + * + * @since 1.8 + */ + protected function form() { + if ( ! empty( $this->post_types ) ) {?> +

    +
      + post_types as $post_type ) { + $pt = get_post_type_object( $post_type ); + if ( ! empty( $pt ) ) { + printf( + '
    • ', + esc_attr( $post_type ), + in_array( $post_type, $this->options['post_types'] ) ? 'checked="checked"' : '', + esc_html( $pt->labels->name ) + ); + } + } + ?> +
    +

    + taxonomies ) ) { + ?> +

    +
      + taxonomies as $taxonomy ) { + $tax = get_taxonomy( $taxonomy ); + if ( ! empty( $tax ) ) { + printf( + '
    • ', + esc_attr( $taxonomy ), + in_array( $taxonomy, $this->options['taxonomies'] ) ? 'checked="checked"' : '', + esc_html( $tax->labels->name ) + ); + } + } + ?> +
    +

    + 'licenses', + 'title' => __( 'License keys', 'polylang' ), + 'description' => __( 'Manage licenses for Polylang Pro or addons.', 'polylang' ), + ) ); + + $this->buttons['cancel'] = sprintf( '', __( 'Close' ) ); + + $this->items = apply_filters( 'pll_settings_licenses', array() ); + + add_action( 'wp_ajax_pll_deactivate_license', array( $this, 'deactivate_license' ) ); + } + + /** + * Tells if the module is active + * + * @since 1.9 + * + * @return bool + */ + public function is_active() { + return ! empty( $this->items ); + } + + /** + * Displays the settings form + * + * @since 1.9 + */ + protected function form() { + if ( ! empty( $this->items ) ) { ?> + + items as $item ) { + echo $this->get_row( $item ); + } + ?> +
    + license_data ) ) { + $license = $item->license_data; + } + + $class = 'license-null'; + + $out = sprintf( + '' . + '', + esc_attr( $item->id ), esc_attr( $item->name ), esc_html( $item->license_key ) + ); + + if ( ! empty( $license ) && is_object( $license ) ) { + $now = current_time( 'timestamp' ); + $expiration = strtotime( $license->expires, $now ); + + // Special case: the license expired after the last check + if ( $license->success && $expiration < $now ) { + $license->success = false; + $license->error = 'expired'; + } + + if ( false === $license->success ) { + $class = 'notice-error notice-alt'; + + switch ( $license->error ) { + case 'expired': + $message = sprintf( + /* translators: %1$s is a date, %2$s and %3$s are html tags */ + __( 'Your license key expired on %1$s. Please %2$srenew your license key%3$s.', 'polylang' ), + date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ), + sprintf( '', 'https://polylang.pro/checkout/?edd_license_key=' . $item->license_key ), + '' + ); + break; + + case 'missing': + $message = sprintf( + /* translators: %s are html tags */ + __( 'Invalid license. Please %svisit your account page%s and verify it.', 'polylang' ), + sprintf( '', 'https://polylang.pro/account' ), + '' + ); + break; + + case 'invalid': + case 'site_inactive': + $message = sprintf( + /* translators: %1$s is a product name, %2$s and %3$s are html tags */ + __( 'Your %1$s license key is not active for this URL. Please %2$svisit your account page%3$s to manage your license key URLs.', 'polylang' ), + $item->name, + sprintf( '', 'https://polylang.pro/account' ), + '' + ); + break; + + case 'item_name_mismatch': + /* translators: %s is a product name */ + $message = sprintf( __( 'This is not a %s license key.', 'polylang' ), $item->name ); + break; + + case 'no_activations_left': + $message = sprintf( + /* translators: %s are html tags */ + __( 'Your license key has reached its activation limit. %sView possible upgrades%s now.', 'polylang' ), + sprintf( '', 'https://polylang.pro/account' ), + '' + ); + break; + } + } else { + $class = 'license-valid'; + + $out .= sprintf( '', $item->id, __( 'Deactivate', 'polylang' ) ); + + if ( 'lifetime' === $license->expires ) { + $message = __( 'The license key never expires.', 'polylang' ); + } elseif ( $expiration > $now && $expiration - $now < ( DAY_IN_SECONDS * 30 ) ) { + $class = 'notice-warning notice-alt'; + $message = sprintf( + /* translators: %1$s is a date, %2$s and %3$s are html tags */ + __( 'Your license key expires soon! It expires on %1$s. %2$sRenew your license key%3$s.', 'polylang' ), + date_i18n( get_option( 'date_format' ), strtotime( $license->expires, $now ) ), + sprintf( '', 'https://polylang.pro/checkout/?edd_license_key=' . $item->license_key ), + '' + ); + } else { + $message = sprintf( + /* translators: %s is a date */ + __( 'Your license key expires on %s.', 'polylang' ), + date_i18n( get_option( 'date_format' ), strtotime( $license->expires, $now ) ) + ); + } + } + } + + if ( ! empty( $message ) ) { + $out .= '

    ' . $message . '

    '; + } + + return sprintf( '%s', $item->id, $class, $out ); + } + + /** + * Ajax method to save the license keys and activate the licenses at the same time + * Overrides parent's method + * + * @since 1.9 + */ + public function save_options() { + check_ajax_referer( 'pll_options', '_pll_nonce' ); + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + if ( $this->module === $_POST['module'] && ! empty( $_POST['licenses'] ) ) { + $x = new WP_Ajax_Response(); + foreach ( $this->items as $item ) { + $updated_item = $item->activate_license( sanitize_text_field( $_POST['licenses'][ $item->id ] ) ); + $x->Add( array( 'what' => 'license-update', 'data' => $item->id, 'supplemental' => array( 'html' => $this->get_row( $updated_item ) ) ) ); + } + + // Updated message + add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'updated' ); + ob_start(); + settings_errors(); + $x->Add( array( 'what' => 'success', 'data' => ob_get_clean() ) ); + $x->send(); + } + } + + /** + * Ajax method to deactivate a license + * + * @since 1.9 + */ + public function deactivate_license() { + check_ajax_referer( 'pll_options', '_pll_nonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + $id = sanitize_text_field( substr( $_POST['id'], 11 ) ); + wp_send_json( array( + 'id' => $id, + 'html' => $this->get_row( $this->items[ $id ]->deactivate_license() ), + ) ); + } +} diff --git a/pole-sbv-content/plugins/polylang/settings/settings-media.php b/pole-sbv-content/plugins/polylang/settings/settings-media.php new file mode 100644 index 00000000..80c4261a --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/settings-media.php @@ -0,0 +1,25 @@ + 'media', + 'title' => __( 'Media' ), + 'description' => __( 'Activate languages and translations for media', 'polylang' ), + 'active_option' => 'media_support', + ) ); + } +} diff --git a/pole-sbv-content/plugins/polylang/settings/settings-module.php b/pole-sbv-content/plugins/polylang/settings/settings-module.php new file mode 100644 index 00000000..0a67e753 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/settings-module.php @@ -0,0 +1,263 @@ +options = &$polylang->options; + $this->model = &$polylang->model; + $this->links_model = &$polylang->links_model; + + $args = wp_parse_args( $args, array( + 'title' => '', + 'description' => '', + 'active_option' => false, + ) ); + + foreach ( $args as $prop => $value ) { + $this->$prop = $value; + } + + // All possible action links, even if not always a link ;-) + $this->action_links = array( + 'configure' => sprintf( + '%s', + esc_attr__( 'Configure this module', 'polylang' ), + '#', + esc_html__( 'Settings', 'polylang' ) + ), + + 'deactivate' => sprintf( + '%s', + esc_attr__( 'Deactivate this module', 'polylang' ), + wp_nonce_url( '?page=mlang&tab=modules&pll_action=deactivate&noheader=true&module=' . $this->module, 'pll_deactivate' ), + esc_html__( 'Deactivate', 'polylang' ) + ), + + 'activate' => sprintf( + '%s', + esc_attr__( 'Activate this module', 'polylang' ), + wp_nonce_url( '?page=mlang&tab=modules&pll_action=activate&noheader=true&module=' . $this->module, 'pll_activate' ), + esc_html__( 'Activate', 'polylang' ) + ), + + 'activated' => esc_html__( 'Activated', 'polylang' ), + + 'deactivated' => esc_html__( 'Deactivated', 'polylang' ), + ); + + $this->buttons = array( + 'cancel' => sprintf( '', esc_html__( 'Cancel' ) ), + 'save' => sprintf( '', esc_html__( 'Save Changes' ) ), + ); + + // Ajax action to save options + add_action( 'wp_ajax_pll_save_options', array( $this, 'save_options' ) ); + } + + /** + * Tells if the module is active + * + * @since 1.8 + * + * @return bool + */ + public function is_active() { + return empty( $this->active_option ) || ! empty( $this->options[ $this->active_option ] ); + } + + /** + * Activates the module + * + * @since 1.8 + */ + public function activate() { + if ( ! empty( $this->active_option ) ) { + $this->options[ $this->active_option ] = true; + update_option( 'polylang', $this->options ); + } + } + + /** + * Deactivates the module + * + * @since 1.8 + */ + public function deactivate() { + if ( ! empty( $this->active_option ) ) { + $this->options[ $this->active_option ] = false; + update_option( 'polylang', $this->options ); + } + } + + /** + * Protected method to display a configuration form + * + * @since 1.8 + */ + protected function form() { + // Child classes can provide a form + } + + /** + * Public method returning the form if any + * + * @since 1.8 + * + * @return string + */ + public function get_form() { + static $form = false; + + // Read the form only once + if ( false === $form ) { + ob_start(); + $this->form(); + $form = ob_get_clean(); + } + + return $form; + } + + /** + * Allows child classes to validate their options before saving + * + * @since 1.8 + * + * @param array $options Raw options + * @return array Options + */ + protected function update( $options ) { + return array(); // It's responsibility of the child class to decide what is saved + } + + /** + * Ajax method to save the options + * + * @since 1.8 + */ + public function save_options() { + check_ajax_referer( 'pll_options', '_pll_nonce' ); + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + + if ( $this->module == $_POST['module'] ) { + // It's up to the child class to decide which options are saved, whether there are errors or not + $post = array_diff_key( $_POST, array_flip( array( 'action', 'module', 'pll_ajax_backend', '_pll_nonce' ) ) ); + $options = $this->update( $post ); + $this->options = array_merge( $this->options, $options ); + update_option( 'polylang', $this->options ); + + // Refresh language cache in case home urls have been modified + $this->model->clean_languages_cache(); + + // Refresh rewrite rules in case rewrite, hide_default, post types or taxonomies options have been modified + // Don't use flush_rewrite_rules as we don't have the right links model and permastruct + delete_option( 'rewrite_rules' ); + + ob_start(); + + if ( ! get_settings_errors() ) { + // Send update message + add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'updated' ); + settings_errors(); + $x = new WP_Ajax_Response( array( 'what' => 'success', 'data' => ob_get_clean() ) ); + $x->send(); + } else { + // Send error messages + settings_errors(); + $x = new WP_Ajax_Response( array( 'what' => 'error', 'data' => ob_get_clean() ) ); + $x->send(); + } + } + } + + /** + * Get the row actions + * + * @since 1.8 + * + * @return array + */ + protected function get_actions() { + if ( $this->is_active() && $this->get_form() ) { + $actions[] = 'configure'; + } + + if ( $this->active_option ) { + $actions[] = $this->is_active() ? 'deactivate' : 'activate'; + } + + if ( empty( $actions ) ) { + $actions[] = $this->is_active() ? 'activated' : 'deactivated'; + } + + return $actions; + } + + /** + * Get the actions links + * + * @since 1.8 + * + * @return array + */ + public function get_action_links() { + return array_intersect_key( $this->action_links, array_flip( $this->get_actions() ) ); + } + + /** + * Default upgrade message ( to Pro version ) + * + * @since 1.9 + * + * @return string + */ + protected function default_upgrade_message() { + return sprintf( + '%s %s', + __( 'You need Polylang Pro to enable this feature.', 'polylang' ), + 'https://polylang.pro', + __( 'Upgrade now.', 'polylang' ) + ); + } + + /** + * Allows child classes to display an upgrade message + * + * @since 1.9 + * + * @return string + */ + public function get_upgrade_message() { + return ''; + } + + /** + * Get the buttons + * + * @since 1.9 + * + * @return array + */ + public function get_buttons() { + return $this->buttons; + } +} diff --git a/pole-sbv-content/plugins/polylang/settings/settings-tools.php b/pole-sbv-content/plugins/polylang/settings/settings-tools.php new file mode 100644 index 00000000..15056b9f --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/settings-tools.php @@ -0,0 +1,49 @@ + 'tools', + 'title' => __( 'Tools', 'polylang' ), + 'description' => __( 'Decide whether to remove all data when deleting Polylang.', 'polylang' ), + ) ); + } + + /** + * displays the settings form + * + * @since 1.8 + */ + protected function form() { + printf( + '', + empty( $this->options['uninstall'] ) ? '' : 'checked="checked"', + esc_html__( 'Remove all Polylang data when using the "Delete" link on the plugins screen.', 'polylang' ) + ); + } + + /** + * sanitizes the settings before saving + * + * @since 1.8 + * + * @param array $options + */ + protected function update( $options ) { + $newoptions['uninstall'] = isset( $options['uninstall'] ) ? 1 : 0; + return $newoptions; // take care to return only validated options + } +} diff --git a/pole-sbv-content/plugins/polylang/settings/settings-url.php b/pole-sbv-content/plugins/polylang/settings/settings-url.php new file mode 100644 index 00000000..9305c920 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/settings-url.php @@ -0,0 +1,284 @@ + 'url', + 'title' => __( 'URL modifications', 'polylang' ), + 'description' => __( 'Decide how your URLs will look like.', 'polylang' ), + 'configure' => true, + ) ); + + $this->links_model = &$polylang->links_model; + $this->page_on_front = &$polylang->static_pages->page_on_front; + } + + /** + * Displays the fieldset to choose how the language is set + * + * @since 1.8 + */ + protected function force_lang() {?> + +

    + +

    ' . esc_html( home_url( $this->links_model->using_permalinks ? 'en/my-post/' : '?lang=en&p=1' ) ) . ''; ?>

    + +

    ' . esc_html( str_replace( array( '://', 'www.' ), array( '://en.', '' ), home_url( 'my-post/' ) ) ) . ''; ?>

    + + options['force_lang'] ? '' : 'style="display: none;"'; ?>> + model->get_languages_list() as $lg ) { + printf( + '' . + '', + esc_attr( $lg->slug ), + esc_attr( $lg->name ), + esc_url( isset( $this->options['domains'][ $lg->slug ] ) ? $this->options['domains'][ $lg->slug ] : ( $lg->slug == $this->options['default_lang'] ? $this->links_model->home : '' ) ) + ); + } + ?> +
    + + + + +

    ' . esc_html( home_url( 'en/' ) ) . ''; ?>

    + +

    ' . esc_html( home_url( 'language/en/' ) ) . ''; ?>

    + + +

    + model->post->get_language( $this->page_on_front ); + $lang = $lang ? $lang : $this->model->get_language( $this->options['default_lang'] ); + printf( + /* translators: %s are urls */ + esc_html__( 'Example: %s instead of %s', 'polylang' ), + '' . esc_html( $this->links_model->home_url( $lang ) ) . '', + '' . esc_html( _get_page_link( $this->page_on_front ) ) . '' + ); + ?> +

    + +
    +
    + force_lang(); ?> +
    +
    + +
    +
    $this->options['force_lang'] ? '' : 'style="display: none;"'; ?>> + hide_default(); ?> +
    + links_model->using_permalinks ) { + ?> +
    $this->options['force_lang'] ? '' : 'style="display: none;"'; ?>> + rewrite(); ?> +
    + page_on_front ) { + ?> +
    $this->options['force_lang'] ? '' : 'style="display: none;"'; ?>> + redirect_lang(); ?> +
    + +
    + $domain ) { + if ( empty( $domain ) ) { + $lang = $this->model->get_language( $key ); + add_settings_error( 'general', 'pll_invalid_domain', esc_html( sprintf( + /* translators: %s is a native language name */ + __( 'Please enter a valid URL for %s.', 'polylang' ), $lang->name + ) ) ); + } + else { + $newoptions['domains'][ $key ] = esc_url_raw( trim( $domain ) ); + } + } + } + + foreach ( array( 'hide_default', 'redirect_lang' ) as $key ) { + $newoptions[ $key ] = isset( $options[ $key ] ) ? 1 : 0; + } + + if ( 3 == $options['force_lang'] ) { + if ( ! class_exists( 'PLL_Xdata_Domain', true ) ) { + $newoptions['browser'] = 0; + } + $newoptions['hide_default'] = 0; + } + + // Check if domains exist + if ( $newoptions['force_lang'] > 1 ) { + $this->check_domains( $newoptions ); + } + + return $newoptions; // Take care to return only validated options + } + + /** + * Check if subdomains or domains are accessible + * + * @since 1.8 + * + * @param array $options new set of options to test + */ + protected function check_domains( $options ) { + $options = array_merge( $this->options, $options ); + $model = new PLL_Model( $options ); + $links_model = $model->get_links_model(); + foreach ( $this->model->get_languages_list() as $lang ) { + $url = add_query_arg( 'deactivate-polylang', 1, $links_model->home_url( $lang ) ); + // Don't redefine vip_safe_wp_remote_get() as it has not the same signature as wp_remote_get() + $response = function_exists( 'vip_safe_wp_remote_get' ) ? vip_safe_wp_remote_get( esc_url_raw( $url ) ) : wp_remote_get( esc_url_raw( $url ) ); + $response_code = wp_remote_retrieve_response_code( $response ); + + if ( 200 != $response_code ) { + add_settings_error( 'general', 'pll_invalid_domain', esc_html( sprintf( + /* translators: %s is an url */ + __( 'Polylang was unable to access the URL %s. Please check that the URL is valid.', 'polylang' ), $url + ) ) ); + } + } + } +} diff --git a/pole-sbv-content/plugins/polylang/settings/settings.php b/pole-sbv-content/plugins/polylang/settings/settings.php new file mode 100644 index 00000000..2a74096c --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/settings.php @@ -0,0 +1,319 @@ + inherited, reference to Polylang options array + * model => inherited, reference to PLL_Model object + * links_model => inherited, reference to PLL_Links_Model object + * links => inherited, reference to PLL_Admin_Links object + * static_pages => inherited, reference to PLL_Admin_Static_Pages object + * filters_links => inherited, reference to PLL_Filters_Links object + * curlang => inherited, optional, current language used to filter admin content + * pref_lang => inherited, preferred language used as default when saving posts or terms + * + * @since 1.2 + */ +class PLL_Settings extends PLL_Admin_Base { + protected $active_tab, $modules; + + /** + * Constructor + * + * @since 1.2 + * + * @param object $links_model + */ + public function __construct( &$links_model ) { + parent::__construct( $links_model ); + + if ( isset( $_GET['page'] ) ) { + $this->active_tab = 'mlang' === $_GET['page'] ? 'lang' : substr( $_GET['page'], 6 ); + } + + PLL_Admin_Strings::init(); + + // FIXME put this as late as possible + add_action( 'admin_init', array( $this, 'register_settings_modules' ) ); + + // adds screen options and the about box in the languages admin panel + add_action( 'load-toplevel_page_mlang', array( $this, 'load_page' ) ); + add_action( 'load-languages_page_mlang_strings', array( $this, 'load_page_strings' ) ); + + // saves per-page value in screen option + add_filter( 'set-screen-option', array( $this, 'set_screen_option' ), 10, 3 ); + } + + /** + * Initializes the modules + * + * @since 1.8 + */ + public function register_settings_modules() { + $modules = array( + 'PLL_Settings_Tools', + 'PLL_Settings_Licenses', + ); + + if ( $this->model->get_languages_list() ) { + $modules = array_merge( array( + 'PLL_Settings_Url', + 'PLL_Settings_Browser', + 'PLL_Settings_Media', + 'PLL_Settings_CPT', + 'PLL_Settings_Sync', + 'PLL_Settings_WPML', + 'PLL_Settings_Share_Slug', + 'PLL_Settings_Translate_Slugs', + ), $modules ); + } + + /** + * Filter the list of setting modules + * + * @since 1.8 + * + * @param array $modules the list of module classes + */ + $modules = apply_filters( 'pll_settings_modules', $modules ); + + foreach ( $modules as $key => $class ) { + $key = is_numeric( $key ) ? strtolower( str_replace( 'PLL_Settings_', '', $class ) ) : $key; + $this->modules[ $key ] = new $class( $this ); + } + } + + /** + * Loads the about metabox + * + * @since 0.8 + */ + public function metabox_about() { + include PLL_SETTINGS_INC . '/view-about.php'; + } + + /** + * Adds screen options and the about box in the languages admin panel + * + * @since 0.9.5 + */ + public function load_page() { + if ( ! defined( 'PLL_DISPLAY_ABOUT' ) || PLL_DISPLAY_ABOUT ) { + add_meta_box( + 'pll-about-box', + __( 'About Polylang', 'polylang' ), + array( $this, 'metabox_about' ), + 'settings_page_mlang', // FIXME not shown in screen options + 'normal' + ); + } + + add_screen_option( 'per_page', array( + 'label' => __( 'Languages', 'polylang' ), + 'default' => 10, + 'option' => 'pll_lang_per_page', + ) ); + + add_action( 'admin_notices', array( $this, 'notice_objects_with_no_lang' ) ); + } + + /** + * Adds screen options in the strings translations admin panel + * + * @since 2.1 + */ + public function load_page_strings() { + add_screen_option( 'per_page', array( + 'label' => __( 'Strings translations', 'polylang' ), + 'default' => 10, + 'option' => 'pll_strings_per_page', + ) ); + } + + /** + * Save the "Views/Uploads per page" option set by this user + * + * @since 0.9.5 + * + * @param mixed $status false or value returned by previous filter + * @param string $option Name of the option being changed + * @param string $value Value of the option + * + * @return string New value if this is our option, otherwise nothing + */ + public function set_screen_option( $status, $option, $value ) { + return 'pll_lang_per_page' === $option || 'pll_strings_per_page' === $option ? $value : $status; + } + + /** + * Manages the user input for the languages pages + * + * @since 1.9 + * + * @param string $action + */ + public function handle_actions( $action ) { + switch ( $action ) { + case 'add': + check_admin_referer( 'add-lang', '_wpnonce_add-lang' ); + + if ( $this->model->add_language( $_POST ) && 'en_US' !== $_POST['locale'] ) { + // attempts to install the language pack + require_once ABSPATH . 'wp-admin/includes/translation-install.php'; + if ( ! wp_download_language_pack( $_POST['locale'] ) ) { + add_settings_error( 'general', 'pll_download_mo', __( 'The language was created, but the WordPress language file was not downloaded. Please install it manually.', 'polylang' ) ); + } + + // force checking for themes and plugins translations updates + wp_clean_themes_cache(); + wp_clean_plugins_cache(); + } + self::redirect(); // to refresh the page ( possible thanks to the $_GET['noheader']=true ) + break; + + case 'delete': + check_admin_referer( 'delete-lang' ); + + if ( ! empty( $_GET['lang'] ) ) { + $this->model->delete_language( (int) $_GET['lang'] ); + } + + self::redirect(); // to refresh the page ( possible thanks to the $_GET['noheader']=true ) + break; + + case 'update': + check_admin_referer( 'add-lang', '_wpnonce_add-lang' ); + $error = $this->model->update_language( $_POST ); + self::redirect(); // to refresh the page ( possible thanks to the $_GET['noheader']=true ) + break; + + case 'default-lang': + check_admin_referer( 'default-lang' ); + + if ( $lang = $this->model->get_language( (int) $_GET['lang'] ) ) { + $this->model->update_default_lang( $lang->slug ); + } + + self::redirect(); // to refresh the page ( possible thanks to the $_GET['noheader']=true ) + break; + + case 'content-default-lang': + check_admin_referer( 'content-default-lang' ); + + if ( $nolang = $this->model->get_objects_with_no_lang() ) { + if ( ! empty( $nolang['posts'] ) ) { + $this->model->set_language_in_mass( 'post', $nolang['posts'], $this->options['default_lang'] ); + } + if ( ! empty( $nolang['terms'] ) ) { + $this->model->set_language_in_mass( 'term', $nolang['terms'], $this->options['default_lang'] ); + } + } + + self::redirect(); // to refresh the page ( possible thanks to the $_GET['noheader']=true ) + break; + + case 'activate': + check_admin_referer( 'pll_activate' ); + $this->modules[ $_GET['module'] ]->activate(); + self::redirect(); + break; + + case 'deactivate': + check_admin_referer( 'pll_deactivate' ); + $this->modules[ $_GET['module'] ]->deactivate(); + self::redirect(); + break; + + default: + /** + * Fires when a non default action has been sent to Polylang settings + * + * @since 1.8 + */ + do_action( "mlang_action_$action" ); + break; + } + } + + /** + * Displays the 3 tabs pages: languages, strings translations, settings + * also manages user input for these pages + * + * @since 0.1 + */ + public function languages_page() { + switch ( $this->active_tab ) { + case 'lang': + // prepare the list table of languages + $list_table = new PLL_Table_Languages(); + $list_table->prepare_items( $this->model->get_languages_list() ); + break; + + case 'strings': + $string_table = new PLL_Table_String( $this->model->get_languages_list() ); + $string_table->prepare_items(); + break; + } + + // handle user input + $action = isset( $_REQUEST['pll_action'] ) ? $_REQUEST['pll_action'] : ''; + if ( 'edit' === $action && ! empty( $_GET['lang'] ) ) { + $edit_lang = $this->model->get_language( (int) $_GET['lang'] ); + } else { + $this->handle_actions( $action ); + } + + // displays the page + include PLL_SETTINGS_INC . '/view-languages.php'; + } + + /** + * Enqueues scripts and styles + */ + public function admin_enqueue_scripts() { + parent::admin_enqueue_scripts(); + + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + + wp_enqueue_script( 'pll_admin', plugins_url( '/js/admin' . $suffix . '.js', POLYLANG_FILE ), array( 'jquery', 'wp-ajax-response', 'postbox', 'jquery-ui-selectmenu' ), POLYLANG_VERSION ); + wp_localize_script( 'pll_admin', 'pll_flag_base_url', plugins_url( '/flags/', POLYLANG_FILE ) ); + + wp_enqueue_style( 'pll_selectmenu', plugins_url( '/css/selectmenu' . $suffix . '.css', POLYLANG_FILE ), array(), POLYLANG_VERSION ); + } + + /** + * Displays a notice when there are objects with no language assigned + * + * @since 1.8 + */ + public function notice_objects_with_no_lang() { + if ( ! empty( $this->options['default_lang'] ) && $this->model->get_objects_with_no_lang() ) { + printf( + '

    %s %s

    ', + esc_html__( 'There are posts, pages, categories or tags without language.', 'polylang' ), + wp_nonce_url( '?page=mlang&pll_action=content-default-lang&noheader=true', 'content-default-lang' ), + esc_html__( 'You can set them all to the default language.', 'polylang' ) + ); + } + } + + /** + * Redirects to language page ( current active tab ) + * saves error messages in a transient for reuse in redirected page + * + * @since 1.5 + * + * @param array $args query arguments to add to the url + */ + static public function redirect( $args = array() ) { + if ( $errors = get_settings_errors() ) { + set_transient( 'settings_errors', $errors, 30 ); + $args['settings-updated'] = 1; + } + // remove possible 'pll_action' and 'lang' query args from the referer before redirecting + wp_safe_redirect( add_query_arg( $args, remove_query_arg( array( 'pll_action', 'lang' ), wp_get_referer() ) ) ); + exit; + } +} diff --git a/pole-sbv-content/plugins/polylang/settings/table-languages.php b/pole-sbv-content/plugins/polylang/settings/table-languages.php new file mode 100644 index 00000000..df1c20a7 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/table-languages.php @@ -0,0 +1,269 @@ + 'Languages', // Do not translate ( used for css class ) + 'ajax' => false, + ) ); + } + + /** + * Generates content for a single row of the table + * + * @since 1.8 + * + * @param object $item The current item + */ + public function single_row( $item ) { + /** + * Filter the list of classes assigned a row in the languages list table + * + * @since 1.8 + * + * @param array $classes list of class names + * @param object $item the current item + */ + $classes = apply_filters( 'pll_languages_row_classes', array(), $item ); + echo '' : ' class="' . esc_attr( implode( ' ', $classes ) ) . '">' ); + $this->single_row_columns( $item ); + echo ''; + } + + /** + * Displays the item information in a column ( default case ) + * + * @since 0.1 + * + * @param object $item + * @param string $column_name + * @return string + */ + function column_default( $item, $column_name ) { + switch ( $column_name ) { + case 'locale': + case 'slug': + return esc_html( $item->$column_name ); + + case 'term_group': + case 'count': + return (int) $item->$column_name; + + default: + return $item->$column_name; // flag + } + } + + /** + * Displays the item information in the column 'name' + * Displays the edit and delete action links + * + * @since 0.1 + * + * @param object $item + * @return string + */ + function column_name( $item ) { + return sprintf( + '%s', + esc_attr__( 'Edit this language', 'polylang' ), + esc_url( admin_url( 'admin.php?page=mlang&pll_action=edit&lang=' . $item->term_id ) ), + esc_html( $item->name ) + ); + } + + /** + * Displays the item information in the default language + * Displays the 'make default' action link + * + * @since 1.8 + * + * @param object $item + * @return string + */ + function column_default_lang( $item ) { + $options = get_option( 'polylang' ); + + if ( $options['default_lang'] != $item->slug ) { + $s = sprintf(' +
    + %3$s +
    ', + esc_attr__( 'Select as default language', 'polylang' ), + wp_nonce_url( '?page=mlang&pll_action=default-lang&noheader=true&lang=' . $item->term_id, 'default-lang' ), + /* translators: accessibility text, %s is a native language name */ + esc_html( sprintf( __( 'Choose %s as default language', 'polylang' ), $item->name ) ) + ); + + /** + * Filter the default language row action in the languages list table + * + * @since 1.8 + * + * @param string $s html markup of the action + * @param object $item + */ + $s = apply_filters( 'pll_default_lang_row_action', $s, $item ); + } else { + $s = sprintf( + '%1$s', + /* translators: accessibility text */ + esc_html__( 'Default language', 'polylang' ) + ); + $actions = array(); + } + + return $s; + } + + /** + * Gets the list of columns + * + * @since 0.1 + * + * @return array the list of column titles + */ + function get_columns() { + return array( + 'name' => esc_html__( 'Full name', 'polylang' ), + 'locale' => esc_html__( 'Locale', 'polylang' ), + 'slug' => esc_html__( 'Code', 'polylang' ), + 'default_lang' => sprintf( '%2$s', esc_attr__( 'Default language', 'polylang' ), esc_html__( 'Default language', 'polylang' ) ), + 'term_group' => esc_html__( 'Order', 'polylang' ), + 'flag' => esc_html__( 'Flag', 'polylang' ), + 'count' => esc_html__( 'Posts', 'polylang' ), + ); + } + + /** + * Gets the list of sortable columns + * + * @since 0.1 + * + * @return array + */ + function get_sortable_columns() { + return array( + 'name' => array( 'name', true ), // sorted by name by default + 'locale' => array( 'locale', false ), + 'slug' => array( 'slug', false ), + 'term_group' => array( 'term_group', false ), + 'count' => array( 'count', false ), + ); + } + + /** + * Gets the name of the default primary column. + * + * @since 2.1 + * + * @return string Name of the default primary column, in this case, 'name'. + */ + protected function get_default_primary_column_name() { + return 'name'; + } + + /** + * Generates and display row actions links for the list table. + * + * @since 1.8 + * + * @param object $item The item being acted upon. + * @param string $column_name Current column name. + * @param string $primary Primary column name. + * @return string The row actions output. + */ + protected function handle_row_actions( $item, $column_name, $primary ) { + if ( $primary !== $column_name ) { + return ''; + } + + $actions = array( + 'edit' => sprintf( + '%s', + esc_attr__( 'Edit this language', 'polylang' ), + esc_url( admin_url( 'admin.php?page=mlang&pll_action=edit&lang=' . $item->term_id ) ), + esc_html__( 'Edit','polylang' ) + ), + 'delete' => sprintf( + '%s', + esc_attr__( 'Delete this language and all its associated data', 'polylang' ), + wp_nonce_url( '?page=mlang&pll_action=delete&noheader=true&lang=' . $item->term_id, 'delete-lang' ), + esc_js( __( 'You are about to permanently delete this language. Are you sure?', 'polylang' ) ), + esc_html__( 'Delete','polylang' ) + ), + ); + + /** + * Filter the list of row actions in the languages list table + * + * @since 1.8 + * + * @param array $actions list of html markup actions + * @param object $item + */ + $actions = apply_filters( 'pll_languages_row_actions', $actions, $item ); + + return $this->row_actions( $actions ); + } + + /** + * Sort items + * + * @since 0.1 + * + * @param object $a The first object to compare + * @param object $b The second object to compare + * @return int -1 or 1 if $a is considered to be respectively less than or greater than $b. + */ + protected function usort_reorder( $a, $b ) { + $orderby = ! empty( $_GET['orderby'] ) ? $_GET['orderby'] : 'name'; + // Determine sort order + if ( is_numeric( $a->$orderby ) ) { + $result = $a->$orderby > $b->$orderby ? 1 : -1; + } else { + $result = strcmp( $a->$orderby, $b->$orderby ); + } + // Send final sort direction to usort + return ( empty( $_GET['order'] ) || 'asc' == $_GET['order'] ) ? $result : -$result; + } + + /** + * Prepares the list of items for displaying + * + * @since 0.1 + * + * @param array $data + */ + function prepare_items( $data = array() ) { + $per_page = $this->get_items_per_page( 'pll_lang_per_page' ); + $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() ); + + usort( $data, array( $this, 'usort_reorder' ) ); + + $total_items = count( $data ); + $this->items = array_slice( $data, ( $this->get_pagenum() - 1 ) * $per_page, $per_page ); + + $this->set_pagination_args( array( + 'total_items' => $total_items, + 'per_page' => $per_page, + 'total_pages' => ceil( $total_items / $per_page ), + ) ); + } +} diff --git a/pole-sbv-content/plugins/polylang/settings/table-settings.php b/pole-sbv-content/plugins/polylang/settings/table-settings.php new file mode 100644 index 00000000..30736cb0 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/table-settings.php @@ -0,0 +1,182 @@ + 'Settings', // Do not translate ( used for css class ) + 'ajax' => false, + ) ); + } + + /** + * Get the table classes for styling + * + * @since 1.8 + */ + protected function get_table_classes() { + return array( 'wp-list-table', 'widefat', 'plugins', 'pll-settings' ); // get the style of the plugins list table + one specific class + } + + /** + * Displays a single row + * + * @since 1.8 + * + * @param object $item PLL_Settings_Module object + */ + public function single_row( $item ) { + // Classes to reuse css from the plugins list table + $classes = $item->is_active() ? 'active' : 'inactive'; + if ( $message = $item->get_upgrade_message() ) { + $classes .= ' update'; + } + + // Display the columns + printf( '', esc_attr( $item->module ), esc_attr( $classes ) ); + $this->single_row_columns( $item ); + echo ''; + + // Display an upgrade message if there is any, reusing css from the plugins updates + if ( $message = $item->get_upgrade_message() ) { + printf( ' + + %s + ', + sprintf( + version_compare( $GLOBALS['wp_version'], '4.6', '<' ) ? + '
    %s
    ' : // backward compatibility with WP < 4.6 + '

    %s

    ', + $message + ) + ); + } + + // The settings if there are + // "inactive" class to reuse css from the plugins list table + if ( $form = $item->get_form() ) { + printf( ' + + + %s + %s +

    + %s +

    + + ', + esc_attr( $item->module ), esc_html( $item->title ), $form, implode( $item->get_buttons() ) + ); + } + } + + /** + * Generates the columns for a single row of the table + * + * @since 1.8 + * + * @param object $item The current item + */ + protected function single_row_columns( $item ) { + list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info(); + + foreach ( $columns as $column_name => $column_display_name ) { + $classes = "$column_name column-$column_name"; + if ( $primary === $column_name ) { + $classes .= ' column-primary'; + } + + if ( in_array( $column_name, $hidden ) ) { + $classes .= ' hidden'; + } + + if ( 'cb' == $column_name ) { + echo ''; + echo $this->column_cb( $item ); + echo ''; + } + else { + printf( '', esc_attr( $classes ) ); + echo $this->column_default( $item, $column_name ); + echo ''; + } + } + } + + /** + * Displays the item information in a column ( default case ) + * + * @since 1.8 + * + * @param object $item + * @param string $column_name + * @return string + */ + protected function column_default( $item, $column_name ) { + if ( 'plugin-title' == $column_name ) { + return sprintf( '%s', esc_html( $item->title ) ) . $this->row_actions( $item->get_action_links(), true /*always visible*/ ); + } + return $item->$column_name; + } + + /** + * Gets the list of columns + * + * @since 1.8 + * + * @return array the list of column titles + */ + public function get_columns() { + return array( + 'cb' => '', // For the 4px border inherited from plugins when the module is activated + 'plugin-title' => esc_html__( 'Module', 'polylang' ), // plugin-title for styling + 'description' => esc_html__( 'Description', 'polylang' ), + ); + } + + /** + * Gets the name of the primary column. + * + * @since 1.8 + * + * @return string The name of the primary column. + */ + protected function get_primary_column_name() { + return 'plugin-title'; + } + + /** + * Prepares the list of items for displaying + * + * @since 1.8 + * + * @param array $items + */ + public function prepare_items( $items = array() ) { + $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns(), $this->get_primary_column_name() ); + $this->items = $items; + } + + /** + * Avoids displaying an empty tablenav + * + * @since 2.1 + * + * @param string $which 'top' or 'bottom' + */ + protected function display_tablenav( $which ) {} +} diff --git a/pole-sbv-content/plugins/polylang/settings/table-string.php b/pole-sbv-content/plugins/polylang/settings/table-string.php new file mode 100644 index 00000000..0b3e6eab --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/table-string.php @@ -0,0 +1,345 @@ + 'Strings translations', // Do not translate ( used for css class ) + 'ajax' => false, + ) ); + + $this->languages = $languages; + $this->strings = PLL_Admin_Strings::get_strings(); + $this->groups = array_unique( wp_list_pluck( $this->strings, 'context' ) ); + $this->selected_group = empty( $_GET['group'] ) || ! in_array( $_GET['group'], $this->groups ) ? -1 : $_GET['group']; + + add_action( 'mlang_action_string-translation', array( $this, 'save_translations' ) ); + } + + /** + * Displays the item information in a column ( default case ) + * + * @since 0.6 + * + * @param array $item + * @param string $column_name + * @return string + */ + function column_default( $item, $column_name ) { + return $item[ $column_name ]; + } + + /** + * Displays the checkbox in first column + * + * @since 1.1 + * + * @param array $item + * @return string + */ + function column_cb( $item ) { + return sprintf( + '', + esc_attr( $item['row'] ), + /* translators: accessibility text, %s is a string potentially in any language */ + sprintf( __( 'Select %s' ), format_to_edit( $item['string'] ) ), + empty( $item['icl'] ) ? 'disabled' : '' // Only strings registered with WPML API can be removed + ); + } + + /** + * Displays the string to translate + * + * @since 1.0 + * + * @param array $item + * @return string + */ + function column_string( $item ) { + return format_to_edit( $item['string'] ); // Don't interpret special chars for the string column + } + + /** + * Displays the translations to edit + * + * @since 0.6 + * + * @param array $item + * @return string + */ + function column_translations( $item ) { + $languages = array_combine( wp_list_pluck( $this->languages, 'slug' ), wp_list_pluck( $this->languages, 'name' ) ); + $out = ''; + + foreach ( $item['translations'] as $key => $translation ) { + $input_type = $item['multiline'] ? + '' : + ''; + $out .= sprintf( '
    ' . $input_type . '
    ' . "\n", + esc_attr( $key ), + esc_attr( $item['row'] ), + esc_html( $languages[ $key ] ), + format_to_edit( $translation ) ); // Don't interpret special chars + } + + return $out; + } + + /** + * Gets the list of columns + * + * @since 0.6 + * + * @return array the list of column titles + */ + function get_columns() { + return array( + 'cb' => '', // Checkbox + 'string' => esc_html__( 'String', 'polylang' ), + 'name' => esc_html__( 'Name', 'polylang' ), + 'context' => esc_html__( 'Group', 'polylang' ), + 'translations' => esc_html__( 'Translations', 'polylang' ), + ); + } + + /** + * Gets the list of sortable columns + * + * @since 0.6 + * + * @return array + */ + function get_sortable_columns() { + return array( + 'string' => array( 'string', false ), + 'name' => array( 'name', false ), + 'context' => array( 'context', false ), + ); + } + + /** + * Gets the name of the default primary column. + * + * @since 2.1 + * + * @return string Name of the default primary column, in this case, 'string'. + */ + protected function get_default_primary_column_name() { + return 'string'; + } + + /** + * Sort items + * + * @since 0.6 + * + * @param object $a The first object to compare + * @param object $b The second object to compare + * @return int -1 or 1 if $a is considered to be respectively less than or greater than $b. + */ + protected function usort_reorder( $a, $b ) { + $result = strcmp( $a[ $_GET['orderby'] ], $b[ $_GET['orderby'] ] ); // determine sort order + return ( empty( $_GET['order'] ) || 'asc' === $_GET['order'] ) ? $result : -$result; // send final sort direction to usort + } + + /** + * Prepares the list of items for displaying + * + * @since 0.6 + */ + function prepare_items() { + $data = $this->strings; + + // Filter for search string + $s = empty( $_GET['s'] ) ? '' : wp_unslash( $_GET['s'] ); + foreach ( $data as $key => $row ) { + if ( ( -1 !== $this->selected_group && $row['context'] !== $this->selected_group ) || ( ! empty( $s ) && stripos( $row['name'], $s ) === false && stripos( $row['string'], $s ) === false ) ) { + unset( $data[ $key ] ); + } + } + + // Load translations + foreach ( $this->languages as $language ) { + // Filters by language if requested + if ( ( $lg = get_user_meta( get_current_user_id(), 'pll_filter_content', true ) ) && $language->slug !== $lg ) { + continue; + } + + $mo = new PLL_MO(); + $mo->import_from_db( $language ); + foreach ( $data as $key => $row ) { + $data[ $key ]['translations'][ $language->slug ] = $mo->translate( $row['string'] ); + $data[ $key ]['row'] = $key; // Store the row number for convenience + } + } + + $per_page = $this->get_items_per_page( 'pll_strings_per_page' ); + $this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() ); + + if ( ! empty( $_GET['orderby'] ) ) { // No sort by default + usort( $data, array( $this, 'usort_reorder' ) ); + } + + $total_items = count( $data ); + $this->items = array_slice( $data, ( $this->get_pagenum() - 1 ) * $per_page, $per_page ); + + $this->set_pagination_args( array( + 'total_items' => $total_items, + 'per_page' => $per_page, + 'total_pages' => ceil( $total_items / $per_page ), + ) ); + } + + /** + * Get the list of possible bulk actions + * + * @since 1.1 + * + * @return array + */ + function get_bulk_actions() { + return array( 'delete' => __( 'Delete','polylang' ) ); + } + + /** + * Get the current action selected from the bulk actions dropdown. + * overrides parent function to avoid submit button to trigger bulk actions + * + * @since 1.8 + * + * @return string|false The action name or False if no action was selected + */ + public function current_action() { + return empty( $_POST['submit'] ) ? parent::current_action() : false; + } + + /** + * Displays the dropdown list to filter strings per group + * + * @since 1.1 + * + * @param string $which only 'top' is supported + */ + function extra_tablenav( $which ) { + if ( 'top' !== $which ) { + return; + } + + echo '
    '; + printf( + '', + /* translators: accessibility text */ + esc_html__( 'Filter by group', 'polylang' ) + ); + echo '' . "\n"; + + submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); + echo '
    '; + } + + /** + * Saves the strings translations in DB + * Optionaly clean the DB + * + * @since 1.9 + */ + public function save_translations() { + check_admin_referer( 'string-translation', '_wpnonce_string-translation' ); + + if ( ! empty( $_POST['submit'] ) ) { + foreach ( $this->languages as $language ) { + if ( empty( $_POST['translation'][ $language->slug ] ) ) { // In case the language filter is active ( thanks to John P. Bloch ) + continue; + } + + $mo = new PLL_MO(); + $mo->import_from_db( $language ); + + foreach ( $_POST['translation'][ $language->slug ] as $key => $translation ) { + /** + * Filter the string translation before it is saved in DB + * Allows to sanitize strings registered with pll_register_string + * + * @since 1.6 + * + * @param string $translation the string translation + * @param string $name the name as defined in pll_register_string + * @param string $context the context as defined in pll_register_string + */ + $translation = apply_filters( 'pll_sanitize_string_translation', $translation, $this->strings[ $key ]['name'], $this->strings[ $key ]['context'] ); + $mo->add_entry( $mo->make_entry( $this->strings[ $key ]['string'], $translation ) ); + } + + // Clean database ( removes all strings which were registered some day but are no more ) + if ( ! empty( $_POST['clean'] ) ) { + $new_mo = new PLL_MO(); + + foreach ( $this->strings as $string ) { + $new_mo->add_entry( $mo->make_entry( $string['string'], $mo->translate( $string['string'] ) ) ); + } + } + + isset( $new_mo ) ? $new_mo->export_to_db( $language ) : $mo->export_to_db( $language ); + } + + add_settings_error( 'general', 'pll_strings_translations_updated', __( 'Translations updated.', 'polylang' ), 'updated' ); + + /** + * Fires after the strings translations are saved in DB + * + * @since 1.2 + */ + do_action( 'pll_save_strings_translations' ); + } + + // Unregisters strings registered through WPML API + if ( $this->current_action() === 'delete' && ! empty( $_POST['strings'] ) && function_exists( 'icl_unregister_string' ) ) { + foreach ( $_POST['strings'] as $key ) { + icl_unregister_string( $this->strings[ $key ]['context'], $this->strings[ $key ]['name'] ); + } + } + + // To refresh the page ( possible thanks to the $_GET['noheader']=true ) + $args = array_intersect_key( $_REQUEST, array_flip( array( 's', 'paged', 'group' ) ) ); + if ( ! empty( $_GET['paged'] ) && ! empty( $_POST['submit'] ) ) { + $args['paged'] = (int) $_GET['paged']; // Don't rely on $_REQUEST['paged'] or $_POST['paged']. See #14 + } + if ( ! empty( $args['s'] ) ) { + $args['s'] = urlencode( $args['s'] ); // Searched string needs to be encoded as it comes from $_POST + } + PLL_Settings::redirect( $args ); + } +} diff --git a/pole-sbv-content/plugins/polylang/settings/view-about.php b/pole-sbv-content/plugins/polylang/settings/view-about.php new file mode 100644 index 00000000..a9c62d37 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/view-about.php @@ -0,0 +1,40 @@ + +

    + ', + '' + ); + if ( ! defined( 'POLYLANG_PRO' ) ) { + echo ' '; + printf( + /* translators: %s are html tags */ + esc_html__( 'Support and extra features are available to %sPolylang Pro%s users.', 'polylang' ), + '', + '' + ); + } + ?> +

    +

    + ', + '' + ); + ?> +

    + diff --git a/pole-sbv-content/plugins/polylang/settings/view-languages.php b/pole-sbv-content/plugins/polylang/settings/view-languages.php new file mode 100644 index 00000000..c1c4db8c --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/view-languages.php @@ -0,0 +1,34 @@ + +
    +

    + active_tab ) { + case 'lang': // Languages tab + case 'strings': // String translations tab + case 'settings': // Settings tab + include PLL_SETTINGS_INC . '/view-tab-' . $this->active_tab . '.php'; + break; + + default: + /** + * Fires when loading the active Polylang settings tab + * Allows plugins to add their own tab + * + * @since 1.5.1 + */ + do_action( 'pll_settings_active_tab_' . $this->active_tab ); + break; + } + ?> +
    diff --git a/pole-sbv-content/plugins/polylang/settings/view-tab-lang.php b/pole-sbv-content/plugins/polylang/settings/view-tab-lang.php new file mode 100644 index 00000000..d4fe14e4 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/view-tab-lang.php @@ -0,0 +1,187 @@ + +
    +
    +
    + display(); + ?> +
    + +
    +
    +
    + +
    +
    + +
    +

    + +
    + + + + + + +
    + + +

    +
    + +
    + + ', + ! empty( $edit_lang ) ? esc_attr( $edit_lang->name ) : '' + ); + ?> +

    +
    + +
    + + ', + ! empty( $edit_lang ) ? esc_attr( $edit_lang->locale ) : '' + ); + ?> +

    +
    + +
    + + ', + ! empty( $edit_lang ) ? esc_attr( $edit_lang->slug ) : '' + ); + ?> +

    +
    + +
    + + %s', + ! empty( $edit_lang ) && $edit_lang->is_rtl ? '' : 'checked="checked"', + esc_html__( 'left to right', 'polylang' ) + ); + printf( + '', + ! empty( $edit_lang ) && $edit_lang->is_rtl ? 'checked="checked"' : '', + esc_html__( 'right to left', 'polylang' ) + ); + ?> +

    +
    + +
    + + +

    +
    + +
    + + ', + ! empty( $edit_lang ) ? esc_attr( $edit_lang->term_group ) : '' + ); + ?> +

    +
    + +
    +
    +
    +
    +
    + + diff --git a/pole-sbv-content/plugins/polylang/settings/view-tab-settings.php b/pole-sbv-content/plugins/polylang/settings/view-tab-settings.php new file mode 100644 index 00000000..bc56d619 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/view-tab-settings.php @@ -0,0 +1,18 @@ + +
    + prepare_items( $this->modules ); + $list_table->display(); + ?> +
    diff --git a/pole-sbv-content/plugins/polylang/settings/view-tab-strings.php b/pole-sbv-content/plugins/polylang/settings/view-tab-strings.php new file mode 100644 index 00000000..29d0cd0c --- /dev/null +++ b/pole-sbv-content/plugins/polylang/settings/view-tab-strings.php @@ -0,0 +1,25 @@ + +
    +
    + + search_box( __( 'Search translations', 'polylang' ), 'translations' ); + wp_nonce_field( 'string-translation', '_wpnonce_string-translation' ); + $string_table->display(); + printf( '
    ', esc_html__( 'Clean strings translation database', 'polylang' ) ); + ?> +

    + +
    +
    diff --git a/pole-sbv-content/plugins/polylang/uninstall.php b/pole-sbv-content/plugins/polylang/uninstall.php new file mode 100644 index 00000000..4d0ebcb7 --- /dev/null +++ b/pole-sbv-content/plugins/polylang/uninstall.php @@ -0,0 +1,141 @@ +get_col( "SELECT blog_id FROM $wpdb->blogs" ) as $blog_id ) { + switch_to_blog( $blog_id ); + $this->uninstall(); + } + restore_current_blog(); + } + else { + $this->uninstall(); + } + } + + /** + * Removes ALL plugin data + * only when the relevant option is active + * + * @since 0.5 + */ + function uninstall() { + $options = get_option( 'polylang' ); + + if ( empty( $options['uninstall'] ) ) { + return; + } + + // Suppress data of the old model < 1.2 + // FIXME: to remove when support for v1.1.6 will be dropped + global $wpdb; + $wpdb->termmeta = $wpdb->prefix . 'termmeta'; // registers the termmeta table in wpdb + + // Do nothing if the termmeta table does not exists + if ( count( $wpdb->get_results( "SHOW TABLES LIKE '$wpdb->termmeta'" ) ) ) { + $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_translations'" ); + $wpdb->query( "DELETE FROM $wpdb->termmeta WHERE meta_key = '_language'" ); + $wpdb->query( "DELETE FROM $wpdb->termmeta WHERE meta_key = '_rtl'" ); + $wpdb->query( "DELETE FROM $wpdb->termmeta WHERE meta_key = '_translations'" ); + } + + // Need to register the taxonomies + $pll_taxonomies = array( 'language', 'term_language', 'post_translations', 'term_translations' ); + foreach ( $pll_taxonomies as $taxonomy ) { + register_taxonomy( $taxonomy, null , array( 'label' => false, 'public' => false, 'query_var' => false, 'rewrite' => false ) ); + } + + $languages = get_terms( 'language', array( 'hide_empty' => false ) ); + + // Delete users options + foreach ( get_users( array( 'fields' => 'ID' ) ) as $user_id ) { + delete_user_meta( $user_id, 'pll_filter_content' ); + delete_user_meta( $user_id, 'pll_duplicate_content' ); + foreach ( $languages as $lang ) { + delete_user_meta( $user_id, 'description_' . $lang->slug ); + } + } + + // Delete menu language switchers + $ids = get_posts( array( + 'post_type' => 'nav_menu_item', + 'numberposts' => -1, + 'nopaging' => true, + 'fields' => 'ids', + 'meta_key' => '_pll_menu_item', + ) ); + + foreach ( $ids as $id ) { + wp_delete_post( $id, true ); + } + + // Delete the strings translations ( <1.2 ) + // FIXME: to remove when support for v1.1.6 will be dropped + foreach ( $languages as $lang ) { + delete_option( 'polylang_mo' . $lang->term_id ); + } + + // Delete the strings translations 1.2+ + register_post_type( 'polylang_mo', array( 'rewrite' => false, 'query_var' => false ) ); + $ids = get_posts( array( + 'post_type' => 'polylang_mo', + 'post_status' => 'any', + 'numberposts' => -1, + 'nopaging' => true, + 'fields' => 'ids', + ) ); + foreach ( $ids as $id ) { + wp_delete_post( $id, true ); + } + + // Delete all what is related to languages and translations + foreach ( get_terms( $pll_taxonomies, array( 'hide_empty' => false ) ) as $term ) { + $term_ids[] = (int) $term->term_id; + $tt_ids[] = (int) $term->term_taxonomy_id; + } + + if ( ! empty( $term_ids ) ) { + $term_ids = array_unique( $term_ids ); + $wpdb->query( "DELETE FROM $wpdb->terms WHERE term_id IN ( " . implode( ',', $term_ids ) . ' )' ); + $wpdb->query( "DELETE FROM $wpdb->term_taxonomy WHERE term_id IN ( " . implode( ',', $term_ids ) . ' )' ); + } + + if ( ! empty( $tt_ids ) ) { + $tt_ids = array_unique( $tt_ids ); + $wpdb->query( "DELETE FROM $wpdb->term_relationships WHERE term_taxonomy_id IN ( " . implode( ',', $tt_ids ) . ' )' ); + } + + // Delete options + delete_option( 'polylang' ); + delete_option( 'widget_polylang' ); // Automatically created by WP + delete_option( 'polylang_wpml_strings' ); // Strings registered with icl_register_string + delete_option( 'polylang_licenses' ); + + // Delete transients + delete_transient( 'pll_languages_list' ); + delete_transient( 'pll_upgrade_1_4' ); + delete_transient( 'pll_translated_slugs' ); + } +} + +new PLL_Uninstall(); diff --git a/pole-sbv-content/themes/pole-sbv/actualites_en_template.php b/pole-sbv-content/themes/pole-sbv/actualites_en_template.php new file mode 100644 index 00000000..77e69f54 --- /dev/null +++ b/pole-sbv-content/themes/pole-sbv/actualites_en_template.php @@ -0,0 +1,72 @@ + + + + 'post', 'posts_per_page' => 4, 'paged' => $paged, ); +$loop = new WP_Query( $args ); + ?> +
    +
    + +
    + +
    +
    +
    +

    + + Our News + +

    +
    + have_posts() ) : $loop->the_post(); ?> +
    +
    + +
    +
    + Published on +
    +

    + Read more > +
    +
    +
    + +
    + +
    +
    +
    +
    + + + diff --git a/pole-sbv-content/themes/pole-sbv/contact_en_template.php b/pole-sbv-content/themes/pole-sbv/contact_en_template.php new file mode 100644 index 00000000..543a8074 --- /dev/null +++ b/pole-sbv-content/themes/pole-sbv/contact_en_template.php @@ -0,0 +1,108 @@ + + + +
    +
    + +
    +
    +
    +

    + + Contact us + +

    +
    + +
    +
    + +
    +
    + +
    +
    +

    + + Our contacts + +

    +
    + +
    +

    + Head Office +

    +

    SBV & Celvia

    +

    Z.I. du Lay CS 10014
    56 660 - Saint-Jean-Brévelay

    +

    Tel : +33 (0)2 97 60 33 88
    Fax : +33 (0)2 97 60 30 80
    contact@pole-sbv.fr

    +
    +
    +

    Procanar

    +

    Z.I. La Haie
    56 190 - Lauzach

    +

    Tel : +33 (0)2 97 48 78 00
    Fax : +33 (0)2 97 48 78 22
    contact@procanar.fr
    www.procanar.fr

    +
    +
    +

    Boscher Volailles

    +

    Z.A.C. de Guergadic
    22 530 - Mur de Bretagne

    +

    Tel : +33 (0)2 96 67 10 30
    Fax : +33 (0)2 96 67 10 32

    +
    +
    +

    LES VOLAILLES DE KERANNA

    +

    Keranna
    56 560 - Guiscriff

    +

    Tel : +33 (0)2 97 34 05 23
    Fax : +33 (0)2 97 34 00 32

    +
    +
    +

    LDC BRETAGNE

    +

    La Lande de la Forge
    22 800 - Lanfains

    +

    Tel : +33 (0)2 96 74 85 75
    Fax : +33 (0)2 96 74 05 42

    +
    +
    +

    CELTYS

    +

    Z.A. de Restavy
    56 240 - Plouay

    +

    Tel : +33 (0)2 97 02 20 20
    Fax : +33 (0)2 97 02 20 00

    +
    +
    +

    MICHEL ROBICHON

    +

    Z.I. de Kergoustard
    12, rue Joseph Quilliou
    56300 - Saint Thuriau

    +

    Tel : +33 (0)2 97 25 97 97
    Fax : +33 (0)2 97 28 99 17
    info@farmor.fr

    +
    +
    +

    FARMOR

    +

    Z.I. de Bellevue
    29, avenue de l’Hippodrome
    22 200 - Saint-Agathon

    +

    Tel : +33 (0)2 96 11 83 00
    Fax : +33 (0)2 96 11 83 20
    info@farmor.fr
    www.farmor.fr

    +
    +
    +

    +

    +

    +
    +
    +

    RVE

    +

    Les Cinq Chemins
    56 580 - Crédin

    +

    Tel : +33 (0)2 97 51 58 58
    Fax : +33 (0)2 97 38 93 79
    info@farmor.fr

    +
    + +
    +
    +
    +
    +
    + + + + diff --git a/pole-sbv-content/themes/pole-sbv/css/main.css b/pole-sbv-content/themes/pole-sbv/css/main.css index 04c44c15..d0672dea 100755 --- a/pole-sbv-content/themes/pole-sbv/css/main.css +++ b/pole-sbv-content/themes/pole-sbv/css/main.css @@ -105,6 +105,7 @@ h3 { /* Schema performences */ .desktopperf01, .desktopperf02 { display:block; + margin:auto; } .mobileperf01, .mobileperf02 { display:none; @@ -560,7 +561,7 @@ h3 { cursor: pointer; } -#ninja_forms_field_13_div_wrap::after { +#ninja_forms_field_13_div_wrap::after, #ninja_forms_field_30_div_wrap::after { content: "▼"; font-size: 1em; height: 1em; @@ -591,17 +592,25 @@ h3 { margin-bottom: 20px; } -.ninja-forms-required-items,#ninja_forms_field_5_div_wrap { +.ninja-forms-required-items,#ninja_forms_field_5_div_wrap, #ninja_forms_field_20_div_wrap{ width:100%; } #ninja_forms_field_1_div_wrap, #ninja_forms_field_6_div_wrap, #ninja_forms_field_7_div_wrap, #ninja_forms_field_2_div_wrap, #ninja_forms_field_8_div_wrap, #ninja_forms_field_9_div_wrap, #ninja_forms_field_11_div_wrap { width:48%; } +#ninja_forms_field_21_div_wrap, #ninja_forms_field_22_div_wrap, #ninja_forms_field_23_div_wrap, #ninja_forms_field_24_div_wrap, #ninja_forms_field_25_div_wrap, #ninja_forms_field_26_div_wrap, #ninja_forms_field_27_div_wrap { + width:48%; +} #ninja_forms_field_12_div_wrap, #ninja_forms_field_13_div_wrap, #ninja_forms_field_3_div_wrap { width:100%; position:relative; } + +#ninja_forms_field_28_div_wrap, #ninja_forms_field_30_div_wrap, #ninja_forms_field_31_div_wrap { + width:100%; + position:relative; +} .companies-wrapper { display:flex; flex-wrap: wrap; @@ -781,6 +790,7 @@ h3 { } .mobileperf01, .mobileperf02 { display:block; + margin:auto; } #header .header-top nav { width:175px; @@ -801,6 +811,8 @@ h3 { } #header .header-top nav a:nth-child(2){ margin-top:16px; + padding-bottom:16px; + border-bottom: 1px solid #d0ae88; } .banner .caption-title h1 { @@ -1002,3 +1014,39 @@ p { .specImg { margin-right:10px; } + +nav a:last-child { + width:30px; + overflow:hidden; + vertical-align: bottom; + margin-right:10px !important; +} + +#lang_choice_1 { + background : transparent; + color:#FFF; + border:0; + text-transform: uppercase; + font-family: 'Avenir'; + font-weight:600; +} + +@media (max-width: 768px){ + nav a:last-child { + width:26px !important; + display:block; + overflow:hidden; + vertical-align: bottom; + margin-right:10px !important; + margin-top:16px !important; + } + + #lang_choice_1 { + background : transparent; + color:#FFF; + border:0; + text-transform: uppercase; + font-family: 'Avenir'; + font-weight:600; + } +} diff --git a/pole-sbv-content/themes/pole-sbv/earth_en_template.php b/pole-sbv-content/themes/pole-sbv/earth_en_template.php new file mode 100644 index 00000000..60a7830d --- /dev/null +++ b/pole-sbv-content/themes/pole-sbv/earth_en_template.php @@ -0,0 +1,108 @@ + + + +
    +
    +
    +
    +

    + + Within our region + +

    +
    + + +
    +
    +
    +
    +
    +

    + + Brittany a poultry farming hub + +

    +
    +

    Our three subsidiaries, with 11 sites, employ 2 500 people within the LDC Group.
    + Our production sites are located near poultry farmers so that all stakeholders can benefit from an exchange of expertise.

    +
    +
    +

    + "We are constantly creating and inventing across the entire production chain." +

    + + +
    +
    +
    +
    +
    +

    + + Preserving Britanny + +

    +
    +

    Sustainable development is a key concern for SBV.

    +

    We strive to reduce our environmental impact and recycle waste and water.

    +

    Our environmental charter bears witness to our efforts in this area.

    +
    +
    +
    + +
    +
    + + + + diff --git a/pole-sbv-content/themes/pole-sbv/footer.php b/pole-sbv-content/themes/pole-sbv/footer.php index 391e9d43..799c8973 100755 --- a/pole-sbv-content/themes/pole-sbv/footer.php +++ b/pole-sbv-content/themes/pole-sbv/footer.php @@ -8,37 +8,37 @@