OpenInteract2/Brick/Messages.pm

filter: Statementstmt 94.7% 18 / 19 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 4 totaltotal 81.2% 26 / 32 CC 2 SCAR 2.4
CC
2
Cov
90%
load
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« OpenInteract2/Brick/Daemon.pm ↑ Summary OpenInteract2/Brick/Apache2.pm »
1 package OpenInteract2::Brick::Messages;
2  
3 87 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 87 ▶use base qw( OpenInteract2::Brick );
Subroutine BEGIN: called CC=1 SCAR=0.0
5 87 ▶use OpenInteract2::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 87 my %INLINED_SUBS = (
8 'global-messages-en.msg' => 'GLOBALMESSAGESENMSG',
9 );
10  
11 87 ▶sub get_name {
Subroutine get_name: called CC=1 SCAR=0.0
Pod undocumented
12 87 return 'messages';
13 }
14  
15 2 ▶sub get_resources {
Subroutine get_resources: called CC=1 SCAR=0.0
Pod undocumented
16 return (
17 2 'global-messages-en.msg' => [ 'msg global-messages-en.msg', 'yes' ],
18 );
19 }
20  
21 1 ▶sub load {
Subroutine load: called CC=2 SCAR=7.4
Pod undocumented
22 1 my ( $self, $resource_name ) = @_;
23 1 my $inline_sub_name = $INLINED_SUBS{ $resource_name };
24 1 ▶ unless ( $inline_sub_name ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($inline_sub_name) 0 1 1
25 0 OpenInteract2::Exception->throw(
26 "Resource name '$resource_name' not found ",
27 "in ", ref( $self ), "; cannot load content." );
28 }
29 1 return $self->$inline_sub_name();
30 }
31  
32 87 OpenInteract2::Brick->register_factory_type( get_name() => __PACKAGE__ );
33  
34 =pod
35  
36 =head1 NAME
37  
38 OpenInteract2::Brick::Messages - All global localization messages
39  
40 =head1 SYNOPSIS
41  
42 oi2_manage create_website --website_dir=/path/to/site
43  
44 =head1 DESCRIPTION
45  
46 This class holds all global (non-package) localization messages.
47  
48 These resources are associated with OpenInteract2 version 1.99_06.
49  
50 =head2 Resources
51  
52 You can grab resources individually using the names below and
53 C<load_resource()> and C<copy_resources_to()>, or you can copy all the
54 resources at once using C<copy_all_resources_to()> -- see
55 L<OpenInteract2::Brick> for details.
56  
57 =over 4
58  
59  
60 =item B<global-messages-en.msg>
61  
62  
63 =back
64  
65 =head1 COPYRIGHT
66  
67 Copyright (c) 2005 Chris Winters. All rights reserved.
68  
69 This library is free software; you can redistribute it and/or modify
70 it under the same terms as Perl itself.
71  
72 =head1 AUTHORS
73  
74  
75 Chris Winters E<lt>chris@cwinters.comE<gt>
76  
77  
78 =cut
79  
80  
81 1 ▶sub GLOBALMESSAGESENMSG {
Subroutine GLOBALMESSAGESENMSG: called CC=1 SCAR=0.0
Pod undocumented
82 1 return <<'SOMELONGSTRING';
83 # These are the global messages for OI2 -- referenced by the templates
84 # in $WEBSITE_DIR/template and also by any template in the system
85  
86 # Globals -- standard labels for stuff you use all the time
87 global.not_available = n/a
88 global.button.modify = Modify
89 global.button.add = Add
90 global.button.remove = Remove
91 global.button.save = Save
92 global.button.go = Go!
93 global.button.search = Search
94 global.button.filter = Filter
95 global.button.reset = Reset
96 global.button.default = Submit
97 global.button.submit = Submit
98  
99 global.security_scope = Scope
100 global.security_label = Level
101 global.security_level.none = None
102 global.security_level.read = Read
103 global.security_level.write = Write
104 global.security_level.clear = Clear
105 global.label.error = Error
106 global.label.view = View
107 global.label.edit = Edit
108 global.label.nbsp = &nbsp;
109 global.label.new = New
110 global.label.yes = Yes
111 global.label.no = No
112  
113 global.exception.security = Security violation. Object requires '[_1]' but got '[_2]'
114  
115 # Attached to global templates
116 base_main.label.home = Home
117 base_main.label.users = Users
118 base_main.label.groups = Groups
119 base_main.label.pages = Pages
120 base_main.label.news = News
121 base_main.label.whats_new = What's New
122 base_main.label.search = Search
123 base_main.label.powered_by = Powered by OpenInteract!
124 base_main.label.logo = OpenInteract logo
125 base_main.phrase.questions = Questions? Check out \
126 <a href="http://www.openinteract.org/">the website</a>
127 c_a_error.title = Error
128 c_a_error.summary = This action encountered one or more errors:
129 error_msg.title = Error
130 error_not_found.title = File not found
131 error_not_found.summary = The URL you entered does not correspond to a page currently on \
132 this website. Please check the url and try again.
133 error_not_found.signed = Sincerely,<br>The Management
134 error_not_found.referer = <a href="[_1]">Back</a> to the page that brought you here
135 error_inactive.page_title = Error: Cannot Display Inactive Item
136 error_inactive.title = [_1] Inactive
137 error_inactive.summary = This item is currently inactive, which generally means it has not yet \
138 been approved by an administrator. Check back later.
139 error_security.page_title = Error: No Rights to Object
140 error_security.title = Security Violation
141 error_security.summary = You have insufficient rights to display the requested object.
142 error_forbidden.title = Task is Forbidden
143 error_forbidden.summary = You cannot accomplish the task you have requested due to \
144 security restrictions. If you believe there is a mistake, please \
145 contact <a href="mailto:[_1]">The Administrator</a>.
146 error_forbidden.signed = Sincerely,<br>The Management
147 error_no_default.title = Task Cannot be Completed
148 error_no_default.summary = The module you requested does not have a default task \
149 defined. Therefore your task cannot be completed. An email has already \
150 been sent to the module author, but if you'd like you can \
151 <a href="mailto:[_1]">do so yourself</a>.
152 error_no_default.signed = Sincerely,<br>The Management
153 form.default.user_list_first = User List...
154 global_javascript.confirm_remove = 'Do you want to remove ' + object_type + '(' + name + ') ?';
155 inactive_object.title = INACTIVE OBJECT
156 object_updates.new = brand new!
157 page_count.page_label = Page
158  
159 # Common Actions
160  
161 action.error.no_object_type = Object type is undefined. How can we know what to search \
162 or return? Please set it in your action configuration using the key 'c_object_type'.
163 action.error.no_class_for_type = Class for given object type '[_1]' is undefined. This may \
164 be a typo in your action configuration (check the key 'c_object_type').
165 action.error.no_id_field = Object ID field is undefined. We cannot know how to fetch an \
166 existing object without it. Please define the key 'id_field' in your object configuration.
167 action.error.no_id_value = No value found in action parameters or request for ID field '[_1]'
168 action.error.no_alt_id_value = also checked alternative ID field '[_1]'.
169 action.error.no_template = No template found in '[_1]' key. This template is mandatory for the task to function.
170 action.error.param_required = Action parameter '[_1]' is empty but required for the task to function.
171 action.error.security = Security violation: you do not have rights to retrieve the requested object.
172 action.error.fetch = Cannot retrieve object: [_1]
173 action.error.create = Object creation failed: [_1]
174 action.error.not_found = Object with ID '[_1]' not found
175 action.error.inactive = This object is currently inactive. Please check later.
176  
177 action.error.fetch_for_update = Cannot fetch object for update: [_1]
178 action.error.update_not_saved = You cannot update this object because it has not yet been saved.
179 action.error.update_security = You do not have sufficient access to update this object. No modifications made.
180 action.error.update = Object update failed: [_1]
181 action.error.fetch_for_remove = Cannot fetch object for removal: [_1]
182 action.error.remove_not_saved = You cannot remove this object because it has not yet been saved.
183 action.error.remove_security = You do not have sufficient access to remove this object. \
184 No modifications made.
185 action.error.remove = Object removal failed: [_1]
186 action.error.search_table_links = Misconfigured search: there should be either two or four \
187 entries in the 'c_search_table_links' section for table '[_1]' under action '[_2]'.
188 action.error.search_too_many_results = Your search has returned too many results ([_1]). \
189 Please try again.
190 action.status.create = [_1] created properly.
191 action.status.update = [_1] updated with changes.
192 action.status.remove = [_1] successfully removed.
193 SOMELONGSTRING
194 }
195  
« OpenInteract2/Brick/Daemon.pm ↑ Summary OpenInteract2/Brick/Apache2.pm »