Skip to content

Commit 2e890e9

Browse files
author
nikrou
committed
Feature 1451 : localization with gettext
Use php-gettext (developpement version rev43, because of php5.3) as fallback Use native language (english) instead of key for translation Keep directory en_UK for english customization Need some refactoring for plurals Todo : managing plugins in the same way git-svn-id: http://piwigo.org/svn/trunk@5021 68402e56-0260-453c-a942-63ccdbb3a9ee
1 parent 35694a6 commit 2e890e9

135 files changed

Lines changed: 22901 additions & 687 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

about.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
//
3535
// Start output of page
3636
//
37-
$title= l10n('about_page_title');
37+
$title= l10n('About Piwigo');
3838
$page['body_id'] = 'theAboutPage';
3939
include(PHPWG_ROOT_PATH.'include/page_header.php');
4040

admin/advanced_feature.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@
6666
array_push($advanced_features,
6767
array
6868
(
69-
'CAPTION' => l10n('Elements_not_linked'),
69+
'CAPTION' => l10n('Not linked elements'),
7070
'URL' => get_root_url().'admin.php?page=element_set&cat=not_linked'
7171
));
7272

7373
array_push($advanced_features,
7474
array
7575
(
76-
'CAPTION' => l10n('Duplicates'),
76+
'CAPTION' => l10n('Files with same name in more than one physical category'),
7777
'URL' => get_root_url().'admin.php?page=element_set&cat=duplicates'
7878
));
7979

admin/cat_list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function save_categories_order($categories)
6868

6969
$base_url = get_root_url().'admin.php?page=cat_list';
7070
$navigation = '<a href="'.$base_url.'">';
71-
$navigation.= l10n('home');
71+
$navigation.= l10n('Home');
7272
$navigation.= '</a>';
7373

7474
// +-----------------------------------------------------------------------+
@@ -78,7 +78,7 @@ function save_categories_order($categories)
7878
if (isset($_GET['delete']) and is_numeric($_GET['delete']) and !is_adviser())
7979
{
8080
delete_categories(array($_GET['delete']));
81-
array_push($page['infos'], l10n('cat_virtual_deleted'));
81+
array_push($page['infos'], l10n('Virtual category deleted'));
8282
update_global_rank();
8383
}
8484
// request to add a virtual category

admin/cat_modify.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
move_categories( array($_GET['cat_id']), $_POST['parent'] );
111111
}
112112

