Jack Lee
asked 10 years ago

For better I18N of ‘DW Question & Answer’, I am happy to mention a few tips on I18N for this plugin:
1. text domainname missing

  1. ‘singular_name’ => _x( ‘Category’, ‘taxonomy singular name’ ),

should be:

  1. ‘singular_name’ => _x( ‘Category’, ‘taxonomy singular name’, ‘dwqa’ ),

and may be you need to add text domainname for ‘Tag’,’Tags’;
2. using other text domainname?

  1. ‘add_new’ => __( ‘Add New’, ‘theme’ ),

‘theme’  should be ‘dwqa’?
and:

 

  1. case ‘info’:
  2.     //Build row actions
  3.     $actions = array(
  4.         ‘edit’      => sprintf( ‘<a href=“%s”>%s</a>’, get_edit_post_link( $post_ID ), __( ‘Edit’, ‘edd-dw-membersip’ ) ),
  5.         ‘delete‘    => sprintf( ‘<a href=“%s”>%s</a>’, get_delete_post_link( $post_ID ), __( ‘Delete‘, ‘edd-dw-membersip’ ) ),
  6.         ‘view’      => sprintf( ‘<a href=“%s”>%s</a>’, get_permalink( $post_ID ), __( ‘View’, ‘edd-dw-membersip’ ) )
  7.     );

3. using ‘_e’ in function ‘create_function’:

 

  1. add_settings_section(
  2.     ‘dwqa-permalink-settings’,
  3.     __( ‘Permalink Settings’,’dwqa’ ),
  4.     create_function( , ‘_e( \’Custom permalinks for single questions, categories, tags.\’,\’dwqa\’ ); ‘ ),
  5.     ‘dwqa-settings’
  6. );

the string in the ‘_e’ can not be detected by POEDIT;
Thanks again for your nice work!
Best wishes!

Cover
replied 10 years ago

Thanks for your tip. 😀

1 Answers
DominicStaff
answered 10 years ago

That’s great!  We could learn from it and make improvement 🙂

Powered by DW Question & Answer Pro