From ddea275a666ee7db5d9c064e8dab3b9f68137621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=BCrker=20YILDIRIM?= Date: Tue, 10 Jul 2018 15:19:21 +0300 Subject: [PATCH 1/3] Updated to include changed sources --- languages/tailor-portfolio.pot | 112 ++++++++++++++++----------------- 1 file changed, 53 insertions(+), 59 deletions(-) diff --git a/languages/tailor-portfolio.pot b/languages/tailor-portfolio.pot index 418059d..348546b 100644 --- a/languages/tailor-portfolio.pot +++ b/languages/tailor-portfolio.pot @@ -1,16 +1,27 @@ # Copyright (C) 2016 Tailor - Portfolio extension # This file is distributed under the same license as the Tailor - Portfolio extension package. +#, fuzzy msgid "" msgstr "" "Project-Id-Version: Tailor - Portfolio extension 1.2.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/tailor-portfolio\n" -"POT-Creation-Date: 2016-10-20 08:11:13+00:00\n" +"POT-Creation-Date: 2018-07-10 15:13+0300\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"X-Generator: Poedit 2.0.6\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-KeywordsList: __;_e;_n;_x;_ex;_nx;esc_attr__;esc_attr_e;esc_attr_x;esc_html__;esc_html_e;esc_html_x;_n_noop;_nx_noop;translate_nooped_plural\n" +"X-Poedit-SearchPath-0: partials\n" +"X-Poedit-SearchPath-1: includes\n" +"X-Poedit-SearchPath-2: includes/shortcodes\n" +"X-Poedit-SearchPath-3: includes/portfolio\n" +"X-Poedit-SearchPath-4: includes/elements\n" +"X-Poedit-SearchPath-5: uninstall.php\n" +"X-Poedit-SearchPath-6: tailor-portfolio.php\n" #: includes/elements/class-projects.php:33 msgid "General" @@ -53,12 +64,13 @@ msgid "Author" msgstr "" #: includes/elements/class-projects.php:174 -#: includes/elements/class-projects.php:253 tailor-portfolio.php:248 +#: includes/elements/class-projects.php:253 +#: includes/portfolio/class-post-type.php:118 msgid "Portfolio" msgstr "" #: includes/elements/class-projects.php:175 -#: includes/portfolio/class-post-type.php:233 +#: includes/portfolio/class-post-type.php:211 msgid "Date" msgstr "" @@ -71,6 +83,7 @@ msgid "Featured image" msgstr "" #: includes/elements/class-projects.php:264 +#: includes/portfolio/class-post-type.php:138 msgid "Skill" msgstr "" @@ -79,18 +92,15 @@ msgid "Projects Page" msgstr "" #: includes/portfolio/class-post-type.php:47 -#: includes/portfolio/class-post-type.php:279 -msgctxt "slug" +#: includes/portfolio/class-post-type.php:257 msgid "project" msgstr "" #: includes/portfolio/class-post-type.php:67 -msgctxt "project general name" msgid "Projects" msgstr "" #: includes/portfolio/class-post-type.php:68 -msgctxt "project singular name" msgid "Project" msgstr "" @@ -99,7 +109,6 @@ msgid "All Projects" msgstr "" #: includes/portfolio/class-post-type.php:70 -msgctxt "project" msgid "Add New" msgstr "" @@ -132,109 +141,94 @@ msgstr "" msgid "This is where you can add new projects to your portfolio." msgstr "" +#: includes/portfolio/class-post-type.php:118 +msgid "Portfolios" +msgstr "" + #: includes/portfolio/class-post-type.php:126 -#: includes/portfolio/class-post-type.php:291 -msgctxt "slug" +#: includes/portfolio/class-post-type.php:269 msgid "portfolio" msgstr "" +#: includes/portfolio/class-post-type.php:138 +msgid "Skills" +msgstr "" + #: includes/portfolio/class-post-type.php:145 -#: includes/portfolio/class-post-type.php:303 -msgctxt "slug" +#: includes/portfolio/class-post-type.php:281 msgid "skill" msgstr "" -#: includes/portfolio/class-post-type.php:169 +#: includes/portfolio/class-post-type.php:168 +#, php-format msgid "Search %s" msgstr "" -#: includes/portfolio/class-post-type.php:170 +#: includes/portfolio/class-post-type.php:169 +#, php-format msgid "All %s" msgstr "" -#: includes/portfolio/class-post-type.php:171 +#: includes/portfolio/class-post-type.php:170 +#, php-format msgid "Parent %s" msgstr "" -#: includes/portfolio/class-post-type.php:172 +#: includes/portfolio/class-post-type.php:171 +#, php-format msgid "Parent %s:" msgstr "" -#: includes/portfolio/class-post-type.php:173 +#: includes/portfolio/class-post-type.php:172 +#, php-format msgid "Edit %s" msgstr "" -#: includes/portfolio/class-post-type.php:174 +#: includes/portfolio/class-post-type.php:173 +#, php-format msgid "Update %s" msgstr "" -#: includes/portfolio/class-post-type.php:175 +#: includes/portfolio/class-post-type.php:174 +#, php-format msgid "Add New %s" msgstr "" -#: includes/portfolio/class-post-type.php:176 +#: includes/portfolio/class-post-type.php:175 +#, php-format msgid "New %s Name" msgstr "" -#: includes/portfolio/class-post-type.php:177 +#: includes/portfolio/class-post-type.php:176 +#, php-format msgid "Separate %s with commas" msgstr "" -#: includes/portfolio/class-post-type.php:178 +#: includes/portfolio/class-post-type.php:177 +#, php-format msgid "Chose from the most recently used %s" msgstr "" -#: includes/portfolio/class-post-type.php:227 +#: includes/portfolio/class-post-type.php:205 msgid "Title" msgstr "" -#: includes/portfolio/class-post-type.php:228 +#: includes/portfolio/class-post-type.php:206 msgid "Thumbnail" msgstr "" -#: includes/portfolio/class-post-type.php:265 +#: includes/portfolio/class-post-type.php:243 msgid "Project base" msgstr "" -#: includes/portfolio/class-post-type.php:266 +#: includes/portfolio/class-post-type.php:244 msgid "Portfolio base" msgstr "" -#: includes/portfolio/class-post-type.php:267 +#: includes/portfolio/class-post-type.php:245 msgid "Skill base" msgstr "" -#: includes/shortcodes/shortcode-projects.php:126 +#: includes/shortcodes/shortcode-projects.php:127 msgid "Please configure this element as there is currently nothing to display" msgstr "" - -#: tailor-portfolio.php:147 -msgid "Please ensure that Tailor 1.7.0 (or newer) is active to use the Portfolio extension." -msgstr "" - -#: tailor-portfolio.php:246 -msgid "Projects" -msgstr "" - -#: tailor-portfolio.php:247 -msgid "Your site's projects." -msgstr "" -#. Plugin Name of the plugin/theme -msgid "Tailor - Portfolio extension" -msgstr "" - -#. Plugin URI of the plugin/theme -msgid "http://www.gettailor.com" -msgstr "" - -#. Description of the plugin/theme -msgid "Adds portfolio functionality to the Tailor plugin." -msgstr "" - -#. Author of the plugin/theme -msgid "Andrew Worsfold" -msgstr "" - -#. Author URI of the plugin/theme -msgid "http://www.andrewworsfold.com" -msgstr "" From 73ea7c5799cc1141146978d0a1b489bbf28873f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=BCrker=20YILDIRIM?= Date: Tue, 10 Jul 2018 15:19:50 +0300 Subject: [PATCH 2/3] phpstorm directory added --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85e7c1d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.idea/ From c971777b83394612c92a111dea01a9136e26283c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=BCrker=20YILDIRIM?= Date: Tue, 10 Jul 2018 15:21:03 +0300 Subject: [PATCH 3/3] Variable definitions changed to static definitions to work properly with multi language functions --- includes/portfolio/class-post-type.php | 56 ++++++++------------------ 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/includes/portfolio/class-post-type.php b/includes/portfolio/class-post-type.php index 308892a..3764c0d 100644 --- a/includes/portfolio/class-post-type.php +++ b/includes/portfolio/class-post-type.php @@ -64,10 +64,10 @@ static function register_project_post_type() { apply_filters( 'tailor_project_parameters', array( 'labels' => array( - 'name' => _x( 'Projects', 'project general name' ), - 'singular_name' => _x( 'Project', 'project singular name' ), + 'name' => __( 'Projects', 'tailor-portfolio' ), + 'singular_name' => __( 'Project', 'tailor-portfolio' ), 'all_items' => __( 'All Projects', 'tailor-portfolio' ), - 'add_new' => _x( 'Add New', 'project', 'tailor-portfolio' ), + 'add_new' => __( 'Add New', 'tailor-portfolio' ), 'add_new_item' => __( 'Add New Project', 'tailor-portfolio' ), 'edit_item' => __( 'Edit Project', 'tailor-portfolio' ), 'new_item' => __( 'Add New Project', 'tailor-portfolio' ), @@ -115,7 +115,7 @@ static function register_taxonomies() { register_taxonomy( 'portfolio', 'project', apply_filters( 'tailor_portfolio_parameters', array( - 'labels' => self::taxonomy_labels( 'Portfolio' ), + 'labels' => self::taxonomy_labels(__('Portfolio', 'tailor-portfolio'), __('Portfolios', 'tailor-portfolio')), 'public' => true, 'hierarchical' => true, 'show_ui' => true, @@ -135,7 +135,7 @@ static function register_taxonomies() { register_taxonomy( 'skill', 'project', apply_filters( 'tailor_skill_parameters', array( - 'labels' => self::taxonomy_labels( 'Skill' ), + 'labels' => self::taxonomy_labels(__('Skill', 'tailor-portfolio'), __('Skills', 'tailor-portfolio')), 'public' => true, 'hierarchical' => false, 'show_ui' => true, @@ -150,18 +150,17 @@ static function register_taxonomies() { ); } - /** - * Returns the set of labels for a given taxonomy. - * - * @since 1.0.0 - * @static - * - * @param $taxonomy_name - * @return mixed|void - */ - static function taxonomy_labels( $taxonomy_name ) { - - $pluralized_name = self::pluralize_string( $taxonomy_name ); + /** + * Returns the set of labels for a given taxonomy. + * + * @since 1.0.0 + * @static + * + * @param $taxonomy_name + * @param $pluralized_name + * @return mixed + */ + static function taxonomy_labels( $taxonomy_name, $pluralized_name ) { return apply_filters( 'tailor_taxonomy_labels', array( 'name' => $pluralized_name, @@ -180,27 +179,6 @@ static function taxonomy_labels( $taxonomy_name ) { ) ); } - /** - * Returns the pluralized version of a string. - * - * @since 1.0.0 - * @static - * - * @param $string - * @return string - */ - static function pluralize_string( $string ) { - $last = $string[ strlen( $string ) - 1 ]; - if ( 'y' == $last ) { - $cut = substr( $string, 0, -1 ); - $plural = $cut . 'ies'; - } - else { - $plural = $string . 's'; - } - return $plural; - } - /** * Allows projects to be searched for using the Jetpack Omnisearch plugin. * @@ -228,7 +206,7 @@ static function project_columns() { 'thumbnail' => __( 'Thumbnail', 'tailor-portfolio' ), ); foreach ( (array) $taxonomies = get_object_taxonomies( 'project', 'objects' ) as $taxonomy ) { - $columns[ 'taxonomy-' . $taxonomy->name ] = ucfirst( self::pluralize_string( $taxonomy->name ) ); + $columns[ 'taxonomy-' . $taxonomy->name ] = ucfirst( __( $taxonomy->name, 'tailor-portfolio' ) ); } $columns['date'] = __( 'Date', 'tailor-portfolio' ); return $columns;