113-
array_push($page['infos'], l10n('editcat_confirm'));
113+
array_push($page['infos'], l10n('Category informations updated successfully.'));
114114
}
115115
elseif (isset($_POST['set_random_representant']))
116116
{
@@ -316,7 +316,7 @@
316316
'date_creation' => l10n('Creation date'),
317317
'date_available' => l10n('Post date'),
318318
'average_rate' => l10n('Average rate'),
319-
'hit' => l10n('most_visited_cat'),
319+
'hit' => l10n('Most visited'),
320320
'file' => l10n('File name'),
321321
'id' => 'Id',
322322
'rank' => l10n('Rank'),
@@ -516,7 +516,7 @@
516516
array_push(
517517
$page['infos'],
518518
sprintf(
519-
l10n('An information email was sent to group "%s"'),
519+
l10n('An information email was sent to group \"%s\"'),
520520
$group_name
521521
)
522522
);

admin/cat_options.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@
160160
$tabsheet = new tabsheet();
161161
// TabSheet initialization
162162
$opt_link = $link_start.'cat_options&amp;section=';
163-
$tabsheet->add('status', l10n('cat_security'), $opt_link.'status');
164-
$tabsheet->add('visible', l10n('lock'), $opt_link.'visible');
165-
$tabsheet->add('upload', l10n('upload'), $opt_link.'upload');
166-
$tabsheet->add('comments', l10n('comments'), $opt_link.'comments');
163+
$tabsheet->add('status', l10n('Public / Private'), $opt_link.'status');
164+
$tabsheet->add('visible', l10n('Lock'), $opt_link.'visible');
165+
$tabsheet->add('Upload', l10n('Upload'), $opt_link.'Upload');
166+
$tabsheet->add('Comments', l10n('Comments'), $opt_link.'Comments');
167167
if ($conf['allow_random_representative'])
168168
{
169169
$tabsheet->add('representative', l10n('Representative'), $opt_link.'representative');
@@ -208,9 +208,9 @@
208208
;';
209209
$template->assign(
210210
array(
211-
'L_SECTION' => l10n('cat_upload_title'),
212-
'L_CAT_OPTIONS_TRUE' => l10n('authorized'),
213-
'L_CAT_OPTIONS_FALSE' => l10n('forbidden'),
211+
'L_SECTION' => l10n('Select uploadable categories'),
212+
'L_CAT_OPTIONS_TRUE' => l10n('Authorized'),
213+
'L_CAT_OPTIONS_FALSE' => l10n('Forbidden'),
214214
)
215215
);
216216
break;
@@ -229,9 +229,9 @@
229229
;';
230230
$template->assign(
231231
array(
232-
'L_SECTION' => l10n('cat_comments_title'),
233-
'L_CAT_OPTIONS_TRUE' => l10n('authorized'),
234-
'L_CAT_OPTIONS_FALSE' => l10n('forbidden'),
232+
'L_SECTION' => l10n('Authorize users to add comments on selected categories'),
233+
'L_CAT_OPTIONS_TRUE' => l10n('Authorized'),
234+
'L_CAT_OPTIONS_FALSE' => l10n('Forbidden'),
235235
)
236236
);
237237
break;
@@ -250,9 +250,9 @@
250250
;';
251251
$template->assign(
252252
array(
253-
'L_SECTION' => l10n('cat_lock_title'),
254-
'L_CAT_OPTIONS_TRUE' => l10n('unlocked'),
255-
'L_CAT_OPTIONS_FALSE' => l10n('locked'),
253+
'L_SECTION' => l10n('Lock categories'),
254+
'L_CAT_OPTIONS_TRUE' => l10n('Unlocked'),
255+
'L_CAT_OPTIONS_FALSE' => l10n('Locked'),
256256
)
257257
);
258258
break;
@@ -271,9 +271,9 @@
271271
;';
272272
$template->assign(
273273
array(
274-
'L_SECTION' => l10n('cat_status_title'),
275-
'L_CAT_OPTIONS_TRUE' => l10n('cat_public'),
276-
'L_CAT_OPTIONS_FALSE' => l10n('cat_private'),
274+
'L_SECTION' => l10n('Manage authorizations for selected categories'),
275+
'L_CAT_OPTIONS_TRUE' => l10n('Public category'),
276+
'L_CAT_OPTIONS_FALSE' => l10n('Private category'),
277277
)
278278
);
279279
break;

admin/configuration.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
{
8787
if ( !url_is_remote($_POST['gallery_url']) )
8888
{
89-
array_push($page['errors'], l10n('conf_gallery_url_error'));
89+
array_push($page['errors'], l10n('The gallery URL is not valid.'));
9090
}
9191
foreach( $main_checkboxes as $checkbox)
9292
{
@@ -110,7 +110,7 @@
110110
or $_POST['nb_comment_page'] < 5
111111
or $_POST['nb_comment_page'] > 50)
112112
{
113-
array_push($page['errors'], l10n('conf_nb_comment_page_error'));
113+
array_push($page['errors'], l10n('The number of comments a page must be between 5 and 50 included.'));
114114
}
115115
foreach( $comments_checkboxes as $checkbox)
116116
{
@@ -160,7 +160,7 @@
160160
pwg_query($query);
161161
}
162162
}
163-
array_push($page['infos'], l10n('conf_confirmation'));
163+
array_push($page['infos'], l10n('Information data registered in database'));
164164
}
165165

166166
//------------------------------------------------------ $conf reinitialization
@@ -173,11 +173,11 @@
173173
// TabSheet
174174
$tabsheet = new tabsheet();
175175
// TabSheet initialization
176-
$tabsheet->add('main', l10n('conf_main_title'), $conf_link.'main');
177-
$tabsheet->add('history', l10n('conf_history_title'), $conf_link.'history');
178-
$tabsheet->add('comments', l10n('conf_comments_title'), $conf_link.'comments');
179-
$tabsheet->add('upload', l10n('conf_upload_title'), $conf_link.'upload');
180-
$tabsheet->add('default', l10n('conf_display'), $conf_link.'default');
176+
$tabsheet->add('main', l10n('Main'), $conf_link.'main');
177+
$tabsheet->add('history', l10n('History'), $conf_link.'history');
178+
$tabsheet->add('comments', l10n('Comments'), $conf_link.'comments');
179+
$tabsheet->add('upload', l10n('Upload'), $conf_link.'upload');
180+
$tabsheet->add('default', l10n('Default display'), $conf_link.'default');
181181
// TabSheet selection
182182
$tabsheet->select($page['section']);
183183
// Assign tabsheet to template
@@ -285,7 +285,7 @@
285285
{
286286
// Reload user
287287
$edit_user = build_user($conf['default_user_id'], false);
288-
array_push($page['infos'], l10n('conf_confirmation'));
288+
array_push($page['infos'], l10n('Information data registered in database'));
289289
}
290290
}
291291
$page['errors'] = array_merge($page['errors'], $errors);

