From d651800bd82761fe8cedc4de01d376f7eb4b3d66 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Tue, 6 Oct 2009 07:11:09 -0400 Subject: [PATCH] tweak some stuff --- classes/WhatDidTheySayAdmin.inc | 3 +- classes/partials/_default-styles.inc | 6 +- classes/partials/admin.inc | 4 +- what-did-they-say.pot | 130 ++++++++++++++------------- 4 files changed, 75 insertions(+), 68 deletions(-) diff --git a/classes/WhatDidTheySayAdmin.inc b/classes/WhatDidTheySayAdmin.inc index 099e1f5..40fd528 100644 --- a/classes/WhatDidTheySayAdmin.inc +++ b/classes/WhatDidTheySayAdmin.inc @@ -884,8 +884,9 @@ class WhatDidTheySayAdmin { $options = get_option('what-did-they-say-options'); $nonce = wp_create_nonce('what-did-they-say'); + $transcript_count = (int)$wpdb->get_var($wpdb->prepare("SELECT count($wpdb->postmeta.meta_key) FROM $wpdb->postmeta WHERE $wpdb->postmeta.meta_key = 'approved_transcripts'")); - $suggested_amount = 20 + ((int)$wpdb->get_var($wpdb->prepare("SELECT count($wpdb->postmeta.meta_key) FROM $wpdb->postmeta WHERE $wpdb->postmeta.meta_key = 'approved_transcripts'")) * 0.1); + $suggested_amount = 20 + ($transcript_count * 0.1); include('partials/admin.inc'); } diff --git a/classes/partials/_default-styles.inc b/classes/partials/_default-styles.inc index 5cc777e..9aa02b7 100644 --- a/classes/partials/_default-styles.inc +++ b/classes/partials/_default-styles.inc @@ -33,7 +33,7 @@ name="wdts[use_nl2br]" value="yes" /> - + nl2br())', 'what-did-they-say') ?> -

By default, transcripts should be hidden on these types of pages:

+

