Re: missing pot messages
Hiromi Kimura <[email protected]> Mon, 07 Apr 2014 13:58:18 +0900 (JST)
| Newsgroups | gmane.comp.horde.internationalization |
|---|---|
| Message-ID | <[email protected]> |
From: Hiromi Kimura <[email protected]> Subject: missing pot messages Date: Mon, 07 Apr 2014 10:17:45 +0900 (JST) > I cheked some applications which have missing pot messages, > and made patches. Please review them. > -=-=-=-=- > Hiromi Kimura, Tandem Accelerator Complex, University of Tsukuba, JAPAN Sorry, previous patches have incollect format characters. -=-=-=-=- Hiromi Kimura, Tandem Accelerator Complex, University of Tsukuba, JAPAN -- i18n mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]
kronolith-missmsg.diff
(text/x-patch, 19 KB)
--- kronolith/perms.php.orig 2014-04-04 08:30:19.000000000 +0900
+++ kronolith/perms.php 2014-04-06 20:42:04.000000000 +0900
@@ -18,7 +18,7 @@
// Exit if the user shouldn't be able to change share permissions.
if (!empty($conf['share']['no_sharing'])) {
- throw new Horde_Exception('Permission denied.');
+ throw new Horde_Exception(_("Permission denied."));
}
$shares = $injector->getInstance('Horde_Core_Factory_Share')->create();
@@ -51,7 +51,7 @@
(isset($share) &&
!$registry->isAdmin() &&
($registry->getAuth() != $share->get('owner')))) {
- throw new Horde_Exception('Permission denied.');
+ throw new Horde_Exception(_("Permission denied."));
}
break;
@@ -71,7 +71,7 @@
if (!$registry->getAuth() ||
(!$registry->isAdmin() &&
($registry->getAuth() != $share->get('owner')))) {
- throw new Horde_Exception('Permission denied.');
+ throw new Horde_Exception(_("Permission denied."));
}
try {
--- kronolith/lib/Api.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/Api.php 2014-04-06 20:43:11.000000000 +0900
@@ -282,14 +282,14 @@
$content_type = 'text/calendar';
}
} else {
- throw new Kronolith_Exception("Invalid calendar data supplied.");
+ throw new Kronolith_Exception(_("Invalid calendar data supplied."));
}
if (!Kronolith::hasPermission($calendar, Horde_Perms::EDIT)) {
// FIXME: Should we attempt to create a calendar based on the
// filename in the case that the requested calendar does not
// exist?
- throw new Kronolith_Exception("Calendar does not exist or no permission to edit");
+ throw new Kronolith_Exception(_("Calendar does not exist or no permission to edit"));
}
// Store all currently existings UIDs. Use this info to delete UIDs not
@@ -402,7 +402,7 @@
if (!(count($parts) == 2 || count($parts) == 3) ||
!Kronolith::hasPermission($calendarId, Horde_Perms::DELETE)) {
- throw new Kronolith_Exception("Calendar does not exist or no permission to delete");
+ throw new Kronolith_Exception(_("Calendar does not exist or no permission to delete"));
}
if (count($parts) == 3) {
--- kronolith/lib/Application.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/Application.php 2014-04-06 20:44:19.000000000 +0900
@@ -716,7 +716,7 @@
$internal = $dav->getInternalCollectionId($collection, 'calendar') ?: $collection;
if (!Kronolith::hasPermission($internal, Horde_Perms::READ)) {
- throw new Kronolith_Exception("Calendar does not exist or no permission to edit");
+ throw new Kronolith_Exception(_("Calendar does not exist or no permission to edit"));
}
$kronolith_driver = Kronolith::getDriver(null, $internal);
@@ -757,7 +757,7 @@
$internal = $dav->getInternalCollectionId($collection, 'calendar') ?: $collection;
if (!Kronolith::hasPermission($internal, Horde_Perms::READ)) {
- throw new Kronolith_Exception("Calendar does not exist or no permission to edit");
+ throw new Kronolith_Exception(_("Calendar does not exist or no permission to edit"));
}
$kronolith_driver = Kronolith::getDriver(null, $internal);
@@ -803,7 +803,7 @@
$internal = $dav->getInternalCollectionId($collection, 'calendar') ?: $collection;
if (!Kronolith::hasPermission($internal, Horde_Perms::EDIT)) {
- throw new Kronolith_Exception("Calendar does not exist or no permission to edit");
+ throw new Kronolith_Exception(_("Calendar does not exist or no permission to edit"));
}
$ical = new Horde_Icalendar();
@@ -867,7 +867,7 @@
$internal = $dav->getInternalCollectionId($collection, 'calendar') ?: $collection;
if (!Kronolith::hasPermission($internal, Horde_Perms::DELETE)) {
- throw new Kronolith_Exception("Calendar does not exist or no permission to delete");
+ throw new Kronolith_Exception(_("Calendar does not exist or no permission to delete"));
}
try {
--- kronolith/lib/Driver.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/Driver.php 2014-04-06 20:46:43.000000000 +0900
@@ -383,7 +383,7 @@
*/
public function exists($uid, $calendar_id = null)
{
- throw new Kronolith_Exception('Not supported');
+ throw new Kronolith_Exception(_("Not supported"));
}
/**
@@ -419,7 +419,7 @@
*/
protected function _move($eventId, $newCalendar)
{
- throw new Kronolith_Exception('Not supported');
+ throw new Kronolith_Exception(_("Not supported"));
}
/**
@@ -429,7 +429,7 @@
*/
public function delete($calendar)
{
- throw new Kronolith_Exception('Not supported');
+ throw new Kronolith_Exception(_("Not supported"));
}
/**
@@ -545,7 +545,7 @@
*/
public function filterEventsByCalendar($uids, $calendar)
{
- throw new Kronolith_Exception('Not supported');
+ throw new Kronolith_Exception(_("Not supported"));
}
/**
@@ -557,7 +557,7 @@
*/
public function removeUserData($user)
{
- throw new Kronolith_Exception('Deprecated.');
+ throw new Kronolith_Exception(_("Deprecated."));
}
/**
--- kronolith/lib/Event.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/Event.php 2014-04-06 20:48:05.000000000 +0900
@@ -535,7 +535,7 @@
if ($GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_CALENDARS, $this->calendar) !== false) {
return $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_CALENDARS, $this->calendar)->share();
}
- throw new Kronolith_Exception('Share not found');
+ throw new Kronolith_Exception(_("Share not found"));
}
/**
@@ -568,7 +568,7 @@
public function save()
{
if (!$this->initialized) {
- throw new Kronolith_Exception('Event not yet initialized');
+ throw new Kronolith_Exception(_("Event not yet initialized"));
}
/* Check for acceptance/denial of this event's resources. */
@@ -1448,7 +1448,7 @@
$originaldt->format('d'));
$originalEvent->save();
} catch (Horde_Exception_NotFound $e) {
- throw new Kronolith_Exception('Unable to locate original event series.');
+ throw new Kronolith_Exception(_("Unable to locate original event series."));
}
} catch (Horde_Icalendar_Exception $e) {}
}
--- kronolith/lib/Calendar/External.php.orig 2014-04-04 08:30:17.000000000 +0900
+++ kronolith/lib/Calendar/External.php 2014-04-06 20:49:07.000000000 +0900
@@ -50,13 +50,13 @@
public function __construct($params = array())
{
if (!isset($params['name'])) {
- throw new BadMethodCallException('name parameter is missing');
+ throw new BadMethodCallException(_("name parameter is missing"));
}
if (!isset($params['id'])) {
- throw new BadMethodCallException('id parameter is missing');
+ throw new BadMethodCallException(_("id parameter is missing"));
}
if (!isset($params['api'])) {
- throw new BadMethodCallException('api parameter is missing');
+ throw new BadMethodCallException(_("api parameter is missing"));
}
if (!empty($params['type'])) {
$this->_type = $params['type'];
--- kronolith/lib/Calendar/Holiday.php.orig 2014-04-04 08:30:17.000000000 +0900
+++ kronolith/lib/Calendar/Holiday.php 2014-04-06 20:49:48.000000000 +0900
@@ -30,7 +30,7 @@
public function __construct($params = array())
{
if (!isset($params['driver'])) {
- throw new BadMethodCallException('driver parameter is missing');
+ throw new BadMethodCallException(_("driver parameter is missing"));
}
parent::__construct($params);
}
--- kronolith/lib/Calendar/Internal.php.orig 2014-04-04 08:30:17.000000000 +0900
+++ kronolith/lib/Calendar/Internal.php 2014-04-06 20:50:34.000000000 +0900
@@ -31,10 +31,10 @@
public function __construct($params = array())
{
if (!isset($params['share'])) {
- throw new BadMethodCallException('share parameter is missing');
+ throw new BadMethodCallException(_("share parameter is missing"));
}
if (!($params['share'] instanceof Horde_Share_Object)) {
- throw new InvalidArgumentException('share parameter is not a Horde_Share_Object');
+ throw new InvalidArgumentException(_("share parameter is not a Horde_Share_Object"));
}
parent::__construct($params);
}
--- kronolith/lib/Calendar/Remote.php.orig 2014-04-04 08:30:17.000000000 +0900
+++ kronolith/lib/Calendar/Remote.php 2014-04-06 21:45:59.000000000 +0900
@@ -66,10 +66,10 @@
public function __construct($params = array())
{
if (!isset($params['url'])) {
- throw new BadMethodCallException('url parameter is missing');
+ throw new BadMethodCallException(_("url parameter is missing"));
}
if (!isset($params['name'])) {
- throw new BadMethodCallException('name parameter is missing');
+ throw new BadMethodCallException(_("name parameter is missing"));
}
$key = $GLOBALS['registry']->getAuthCredential('password');
if ($key) {
--- kronolith/lib/Calendar/Resource.php.orig 2014-04-04 08:30:17.000000000 +0900
+++ kronolith/lib/Calendar/Resource.php 2014-04-06 21:47:02.000000000 +0900
@@ -31,10 +31,10 @@
public function __construct($params = array())
{
if (!isset($params['resource'])) {
- throw new BadMethodCallException('resource parameter is missing.');
+ throw new BadMethodCallException(_("resource parameter is missing."));
}
if (!($params['resource'] instanceof Kronolith_Resource_Single)) {
- throw new InvalidArgumentException('resource parameter is not a Kronolith_Resource_Single object.');
+ throw new InvalidArgumentException(_("resource parameter is not a Kronolith_Resource_Single object."));
}
parent::__construct($params);
}
--- kronolith/lib/Calendar/ResourceGroup.php.orig 2014-04-04 08:30:17.000000000 +0900
+++ kronolith/lib/Calendar/ResourceGroup.php 2014-04-06 21:48:07.000000000 +0900
@@ -32,10 +32,10 @@
public function __construct($params = array())
{
if (!isset($params['resource'])) {
- throw new BadMethodCallException('resource parameter is missing.');
+ throw new BadMethodCallException(_("resource parameter is missing."));
}
if (!($params['resource'] instanceof Kronolith_Resource_Group)) {
- throw new InvalidArgumentException('resource parameter is not a Kronolith_Resource_Single object.');
+ throw new InvalidArgumentException(_("resource parameter is not a Kronolith_Resource_Single object."));
}
parent::__construct($params);
}
--- kronolith/lib/Calendars/Default.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/Calendars/Default.php 2014-04-07 13:48:57.000000000 +0900
@@ -27,7 +27,7 @@
public function __construct($shares, $user, $params)
{
if (!isset($params['identity'])) {
- throw new Kronolith_Exception('This calendars handler needs an "identity" parameter!');
+ throw new Kronolith_Exception(_("This calendars handler needs an \"identity\" parameter!"));
} else {
$this->_identity = $params['identity'];
unset($params['identity']);
@@ -44,4 +44,4 @@
{
return sprintf(_("Calendar of %s"), $this->_identity->getName());
}
-}
\ No newline at end of file
+}
--- kronolith/lib/Driver/Kolab.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/Driver/Kolab.php 2014-04-06 21:56:53.000000000 +0900
@@ -48,7 +48,7 @@
public function initialize()
{
if (empty($this->_params['storage'])) {
- throw new InvalidArgumentException('Missing required Horde_Kolab_Storage instance');
+ throw new InvalidArgumentException(_("Missing required Horde_Kolab_Storage instance"));
}
$this->_kolab = $this->_params['storage'];
$this->reset();
@@ -189,7 +189,7 @@
// Log error if someone uses this function in an unsupported way
if ($calendar_id != $this->calendar) {
Horde::log(sprintf("Kolab::exists called for calendar %s. Currently active is %s.", $calendar_id, $this->calendar), 'ERR');
- throw new Kronolith_Exception(sprintf("Kolab::exists called for calendar %s. Currently active is %s.", $calendar_id, $this->calendar));
+ throw new Kronolith_Exception(sprintf(_("Kolab::exists called for calendar %s. Currently active is %s."), $calendar_id, $this->calendar));
}
$this->synchronize();
--- kronolith/lib/Driver/Sql.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/Driver/Sql.php 2014-04-07 09:59:44.000000000 +0900
@@ -519,7 +519,7 @@
throw new Kronolith_Exception($e);
}
if (!count($events)) {
- throw new Horde_Exception_NotFound($uid . ' not found');
+ throw new Horde_Exception_NotFound(sprintf(_("%s not found"), $uid));
}
$eventArray = array();
--- kronolith/lib/Factory/Driver.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/Factory/Driver.php 2014-04-06 21:55:05.000000000 +0900
@@ -103,7 +103,7 @@
break;
default:
- throw new Kronolith_Exception('No calendar driver specified');
+ throw new Kronolith_Exception(_("No calendar driver specified"));
break;
}
--- kronolith/lib/Factory/Geo.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/Factory/Geo.php 2014-04-06 21:57:43.000000000 +0900
@@ -16,7 +16,7 @@
public function create(Horde_Injector $injector)
{
if (empty($GLOBALS['conf']['maps']['geodriver'])) {
- throw new Kronolith_Exception('Geospatial support not configured.');
+ throw new Kronolith_Exception(_("Geospatial support not configured."));
}
$class = 'Kronolith_Geo_' . $GLOBALS['conf']['maps']['geodriver'];
--- kronolith/lib/Resource/Base.php.orig 2014-04-04 08:30:17.000000000 +0900
+++ kronolith/lib/Resource/Base.php 2014-04-06 21:59:03.000000000 +0900
@@ -51,7 +51,7 @@
// Names are required.
if (empty($params['name'])) {
- throw new Horde_Exception('Required \'name\' attribute missing from resource calendar');
+ throw new Horde_Exception(_("Required \'name\' attribute missing from resource calendar"));
}
$this->_params = array_merge(
array('description' => '',
@@ -120,7 +120,7 @@
return ($this instanceof Kronolith_Resource_Single) ? 'Single' : 'Group';
}
if (!array_key_exists($property, $this->_params)) {
- throw new Horde_Exception(sprintf('The property \'%s\' does not exist', $property));
+ throw new Horde_Exception(sprintf(_("The property \'%s\' does not exist"), $property));
}
return $this->_params[$property];
}
--- kronolith/lib/Resource/Group.php.orig 2014-04-04 08:30:17.000000000 +0900
+++ kronolith/lib/Resource/Group.php 2014-04-06 22:00:16.000000000 +0900
@@ -158,7 +158,7 @@
if (!empty($this->_selectedResource)) {
$this->_selectedResource->addEvent($event);
} else {
- throw new Kronolith_Exception('Events should be added to the Single resource object, not directly to the Group object.');
+ throw new Kronolith_Exception(_("Events should be added to the Single resource object, not directly to the Group object."));
}
}
@@ -171,7 +171,7 @@
*/
public function removeEvent(Kronolith_Event $event)
{
- throw new Kronolith_Exception('Unsupported');
+ throw new Kronolith_Exception(_("Unsupported"));
}
/**
@@ -181,7 +181,7 @@
*/
public function getFreeBusy($startstamp = null, $endstamp = null, $asObject = false, $json = false)
{
- throw new Kronolith_Exception('Unsupported');
+ throw new Kronolith_Exception(_("Unsupported"));
}
/**
@@ -196,7 +196,7 @@
if (empty($this->_id)) {
$this->_id = $id;
} else {
- throw new Kronolith_Exception('Resource already exists. Cannot change the id.');
+ throw new Kronolith_Exception(_("Resource already exists. Cannot change the id."));
}
}
@@ -210,4 +210,4 @@
return Kronolith_Resource::RESPONSETYPE_AUTO;
}
-}
\ No newline at end of file
+}
--- kronolith/lib/Resource/Single.php.orig 2014-04-04 08:30:17.000000000 +0900
+++ kronolith/lib/Resource/Single.php 2014-04-06 22:00:56.000000000 +0900
@@ -129,7 +129,7 @@
if (empty($this->_id)) {
$this->_id = $id;
} else {
- throw new Kronolith_Exception('Resource already exists. Cannot change the id.');
+ throw new Kronolith_Exception(_("Resource already exists. Cannot change the id."));
}
}
@@ -177,4 +177,4 @@
$to->creator = $from->creator;
}
-}
\ No newline at end of file
+}
--- kronolith/lib/Storage/Sql.php.orig 2014-04-04 08:30:17.000000000 +0900
+++ kronolith/lib/Storage/Sql.php 2014-04-06 22:01:42.000000000 +0900
@@ -34,7 +34,7 @@
{
$this->_user = $user;
if (empty($params['db'])) {
- throw new InvalidArgumentException('Missing required db parameter');
+ throw new InvalidArgumentException(_("Missing required db parameter"));
}
$this->_db = $params['db'];
--- kronolith/lib/View/DeleteEvent.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/View/DeleteEvent.php 2014-04-06 22:02:39.000000000 +0900
@@ -28,7 +28,7 @@
case 'event':
return $this->_event;
default:
- throw new Kronolith_Exception('Property does not exist.');
+ throw new Kronolith_Exception(_("Property does not exist."));
}
}
--- kronolith/lib/View/EditEvent.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/View/EditEvent.php 2014-04-06 22:03:00.000000000 +0900
@@ -29,7 +29,7 @@
case 'event':
return $this->_event;
default:
- throw new Kronolith_Exception('Property does not exist.');
+ throw new Kronolith_Exception(_("Property does not exist."));
}
}
--- kronolith/lib/View/Event.php.orig 2014-04-04 08:30:18.000000000 +0900
+++ kronolith/lib/View/Event.php 2014-04-06 22:03:21.000000000 +0900
@@ -28,7 +28,7 @@
case 'event':
return $this->_event;
default:
- throw new Kronolith_Exception('Property does not exist.');
+ throw new Kronolith_Exception(_("Property does not exist."));
}
}
nag-missmsg.diff
(text/x-patch, 1.6 KB)
--- nag/lib/Driver/Sql.php.orig 2014-04-04 08:30:20.000000000 +0900
+++ nag/lib/Driver/Sql.php 2014-04-07 08:30:22.000000000 +0900
@@ -81,7 +81,7 @@
$values = array($taskIds);
} else {
if (empty($taskIds)) {
- throw new InvalidArgumentException('Must specify at least one task id');
+ throw new InvalidArgumentException(_("Must specify at least one task id"));
}
$query = sprintf('SELECT * FROM %s WHERE ' . $column . ' IN ('
. implode(',', array_fill(0, count($taskIds), '?')) . ')',
@@ -96,7 +96,7 @@
throw new Nag_Exception($e);
}
if (!$rows) {
- throw new Horde_Exception_NotFound("Tasks not found");
+ throw new Horde_Exception_NotFound(_("Tasks not found"));
}
if (!is_array($taskIds)) {
--- nag/lib/Tasklists/Default.php.orig 2014-04-04 08:30:20.000000000 +0900
+++ nag/lib/Tasklists/Default.php 2014-04-07 13:45:30.000000000 +0900
@@ -27,7 +27,7 @@
public function __construct($shares, $user, $params)
{
if (!isset($params['identity'])) {
- throw new Nag_Exception('This tasklist handler needs an "identity" parameter!');
+ throw new Nag_Exception(_("This tasklist handler needs an \"identity\" parameter!"));
} else {
$this->_identity = $params['identity'];
unset($params['identity']);
@@ -44,4 +44,4 @@
{
return sprintf(_("Task list of %s"), $this->_identity->getName());
}
-}
\ No newline at end of file
+}
mnemo-missmsg.diff
(text/x-patch, 3.1 KB)
--- mnemo/lib/Api.php.orig 2014-04-06 22:03:45.000000000 +0900
+++ mnemo/lib/Api.php 2014-04-06 22:04:40.000000000 +0900
@@ -61,7 +61,7 @@
global $conf;
if (!isset($conf['storage']['driver'])) {
- throw new Mnemo_Exception('Not configured');
+ throw new Mnemo_Exception(_("Not configured"));
}
// Make sure we have a valid notepad.
--- mnemo/lib/Driver/Kolab.php.orig 2014-04-04 08:30:14.000000000 +0900
+++ mnemo/lib/Driver/Kolab.php 2014-04-07 09:45:28.000000000 +0900
@@ -40,7 +40,7 @@
public function __construct($notepad, $params = array())
{
if (empty($params['storage'])) {
- throw new InvalidArgumentException('Missing required storage handler.');
+ throw new InvalidArgumentException(_("Missing required storage handler."));
}
$this->_notepad = $notepad;
$this->_kolab = $params['storage'];
@@ -257,7 +257,7 @@
{
if (empty($this->_notepad)) {
throw new Mnemo_Exception(
- 'The notepad has been left undefined but is required!'
+ _("The notepad has been left undefined but is required!")
);
}
if ($this->_data === null) {
@@ -283,7 +283,7 @@
} catch (Horde_Kolab_Storage_Exception $e) {
throw new Mnemo_Exception(
sprintf(
- 'Failed retrieving Kolab data for notepad %s: %s',
+ _("Failed retrieving Kolab data for notepad %s: %s"),
$notepad,
$e->getMessage()
)
--- mnemo/lib/Driver/Sql.php.orig 2014-04-04 08:30:14.000000000 +0900
+++ mnemo/lib/Driver/Sql.php 2014-04-06 22:07:27.000000000 +0900
@@ -53,7 +53,7 @@
public function __construct($notepad, $params = array())
{
if (empty($params['db']) || empty($params['table'])) {
- throw new InvalidArgumentException('Missing required connection parameter(s).');
+ throw new InvalidArgumentException(_("Missing required connection parameter(s)."));
}
$this->_notepad = $notepad;
$this->_db = $params['db'];
@@ -137,7 +137,7 @@
}
if (!count($row)) {
- throw new Horde_Exception_NotFound('Not found');
+ throw new Horde_Exception_NotFound(_("Not found"));
}
$this->_notepad = $row['memo_owner'];
--- mnemo/lib/Notepads/Default.php.orig 2014-04-04 08:30:14.000000000 +0900
+++ mnemo/lib/Notepads/Default.php 2014-04-07 13:46:16.000000000 +0900
@@ -46,7 +46,7 @@
public function __construct($shares, $user, $params)
{
if (!isset($params['identity'])) {
- throw new Mnemo_Exception('This notepad handler needs an "identity" parameter!');
+ throw new Mnemo_Exception(_("This notepad handler needs an \"identity\" parameter!"));
} else {
$this->_identity = $params['identity'];
unset($params['identity']);
@@ -63,4 +63,4 @@
{
return sprintf(_("Notepad of %s"), $this->_identity->getName());
}
-}
\ No newline at end of file
+}