Skip to content

Commit

Permalink
Item1918: added more MAKETEXTs and moved translations from JS to meta…
Browse files Browse the repository at this point in the history
…-tags.

git-svn-id: http://svn.foswiki.org/trunk/TagsPlugin@5363 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OliverKrueger authored and OliverKrueger committed Oct 23, 2009
1 parent 95ba612 commit 79a5eef
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 25 deletions.
4 changes: 2 additions & 2 deletions data/System/TagsPluginUserSelector.txt
Expand Up @@ -16,8 +16,8 @@ If you want to customize the "user buttons", this is the right place.

---++ Implementation
<verbatim>
%STARTINCLUDE% <span class='foswikiGrayText'>Users:</span>
<a href='#' class='tagsplugin_user tagsplugin_user_active' user='all'>%ICON{filter}% all</a>
%STARTINCLUDE% <span class='foswikiGrayText'>%MAKETEXT{"Users"}%:</span>
<a href='#' class='tagsplugin_user tagsplugin_user_active' user='all'>%ICON{filter}% %MAKETEXT{"all"}%</a>
<a href='#' class='tagsplugin_user' user='%WIKINAME%'>%ICON{filter}% %SPACEOUT{"%WIKINAME%"}%</a>
%TAGGROUPS{format=" <a href='#' class='tagsplugin_user' user='$group'>$percntICON{filter}$percnt $percntSPACEOUT{\"$group\"}$percnt</a>" sep="$n" }%%STOPINCLUDE%
</verbatim>
16 changes: 8 additions & 8 deletions data/System/TagsPluginViewsTagSearch.txt
Expand Up @@ -2,26 +2,26 @@
%META:TOPICPARENT{name="TagsPlugin"}%
<noautolink>

---+++ list of everyone's tags on the current topic
---+++ %MAKETEXT{"list of everyone's tags on the current topic"}%
%TAGSEARCH{ web="%BASEWEB%" topic="%BASETOPIC%" }%

---+++ list of %NOP%%WIKINAME%'s tags on the current topic
---+++ %MAKETEXT{"list of %NOP%%WIKINAME%'s tags on the current topic"}%
%TAGSEARCH{ web="%BASEWEB%" topic="%BASETOPIC%" user="%WIKINAME%" }%

---+++ tag cloud of everyone's tags
---+++ %MAKETEXT{"tag cloud of everyone's tags"}%
%TAGCLOUD{ terms="$percntTAGSEARCH{ query=\"tag\" format=\"$tag:$count\" sep=\", \" }$percnt" }%

---+++ tag cloud of everyone's tags on topic ?mytopic=%URLPARAM{"mytopic" default="undef"}%
---+++ %MAKETEXT{"tag cloud of everyone's tags on topic"}% ?mytopic=%URLPARAM{"mytopic" default="undef"}%
%TAGCLOUD{ terms="$percntTAGSEARCH{ query=\"tag\" topic=\"$percntURLPARAM{mytopic}$percnt\" format=\"$tag:$count\" sep=\", \" }$percnt" }%

---+++ List of topics tagged with ?tag=%URLPARAM{tag}% (inverse tag lookup)
---+++ %MAKETEXT{"Inverse tag lookup: List of topics tagged with"}% ?tag=%URLPARAM{tag}%
%TAGSEARCH{ query="topic" tag="%URLPARAM{tag}%" }%

---+++ Complete list by topics
---+++ %MAKETEXT{"Complete list by topics"}%
%TAGSEARCH{
query="topic"
header="|*Tag*|*Topic*|*User*|$n"
header="|*%MAKETEXT{"Tag"}%*|*%MAKETEXT{"Topic"}%*|*%MAKETEXT{"User"}%*|$n"
format="| $tag | [[$item][$item]] | $user |"
sep="$n"
}%
</noautolink>
</noautolink>
4 changes: 2 additions & 2 deletions data/System/TagsPluginWebSelector.txt
Expand Up @@ -16,8 +16,8 @@ If you want to customize the "web buttons", this is the right place.