diff --git a/what-did-they-say.pot b/what-did-they-say.pot index a8248d4..3181cc3 100644 --- a/what-did-they-say.pot +++ b/what-did-they-say.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: what-did-they-say 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-10-04 23:19-0400\n" +"POT-Creation-Date: 2009-10-06 07:01-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,11 +16,11 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: what-did-they-say.php:213 +#: what-did-they-say.php:214 msgid "Edit/Add Transcripts" msgstr "" -#: what-did-they-say.php:215 +#: what-did-they-say.php:220 msgid "Manage Transcripts:" msgstr "" @@ -145,11 +145,11 @@ msgstr "" msgid "Transcript update failure!" msgstr "" -#: classes/partials/_editor-script.inc:16 classes/WhatDidTheySayAdmin.inc:153 +#: classes/partials/_editor-script.inc:16 classes/WhatDidTheySayAdmin.inc:264 msgid "Show transcripts" msgstr "" -#: classes/partials/_editor-script.inc:17 classes/WhatDidTheySayAdmin.inc:154 +#: classes/partials/_editor-script.inc:17 classes/WhatDidTheySayAdmin.inc:265 msgid "Hide transcripts" msgstr "" @@ -199,108 +199,114 @@ msgstr "" msgid "Turn transcript line breaks into HTML new lines (nl2br())" msgstr "" -#: classes/partials/_default-styles.inc:47 -msgid "On the home page" +#: classes/partials/_default-styles.inc:44 +msgid "" +"Allow HTML in transcripts. If disabled, only short codes are allowed. Script " +"and style tags are always filtered out." msgstr "" #: classes/partials/_default-styles.inc:55 -msgid "On individual post pages" -msgstr "" - -#: classes/partials/_default-styles.inc:58 -msgid "Change default styles" -msgstr "" - -#: classes/partials/_default-styles.inc:61 -msgid "Transcript Line Breaks" +msgid "On the home page" msgstr "" #: classes/partials/_default-styles.inc:63 +msgid "On individual post pages" +msgstr "" + +#: classes/partials/_default-styles.inc:66 +msgid "Change default styles" +msgstr "" + +#: classes/partials/_default-styles.inc:69 +msgid "Transcript Line Breaks" +msgstr "" + +#: classes/partials/_default-styles.inc:71 msgid "" "If you're using short codes or HTML to construct your transcripts, you don't " "need to enable transcript line breaks." msgstr "" -#: classes/partials/_default-styles.inc:65 +#: classes/partials/_default-styles.inc:73 msgid "Default CSS Selectors Information" msgstr "" -#: classes/partials/_default-styles.inc:67 +#: classes/partials/_default-styles.inc:75 msgid "" "By default, the following CSS selectors are used by What Did They " "Say?!?:" msgstr "" -#: classes/partials/_default-styles.inc:70 +#: classes/partials/_default-styles.inc:78 msgid "The container for the transcript" msgstr "" -#: classes/partials/_default-styles.inc:72 +#: classes/partials/_default-styles.inc:80 msgid "Character dialog" msgstr "" -#: classes/partials/_default-styles.inc:74 +#: classes/partials/_default-styles.inc:82 msgid "The character's name" msgstr "" -#: classes/partials/_default-styles.inc:76 +#: classes/partials/_default-styles.inc:84 msgid "" "The direction the characters is speaking in/from (off-stage, to another " "character)" msgstr "" -#: classes/partials/_default-styles.inc:78 +#: classes/partials/_default-styles.inc:86 msgid "A scene heading" msgstr "" -#: classes/partials/_default-styles.inc:80 +#: classes/partials/_default-styles.inc:88 msgid "Action within a scene" msgstr "" -#: classes/partials/_default-styles.inc:83 +#: classes/partials/_default-styles.inc:91 msgid "Overriding Filters" msgstr "" -#: classes/partials/_default-styles.inc:86 +#: classes/partials/_default-styles.inc:94 msgid "" "If you want to override how transcript HTML is structured, create hooks in " "your theme that implement the following filters." msgstr "" -#: classes/partials/_default-styles.inc:87 +#: classes/partials/_default-styles.inc:95 msgid "" "All of them return the same parameters that are passed in as an array(), " "with the return $content containing the filter output." msgstr "" -#: classes/partials/_default-styles.inc:92 +#: classes/partials/_default-styles.inc:100 msgid "Output $content contains the HTML for dialog blocks." msgstr "" -#: classes/partials/_default-styles.inc:95 +#: classes/partials/_default-styles.inc:103 msgid "Output $content contains the HTML for scene action blocks." msgstr "" -#: classes/partials/_default-styles.inc:98 +#: classes/partials/_default-styles.inc:106 msgid "" "Ouptut $content contains the HTML for scene heading blocks." msgstr "" -#: classes/partials/_default-styles.inc:101 +#: classes/partials/_default-styles.inc:109 msgid "Output $content contains the HTML for a single transcript." msgstr "" -#: classes/partials/_default-styles.inc:104 +#: classes/partials/_default-styles.inc:112 msgid "Output $content contains the HTML for a language name." msgstr "" -#: classes/partials/_default-styles.inc:107 +#: classes/partials/_default-styles.inc:115 msgid "" "Output $content contains the HTML for all the provided " "$transcripts that match $search_string." msgstr "" -#: classes/partials/_default-styles.inc:110 +#: classes/partials/_default-styles.inc:118 #, php-format msgid "" "Output $content contains the sprintf() format string for how " @@ -308,14 +314,14 @@ msgid "" "code>." msgstr "" -#: classes/partials/_default-styles.inc:113 +#: classes/partials/_default-styles.inc:121 msgid "" "Output $content contains three elements: a container (.wdts-" "transcript-opener), and an opener & closer in the container (.wdts-" "opener and .wdts-container)." msgstr "" -#: classes/partials/_default-styles.inc:117 +#: classes/partials/_default-styles.inc:125 msgid "" "A filter in your theme that would change the display of langauge names would " "look like the following:" @@ -475,7 +481,7 @@ msgid "Misc. Options" msgstr "" #: classes/partials/admin.inc:14 classes/partials/admin.inc:47 -#: classes/WhatDidTheySayAdmin.inc:775 classes/WhatDidTheySayAdmin.inc:776 +#: classes/WhatDidTheySayAdmin.inc:207 classes/WhatDidTheySayAdmin.inc:208 msgid "What Did They Say?!?" msgstr "" @@ -611,96 +617,96 @@ msgstr "" msgid "Hey, where are the keys?" msgstr "" -#: classes/WhatDidTheySayAdmin.inc:54 +#: classes/WhatDidTheySayAdmin.inc:56 msgid "Submit transcriptions to a post" msgstr "" -#: classes/WhatDidTheySayAdmin.inc:55 +#: classes/WhatDidTheySayAdmin.inc:57 msgid "Approve transcriptions to a post" msgstr "" -#: classes/WhatDidTheySayAdmin.inc:56 +#: classes/WhatDidTheySayAdmin.inc:58 msgid "Change the available languages" msgstr "" -#: classes/WhatDidTheySayAdmin.inc:310 +#: classes/WhatDidTheySayAdmin.inc:231 +msgid "Manage Transcripts" +msgstr "" + +#: classes/WhatDidTheySayAdmin.inc:306 #, php-format msgid "Transcript: %s" msgstr "" -#: classes/WhatDidTheySayAdmin.inc:328 +#: classes/WhatDidTheySayAdmin.inc:335 #, php-format msgid "%s transcript excerpt:" msgstr "" -#: classes/WhatDidTheySayAdmin.inc:426 +#: classes/WhatDidTheySayAdmin.inc:568 msgid "Transcript added to queue." msgstr "" -#: classes/WhatDidTheySayAdmin.inc:428 +#: classes/WhatDidTheySayAdmin.inc:570 msgid "Transcript not added to queue." msgstr "" -#: classes/WhatDidTheySayAdmin.inc:499 +#: classes/WhatDidTheySayAdmin.inc:641 msgid "Transcripts updated." msgstr "" -#: classes/WhatDidTheySayAdmin.inc:582 +#: classes/WhatDidTheySayAdmin.inc:704 msgid "Default styles option updated." msgstr "" -#: classes/WhatDidTheySayAdmin.inc:598 +#: classes/WhatDidTheySayAdmin.inc:720 msgid "Insertion level updated." msgstr "" -#: classes/WhatDidTheySayAdmin.inc:616 +#: classes/WhatDidTheySayAdmin.inc:738 #, php-format msgid "%s deleted." msgstr "" -#: classes/WhatDidTheySayAdmin.inc:618 +#: classes/WhatDidTheySayAdmin.inc:740 msgid "Language not deleted!" msgstr "" -#: classes/WhatDidTheySayAdmin.inc:625 +#: classes/WhatDidTheySayAdmin.inc:747 #, php-format msgid "%s added." msgstr "" -#: classes/WhatDidTheySayAdmin.inc:627 +#: classes/WhatDidTheySayAdmin.inc:749 msgid "Language not added!" msgstr "" -#: classes/WhatDidTheySayAdmin.inc:633 +#: classes/WhatDidTheySayAdmin.inc:755 #, php-format msgid "%s set as default." msgstr "" -#: classes/WhatDidTheySayAdmin.inc:635 +#: classes/WhatDidTheySayAdmin.inc:757 msgid "Language not set as default!" msgstr "" -#: classes/WhatDidTheySayAdmin.inc:641 +#: classes/WhatDidTheySayAdmin.inc:763 #, php-format msgid "%1$s renamed to %2$s." msgstr "" -#: classes/WhatDidTheySayAdmin.inc:643 +#: classes/WhatDidTheySayAdmin.inc:765 msgid "Language not renamed!" msgstr "" -#: classes/WhatDidTheySayAdmin.inc:666 +#: classes/WhatDidTheySayAdmin.inc:788 msgid "User capabilities updated." msgstr "" -#: classes/WhatDidTheySayAdmin.inc:685 +#: classes/WhatDidTheySayAdmin.inc:807 msgid "What Did They Say?!? options reset." msgstr "" -#: classes/WhatDidTheySayAdmin.inc:704 +#: classes/WhatDidTheySayAdmin.inc:826 msgid "What Did They Say?!? core options changed." msgstr "" - -#: classes/WhatDidTheySayAdmin.inc:799 -msgid "Manage Transcripts" -msgstr ""