Login/password localization improvement

Issue #462 resolved
Victor created an issue

Hi I've been working on translating the theme, and found out that words "Login" and "Password" that users see in the header are hard-coded. I suggest several improvements to this. 1.Change lines 197 and 198 in adaptable/layout/includes/header.php from:

<input style="height: 12px; padding-bottom: 4px;" type="text" name="username" placeholder="Username" size="10">
<input style="height: 12px; padding-bottom: 4px;" type="password" name="password" placeholder="Password"  size="10">

to:

<input style="height: 12px; padding-bottom: 4px;" type="text" name="username" placeholder="<?php echo get_string('loginplaceholder', 'theme_adaptable'); ?>" size="10">
<input style="height: 12px; padding-bottom: 4px;" type="password" name="password" placeholder="<?php echo get_string('passwordplaceholder', 'theme_adaptable'); ?>"  size="10">

2.Add following lines to adaptable/lang/en/theme_adaptable.php

$string['loginplaceholder'] = 'Login';
$string['passwordplaceholder'] = 'Password';

So these strings can be changed in local language folder.

Comments (4)

  1. Info 3bits

    Thank you for your proposal. You are right, the labels are hardcoded. Be were not aware until the spanish translation. It will fixed in the next version.

  2. Log in to comment