Hello everyone,
One hour ago I’ve got this rejection reason:
All theme text strings need to be translatable: http://envato.d.pr/15heG/1yXEorsw
This is the code from the array of plugins to be installed using TGMPA.
Can someone clarify one thing: why do I need to make this string translatable? I.e. why do I need to translate Mercedes to other languages?
Agreed. “Twitter”, “Facebook”, “Linkedin” must be translatable as well I guess
I can very much see your point but consider this: how would a Hebrew speaker spell “Mercedes”? It would be “מרצדס”. This is true for many other language not using English letters.
But in our situation we don’t need to translate these strings. There is no reason for this. Really. Plugin name, in this case, like a trademark.
codiux
October 12, 2016, 4:40pm
6
same issue , What’s new ?
kotofey
October 12, 2016, 11:35pm
7
You should do what reviewer says (if you need to approve your theme)
codiux
October 12, 2016, 11:39pm
8
and what about abspath function in tgm ?
codiux
October 12, 2016, 11:46pm
10
they sent me this message about abspath function in tgm :
Theme needs to properly load files. There are several functions available for getting the path:
- get_template_directory(): Returns the absolute template directory path
- get_template_directory_uri(): Returns the template directory URI
- get_stylesheet_directory(): Returns the absolute stylesheet directory path
- get_stylesheet_directory_uri(): Returns the stylesheet directory URI.
kotofey
October 12, 2016, 11:52pm
11
And you don’t know which one you need to use?
Tip: - get_template_directory(): Returns the absolute template directory path
codiux
October 12, 2016, 11:55pm
12
ABSPATH returns the absoloute path of the wordpress installation .
get_template_directory it’s not the right alternatif
kotofey
October 13, 2016, 12:00am
13
Buddy, if you know more than me, then why you asking your questions?
Once again. If you need to install a plugin within your theme using TGMPA, then you should use get_template_directory()
I.e.
array(
'name' => esc_html__( 'My Meta Boxes', 'textdomain' ), // The plugin name.
'slug' => 'pretty-awesome-meta-box', // The plugin slug (typically the folder name).
'source' => get_template_directory() . '/inc/plugins/pretty-awesome-meta-box.zip', // The plugin source.
.............
)
codiux
October 13, 2016, 12:03am
14
i ask you because i want to know if they asked the same things to you too .
and because ABSPATH can’t be replaced with thoses functions in their message .
that’s why .
thanks for your snippet .
kotofey
October 13, 2016, 12:13am
15
No, because I don’t use ABSPATH instead WordPress functions
OK. Good luck with approval
codiux
October 13, 2016, 12:17am
16
kotofey
October 13, 2016, 12:19am
17
Ahh… that’s better. I’ve assumed that you talking about installing plugins. How did you include tgmpa file into your theme?
codiux
October 13, 2016, 12:22am
18
By adding a require_once call in functions.php referencing the class file.
kotofey
October 13, 2016, 12:24am
19
require_once get_template_directory() ?
codiux
October 13, 2016, 12:25am
20
Yes
require_once get_template_directory() . ‘/tgm/tgm.php’;
kotofey
October 13, 2016, 12:30am
21
Hmm…interesting. Seems like a new reviewer.
Re-submit your theme with note to the reviewer and cross your fingers