admin/element_set.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
}
133133
else if ('not_linked' == $_GET['cat'])
134134
{
135-
$page['title'] = l10n('Elements_not_linked');
135+
$page['title'] = l10n('Not linked elements');
136136
$template->assign(array('U_ACTIVE_MENU' => 5 ));
137137

138138
// we are searching elements not linked to any virtual category
@@ -163,7 +163,7 @@
163163
}
164164
else if ('duplicates' == $_GET['cat'])
165165
{
166-
$page['title'] = l10n('Duplicates');
166+
$page['title'] = l10n('Files with same name in more than one physical category');
167167
$template->assign(array('U_ACTIVE_MENU' => 5 ));
168168

169169
// we are searching related elements twice or more to physical categories
@@ -189,7 +189,7 @@
189189
}
190190
elseif ('recent'== $_GET['cat'])
191191
{
192-
$page['title'] = l10n('recent_pics_cat');
192+
$page['title'] = l10n('Recent pictures');
193193
$query = 'SELECT MAX(date_available) AS date
194194
FROM '.IMAGES_TABLE;
195195
if ($row = pwg_db_fetch_assoc( pwg_query($query) ) )

admin/extend_for_templates.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
if (pwg_query($query))
147147
{
148148
array_push($page['infos'],
149-
l10n('Templates recorded.'));
149+
l10n('Templates configuration has been recorded.'));
150150
}
151151
}
152152

admin/group_list.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373
array_push(
7474
$page['infos'],
75-
sprintf(l10n('group "%s" deleted'), $groupname)
75+
sprintf(l10n('group \"%s\" deleted'), $groupname)
7676
);
7777
}
7878

@@ -84,7 +84,7 @@
8484
{
8585
if (empty($_POST['groupname']))
8686
{
87-
array_push($page['errors'], l10n('group_add_error1'));
87+
array_push($page['errors'], l10n('The name of a group must not contain \" or \' or be empty.'));
8888
}
8989
if (count($page['errors']) == 0)
9090
{
@@ -97,7 +97,7 @@
9797
list($count) = pwg_db_fetch_row(pwg_query($query));
9898
if ($count != 0)
9999
{
100-
array_push($page['errors'], l10n('group_add_error2'));
100+
array_push($page['errors'], l10n('This name is already used by another group.'));
101101
}
102102
}
103103
if (count($page['errors']) == 0)
@@ -113,7 +113,7 @@
113113

114114
array_push(
115115
$page['infos'],
116-
sprintf(l10n('group "%s" added'), $_POST['groupname'])
116+
sprintf(l10n('group \"%s\" added'), $_POST['groupname'])
117117
);
118118
}
119119
}
@@ -141,7 +141,7 @@
141141

142142
array_push(
143143
$page['infos'],
144-
sprintf(l10n('group "%s" updated'), $groupname)
144+
sprintf(l10n('group \"%s\" updated'), $groupname)
145145
);
146146
}
147147

@@ -188,7 +188,7 @@
188188
'groups',
189189
array(
190190
'NAME' => $row['name'],
191-
'IS_DEFAULT' => (get_boolean($row['is_default']) ? ' ['.l10n('is_default_group').']' : ''),
191+
'IS_DEFAULT' => (get_boolean($row['is_default']) ? ' ['.l10n('default').']' : ''),
192192
'MEMBERS' => l10n_dec('%d member', '%d members', $counter),
193193
'U_MEMBERS' => $members_url.$row['id'],
194194
'U_DELETE' => $del_url.$row['id'],

admin/group_perm.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@
132132
array(
133133
'TITLE' =>
134134
sprintf(
135-
l10n('Manage permissions for group "%s"'),
135+
l10n('Manage permissions for group \"%s\"'),
136136
get_groupname($page['group']
137137
)
138138
),
139-
'L_CAT_OPTIONS_TRUE'=>l10n('authorized'),
140-
'L_CAT_OPTIONS_FALSE'=>l10n('forbidden'),
139+
'L_CAT_OPTIONS_TRUE'=>l10n('Authorized'),
140+
'L_CAT_OPTIONS_FALSE'=>l10n('Forbidden'),
141141

142142
'F_ACTION' =>
143143
get_root_url().

0 commit comments

Comments
 (0)