---++ Implementation
<verbatim>
%STARTINCLUDE% <span class='foswikiGrayText'>Webs:</span>
<a href='#' class='tagsplugin_web %IF{"$ TAGSPLUGIN_WEBSELECTOR_DEFAULT='all'" then="tagsplugin_web_active"}%' web='all'>%ICON{filter}% all</a>
%STARTINCLUDE% <span class='foswikiGrayText'>%MAKETEXT{"Webs"}%:</span>
<a href='#' class='tagsplugin_web %IF{"$ TAGSPLUGIN_WEBSELECTOR_DEFAULT='all'" then="tagsplugin_web_active"}%' web='all'>%ICON{filter}% %MAKETEXT{"all"}%</a>
%FLEXWEBLIST{
webs="public, -Trash"
format=" <a href='#' class='tagsplugin_web $percntIF{\"$ TAGSPLUGIN_WEBSELECTOR_DEFAULT='$name'\" then=\"tagsplugin_web_active\"}$percnt' web='$name'>$percntICON{filter}$percnt $name</a>"
Expand Down
14 changes: 14 additions & 0 deletions lib/Foswiki/Plugins/TagsPlugin.pm
Expand Up @@ -84,6 +84,20 @@ sub initPlugin {
my $header = '<meta name="foswiki.tagsplugin.defaultuser" content="%TAGSPLUGIN_TAGUSER%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.web" content="'.$tagweb.'" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.topic" content="'.$tagtopic.'" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.Ok" content="%MAKETEXT{"Ok"}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.TagDetailsOn" content="%MAKETEXT{"Tag Details on"}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.Tag400" content="%MAKETEXT{"Assuming you are logged-in and assuming you provided a tag name you probably just revealed a software bug. I am sorry about that. (400)"}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.Tag401" content="%MAKETEXT{"According to my data, you are not logged in. Please log-in before you retry."}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.Tag403" content="%MAKETEXT{"I am sorry, but you are not allowed to do that."}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.Tag500" content="%MAKETEXT{"Something beyond your sphere of influence went wrong. Most probably a problem with the database. May I kindly ask you to inform your administrator? Thank you."}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.TagUnknown" content="%MAKETEXT{"Unknown error in tagsplugin_be_tag."}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.Untag400" content="%MAKETEXT{"Assuming you are logged in you probably just revealed a software bug. I am sorry about that. (400)"}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.Untag401" content="%MAKETEXT{"According to my data, you are not logged in. Please log-in before you retry."}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.Untag403" content="%MAKETEXT{"I am sorry, but you are not allowed to do that."}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.Untag404" content="%MAKETEXT{"I am sorry, but either the tag or the topic does not exist."}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.Untag500" content="%MAKETEXT{"Something beyond your sphere of influence went wrong. Most probably a problem with the database. May I kindly ask you to inform your administrator? Thank you."}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.UntagUnknown" content="%MAKETEXT{"Unknown error in tagsplugin_be_untag."}%" />'."\n";
$header .= '<meta name="foswiki.tagsplugin.translation.Attention" content="%MAKETEXT{"May I kindly ask for your attention?"}%" />'."\n";
$header .= '<link rel="stylesheet" type="text/css" href="%PUBURL%/System/TagsPlugin/tagsplugin.css" media="all" />'."\n";
Foswiki::Func::addToHEAD('TAGSPLUGIN', "\n".$header );

Expand Down
26 changes: 13 additions & 13 deletions pub/System/TagsPlugin/tagsplugin-base.js
Expand Up @@ -95,7 +95,7 @@
$("#tagsplugin_dialog_details")
.dialog('option', 'modal', true)
.dialog('option', 'width', 460)
.dialog('option', 'title', 'Tag Details on '+tag)
.dialog('option', 'title', foswiki.tagsplugin.translation.TagDetailsOn+' '+tag)
.dialog("open")
.bind(
'dialogclose',
Expand Down Expand Up @@ -167,19 +167,19 @@
tagsplugin_fe_refreshTagList();
break;
case 400:
tagsplugin_alert("Assuming you are logged-in and assuming you provided a tag name you probably just revealed a software bug. I'm sorry about that. (400)");
tagsplugin_alert( foswiki.tagsplugin.translation.Tag400 );
break;
case 401:
tagsplugin_alert("According to my data, you are not logged in. Please log-in before you retry.");
tagsplugin_alert( foswiki.tagsplugin.translation.Tag401 );
break;
case 403:
tagsplugin_alert("I'm sorry, but you are not allowed to do that.");
tagsplugin_alert( foswiki.tagsplugin.translation.Tag403 );
break;
case 500:
tagsplugin_alert("Something beyond your sphere of influence went wrong. Most probably a problem with the database. May I kindly ask you to inform your administrator? Thank you.");
tagsplugin_alert( foswiki.tagsplugin.translation.Tag500 );
break;
default:
tagsplugin_alert("Unknown error in tagsplugin_be_tag.");
tagsplugin_alert( foswiki.tagsplugin.translation.TagUnknown );
break;
}
$("#tagsplugin_processing img").hide();
Expand All @@ -202,22 +202,22 @@
tagsplugin_fe_refreshTagList();
break;
case 400:
tagsplugin_alert("Assuming you are logged in you probably just revealed a software bug. I'm sorry about that. (400)");
tagsplugin_alert( foswiki.tagsplugin.translation.Untag400 );
break;
case 401:
tagsplugin_alert("According to my data, you are not logged in. Please log-in before you retry.");
tagsplugin_alert( foswiki.tagsplugin.translation.Untag401 );
break;
case 403:
tagsplugin_alert("I'm sorry, but you are not allowed to do that.");
tagsplugin_alert( foswiki.tagsplugin.translation.Untag403 );
break;
case 404:
tagsplugin_alert("I'm sorry, but either the tag or the topic does not exist.");
tagsplugin_alert( foswiki.tagsplugin.translation.Untag404 );
break;
case 500:
tagsplugin_alert("Something beyond your sphere of influence went wrong. Most probably a problem with the database. May I kindly ask you to inform your administrator? Thank you.");
tagsplugin_alert( foswiki.tagsplugin.translation.Untag500 );
break;
default:
tagsplugin_alert("Unknown error in tagsplugin_be_untag.");
tagsplugin_alert( foswiki.tagsplugin.translation.UntagUnknown );
break;
}
$("#tagsplugin_processing img").hide();
Expand All @@ -232,7 +232,7 @@
.html(text)
.dialog('option', 'modal', true)
.dialog('option', 'width', 460)
.dialog('option', 'title', 'May I kindly ask for your attention?')
.dialog('option', 'title', foswiki.tagsplugin.translation.Attention )
.dialog('option', 'buttons', { "Ok": function() { $(this).dialog("close"); } })
.dialog("open")
.bind(
Expand Down

0 comments on commit 79a5eef

Please sign in to comment.