[Bps-public-commit] RT-Extension-TicketLocking branch, master, updated. 1.05
Alex Vandiver
alexmv at bestpractical.com
Mon Jan 26 14:39:59 EST 2015
The branch, master has been updated
via 8d9fd4c0b6444d0be546f5e4407704a39f9c8435 (commit)
via 03bf0ad23694d3c8319bdaa0ca760706f1eba3bc (commit)
via 16bcfc27f2fa852252e5e1818836863afed3c2fa (commit)
via 5833bd1c2d1b9b80d1b696e3b2accbe4ec0fa08d (commit)
via 1cb7805d34f1a5561f697eee964cfb1da1899bc6 (commit)
from f17bf1886bb8decc8c92c6036ff22490e8fde967 (commit)
Summary of changes:
Changes | 4 ++
MANIFEST | 2 +
META.yml | 7 ++-
Makefile.PL | 5 +-
html/Elements/MyLocks | 8 +--
html/Elements/ShowLock | 4 +-
lib/RT/Extension/TicketLocking.pm | 10 ++--
po/fr.po | 102 ++++++++++++++++++++++++++++++++++++++
po/ticketlocking.pot | 97 ++++++++++++++++++++++++++++++++++++
9 files changed, 226 insertions(+), 13 deletions(-)
create mode 100644 po/fr.po
create mode 100644 po/ticketlocking.pot
- Log -----------------------------------------------------------------
commit 1cb7805d34f1a5561f697eee964cfb1da1899bc6
Author: Emmanuel Lacour <elacour at easter-eggs.com>
Date: Mon Jan 26 13:36:00 2015 +0100
Add missing loc calls
diff --git a/html/Elements/MyLocks b/html/Elements/MyLocks
index 111a34d..5324a3a 100644
--- a/html/Elements/MyLocks
+++ b/html/Elements/MyLocks
@@ -48,14 +48,14 @@
<&|/Widgets/TitleBox, title => loc("Tickets locked by you") &>
% if(@locks) {
- <a href="index.html?UnlockAll=1">Unlock All</a>
+ <a href="index.html?UnlockAll=1"><&|/l&>Unlock All</&></a>
<table border="0" cellspacing="0" cellpadding="1" width="100%" class="ticket-list">
<%PERL>
my $expire_title;
- $expire_title = {title => 'Expires in'} if $expiry;
+ $expire_title = {title => loc('Expires in')} if $expiry;
$m->comp('/Elements/CollectionAsTable/Header',
- Format => [{title => '#'}, {title => 'Subject'}, {title => 'Time Locked'}, $expire_title, {title => 'NBSP'}],
+ Format => [{title => '#'}, {title => loc('Subject')}, {title => loc('Time Locked')}, $expire_title, {title => 'NBSP'}],
maxitems => ($expiry ? 5 : 4)
);
@@ -74,7 +74,7 @@
{output => ["<a href=\"${RT::WebPath}/Ticket/Display.html?id=$id\">$subject</a>"]},
{output => [$date->DurationAsString($duration)]},
{output => [$expiryTime]},
- {output => ["<a href=\"${RT::WebPath}/Ticket/Display.html?id=$id&Lock=remove\">Unlock</a>"]}],
+ {output => ["<a href=\"${RT::WebPath}/Ticket/Display.html?id=$id&Lock=remove\">".loc('Unlock')."</a>"]}],
maxitems => ($expiry ? 5 : 4),
i => $i
);
diff --git a/html/Elements/ShowLock b/html/Elements/ShowLock
index 81a9c4a..a83d05f 100644
--- a/html/Elements/ShowLock
+++ b/html/Elements/ShowLock
@@ -23,7 +23,7 @@
%#
%# END LICENSE BLOCK
-% my $TicketLabel = $Id ? "Ticket #$Id" : 'this ticket';
+% my $TicketLabel = $Id ? loc("Ticket #[_1]", $Id) : loc('this ticket');
% if ($Duration ||($u->id && $u->id == $session{'CurrentUser'}->id)) {
<div class="locked-by-you">
@@ -40,7 +40,7 @@
</div>
% } elsif ($u->id) {
% my $u_str = $m->scomp('/Elements/ShowUser', User => $u);
-% $TicketLabel = 'This ticket' if $TicketLabel eq 'this ticket';
+% $TicketLabel = loc('This ticket') if $TicketLabel eq loc('this ticket');
% $TicketLabel = $m->interp->apply_escapes($TicketLabel, 'h');
% $ago = $m->interp->apply_escapes($ago, 'h');
<div class="locked">
diff --git a/lib/RT/Extension/TicketLocking.pm b/lib/RT/Extension/TicketLocking.pm
index 55b334f..86b4cc4 100644
--- a/lib/RT/Extension/TicketLocking.pm
+++ b/lib/RT/Extension/TicketLocking.pm
@@ -343,17 +343,17 @@ sub Unlock {
my $type = shift || 'Auto';
my $lock = $ticket->RT::Ticket::Locked();
- return (undef, "This ticket was not locked.") unless $lock;
- return (undef, "You cannot unlock a ticket locked by another user.")
+ return (undef, $ticket->CurrentUser->loc("This ticket was not locked.")) unless $lock;
+ return (undef, $ticket->CurrentUser->loc("You cannot unlock a ticket locked by another user."))
unless $lock->Content->{User} == $ticket->CurrentUser->id;
my $current_type = $lock->Content->{'Type'};
- return (undef, "There is a lock with a higher priority on this ticket.")
+ return (undef, $ticket->CurrentUser->loc("There is a lock with a higher priority on this ticket."))
if $ticket->LockPriority( $type ) < $ticket->LockPriority( $current_type );
my $duration = time() - $lock->Content->{'Timestamp'};
$ticket->DeleteAttribute('RT_Lock');
- return ($duration, "You have unlocked this ticket. It was locked for $duration seconds.");
+ return ($duration, $ticket->CurrentUser->loc("You have unlocked this ticket. It was locked for [_1] seconds.", $duration));
}
commit 5833bd1c2d1b9b80d1b696e3b2accbe4ec0fa08d
Author: Emmanuel Lacour <elacour at easter-eggs.com>
Date: Mon Jan 26 13:36:22 2015 +0100
Run extract-message-catalog to produce pot file
diff --git a/po/ticketlocking.pot b/po/ticketlocking.pot
new file mode 100644
index 0000000..bd0d36d
--- /dev/null
+++ b/po/ticketlocking.pot
@@ -0,0 +1,94 @@
+#. ($TicketLabel, $u_str, $ago)
+#: html/Elements/ShowLock:47
+msgid "%1 has been locked by %2 for %3"
+msgstr ""
+
+#: html/Callbacks/RT-Extension-TicketLocking/Elements/Tabs/Privileged:27 html/Callbacks/RT-Extension-TicketLocking/RTIR/Elements/QueueTabs/Default:17 html/Callbacks/RT-Extension-TicketLocking/Ticket/Elements/Tabs/Default:21
+msgid "Break lock"
+msgstr ""
+
+#: html/Elements/MyLocks:56
+msgid "Expires in"
+msgstr ""
+
+#: html/Callbacks/RT-Extension-TicketLocking/Elements/Tabs/Privileged:34 html/Callbacks/RT-Extension-TicketLocking/RTIR/Elements/QueueTabs/Default:24 html/Callbacks/RT-Extension-TicketLocking/Ticket/Elements/Tabs/Default:27
+msgid "Lock"
+msgstr ""
+
+#: html/Elements/MyLocks:58
+msgid "Subject"
+msgstr ""
+
+#: lib/RT/Extension/TicketLocking.pm:351
+msgid "There is a lock with a higher priority on this ticket."
+msgstr ""
+
+#: html/Elements/ShowLock:43
+msgid "This ticket"
+msgstr ""
+
+#: lib/RT/Extension/TicketLocking.pm:346
+msgid "This ticket was not locked."
+msgstr ""
+
+#. ($Id)
+#: html/Elements/ShowLock:26
+msgid "Ticket #%1"
+msgstr ""
+
+#: html/Elements/MyLocks:49
+msgid "Tickets locked by you"
+msgstr ""
+
+#: html/Elements/MyLocks:58
+msgid "Time Locked"
+msgstr ""
+
+#: html/Callbacks/RT-Extension-TicketLocking/Elements/Tabs/Privileged:21 html/Callbacks/RT-Extension-TicketLocking/RTIR/Elements/QueueTabs/Default:12 html/Callbacks/RT-Extension-TicketLocking/Ticket/Elements/Tabs/Default:16 html/Elements/MyLocks:77
+msgid "Unlock"
+msgstr ""
+
+#: html/Elements/MyLocks:51
+msgid "Unlock All"
+msgstr ""
+
+#: lib/RT/Extension/TicketLocking.pm:347
+msgid "You cannot unlock a ticket locked by another user."
+msgstr ""
+
+#. ($TicketLabel, $ago)
+#: html/Elements/ShowLock:31
+msgid "You had %1 locked for %2. It is now unlocked"
+msgstr ""
+
+#: html/Callbacks/RT-Extension-TicketLocking/RTIR/Display.html/ProcessArguments:27 html/Callbacks/RT-Extension-TicketLocking/RTIR/Incident/Display.html/ProcessArguments:26 html/Callbacks/RT-Extension-TicketLocking/Ticket/Display.html/ProcessArguments:26
+msgid "You have broken the lock on this ticket"
+msgstr ""
+
+#. ($TicketLabel, $ago)
+#: html/Elements/ShowLock:37
+msgid "You have had %1 locked for %2"
+msgstr ""
+
+#. ($TicketLabel)
+#: html/Elements/ShowLock:35
+msgid "You have locked %1"
+msgstr ""
+
+#. ($duration)
+#: lib/RT/Extension/TicketLocking.pm:356
+msgid "You have unlocked this ticket. It was locked for %1 seconds."
+msgstr ""
+
+#: html/Callbacks/RT-Extension-TicketLocking/RTIR/Display.html/ProcessArguments:12 html/Callbacks/RT-Extension-TicketLocking/RTIR/Incident/Display.html/ProcessArguments:12 html/Callbacks/RT-Extension-TicketLocking/Ticket/Display.html/ProcessArguments:12
+msgid "You now have a lock on this ticket"
+msgstr ""
+
+#: html/Callbacks/RT-Extension-TicketLocking/RTIR/Display.html/ProcessArguments:14 html/Callbacks/RT-Extension-TicketLocking/RTIR/Incident/Display.html/ProcessArguments:14 html/Callbacks/RT-Extension-TicketLocking/Ticket/Display.html/ProcessArguments:14
+msgid "Your attempt to lock this ticket failed"
+msgstr ""
+
+#: html/Elements/ShowLock:26 html/Elements/ShowLock:43
+msgid "this ticket"
+msgstr ""
+
commit 16bcfc27f2fa852252e5e1818836863afed3c2fa
Author: Emmanuel Lacour <elacour at easter-eggs.com>
Date: Mon Jan 26 13:36:42 2015 +0100
Add French translation
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..40d92dd
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,102 @@
+msgid ""
+msgstr ""
+"PO-Revision-Date: 2015-01-26 12:14+0200\n"
+"Last-Translator: Emmanuel Lacour <elacour at home-dn.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. ($TicketLabel, $u_str, $ago)
+#: html/Elements/ShowLock:47
+msgid "%1 has been locked by %2 for %3"
+msgstr "%1 a été verrouillé par %2 depuis %3"
+
+#: html/Callbacks/RT-Extension-TicketLocking/Elements/Tabs/Privileged:27 html/Callbacks/RT-Extension-TicketLocking/RTIR/Elements/QueueTabs/Default:17 html/Callbacks/RT-Extension-TicketLocking/Ticket/Elements/Tabs/Default:21
+msgid "Break lock"
+msgstr "Supprimer le verrou"
+
+#: html/Elements/MyLocks:56
+msgid "Expires in"
+msgstr "Expire dans"
+
+#: html/Callbacks/RT-Extension-TicketLocking/Elements/Tabs/Privileged:34 html/Callbacks/RT-Extension-TicketLocking/RTIR/Elements/QueueTabs/Default:24 html/Callbacks/RT-Extension-TicketLocking/Ticket/Elements/Tabs/Default:27
+msgid "Lock"
+msgstr "Verrouiller"
+
+#: html/Elements/MyLocks:58
+msgid "Subject"
+msgstr "Sujet"
+
+#: lib/RT/Extension/TicketLocking.pm:351
+msgid "There is a lock with a higher priority on this ticket."
+msgstr "Il y a un verrou avec une priorité supérieure sur ce ticket."
+
+#: html/Elements/ShowLock:43
+msgid "This ticket"
+msgstr "Ce ticket"
+
+#: lib/RT/Extension/TicketLocking.pm:346
+msgid "This ticket was not locked."
+msgstr "Ce ticket n'a pas été verrouillé"
+
+#. ($Id)
+#: html/Elements/ShowLock:26
+msgid "Ticket #%1"
+msgstr "Ticket n°%1"
+
+#: html/Elements/MyLocks:49
+msgid "Tickets locked by you"
+msgstr "Tickets verrouillés par vous"
+
+#: html/Elements/MyLocks:58
+msgid "Time Locked"
+msgstr "Verrouillé depuis"
+
+#: html/Callbacks/RT-Extension-TicketLocking/Elements/Tabs/Privileged:21 html/Callbacks/RT-Extension-TicketLocking/RTIR/Elements/QueueTabs/Default:12 html/Callbacks/RT-Extension-TicketLocking/Ticket/Elements/Tabs/Default:16 html/Elements/MyLocks:77
+msgid "Unlock"
+msgstr "Déverrouiller"
+
+#: html/Elements/MyLocks:51
+msgid "Unlock All"
+msgstr "Tout déverrouiller"
+
+#: lib/RT/Extension/TicketLocking.pm:347
+msgid "You cannot unlock a ticket locked by another user."
+msgstr "Vous ne pouvez pas déverrouillé un tiket verrouillé par quelqu'un d'autre."
+
+#. ($TicketLabel, $ago)
+#: html/Elements/ShowLock:31
+msgid "You had %1 locked for %2. It is now unlocked"
+msgstr "Vous aviez %1 verrouillé depuis %2. Il est maintenant déverrouillé."
+
+#: html/Callbacks/RT-Extension-TicketLocking/RTIR/Display.html/ProcessArguments:27 html/Callbacks/RT-Extension-TicketLocking/RTIR/Incident/Display.html/ProcessArguments:26 html/Callbacks/RT-Extension-TicketLocking/Ticket/Display.html/ProcessArguments:26
+msgid "You have broken the lock on this ticket"
+msgstr "Vous avez supprimer le verrou sur ce ticket"
+
+#. ($TicketLabel, $ago)
+#: html/Elements/ShowLock:37
+msgid "You have had %1 locked for %2"
+msgstr "Vous avez verrouillé %1 depuis %2"
+
+#. ($TicketLabel)
+#: html/Elements/ShowLock:35
+msgid "You have locked %1"
+msgstr "Vous avez verrouillé %1"
+
+#. ($duration)
+#: lib/RT/Extension/TicketLocking.pm:356
+msgid "You have unlocked this ticket. It was locked for %1 seconds."
+msgstr "Vous avez déverrouillé ce ticket. Il était verrouillé depuis %1 secondes."
+
+#: html/Callbacks/RT-Extension-TicketLocking/RTIR/Display.html/ProcessArguments:12 html/Callbacks/RT-Extension-TicketLocking/RTIR/Incident/Display.html/ProcessArguments:12 html/Callbacks/RT-Extension-TicketLocking/Ticket/Display.html/ProcessArguments:12
+msgid "You now have a lock on this ticket"
+msgstr "Vous avez maintenant un verrou sur ce ticket"
+
+#: html/Callbacks/RT-Extension-TicketLocking/RTIR/Display.html/ProcessArguments:14 html/Callbacks/RT-Extension-TicketLocking/RTIR/Incident/Display.html/ProcessArguments:14 html/Callbacks/RT-Extension-TicketLocking/Ticket/Display.html/ProcessArguments:14
+msgid "Your attempt to lock this ticket failed"
+msgstr "Votre tentative pour verrouiller ce ticket a échoué"
+
+#: html/Elements/ShowLock:26 html/Elements/ShowLock:43
+msgid "this ticket"
+msgstr "ce ticket"
+
commit 03bf0ad23694d3c8319bdaa0ca760706f1eba3bc
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Jan 26 14:37:47 2015 -0500
Packaging updates
diff --git a/META.yml b/META.yml
index 14d68db..2c2f9f9 100644
--- a/META.yml
+++ b/META.yml
@@ -20,10 +20,14 @@ no_index:
- html
- inc
- xt
+ package:
+ - RT::Ticket
+ - RT::User
requires:
perl: 5.8.3
resources:
license: http://opensource.org/licenses/gpl-license.php
+ repository: https://github.com/bestpractical/rt-extension-ticketlocking
version: '1.00'
x_module_install_rtx_version: '0.36'
x_requires_rt: 4.0.6
diff --git a/Makefile.PL b/Makefile.PL
index dd06631..b4cf61e 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,11 +1,14 @@
use inc::Module::Install;
RTx('RT-Extension-TicketLocking');
+repository('https://github.com/bestpractical/rt-extension-ticketlocking');
build_requires('Test::More');
requires_rt('4.0.6');
+no_index package => qw/RT::Ticket RT::User/;
+
my ($lib_path) = $INC{'RT.pm'} =~ /^(.*)[\\\/]/;
my $local_lib_path = "$RT::LocalPath/lib";
unshift @INC, $local_lib_path, $lib_path;
@@ -16,5 +19,5 @@ substitute( {
'xt/test_suite.pl',
);
-
+sign;
WriteAll();
diff --git a/po/fr.po b/po/fr.po
index 40d92dd..7222707 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,8 +6,8 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#. ($TicketLabel, $u_str, $ago)
#: html/Elements/ShowLock:47
+#. ($TicketLabel, $u_str, $ago)
msgid "%1 has been locked by %2 for %3"
msgstr "%1 a été verrouillé par %2 depuis %3"
@@ -39,8 +39,8 @@ msgstr "Ce ticket"
msgid "This ticket was not locked."
msgstr "Ce ticket n'a pas été verrouillé"
-#. ($Id)
#: html/Elements/ShowLock:26
+#. ($Id)
msgid "Ticket #%1"
msgstr "Ticket n°%1"
@@ -64,8 +64,8 @@ msgstr "Tout déverrouiller"
msgid "You cannot unlock a ticket locked by another user."
msgstr "Vous ne pouvez pas déverrouillé un tiket verrouillé par quelqu'un d'autre."
-#. ($TicketLabel, $ago)
#: html/Elements/ShowLock:31
+#. ($TicketLabel, $ago)
msgid "You had %1 locked for %2. It is now unlocked"
msgstr "Vous aviez %1 verrouillé depuis %2. Il est maintenant déverrouillé."
@@ -73,18 +73,18 @@ msgstr "Vous aviez %1 verrouillé depuis %2. Il est maintenant déverrouillé."
msgid "You have broken the lock on this ticket"
msgstr "Vous avez supprimer le verrou sur ce ticket"
-#. ($TicketLabel, $ago)
#: html/Elements/ShowLock:37
+#. ($TicketLabel, $ago)
msgid "You have had %1 locked for %2"
msgstr "Vous avez verrouillé %1 depuis %2"
-#. ($TicketLabel)
#: html/Elements/ShowLock:35
+#. ($TicketLabel)
msgid "You have locked %1"
msgstr "Vous avez verrouillé %1"
-#. ($duration)
#: lib/RT/Extension/TicketLocking.pm:356
+#. ($duration)
msgid "You have unlocked this ticket. It was locked for %1 seconds."
msgstr "Vous avez déverrouillé ce ticket. Il était verrouillé depuis %1 secondes."
diff --git a/po/ticketlocking.pot b/po/ticketlocking.pot
index bd0d36d..13f74d8 100644
--- a/po/ticketlocking.pot
+++ b/po/ticketlocking.pot
@@ -1,5 +1,8 @@
-#. ($TicketLabel, $u_str, $ago)
+msgid ""
+msgstr ""
+
#: html/Elements/ShowLock:47
+#. ($TicketLabel, $u_str, $ago)
msgid "%1 has been locked by %2 for %3"
msgstr ""
@@ -31,8 +34,8 @@ msgstr ""
msgid "This ticket was not locked."
msgstr ""
-#. ($Id)
#: html/Elements/ShowLock:26
+#. ($Id)
msgid "Ticket #%1"
msgstr ""
@@ -56,8 +59,8 @@ msgstr ""
msgid "You cannot unlock a ticket locked by another user."
msgstr ""
-#. ($TicketLabel, $ago)
#: html/Elements/ShowLock:31
+#. ($TicketLabel, $ago)
msgid "You had %1 locked for %2. It is now unlocked"
msgstr ""
@@ -65,18 +68,18 @@ msgstr ""
msgid "You have broken the lock on this ticket"
msgstr ""
-#. ($TicketLabel, $ago)
#: html/Elements/ShowLock:37
+#. ($TicketLabel, $ago)
msgid "You have had %1 locked for %2"
msgstr ""
-#. ($TicketLabel)
#: html/Elements/ShowLock:35
+#. ($TicketLabel)
msgid "You have locked %1"
msgstr ""
-#. ($duration)
#: lib/RT/Extension/TicketLocking.pm:356
+#. ($duration)
msgid "You have unlocked this ticket. It was locked for %1 seconds."
msgstr ""
commit 8d9fd4c0b6444d0be546f5e4407704a39f9c8435
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Jan 26 14:39:36 2015 -0500
Version 1.05 releng
diff --git a/Changes b/Changes
index bc5c22c..18d32eb 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+1.05 2015-02-26
+ - Packaging updates
+ - Localization, thanks to Emmanuel Lacour
+
1.00 2015-01-19
- Fix escaping in "locked by..."
- Bump dependency to 4.0 that contains l_unsafe
diff --git a/MANIFEST b/MANIFEST
index b616859..7066481 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -70,6 +70,8 @@ lib/RT/Extension/TicketLocking.pm
Makefile.PL
MANIFEST This list of files
META.yml
+po/fr.po
+po/ticketlocking.pot
README
xt/rt.t
xt/rtir.t
diff --git a/META.yml b/META.yml
index 2c2f9f9..b965962 100644
--- a/META.yml
+++ b/META.yml
@@ -19,6 +19,7 @@ no_index:
directory:
- html
- inc
+ - po
- xt
package:
- RT::Ticket
@@ -28,6 +29,6 @@ requires:
resources:
license: http://opensource.org/licenses/gpl-license.php
repository: https://github.com/bestpractical/rt-extension-ticketlocking
-version: '1.00'
+version: '1.05'
x_module_install_rtx_version: '0.36'
x_requires_rt: 4.0.6
diff --git a/lib/RT/Extension/TicketLocking.pm b/lib/RT/Extension/TicketLocking.pm
index 86b4cc4..e00cfd4 100644
--- a/lib/RT/Extension/TicketLocking.pm
+++ b/lib/RT/Extension/TicketLocking.pm
@@ -52,7 +52,7 @@ use warnings;
package RT::Extension::TicketLocking;
-our $VERSION = '1.00';
+our $VERSION = '1.05';
=head1 NAME
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list