Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   Can't translate comment_form.php (http://forum.bytesforall.com/showthread.php?t=20289)

guldarmband May 9, 2013 04:47 AM

Can't translate comment_form.php
 
I've tried in every way I can imagine to translate the comment_form.php-file.

* I've used poedit and it works for the rest of the site, but not comment_form.php
* I've created a child theme and uploaded the translated comment_form.php but noting happens.

The only way I make it work is if I translate it in the parent theme, but then I'll have to redo it with every update and I would be really happy if I that could be avoided!

Anyone knows how to do it? :)

juggledad May 9, 2013 06:21 AM

url pointing to the issue?

guldarmband May 9, 2013 09:33 AM

http://guldarmband.com/rp/2013/04/29/ar-du-inte-medlem-i-rp-foreningen-an/

juggledad May 9, 2013 02:25 PM

looks like that never made it into the po file. you will need to edit montezuma/includes/template-tags.php line 8
HTML Code:

        printf( _n( 'One comment on “%2$s”', '%1$s more thoughts on “%2$s”', get_comments_number(), 'montezuma' ),

guldarmband May 13, 2013 02:27 AM

Yes, but if I translate it and upload to my child theme the changes doesn't override the montezuma theme like they should. Any idea of how I can change it without changing in the parent theme?

juggledad May 13, 2013 04:30 AM

For now you will have to edit the actual theme file. I've sent a note to the developer asking that this get added to the PO file for the next release.

juggledad May 13, 2013 05:02 AM

I discovered an error. You should be able to put your translated comment(s) titles at mto->Comments->Comments Titles, but there was some missing code that ended up ignoring these titles. To fix this,

edit '/includes/template_tags.php' and change line 8 (version 1.1.9) from
HTML Code:

        printf( _n( 'One comment on “%2$s”', '%1$s more thoughts on “%2$s”', get_comments_number(), 'montezuma' ),
to
HTML Code:

        global $montezuma, $comment;

        printf( _n( $montezuma['comments_title_single'] , $montezuma['comments_title_plural'], get_comments_number(), 'montezuma' ),

and change your titles at mto->Comments->Comments Titles and test it and let me know how it works for you.

If it works I'll write up a patch for the next release.

guldarmband May 13, 2013 06:42 AM

Quote:

Originally Posted by juggledad (Post 100508)
edit '/includes/template_tags.php' and change line 8 (version 1.1.9) from
HTML Code:

        printf( _n( 'One comment on “%2$s”', '%1$s more thoughts on “%2$s”', get_comments_number(), 'montezuma' ),
to
HTML Code:

        global $montezuma, $comment;

        printf( _n( $montezuma['comments_title_single'] , $montezuma['comments_title_plural'], get_comments_number(), 'montezuma' ),

and change your titles at mto->Comments->Comments Titles and test it and let me know how it works for you.

If it works I'll write up a patch for the next release.

It works! :) Now I only have the "Leave a Reply" and such to translate, but I guess I'll have to do that in the actual theme file?

juggledad May 13, 2013 07:45 AM

translate the 'Leave a Reply' in the PO file


All times are GMT -6. The time now is 01:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.