Skip to content

Commit

Permalink
MDL-22050 removing moodle/langconfig duplicates
Browse files Browse the repository at this point in the history
AMOS BEGIN
  MOV [alphabet,core],[alphabet,core_langconfig]
AMOS END
  • Loading branch information
skodak committed Apr 10, 2010
1 parent b8fc958 commit 61bb07c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion admin/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
echo $OUTPUT->heading("$usercount ".get_string('users'));
}

$alphabet = explode(',', get_string('alphabet'));
$alphabet = explode(',', get_string('alphabet', 'langconfig'));
$strall = get_string('all');

$baseurl = new moodle_url('user.php', array('sort' => $sort, 'dir' => $dir, 'perpage' => $perpage));
Expand Down
1 change: 0 additions & 1 deletion lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@
$string['allownot'] = 'Do not allow';
$string['allparticipants'] = 'All participants';
$string['allteachers'] = 'All teachers';
$string['alphabet'] = 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
$string['alphanumerical'] = 'Can only contain alphanumeric characters, hyphen (-) or period (.)';
$string['alreadyconfirmed'] = 'Registration has already been confirmed';
$string['always'] = 'Always';
Expand Down
9 changes: 5 additions & 4 deletions lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5856,9 +5856,6 @@ public function load_component_strings($component, $lang) {
* @return string The String !
*/
public function get_string($identifier, $component='', $a=NULL) {
if (empty($component)) {
$component = 'moodle';
}
// this will be replaced by merging of lang and langconfig
static $langconfigstrs = array('alphabet' => 1, 'backupnameformat' => 1, 'decsep' => 1,
'firstdayofweek' => 1, 'listsep' => 1, 'locale' => 1, 'localewin' => 1,
Expand All @@ -5870,10 +5867,14 @@ public function get_string($identifier, $component='', $a=NULL) {
'thischarset' => 1, 'thisdirection' => 1, 'thislanguage' => 1,
'strftimedatetimeshort' => 1, 'thousandssep' => 1);

if ((empty($component) or $component === 'moodle') and isset($langconfigstrs[$identifier])) {
if ((empty($component)) and isset($langconfigstrs[$identifier])) {
$component = 'core_langconfig';
}

if (empty($component)) {
$component = 'moodle';
}

$lang = current_language();

$string = $this->load_component_strings($component, $lang);
Expand Down
2 changes: 1 addition & 1 deletion lib/tablelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ function print_initials_bar(){
&& isset($this->columns['fullname'])) {

$strall = get_string('all');
$alpha = explode(',', get_string('alphabet'));
$alpha = explode(',', get_string('alphabet', 'langconfig'));

// Bar of first initials

Expand Down
2 changes: 1 addition & 1 deletion user/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@
$firstinitial = $table->get_initial_first();
$lastinitial = $table->get_initial_last();
$strall = get_string('all');
$alpha = explode(',', get_string('alphabet'));
$alpha = explode(',', get_string('alphabet', 'langconfig'));

// Bar of first initials

Expand Down

0 comments on commit 61bb07c

Please sign in to comment.