Commit 5d1ecf9e authored by sikeda's avatar sikeda
Browse files

[dev] Small refactoring. Sympa::List::get_option_title() was moved to Sympa::ListOpt::get_title().


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12595 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 26ed39a9
......@@ -63,6 +63,7 @@ use Sympa::Family;
use Sympa::HTMLSanitizer;
use Sympa::Language;
use Sympa::List;
use Sympa::ListOpt;
use Sympa::Log;
use Sympa::Marc::Search;
use Sympa::Message;
......@@ -6272,7 +6273,7 @@ sub do_suboptions {
 
foreach $m ($list->available_reception_mode) {
$param->{'reception'}{$m}{'description'} =
$list->get_option_title($m, 'reception');
Sympa::ListOpt::get_title($m, 'reception');
if ($s->{'reception'} eq $m) {
$param->{'reception'}{$m}{'selected'} = ' selected';
if ($m =~ /^(mail|notice|not_me|txt|html|urlize)$/i) {
......@@ -6285,7 +6286,7 @@ sub do_suboptions {
 
foreach $m (qw(conceal noconceal)) {
$param->{'visibility'}{$m}{'description'} =
$list->get_option_title($m, 'visibility');
Sympa::ListOpt::get_title($m, 'visibility');
if ($s->{'visibility'} eq $m) {
$param->{'visibility'}{$m}{'selected'} = ' selected';
} else {
......@@ -11326,7 +11327,7 @@ sub do_editsubscriber {
 
foreach my $m ($list->available_reception_mode) {
$param->{'reception'}{$m}{'description'} =
$list->get_option_title($m, 'reception');
Sympa::ListOpt::get_title($m, 'reception');
if ($param->{'current_subscriber'}{'reception'} eq $m) {
$param->{'reception'}{$m}{'selected'} = ' selected';
} else {
......@@ -11336,7 +11337,7 @@ sub do_editsubscriber {
 
foreach my $m (qw(conceal noconceal)) {
$param->{'visibility'}{$m}{'description'} =
$list->get_option_title($m, 'visibility');
Sympa::ListOpt::get_title($m, 'visibility');
if ($param->{'current_subscriber'}{'visibility'} eq $m) {
$param->{'visibility'}{$m}{'selected'} = ' selected';
} else {
......@@ -13018,7 +13019,7 @@ sub _prepare_edit_form {
foreach my $v (@{$p->{'value'}}) {
if ($v->{'name'} eq 'reception') {
foreach my $x (keys %{$v->{'value'}}) {
$v->{'value'}{$x}{'title'} = $list->get_option_title(
$v->{'value'}{$x}{'title'} = Sympa::ListOpt::get_title(
$x,
'reception',
Sympa::is_listmaster(
......@@ -13028,7 +13029,7 @@ sub _prepare_edit_form {
}
} elsif ($v->{'name'} eq 'visibility') {
foreach my $x (keys %{$v->{'value'}}) {
$v->{'value'}{$x}{'title'} = $list->get_option_title(
$v->{'value'}{$x}{'title'} = Sympa::ListOpt::get_title(
$x,
'visibility',
Sympa::is_listmaster(
......@@ -13041,7 +13042,7 @@ sub _prepare_edit_form {
} elsif ($pname eq 'status') {
foreach my $x (keys %{$p->{'value'}}) {
$p->{'value'}{$x}{'title'} =
$list->get_option_title($x, 'status',
Sympa::ListOpt::get_title($x, 'status',
Sympa::is_listmaster($list, $param->{'user'}{'email'}));
}
}
......@@ -20932,7 +20933,7 @@ sub _set_my_lists_info {
$member_info->{'visibility'} ||= 'noconceal';
foreach my $mode ($list->available_reception_mode) {
$param->{'reception'}{$list->{'name'}}{$mode}{'description'} =
$list->get_option_title($mode, 'reception');
Sympa::ListOpt::get_title($mode, 'reception');
if ($member_info->{'reception'} eq $mode) {
$param->{'reception'}{$list->{'name'}}{$mode}
{'selected'} = ' selected';
......
......@@ -57,6 +57,7 @@ nobase_modules_DATA = \
Sympa/Language.pm \
Sympa/List.pm \
Sympa/ListDef.pm \
Sympa/ListOpt.pm \
Sympa/LockedFile.pm \
Sympa/Log.pm \
Sympa/Mailer.pm \
......
......@@ -303,226 +303,7 @@ foreach my $t (qw(subscriber_table admin_table)) {
}
}
## List parameter values except for parameters below.
my %list_option = (
# reply_to_header.apply
'forced' => {'gettext_id' => 'overwrite Reply-To: header field'},
'respect' => {'gettext_id' => 'preserve existing header field'},
# reply_to_header.value
'sender' => {'gettext_id' => 'sender'},
# reply_to_header.value, include_remote_sympa_list.cert
'list' => {'gettext_id' => 'list'},
# include_ldap_2level_query.select2, include_ldap_2level_query.select1,
# include_ldap_query.select, reply_to_header.value, dmarc_protection.mode
'all' => {'gettext_id' => 'all'},
# reply_to_header.value
'other_email' => {'gettext_id' => 'other email address'},
# msg_topic_keywords_apply_on
'subject' => {'gettext_id' => 'subject field'},
'body' => {'gettext_id' => 'message body'},
'subject_and_body' => {'gettext_id' => 'subject and body'},
# bouncers_level2.notification, bouncers_level2.action,
# bouncers_level1.notification, bouncers_level1.action,
# spam_protection, dkim_signature_apply_on, web_archive_spam_protection,
# dmarc_protection.mode
'none' => {'gettext_id' => 'do nothing'},
# bouncers_level2.notification, bouncers_level1.notification,
# welcome_return_path, remind_return_path, rfc2369_header_fields,
# archive.mail_access
'owner' => {'gettext_id' => 'owner'},
# bouncers_level2.notification, bouncers_level1.notification
'listmaster' => {'gettext_id' => 'listmaster'},
# bouncers_level2.action, bouncers_level1.action
'remove_bouncers' => {'gettext_id' => 'remove bouncing users'},
'notify_bouncers' => {'gettext_id' => 'send notify to bouncing users'},
# pictures_feature, dkim_feature, merge_feature,
# inclusion_notification_feature, tracking.delivery_status_notification,
# tracking.message_disposition_notification
'on' => {'gettext_id' => 'enabled'},
'off' => {'gettext_id' => 'disabled'},
# include_remote_sympa_list.cert
'robot' => {'gettext_id' => 'robot'},
# include_ldap_2level_query.select2, include_ldap_2level_query.select1,
# include_ldap_query.select
'first' => {'gettext_id' => 'first entry'},
# include_ldap_2level_query.select2, include_ldap_2level_query.select1
'regex' => {'gettext_id' => 'entries matching regular expression'},
# include_ldap_2level_query.scope2, include_ldap_2level_query.scope1,
# include_ldap_query.scope
'base' => {'gettext_id' => 'base'},
'one' => {'gettext_id' => 'one level'},
'sub' => {'gettext_id' => 'subtree'},
# include_ldap_2level_query.use_ssl, include_ldap_query.use_ssl
'yes' => {'gettext_id' => 'yes'},
'no' => {'gettext_id' => 'no'},
# include_ldap_2level_query.ssl_version, include_ldap_query.ssl_version
'sslv2' => {'gettext_id' => 'SSL version 2'},
'sslv3' => {'gettext_id' => 'SSL version 3'},
'tlsv1' => {'gettext_id' => 'TLS version 1'},
'tlsv1_1' => {'gettext_id' => 'TLS version 1.1'},
'tlsv1_2' => {'gettext_id' => 'TLS version 1.2'},
# editor.reception, owner_include.reception, owner.reception,
# editor_include.reception
'mail' => {'gettext_id' => 'receive notification email'},
'nomail' => {'gettext_id' => 'no notifications'},
# editor.visibility, owner_include.visibility, owner.visibility,
# editor_include.visibility
'conceal' => {'gettext_id' => 'concealed from list menu'},
'noconceal' => {'gettext_id' => 'listed on the list menu'},
# welcome_return_path, remind_return_path
'unique' => {'gettext_id' => 'bounce management'},
# owner_include.profile, owner.profile
'privileged' => {'gettext_id' => 'privileged owner'},
'normal' => {'gettext_id' => 'normal owner'},
# priority
'0' => {'gettext_id' => '0 - highest priority'},
'9' => {'gettext_id' => '9 - lowest priority'},
'z' => {'gettext_id' => 'queue messages only'},
# spam_protection, web_archive_spam_protection
'at' => {'gettext_id' => 'replace @ characters'},
'javascript' => {'gettext_id' => 'use JavaScript'},
# msg_topic_tagging
'required_sender' => {'gettext_id' => 'required to post message'},
'required_moderator' =>
{'gettext_id' => 'required to distribute message'},
# msg_topic_tagging, custom_attribute.optional
'optional' => {'gettext_id' => 'optional'},
# custom_attribute.optional
'required' => {'gettext_id' => 'required'},
# custom_attribute.type
'string' => {'gettext_id' => 'string'},
'text' => {'gettext_id' => 'multi-line text'},
'integer' => {'gettext_id' => 'number'},
'enum' => {'gettext_id' => 'set of keywords'},
# footer_type
'mime' => {'gettext_id' => 'add a new MIME part'},
'append' => {'gettext_id' => 'append to message body'},
# archive.mail_access
'open' => {'gettext_id' => 'open'},
'closed' => {'gettext_id' => 'closed'},
'private' => {'gettext_id' => 'subscribers only'},
'public' => {'gettext_id' => 'public'},
## ## user_data_source
## 'database' => {'gettext_id' => 'RDBMS'},
## 'file' => {'gettext_id' => 'include from local file'},
## 'include' => {'gettext_id' => 'include from external source'},
## 'include2' => {'gettext_id' => 'general datasource'},
# rfc2369_header_fields
'help' => {'gettext_id' => 'help'},
'subscribe' => {'gettext_id' => 'subscription'},
'unsubscribe' => {'gettext_id' => 'unsubscription'},
'post' => {'gettext_id' => 'posting address'},
'archive' => {'gettext_id' => 'list archive'},
# dkim_signature_apply_on
'md5_authenticated_messages' =>
{'gettext_id' => 'authenticated by password'},
'smime_authenticated_messages' =>
{'gettext_id' => 'authenticated by S/MIME signature'},
'dkim_authenticated_messages' =>
{'gettext_id' => 'authenticated by DKIM signature'},
'editor_validated_messages' => {'gettext_id' => 'approved by editor'},
'any' => {'gettext_id' => 'any messages'},
# archive.period
'day' => {'gettext_id' => 'daily'},
'week' => {'gettext_id' => 'weekly'},
'month' => {'gettext_id' => 'monthly'},
'quarter' => {'gettext_id' => 'quarterly'},
'year' => {'gettext_id' => 'yearly'},
# web_archive_spam_protection
'cookie' => {'gettext_id' => 'use HTTP cookie'},
# verp_rate
'100%' => {'gettext_id' => '100% - always'},
'0%' => {'gettext_id' => '0% - never'},
# archive_crypted_msg
'original' => {'gettext_id' => 'original messages'},
'decrypted' => {'gettext_id' => 'decrypted messages'},
# tracking.message_disposition_notification
'on_demand' => {'gettext_id' => 'on demand'},
# dmarc_protection.mode
'dkim_signature' => {'gettext_id' => 'DKIM signature exists'},
'dmarc_any' => {'gettext_id' => 'DMARC policy exists'},
'dmarc_reject' => {'gettext_id' => 'DMARC policy suggests rejection'},
'dmarc_quarantine' =>
{'gettext_id' => 'DMARC policy suggests quarantine'},
'domain_regex' => {'gettext_id' => 'domain matching regular expression'},
# dmarc_protection.phrase
'display_name' => {'gettext_id' => '"Name"'},
'name_and_email' => {'gettext_id' => '"Name" (e-mail)'},
'name_via_list' => {'gettext_id' => '"Name" (via List)'},
'name_email_via_list' => {'gettext_id' => '"Name" (e-mail via List)'},
'list_for_email' => {'gettext_id' => '"List" (on behalf of e-mail)'},
'list_for_name' => {'gettext_id' => '"List" (on behalf of Name)'},
);
## Values for subscriber reception mode.
my %reception_mode = (
'mail' => {'gettext_id' => 'standard (direct reception)'},
'digest' => {'gettext_id' => 'digest MIME format'},
'digestplain' => {'gettext_id' => 'digest plain text format'},
'summary' => {'gettext_id' => 'summary mode'},
'notice' => {'gettext_id' => 'notice mode'},
'txt' => {'gettext_id' => 'text-only mode'},
'html' => {'gettext_id' => 'html-only mode'},
'urlize' => {'gettext_id' => 'urlize mode'},
'nomail' => {'gettext_id' => 'no mail'},
'not_me' => {'gettext_id' => 'you do not receive your own posts'}
);
## Values for subscriber visibility mode.
my %visibility_mode = (
'noconceal' => {'gettext_id' => 'listed in the list review page'},
'conceal' => {'gettext_id' => 'concealed'}
);
## Values for list status.
my %list_status = (
'open' => {'gettext_id' => 'in operation'},
'pending' => {'gettext_id' => 'list not yet activated'},
'error_config' => {'gettext_id' => 'erroneous configuration'},
'family_closed' => {'gettext_id' => 'closed family instance'},
'closed' => {'gettext_id' => 'closed list'},
);
## This is the generic hash which keeps all lists in memory.
# This is the generic hash which keeps all lists in memory.
my %list_of_lists = ();
my %list_of_robots = ();
my %edit_list_conf = ();
......@@ -9914,32 +9695,8 @@ sub _flush_list_db {
}
}
##
## Method for UI
##
sub get_option_title {
my $self = shift;
my $option = shift;
my $type = shift || '';
my $withval = shift || 0;
my $map = {
'reception' => \%reception_mode,
'visibility' => \%visibility_mode,
'status' => \%list_status,
}->{$type}
|| \%list_option;
my $t = $map->{$option} || {};
if ($t->{'gettext_id'}) {
my $ret = $language->gettext($t->{'gettext_id'});
$ret =~ s/^\s+//;
$ret =~ s/\s+$//;
return sprintf '%s (%s)', $ret, $option if $withval;
return $ret;
}
return $option;
}
# Moved to Sympa::ListOpt::get_title().
#sub get_option_title;
=head2 Pluggin data-sources
......
# -*- indent-tabs-mode: nil; -*-
# vim:ft=perl:et:sw=4
# $Id$
# Sympa - SYsteme de Multi-Postage Automatique
#
# Copyright (c) 1997, 1998, 1999 Institut Pasteur & Christophe Wolfhugel
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
# Copyright (c) 2011, 2012, 2013, 2014, 2015 GIP RENATER
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
package Sympa::ListOpt;
use strict;
use warnings;
use Sympa::Language;
my $language = Sympa::Language->instance;
# List parameter values except for parameters below.
my %list_option = (
# reply_to_header.apply
'forced' => {'gettext_id' => 'overwrite Reply-To: header field'},
'respect' => {'gettext_id' => 'preserve existing header field'},
# reply_to_header.value
'sender' => {'gettext_id' => 'sender'},
# reply_to_header.value, include_remote_sympa_list.cert
'list' => {'gettext_id' => 'list'},
# include_ldap_2level_query.select2, include_ldap_2level_query.select1,
# include_ldap_query.select, reply_to_header.value, dmarc_protection.mode
'all' => {'gettext_id' => 'all'},
# reply_to_header.value
'other_email' => {'gettext_id' => 'other email address'},
# msg_topic_keywords_apply_on
'subject' => {'gettext_id' => 'subject field'},
'body' => {'gettext_id' => 'message body'},
'subject_and_body' => {'gettext_id' => 'subject and body'},
# bouncers_level2.notification, bouncers_level2.action,
# bouncers_level1.notification, bouncers_level1.action,
# spam_protection, dkim_signature_apply_on, web_archive_spam_protection,
# dmarc_protection.mode
'none' => {'gettext_id' => 'do nothing'},
# bouncers_level2.notification, bouncers_level1.notification,
# welcome_return_path, remind_return_path, rfc2369_header_fields,
# archive.mail_access
'owner' => {'gettext_id' => 'owner'},
# bouncers_level2.notification, bouncers_level1.notification
'listmaster' => {'gettext_id' => 'listmaster'},
# bouncers_level2.action, bouncers_level1.action
'remove_bouncers' => {'gettext_id' => 'remove bouncing users'},
'notify_bouncers' => {'gettext_id' => 'send notify to bouncing users'},
# pictures_feature, dkim_feature, merge_feature,
# inclusion_notification_feature, tracking.delivery_status_notification,
# tracking.message_disposition_notification
'on' => {'gettext_id' => 'enabled'},
'off' => {'gettext_id' => 'disabled'},
# include_remote_sympa_list.cert
'robot' => {'gettext_id' => 'robot'},
# include_ldap_2level_query.select2, include_ldap_2level_query.select1,
# include_ldap_query.select
'first' => {'gettext_id' => 'first entry'},
# include_ldap_2level_query.select2, include_ldap_2level_query.select1
'regex' => {'gettext_id' => 'entries matching regular expression'},
# include_ldap_2level_query.scope2, include_ldap_2level_query.scope1,
# include_ldap_query.scope
'base' => {'gettext_id' => 'base'},
'one' => {'gettext_id' => 'one level'},
'sub' => {'gettext_id' => 'subtree'},
# include_ldap_2level_query.use_ssl, include_ldap_query.use_ssl
'yes' => {'gettext_id' => 'yes'},
'no' => {'gettext_id' => 'no'},
# include_ldap_2level_query.ssl_version, include_ldap_query.ssl_version
'sslv2' => {'gettext_id' => 'SSL version 2'},
'sslv3' => {'gettext_id' => 'SSL version 3'},
'tlsv1' => {'gettext_id' => 'TLS version 1'},
'tlsv1_1' => {'gettext_id' => 'TLS version 1.1'},
'tlsv1_2' => {'gettext_id' => 'TLS version 1.2'},
# editor.reception, owner_include.reception, owner.reception,
# editor_include.reception
'mail' => {'gettext_id' => 'receive notification email'},
'nomail' => {'gettext_id' => 'no notifications'},
# editor.visibility, owner_include.visibility, owner.visibility,
# editor_include.visibility
'conceal' => {'gettext_id' => 'concealed from list menu'},
'noconceal' => {'gettext_id' => 'listed on the list menu'},
# welcome_return_path, remind_return_path
'unique' => {'gettext_id' => 'bounce management'},
# owner_include.profile, owner.profile
'privileged' => {'gettext_id' => 'privileged owner'},
'normal' => {'gettext_id' => 'normal owner'},
# priority
'0' => {'gettext_id' => '0 - highest priority'},
'9' => {'gettext_id' => '9 - lowest priority'},
'z' => {'gettext_id' => 'queue messages only'},
# spam_protection, web_archive_spam_protection
'at' => {'gettext_id' => 'replace @ characters'},
'javascript' => {'gettext_id' => 'use JavaScript'},
# msg_topic_tagging
'required_sender' => {'gettext_id' => 'required to post message'},
'required_moderator' =>
{'gettext_id' => 'required to distribute message'},
# msg_topic_tagging, custom_attribute.optional
'optional' => {'gettext_id' => 'optional'},
# custom_attribute.optional
'required' => {'gettext_id' => 'required'},
# custom_attribute.type
'string' => {'gettext_id' => 'string'},
'text' => {'gettext_id' => 'multi-line text'},
'integer' => {'gettext_id' => 'number'},
'enum' => {'gettext_id' => 'set of keywords'},
# footer_type
'mime' => {'gettext_id' => 'add a new MIME part'},
'append' => {'gettext_id' => 'append to message body'},
# archive.mail_access
'open' => {'gettext_id' => 'open'},
'closed' => {'gettext_id' => 'closed'},
'private' => {'gettext_id' => 'subscribers only'},
'public' => {'gettext_id' => 'public'},
## ## user_data_source
## 'database' => {'gettext_id' => 'RDBMS'},
## 'file' => {'gettext_id' => 'include from local file'},
## 'include' => {'gettext_id' => 'include from external source'},
## 'include2' => {'gettext_id' => 'general datasource'},
# rfc2369_header_fields
'help' => {'gettext_id' => 'help'},
'subscribe' => {'gettext_id' => 'subscription'},
'unsubscribe' => {'gettext_id' => 'unsubscription'},
'post' => {'gettext_id' => 'posting address'},
'archive' => {'gettext_id' => 'list archive'},
# dkim_signature_apply_on
'md5_authenticated_messages' =>
{'gettext_id' => 'authenticated by password'},
'smime_authenticated_messages' =>
{'gettext_id' => 'authenticated by S/MIME signature'},
'dkim_authenticated_messages' =>
{'gettext_id' => 'authenticated by DKIM signature'},
'editor_validated_messages' => {'gettext_id' => 'approved by editor'},
'any' => {'gettext_id' => 'any messages'},
# archive.period
'day' => {'gettext_id' => 'daily'},
'week' => {'gettext_id' => 'weekly'},
'month' => {'gettext_id' => 'monthly'},
'quarter' => {'gettext_id' => 'quarterly'},
'year' => {'gettext_id' => 'yearly'},
# web_archive_spam_protection
'cookie' => {'gettext_id' => 'use HTTP cookie'},
# verp_rate
'100%' => {'gettext_id' => '100% - always'},
'0%' => {'gettext_id' => '0% - never'},
# archive_crypted_msg
'original' => {'gettext_id' => 'original messages'},
'decrypted' => {'gettext_id' => 'decrypted messages'},
# tracking.message_disposition_notification
'on_demand' => {'gettext_id' => 'on demand'},
# dmarc_protection.mode
'dkim_signature' => {'gettext_id' => 'DKIM signature exists'},
'dmarc_any' => {'gettext_id' => 'DMARC policy exists'},
'dmarc_reject' => {'gettext_id' => 'DMARC policy suggests rejection'},
'dmarc_quarantine' =>
{'gettext_id' => 'DMARC policy suggests quarantine'},
'domain_regex' => {'gettext_id' => 'domain matching regular expression'},
# dmarc_protection.phrase
'display_name' => {'gettext_id' => '"Name"'},
'name_and_email' => {'gettext_id' => '"Name" (e-mail)'},
'name_via_list' => {'gettext_id' => '"Name" (via List)'},
'name_email_via_list' => {'gettext_id' => '"Name" (e-mail via List)'},
'list_for_email' => {'gettext_id' => '"List" (on behalf of e-mail)'},
'list_for_name' => {'gettext_id' => '"List" (on behalf of Name)'},
);
# Values for subscriber reception mode.
my %reception_mode = (
'mail' => {'gettext_id' => 'standard (direct reception)'},
'digest' => {'gettext_id' => 'digest MIME format'},
'digestplain' => {'gettext_id' => 'digest plain text format'},
'summary' => {'gettext_id' => 'summary mode'},
'notice' => {'gettext_id' => 'notice mode'},
'txt' => {'gettext_id' => 'text-only mode'},
'html' => {'gettext_id' => 'html-only mode'},
'urlize' => {'gettext_id' => 'urlize mode'},
'nomail' => {'gettext_id' => 'no mail'},
'not_me' => {'gettext_id' => 'you do not receive your own posts'}
);
# Values for subscriber visibility mode.
my %visibility_mode = (
'noconceal' => {'gettext_id' => 'listed in the list review page'},
'conceal' => {'gettext_id' => 'concealed'}
);
# Values for list status.
my %list_status = (
'open' => {'gettext_id' => 'in operation'},
'pending' => {'gettext_id' => 'list not yet activated'},
'error_config' => {'gettext_id' => 'erroneous configuration'},
'family_closed' => {'gettext_id' => 'closed family instance'},
'closed' => {'gettext_id' => 'closed list'},
);
# Old name: Sympa::List::get_option_title().
sub get_title {
my $option = shift;
my $type = shift || '';
my $withval = shift || 0;
my $map = {
'reception' => \%reception_mode,
'visibility' => \%visibility_mode,
'status' => \%list_status,
}->{$type}
|| \%list_option;
my $t = $map->{$option} || {};
if ($t->{'gettext_id'}) {
my $ret = $language->gettext($t->{'gettext_id'});
$ret =~ s/^\s+//;
$ret =~ s/\s+$//;
return sprintf '%s (%s)', $ret, $option if $withval;
return $ret;
}
return $option;
}
1;
__END__
=encoding utf-8
=head1 NAME
Sympa::ListOpt - Names of options