Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
0dbf35ea
Commit
0dbf35ea
authored
Jul 31, 2009
by
Ben Bradshaw
Browse files
[2994] Better internationalisation support for this fix
parent
714e9791
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/blocktype/lib.php
View file @
0dbf35ea
...
...
@@ -449,20 +449,14 @@ class BlockInstance {
$content
=
''
;
}
$blocktitle
=
$this
->
get
(
'title'
);
if
(
trim
(
$blocktitle
)
==
""
)
{
$blocktitle
=
"this"
;
}
else
{
$blocktitle
=
"'"
.
$blocktitle
.
"'"
;
}
if
(
!
defined
(
'JSON'
)
&&
!
$jsreply
)
{
if
(
$this
->
get
(
'canmoveleft'
))
{
$movecontrols
[]
=
array
(
'column'
=>
$this
->
get
(
'column'
)
-
1
,
'order'
=>
$this
->
get
(
'order'
),
'title'
=>
get_string
(
'moveblockleft'
,
'view'
,
$blocktitle
),
'title'
=>
trim
(
$this
->
get
(
'title'
))
==
''
?
get_string
(
'movethisblockleft'
,
'view'
)
:
get_string
(
'moveblockleft'
,
'view'
,
"'"
.
$this
->
get
(
'title'
)
.
"'"
),
'arrow'
=>
'←'
,
'dir'
=>
'left'
,
);
...
...
@@ -471,7 +465,9 @@ class BlockInstance {
$movecontrols
[]
=
array
(
'column'
=>
$this
->
get
(
'column'
),
'order'
=>
$this
->
get
(
'order'
)
+
1
,
'title'
=>
get_string
(
'moveblockdown'
,
'view'
,
$blocktitle
),
'title'
=>
trim
(
$this
->
get
(
'title'
))
==
''
?
get_string
(
'movethisblockdown'
,
'view'
)
:
get_string
(
'moveblockdown'
,
'view'
,
"'"
.
$this
->
get
(
'title'
)
.
"'"
),
'arrow'
=>
'↓'
,
'dir'
=>
'down'
,
);
...
...
@@ -480,7 +476,9 @@ class BlockInstance {
$movecontrols
[]
=
array
(
'column'
=>
$this
->
get
(
'column'
),
'order'
=>
$this
->
get
(
'order'
)
-
1
,
'title'
=>
get_string
(
'moveblockup'
,
'view'
,
$blocktitle
),
'title'
=>
trim
(
$this
->
get
(
'title'
))
==
''
?
get_string
(
'movethisblockup'
,
'view'
)
:
get_string
(
'moveblockup'
,
'view'
,
"'"
.
$this
->
get
(
'title'
)
.
"'"
),
'arrow'
=>
'↑'
,
'dir'
=>
'up'
,
);
...
...
@@ -489,7 +487,9 @@ class BlockInstance {
$movecontrols
[]
=
array
(
'column'
=>
$this
->
get
(
'column'
)
+
1
,
'order'
=>
$this
->
get
(
'order'
),
'title'
=>
get_string
(
'moveblockright'
,
'view'
,
$blocktitle
),
'title'
=>
trim
(
$this
->
get
(
'title'
))
==
''
?
get_string
(
'movethisblockright'
,
'view'
)
:
get_string
(
'moveblockright'
,
'view'
,
"'"
.
$this
->
get
(
'title'
)
.
"'"
),
'arrow'
=>
'→'
,
'dir'
=>
'right'
,
);
...
...
@@ -511,7 +511,8 @@ class BlockInstance {
$smarty
->
assign
(
'content'
,
$content
);
$smarty
->
assign
(
'javascript'
,
defined
(
'JSON'
));
$smarty
->
assign
(
'strnotitle'
,
get_string
(
'notitle'
,
'view'
));
$smarty
->
assign
(
'blocktitle'
,
array
(
$blocktitle
));
$smarty
->
assign
(
'strconfigtitletext'
,
trim
(
$this
->
get
(
'title'
))
==
''
?
get_string
(
'configurethisblock'
,
'view'
)
:
get_string
(
'configureblock'
,
'view'
,
"'"
.
$this
->
get
(
'title'
)
.
"'"
));
$smarty
->
assign
(
'strremovetitletext'
,
trim
(
$this
->
get
(
'title'
))
==
''
?
get_string
(
'removethisblock'
,
'view'
)
:
get_string
(
'removeblock'
,
'view'
,
"'"
.
$this
->
get
(
'title'
)
.
"'"
));
return
array
(
'html'
=>
$smarty
->
fetch
(
'view/blocktypecontainerediting.tpl'
),
'javascript'
=>
$js
);
}
...
...
htdocs/lang/en.utf8/view.php
View file @
0dbf35ea
...
...
@@ -203,12 +203,18 @@ $string['add'] = 'Add';
$string
[
'addcolumn'
]
=
'Add Column'
;
$string
[
'removecolumn'
]
=
'Remove this column'
;
$string
[
'moveblockleft'
]
=
"Move %s block left"
;
$string
[
'movethisblockleft'
]
=
"Move this block left"
;
$string
[
'moveblockdown'
]
=
"Move %s block down"
;
$string
[
'movethisblockdown'
]
=
"Move this block down"
;
$string
[
'moveblockup'
]
=
"Move %s block up"
;
$string
[
'movethisblockup'
]
=
"Move this block up"
;
$string
[
'moveblockright'
]
=
"Move %s block right"
;
$string
[
'movethisblockright'
]
=
"Move this block right"
;
$string
[
'Configure'
]
=
'Configure'
;
$string
[
'configureblock'
]
=
'Configure %s block'
;
$string
[
'configurethisblock'
]
=
'Configure this block'
;
$string
[
'removeblock'
]
=
'Remove %s block'
;
$string
[
'removethisblock'
]
=
'Remove this block'
;
$string
[
'blocktitle'
]
=
'Block Title'
;
$string
[
'changemyviewlayout'
]
=
'Change My View Layout'
;
...
...
htdocs/theme/raw/templates/view/blocktypecontainerediting.tpl
View file @
0dbf35ea
...
...
@@ -7,8 +7,8 @@
{
assign
var
=
direction
value
=
$item.dir
}
<input
type=
"image"
src=
"
{
theme_url
filename
=
images
/
move
-
block
-
$direction.png
}
"
class=
"submit movebutton"
name=
"action_moveblockinstance_id_
{
$id
}
_column_
{
$item.column
}
_order_
{
$item.order
}
"
alt=
"
{
$item.arrow
}
"
title=
"
{
$item.title
}
"
>
{/
foreach
}
{
if
$configurable
&&
!
$configure
}
<input
type=
"image"
src=
"
{
theme_url
filename
=
images
/
configure
-
block
.
png
}
"
class=
"submit configurebutton"
name=
"action_configureblockinstance_id_
{
$id
}
"
alt=
"•"
title=
"
{
str
tag
=
'configureblock'
section
=
'view'
args
=
$blocktitl
e
}
"
>
{/
if
}
<input
type=
"image"
src=
"
{
theme_url
filename
=
images
/
remove
-
block
.
png
}
"
class=
"cancel deletebutton"
name=
"action_removeblockinstance_id_
{
$id
}
"
alt=
"X"
title=
"
{
str
tag
=
'removeblock'
section
=
'view'
args
=
$blocktitl
e
}
"
>
{
if
$configurable
&&
!
$configure
}
<input
type=
"image"
src=
"
{
theme_url
filename
=
images
/
configure
-
block
.
png
}
"
class=
"submit configurebutton"
name=
"action_configureblockinstance_id_
{
$id
}
"
alt=
"•"
title=
"
{
$
str
configtitletext
|
escap
e
}
"
>
{/
if
}
<input
type=
"image"
src=
"
{
theme_url
filename
=
images
/
remove
-
block
.
png
}
"
class=
"cancel deletebutton"
name=
"action_removeblockinstance_id_
{
$id
}
"
alt=
"X"
title=
"
{
$
str
removetitletext
|
escap
e
}
"
>
</div>
<div
class=
"blockinstance-content"
>
{
$content
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment