[dw-free] English-strip /manage/tags
[commit: http://hg.dwscoalition.org/dw-free/rev/d8f1ea234c7c]
http://bugs.dwscoalition.org/show_bug.cgi?id=381
Do counts, security box
Patch by
wyntarvox.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=381
Do counts, security box
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- htdocs/js/tags.js
- htdocs/manage/tags.bml
- htdocs/manage/tags.bml.text
-------------------------------------------------------------------------------- diff -r 9799d4d90f66 -r d8f1ea234c7c htdocs/js/tags.js --- a/htdocs/js/tags.js Sun May 17 12:56:24 2009 +0000 +++ b/htdocs/js/tags.js Sun May 17 13:00:23 2009 +0000 @@ -59,7 +59,7 @@ function tagselect(list) // no selections if (! selected_num) { toggle_actions(false); - rename_btn.value = "Rename"; + rename_btn.value = ml.rename_btn; show_props(tagprops); } else { toggle_actions(true); @@ -67,7 +67,7 @@ function tagselect(list) // exactly one selection if (selected_num == 1) { - rename_btn.value = "Rename"; + rename_btn.value = ml.rename_btn; show_props(tagprops, selected_id); } @@ -117,16 +117,16 @@ function show_props(div, id) var tag = tags[id]; var out; - if (! tag) tag = [ 'n/a', 'n/a', '-', '-', '-', '-', '-' ]; + if (! tag) tag = [ ml.na_label, ml.na_label, '-', '-', '-', '-', '-' ]; var secimg = ' <img align="middle" src="/img/'; - if (tag[1] == "public") { + if (tag[1] == ml.public_label) { secimg = secimg + "silk/identity/user.png"; } - else if (tag[1] == "private") { + else if (tag[1] == ml.private_label) { secimg = secimg + "silk/entry/private.png"; } - else if (tag[1] == "friends") { + else if (tag[1] == ml.trusted_label) { secimg = secimg + "silk/entry/locked.png"; } else { @@ -136,13 +136,13 @@ function show_props(div, id) if (tag[1] == "n/a") secimg = ""; out = "<table class='proptbl' cellspacing='0'>"; - out = out + "<tr><td class='h' colspan='2'>counts and security</td></tr>"; - out = out + "<tr><td class='t'>public</td><td class='c'>" + tag[2] + "</td></tr>"; - out = out + "<tr><td class='t'>private</td><td class='c'>" + tag[3] + "</td></tr>"; - out = out + "<tr><td class='t'>friends</td><td class='c'>" + tag[4] + "</td></tr>"; - out = out + "<tr><td class='t'>custom groups</td><td class='c'>" + tag[5] + "</td></tr>"; - out = out + "<tr><td class='r'>total</td><td class='rv'>" + tag[6] + "</td></tr>"; - out = out + "<tr><td class='r' style='height: 16px'>security</td><td class='rv' align='middle'>" + tag[1] + secimg + "</td></tr>"; + out = out + "<tr><td class='h' colspan='2'>" + ml.counts_label + "</td></tr>"; + out = out + "<tr><td class='t'>" + ml.public_label + "</td><td class='c'>" + tag[2] + "</td></tr>"; + out = out + "<tr><td class='t'>" + ml.private_label + "</td><td class='c'>" + tag[3] + "</td></tr>"; + out = out + "<tr><td class='t'>" + ml.trusted_label + "</td><td class='c'>" + tag[4] + "</td></tr>"; + out = out + "<tr><td class='t'>" + ml.filters_label + "</td><td class='c'>" + tag[5] + "</td></tr>"; + out = out + "<tr><td class='r'>" + ml.total_label + "</td><td class='rv'>" + tag[6] + "</td></tr>"; + out = out + "<tr><td class='r' style='height: 16px'>" + ml.security_label + "</td><td class='rv' align='middle'>" + tag[1] + secimg + "</td></tr>"; out = out + "</table>"; div.innerHTML = out; diff -r 9799d4d90f66 -r d8f1ea234c7c htdocs/manage/tags.bml --- a/htdocs/manage/tags.bml Sun May 17 12:56:24 2009 +0000 +++ b/htdocs/manage/tags.bml Sun May 17 13:00:23 2009 +0000 @@ -1,10 +1,9 @@ <?page -title=><?_code return $ML{'.title2'}; _code?> body<= <?_code { use strict; - use vars qw(%POST %GET); + use vars qw(%POST %GET $headextra); LJ::set_active_crumb('managetags'); @@ -15,6 +14,23 @@ body<= return "<?needlogin?>" unless $remote; LJ::need_res("stc/tags.css", "js/tags.js"); + + $headextra = <<HEAD; +<script type="text/javascript"> + var ml = new Object(); + + ml.counts_label = "$ML{'.label.counts'}"; + ml.public_label = "$ML{'.label.public'}"; + ml.private_label = "$ML{'.label.private'}"; + ml.trusted_label = "$ML{'.label.trusted'}"; + ml.filters_label = "$ML{'.label.filters'}"; + ml.total_label = "$ML{'.label.total'}"; + ml.security_label = "$ML{'.label.security'}"; + ml.na_label = "$ML{'.label.notapplicable'}"; + ml.rename_btn = "$ML{'.button.rename'}"; + +</script> +HEAD my $authas = $GET{'authas'} || $remote->{'user'}; my $u = LJ::get_authas_user($authas); @@ -315,4 +331,8 @@ body<= } _code?> <=body bodyopts=>onLoad="initTagPage()" +title=><?_code return $ML{'.title2'}; _code?> +head<= +<?_code return $headextra; _code?> +<=head page?> diff -r 9799d4d90f66 -r d8f1ea234c7c htdocs/manage/tags.bml.text --- a/htdocs/manage/tags.bml.text Sun May 17 12:56:24 2009 +0000 +++ b/htdocs/manage/tags.bml.text Sun May 17 13:00:23 2009 +0000 @@ -23,9 +23,25 @@ .intro=Use this page to review and edit tags you have defined. +.label.counts=counts and security + +.label.filters=filters + +.label.notapplicable=n/a + +.label.private=private + +.label.public=public + +.label.security=security + .label.settings=Tag Settings .label.tags=Tag Properties + +.label.total=total + +.label.trusted=trusted .label.yours=Your Tags --------------------------------------------------------------------------------