Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.idea/
56 changes: 17 additions & 39 deletions includes/portfolio/class-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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.
*
Expand Down Expand Up @@ -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;
Expand Down
112 changes: 53 additions & 59 deletions languages/tailor-portfolio.pot
Original file line number Diff line number Diff line change
@@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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"
Expand Down Expand Up @@ -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 ""

Expand All @@ -71,6 +83,7 @@ msgid "Featured image"
msgstr ""

#: includes/elements/class-projects.php:264
#: includes/portfolio/class-post-type.php:138
msgid "Skill"
msgstr ""

Expand All @@ -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 ""

Expand All @@ -99,7 +109,6 @@ msgid "All Projects"
msgstr ""

#: includes/portfolio/class-post-type.php:70
msgctxt "project"
msgid "Add New"
msgstr ""

Expand Down Expand Up @@ -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 ""