Skip to content

Commit

Permalink
Issue #60 - add some tests for oik-bwtrace admin, convert and test en…
Browse files Browse the repository at this point in the history
…_GB and bb_BB
  • Loading branch information
bobbingwide committed Dec 19, 2017
1 parent fae4385 commit 6a3601e
Show file tree
Hide file tree
Showing 13 changed files with 1,676 additions and 197 deletions.
3 changes: 2 additions & 1 deletion admin/class-oik-trace-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ function __construct() {
function display_info() {
stag( "table", "widefat" );
stag( "thead" );
bw_tablerow( bw_as_array( "Field,Value,Notes" ), "tr", "th" );
$headings = array( __( "Field", "oik-bwtrace" ), __( "Value", "oik-bwtrace" ), __( "Notes", "oik-bwtrace" ) );
bw_tablerow( $headings, "tr", "th" );
etag( "thead" );
stag( "tbody" );
$this->display_fields();
Expand Down
65 changes: 20 additions & 45 deletions admin/oik-bwtrace.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ function bw_action_options_add_page() {
*
*/
function bw_action_options_do_page() {
oik_menu_header( "action options", "w70pc" );
oik_box( null, null, "Options", "oik_action_options" );
oik_box( null, null, "Information", "oik_trace_info" );
BW_::oik_menu_header( __( "action options", "oik-bwtrace" ), "w70pc" );
BW_::oik_box( null, null, __( "Options", "oik-bwtrace" ) , "oik_action_options" );
BW_::oik_box( null, null, __( "Information", "oik-bwtrace" ), "oik_trace_info" );
oik_menu_footer();
bw_flush();
}
Expand All @@ -90,55 +90,30 @@ function oik_action_options() {
bw_flush();
settings_fields('bw_action_options_options');

//bw_textfield_arr( "bw_action_options", "Action file", $options, 'file', 60 );
//bw_checkbox_arr( "bw_action_options", "Trace actions", $options, 'actions' );
//bw_checkbox_arr( "bw_action_options", "Trace immediate actions", $options, 'immediate' );
bw_checkbox_arr( "bw_action_options", "Count action hooks and filters", $options, 'count' );
bw_checkbox_arr( "bw_action_options", "Trace deprecated messages", $options, 'trace_deprecated' );
bw_checkbox_arr( "bw_action_options", "Trace Error, Warning and Notice messages", $options, 'trace_errors' );
bw_checkbox_arr( "bw_action_options", "Trace 'wp' action", $options, 'trace_wp_action' );
bw_checkbox_arr( "bw_action_options", "Trace 'wp' global wp_rewrite ", $options, 'trace_wp_rewrite' );
bw_checkbox_arr( "bw_action_options", "Trace 'shutdown' included files", $options, 'trace_included_files' );
bw_checkbox_arr( "bw_action_options", "Trace 'shutdown' saved queries", $options, 'trace_saved_queries' );
bw_checkbox_arr( "bw_action_options", "Trace 'shutdown' output buffer", $options, 'trace_output_buffer' );
bw_checkbox_arr( "bw_action_options", "Trace 'shutdown' trace functions count", $options, 'trace_functions' );
bw_checkbox_arr( "bw_action_options", "Trace 'shutdown' status report and log in summary file", $options, 'trace_status_report' );
bw_checkbox_arr( "bw_action_options", __( "Count action hooks and filters", "oik-bwtrace" ), $options, 'count' );
bw_checkbox_arr( "bw_action_options", __( "Trace deprecated messages", "oik-bwtrace" ), $options, 'trace_deprecated' );
bw_checkbox_arr( "bw_action_options", __( "Trace Error, Warning and Notice messages", "oik-bwtrace" ), $options, 'trace_errors' );
bw_checkbox_arr( "bw_action_options", __( "Trace 'wp' action", "oik-bwtrace" ), $options, 'trace_wp_action' );
bw_checkbox_arr( "bw_action_options", __( "Trace 'wp' global wp_rewrite ", "oik-bwtrace" ), $options, 'trace_wp_rewrite' );
bw_checkbox_arr( "bw_action_options", __( "Trace 'shutdown' included files", "oik-bwtrace" ), $options, 'trace_included_files' );
bw_checkbox_arr( "bw_action_options", __( "Trace 'shutdown' saved queries", "oik-bwtrace" ), $options, 'trace_saved_queries' );
bw_checkbox_arr( "bw_action_options", __( "Trace 'shutdown' output buffer", "oik-bwtrace" ), $options, 'trace_output_buffer' );
bw_checkbox_arr( "bw_action_options", __( "Trace 'shutdown' trace functions count", "oik-bwtrace" ), $options, 'trace_functions' );
bw_checkbox_arr( "bw_action_options", __( "Trace 'shutdown' status report and log in summary file", "oik-bwtrace" ), $options, 'trace_status_report' );

bw_textarea_arr( "bw_action_options", "Other hooks to trace", $options, "hooks", 80 );
bw_textarea_arr( "bw_action_options", "Filter results to trace", $options, "results", 80 );
bw_textarea_arr( "bw_action_options", "Trace the global post object", $options, "post_hooks", 80 );
bw_textarea_arr( "bw_action_options", "Trace attached hook functions", $options, "hook_funcs", 80 );
bw_textarea_arr( "bw_action_options", "Hooks to debug backtrace", $options, "backtrace", 80 );
bw_textarea_arr( "bw_action_options", "'String watch' for this string", $options, "stringwatch", 80 );
BW_::bw_textarea_arr( "bw_action_options", __( "Other hooks to trace", "oik-bwtrace" ), $options, "hooks", 80 );
BW_::bw_textarea_arr( "bw_action_options", __( "Filter results to trace", "oik-bwtrace" ), $options, "results", 80 );
BW_::bw_textarea_arr( "bw_action_options", __( "Trace the global post object", "oik-bwtrace" ), $options, "post_hooks", 80 );
BW_::bw_textarea_arr( "bw_action_options", __( "Trace attached hook functions", "oik-bwtrace" ), $options, "hook_funcs", 80 );
BW_::bw_textarea_arr( "bw_action_options", __( "Hooks to debug backtrace", "oik-bwtrace" ), $options, "backtrace", 80 );
BW_::bw_textarea_arr( "bw_action_options", __( "'String watch' for this string", "oik-bwtrace" ), $options, "stringwatch", 80 );

//bw_tablerow( array( "", "<input type=\"submit\" name=\"ok\" value=\"Save changes\" class=\"button-primary\"/>") );
etag( "table" );
p( isubmit( "ok", "Save changes", null, "button-primary" ) );
BW_::p( isubmit( "ok", __( "Save changes", "oik-bwtrace" ), null, "button-primary" ) );
etag( "form" );
}

function oik_action_notes() {
p( "The actions output produced by " .bw_oik(). " actions can be used to find the sequence that actions are performed." );
p( "It needs to be used in conjunction with the trace facility.");
//p( "The oik actions should <b>not</b> need to be activated on a live site.");
//p( "If you do need to activate it, only do so for a short period of time." );

//p( "You will need to specify the action file name (e.g. bwaction.loh )" );
//p( "Set actions to 'on' when you want to trace action processing, 'off' otherwise.");
p( "Set Count action hooks and filters to count the number of times each action or filter hook is invoked" );
//p( "Set immediate actions to 'on' when you want to trace ALL actions and filters." );
//p( "Note: Immediate action tracing will replace the current version of wp-includes/plugin.php with one that has been modified to include tracing." );
//p( "When you deselect the check box then the original file is restored." );
//p( "The code should not break your site after a WordPress upgrade." );

p( "You may find the most recent trace action output at..." );
$bw_action_url = bw_trace_url( 'bw_action_options' );

alink( NULL, $bw_action_url, $bw_action_url, "View action output in your browser.");
p( "The trace action log is reset at the same time as the trace log." );

bw_flush();
}

/**
* Display the oik trace options page
Expand Down
Binary file modified languages/oik-bwtrace-bb_BB.mo
Binary file not shown.
130 changes: 78 additions & 52 deletions languages/oik-bwtrace-bb_BB.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: oik bwtrace 2.1.1-beta-20171023\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/oik-bwtrace\n"
"POT-Creation-Date: 2017-12-19 09:42:19+00:00\n"
"POT-Creation-Date: 2017-12-19 17:57:35+00:00\n"
"MIME-Version: 1.0\n"
"Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
"Language: bb_BB\n"
Expand All @@ -28,106 +28,132 @@ msgid "action options"
msgstr "atcoin otpoins"


#: admin/oik-bwtrace.php:73 admin/oik-bwtrace.php:149
#: admin/oik-bwtrace.php:73 admin/oik-bwtrace.php:124
msgid "Options"
msgstr "Otpoins"


#: admin/oik-bwtrace.php:74 admin/oik-bwtrace.php:150
#: admin/oik-bwtrace.php:74
msgid "Information"
msgstr "Ifnroamiton"


#: admin/oik-bwtrace.php:107
#: admin/oik-bwtrace.php:93
msgid "Count action hooks and filters"
msgstr "Cuont atcoin hooks And flietrs"


#: admin/oik-bwtrace.php:94
msgid "Trace deprecated messages"
msgstr "Tarce dpeeracetd mseasegs"


#: admin/oik-bwtrace.php:95
msgid "Trace Error, Warning and Notice messages"
msgstr "Tarce Error, Wrainng And Ntocie mseasegs"


#: admin/oik-bwtrace.php:96
msgid "Trace 'wp' action"
msgstr "Tarce 'wp' atcoin"


#: admin/oik-bwtrace.php:97
msgid "Trace 'wp' global wp_rewrite "
msgstr "Tarce 'wp' golabl wp_rweirte "


#: admin/oik-bwtrace.php:98
msgid "Trace 'shutdown' included files"
msgstr "Tarce 'suhdtwon' icnuledd flies"


#: admin/oik-bwtrace.php:99
msgid "Trace 'shutdown' saved queries"
msgstr "Tarce 'suhdtwon' svaed qeuires"


#: admin/oik-bwtrace.php:100
msgid "Trace 'shutdown' output buffer"
msgstr "Tarce 'suhdtwon' otuupt bfuefr"


#: admin/oik-bwtrace.php:101
msgid "Trace 'shutdown' trace functions count"
msgstr "Tarce 'suhdtwon' tarce fnutcoins cuont"


#: admin/oik-bwtrace.php:102
msgid "Trace 'shutdown' status report and log in summary file"
msgstr "Tarce 'suhdtwon' satuts rperot And lOg In smuamry flie"


#: admin/oik-bwtrace.php:104
msgid "Other hooks to trace"
msgstr "Ohter hooks tO tarce"


#: admin/oik-bwtrace.php:108
#: admin/oik-bwtrace.php:105
msgid "Filter results to trace"
msgstr "Flietr rseluts tO tarce"


#: admin/oik-bwtrace.php:109
#: admin/oik-bwtrace.php:106
msgid "Trace the global post object"
msgstr "Tarce thE golabl psot ojbcet"


#: admin/oik-bwtrace.php:110
#: admin/oik-bwtrace.php:107
msgid "Trace attached hook functions"
msgstr "Tarce attcaehd hook fnutcoins"


#: admin/oik-bwtrace.php:111
#: admin/oik-bwtrace.php:108
msgid "Hooks to debug backtrace"
msgstr "Hooks tO dbeug bcatkarce"


#: admin/oik-bwtrace.php:112
#: admin/oik-bwtrace.php:109
msgid "'String watch' for this string"
msgstr "'Srtnig wtach' fOr tihs srtnig"


#: admin/oik-bwtrace.php:122
msgid "It needs to be used in conjunction with the trace facility."
msgstr "It needs tO bE uesd In cnoujcniton wtih thE tarce fcalitiy."


#: admin/oik-bwtrace.php:128
msgid ""
"Set Count action hooks and filters to count the number of times each action "
"or filter hook is invoked"
msgstr ""
"SEt Cuont atcoin hooks And flietrs tO cuont thE nmuebr Of tmies ecah atcoin "
"Or flietr hook Is ivnkoed"


#: admin/oik-bwtrace.php:134
msgid "You may find the most recent trace action output at..."
msgstr "YOU mAy fnid thE msot rcenet tarce atcoin otuupt At..."


#: admin/oik-bwtrace.php:138
msgid "The trace action log is reset at the same time as the trace log."
msgstr "ThE tarce atcoin lOg Is rseet At thE smae tmie As thE tarce lOg."
#: admin/oik-bwtrace.php:113 admin/oik-bwtrace.php:180
msgid "Save changes"
msgstr "Svae cahgnes"


#: admin/oik-bwtrace.php:148
#: admin/oik-bwtrace.php:123
msgid "trace options"
msgstr "tarce otpoins"


#: admin/oik-bwtrace.php:151
#: admin/oik-bwtrace.php:126
msgid "Notes about oik trace"
msgstr "Ntoes aobut OIk tarce"


#: admin/oik-bwtrace.php:152
#: admin/oik-bwtrace.php:127
msgid "Trace options and reset button"
msgstr "Tarce otpoins And rseet btuotn"


#: admin/oik-bwtrace.php:173
#: admin/oik-bwtrace.php:148
msgid "Trace file"
msgstr "Tarce flie"


#: admin/oik-bwtrace.php:177
#: admin/oik-bwtrace.php:152
msgid "AJAX Trace file"
msgstr "AAJX Tarce flie"


#: admin/oik-bwtrace.php:185
#: admin/oik-bwtrace.php:160
msgid "Trace level"
msgstr "Tarce lveel"


#: admin/oik-bwtrace.php:205
msgid "Save changes"
msgstr "Svae cahgnes"


#: admin/oik-bwtrace.php:215
#: admin/oik-bwtrace.php:190
msgid ""
"The tracing output produced by oik-bwtrace can be used for problem "
"determination."
Expand All @@ -136,34 +162,34 @@ msgstr ""
"dtereimaniton."


#: admin/oik-bwtrace.php:216
#: admin/oik-bwtrace.php:191
msgid "It's not for the faint hearted."
msgstr "It's nOt fOr thE fiant haetred."


#: admin/oik-bwtrace.php:217
#: admin/oik-bwtrace.php:192
msgid ""
"The oik-bwtrace plugin should <b>not</b> need to be activated on a live site."
msgstr ""
"ThE OIk-btwarce pulign sohlud <b>not</b> need tO bE atcvitaed On A lvie stie."


#: admin/oik-bwtrace.php:218
#: admin/oik-bwtrace.php:193
msgid "If you do need to activate it, only do so for a short period of time."
msgstr "If yOU dO need tO atcvitae It, olny dO sO fOr A sohrt preoid Of tmie."


#: admin/oik-bwtrace.php:220
#: admin/oik-bwtrace.php:195
msgid "You will need to specify the trace file name (e.g. bwtrace.loh )"
msgstr "YOU wlil need tO sepicfy thE tarce flie nmae (E.g. btwarce.lOh )"


#: admin/oik-bwtrace.php:221
#: admin/oik-bwtrace.php:196
msgid "When you want to trace processing check 'Trace enabled'"
msgstr "Wehn yOU wnat tO tarce porecssnig cehck 'Tarce eanlbed'"


#: admin/oik-bwtrace.php:222
#: admin/oik-bwtrace.php:197
msgid ""
"Check 'Reset trace file every transaction' to cause the trace file to be "
"cleared for every request, including AJAX requests."
Expand All @@ -172,12 +198,12 @@ msgstr ""
"celraed fOr eevry rqeeust, icnulidng AAJX rqeeutss."


#: admin/oik-bwtrace.php:225
#: admin/oik-bwtrace.php:200
msgid "You may find the most recent trace output at..."
msgstr "YOU mAy fnid thE msot rcenet tarce otuupt At..."


#: admin/oik-bwtrace.php:230
#: admin/oik-bwtrace.php:205
msgid ""
"If you want to trace processing within some content you can use two "
"shortcodes: [bwtron] to turn trace on and [bwtroff] to turn it off"
Expand All @@ -186,7 +212,7 @@ msgstr ""
"sohtroceds: [bwtron] tO trun tarce On And [bwtroff] tO trun It Off"


#: admin/oik-bwtrace.php:251
#: admin/oik-bwtrace.php:226
msgid "Activate the oik base plugin to enable the [bwtrace] shortcode"
msgstr "Atcvitae thE OIk bsae pulign tO eanlbe thE [bwtrace] sohtrocde"

Expand Down
Binary file modified languages/oik-bwtrace-en_GB.mo
Binary file not shown.
Loading

0 comments on commit 6a3601e

Please sign in to comment.