Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
myframa
Commits
a54c5d1d
Commit
a54c5d1d
authored
Sep 13, 2016
by
JosephK
Browse files
Fix
#12
parent
f7f9054d
Changes
3
Hide whitespace changes
Inline
Side-by-side
shaarli/plugins/recovery/recovery.php
View file @
a54c5d1d
...
...
@@ -17,12 +17,8 @@ function hook_recovery_render_tools($data)
{
$html
=
file_get_contents
(
PluginManager
::
$PLUGINS_PATH
.
'/recovery/tools.html'
);
// TODO: use preg_replace() instead
$html
=
str_replace
(
"{'Change email'|t}"
,
t
(
'Change email'
),
$html
);
$html
=
str_replace
(
"{'Change your recovery email'|t}"
,
t
(
'Change your recovery email'
),
$html
);
$html
=
str_replace
(
"
{
'Close'|t
}
"
,
t
(
'Close'
),
$html
);
$html
=
str_replace
(
"
{
'Email'|t
}
"
,
t
(
'Courriel'
),
$html
);
$html
=
str_replace
(
"{'Save config'|t}"
,
t
(
'Save config'
),
$html
);
function
translate
(
$matches
)
{
return
t
(
$matches
[
1
]);
}
$html
=
preg_replace_callback
(
'/\{\'(.+)\'\|t\}/i'
,
translate
,
$html
);
if
(
isset
(
$GLOBALS
[
'config'
][
'email'
]))
{
$html
=
str_replace
(
'value=""'
,
'value="'
.
htmlentities
(
$GLOBALS
[
'config'
][
'email'
])
.
'"'
,
$html
);
...
...
shaarli/plugins/tags_advanced/tags_advanced.php
View file @
a54c5d1d
...
...
@@ -10,17 +10,8 @@ function tags_advanced_config($taData)
$html
=
file_get_contents
(
PluginManager
::
$PLUGINS_PATH
.
'/tags_advanced/tools.html'
);
$html
=
str_replace
(
'{$token}'
,
getToken
()
,
$html
);
// TODO: use preg_replace() instead
$html
=
str_replace
(
"{'Tags advanced'|t}"
,
t
(
'Tags advanced'
),
$html
);
$html
=
str_replace
(
"
{
'Close'|t
}
"
,
t
(
'Close'
),
$html
);
$html
=
str_replace
(
"
{
'Order'|t
}
"
,
t
(
'Order'
),
$html
);
$html
=
str_replace
(
"
{
'Name'|t
}
"
,
t
(
'Name'
),
$html
);
$html
=
str_replace
(
"
{
'Icon'|t
}
"
,
t
(
'Icon'
),
$html
);
$html
=
str_replace
(
"
{
'Filter'|t
}
"
,
t
(
'Filter'
),
$html
);
$html
=
str_replace
(
"
{
'Pined?'|t
}
"
,
t
(
'Pined?'
),
$html
);
$html
=
str_replace
(
"
{
'Private?'|t
}
"
,
t
(
'Private?'
),
$html
);
$html
=
str_replace
(
"{'Add tag'|t}"
,
t
(
'Add tag'
),
$html
);
$html
=
str_replace
(
"
{
'Save'|t
}
"
,
t
(
'Save'
),
$html
);
function
translate
(
$matches
)
{
return
t
(
$matches
[
1
]);
}
$html
=
preg_replace_callback
(
'/\{\'(.+)\'\|t\}/i'
,
translate
,
$html
);
if
(
!
isset
(
$taData
)
||
empty
(
$taData
))
{
$taData
=
array
(
...
...
shaarli/plugins/tags_advanced/tools.html
View file @
a54c5d1d
...
...
@@ -15,7 +15,7 @@
<tr>
<th
scope=
"col"
><span
class=
"sr-only"
>
{'Order'|t}
</span></th>
<th
scope=
"col"
>
{'Name'|t}
</th>
<th
scope=
"col"
class=
"text-center hidden"
>
{'
'|t}
Icon
</th>
<!-- Class FontAwesome + color frama.css -->
<th
scope=
"col"
class=
"text-center hidden"
>
{'Icon
'|t}
</th>
<!-- Class FontAwesome + color frama.css -->
<th
scope=
"col"
><i
class=
"fa fa-fw fa-lg fa-filter"
></i>
{'Filter'|t}
</th>
<th
scope=
"col"
class=
"text-center"
><i
class=
"fa fa-fw fa-lg fa-map-pin"
></i><span
class=
"sr-only"
>
{'Pined?'|t}
</span></th>
<th
scope=
"col"
class=
"text-center"
><i
class=
"fa fa-fw fa-lg fa-key text-warning"
></i><span
class=
"sr-only"
>
{'Private?'|t}
</span></th>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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