fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-08-22 10:03 am

[dw-free] Pass sitename to various translation strings

[commit: http://hg.dwscoalition.org/dw-free/rev/343dbd2bf378]

http://bugs.dwscoalition.org/show_bug.cgi?id=777

Pass sitename to the string instead of hardcoding into the translation
string, so that the text says the right thing on other sites as well.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/LJ/Talk.pm
  • htdocs/register.bml
  • htdocs/register.bml.text
  • htdocs/support/faq.bml
  • htdocs/support/faq.bml.text
  • htdocs/talkpost.bml
  • htdocs/talkpost.bml.text
  • htdocs/tools/textmessage.bml
  • htdocs/tools/textmessage.bml.text
--------------------------------------------------------------------------------
diff -r a9afa68cf9e4 -r 343dbd2bf378 cgi-bin/LJ/Talk.pm
--- a/cgi-bin/LJ/Talk.pm	Mon Aug 22 18:02:14 2011 +0800
+++ b/cgi-bin/LJ/Talk.pm	Mon Aug 22 18:03:37 2011 +0800
@@ -1975,7 +1975,7 @@
     # Some JavaScript to help the UI out
 
     $ret .= "<script type='text/javascript' language='JavaScript'>\n";
-    $ret .= "var usermismatchtext = \"" . LJ::ejs($BML::ML{'.usermismatch'}) . "\";\n";
+    $ret .= "var usermismatchtext = \"" . LJ::ejs( LJ::Lang::ml( '.usermismatch2', { sitenameshort => $LJ::SITENAMESHORT } ) ) . "\";\n";
     $ret .= "</script><script type='text/javascript' language='JavaScript' src='$LJ::JSPREFIX/talkpost.js'></script>";
     $ret .= "</form>\n";
 
diff -r a9afa68cf9e4 -r 343dbd2bf378 htdocs/register.bml
--- a/htdocs/register.bml	Mon Aug 22 18:02:14 2011 +0800
+++ b/htdocs/register.bml	Mon Aug 22 18:03:37 2011 +0800
@@ -71,7 +71,7 @@
          'from' => $LJ::ADMIN_EMAIL,
          'fromname' => $LJ::SITENAME,
          'charset' => 'utf-8',
-         'subject' => $ML{'.email.subject'},
+         'subject' => BML::ml( ".email.subject2", { sitename => $LJ::SITENAME } ),
          'body' => BML::ml('.email.body2',
                            { 'sitename' => $LJ::SITENAME,
                              'siteroot' => $LJ::SITEROOT,
diff -r a9afa68cf9e4 -r 343dbd2bf378 htdocs/register.bml.text
--- a/htdocs/register.bml.text	Mon Aug 22 18:02:14 2011 +0800
+++ b/htdocs/register.bml.text	Mon Aug 22 18:03:37 2011 +0800
@@ -29,7 +29,7 @@
 [[siteroot]]/
 .
 
-.email.subject=Validate Email
+.email.subject2=Confirm Email - [[sitename]]
 
 .error.emailchanged=This verification link is out of date.  Please <a [[aopts]]>request a new verification email</a>.
 
diff -r a9afa68cf9e4 -r 343dbd2bf378 htdocs/support/faq.bml
--- a/htdocs/support/faq.bml	Mon Aug 22 18:02:14 2011 +0800
+++ b/htdocs/support/faq.bml	Mon Aug 22 18:03:37 2011 +0800
@@ -39,7 +39,7 @@
     my $ret = "";
 
     $ret .= "<div id='faq'>";
-    $ret .= "<?p $ML{'.faq.title.text'} p?>";
+    $ret .= "<?p " . BML::ml( ".faq.title.text2", { sitenameshort => $LJ::SITENAMESHORT } ) . " p?>";
 
     # FAQ search
     $ret .= "<?p $ML{'.faq.search.text'} p?>";
diff -r a9afa68cf9e4 -r 343dbd2bf378 htdocs/support/faq.bml.text
--- a/htdocs/support/faq.bml.text	Mon Aug 22 18:02:14 2011 +0800
+++ b/htdocs/support/faq.bml.text	Mon Aug 22 18:03:37 2011 +0800
@@ -7,7 +7,7 @@
 
 .faq.title=Frequently Asked Questions
 
-.faq.title.text=We know that a site like Dreamwidth can be difficult to find your way around, and the changes we've made to some things you might be used to can be confusing.  We've put together some basic Guides, and written a set of FAQs that should help you do what you want to do on Dreamwidth, whether it's configure your OpenID account or customize your new journal.</p> <p>If you already have a Dreamwidth account, you may notice your name appearing in some of the FAQs as you read them.  If you view the same sections when logged out, the text will simply say "username". 
+.faq.title.text2=We know that a site like [[sitenameshort]] can be difficult to find your way around, and the changes we've made to some things you might be used to can be confusing.  We've put together some basic Guides, and written a set of FAQs that should help you do what you want to do on [[sitenameshort]], whether it's configure your OpenID account or customize your new journal.</p> <p>If you already have a [[sitenameshort]] account, you may notice your name appearing in some of the FAQs as you read them.  If you view the same sections when logged out, the text will simply say "username".
 
 .toc.title=Available Categories
 
diff -r a9afa68cf9e4 -r 343dbd2bf378 htdocs/talkpost.bml
--- a/htdocs/talkpost.bml	Mon Aug 22 18:02:14 2011 +0800
+++ b/htdocs/talkpost.bml	Mon Aug 22 18:03:37 2011 +0800
@@ -383,7 +383,7 @@
     unless ($u->can_get_comments ||
             ($remote && $remote->can_leave_comments)) {
         $ret .= "<?h1 $ML{'Sorry'} h1?><?p ";
-        $ret .= $LJ::MSG_NO_COMMENT || "Sorry, you cannot leave comments at this time.";
+        $ret .= $LJ::MSG_NO_COMMENT || $ML{'.sorry.cannotcomment'};
         $ret .= " p?>";
         return $ret;
     }
diff -r a9afa68cf9e4 -r 343dbd2bf378 htdocs/talkpost.bml.text
--- a/htdocs/talkpost.bml.text	Mon Aug 22 18:02:14 2011 +0800
+++ b/htdocs/talkpost.bml.text	Mon Aug 22 18:03:37 2011 +0800
@@ -93,10 +93,12 @@
 
 .postresponse=Post a comment in response:
 
+.sorry.cannotcomment=Sorry, you cannot leave comments at this time.
+
 .title=(Reply)
 
-.usermismatch<<
-You've entered an account name but have deselected the 'Dreamwidth account' option.
+.usermismatch2<<
+You've entered an account name but have deselected the '[[sitenameshort]] account' option.
 
 Please clear the textbox or select the correct posting mode and try again.
 .
diff -r a9afa68cf9e4 -r 343dbd2bf378 htdocs/tools/textmessage.bml
--- a/htdocs/tools/textmessage.bml	Mon Aug 22 18:02:14 2011 +0800
+++ b/htdocs/tools/textmessage.bml	Mon Aug 22 18:03:37 2011 +0800
@@ -40,7 +40,7 @@
 
     unless ($user) {
         $ret .= "<?h1 $ML{'.enter.user.head'} h1?>".
-            "<?p ".BML::ml('.enter.user.text2', { sitenameshort => $LJ::SITENAMESHORT })." p?>".
+            "<?p " . BML::ml( '.enter.user.text3', { sitenameshort => $LJ::SITENAMESHORT } ) . " p?>".
             "<div style='margin-left: 40px'><form method='get' action='textmessage'>$ML{'.enter.user.input'} <input type='text' size='15' maxlength='15' name='user' /> <input type='submit' value=\"$ML{'.enter.user.submit'}\" /></form></div>".
             "<p>".BML::ml('.setup.text', { aopts => "href='$LJ::SITEROOT/manage/profile/'" })."</p>";
         return add_footer( $ret );
diff -r a9afa68cf9e4 -r 343dbd2bf378 htdocs/tools/textmessage.bml.text
--- a/htdocs/tools/textmessage.bml.text	Mon Aug 22 18:02:14 2011 +0800
+++ b/htdocs/tools/textmessage.bml.text	Mon Aug 22 18:03:37 2011 +0800
@@ -5,7 +5,7 @@
 
 .enter.user.submit=Proceed...
 
-.enter.user.text2=Enter the Dreamwidth account name of the person you'd like to send a text message to:
+.enter.user.text3=Enter the [[sitenameshort]] account name of the person you'd like to send a text message to:
 
 .error.banned.head=Banned
 
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org