WBCE Home | WBCE Hilfe | WBCE Addon Repository | Impressum | Datenschutz

WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

You are not logged in.

#1 12.04.2019 03:48:07

losttrip
Member

Language hard coded in Access Users and Groups

WBCE 1.3.3
I found hard coded language (German) for ['ADD_GROUP'] and ['ADD_USER'] in the Admin Access :

\wbce\templates\wbce_flat_theme\templates\groups_form.htt (1 hit)
    Line 12:         <h3 class="fg12" id="header-add-group">Gruppe hinzufügen</h3>
\wbce\templates\wbce_flat_theme\templates\users_form.htt (1 hit)
    Line 11:     <h3 id="header-add-user" class="fg12">Benutzer hinzufügen</h3>

\wbce\templates\argos_theme_reloaded\templates\groups_form.htt (1 hit)
    Line 16:         <h3 class="fg12" id="header-add-group">Gruppe hinzufügen</h3>
\wbce\templates\argos_theme_reloaded\templates\users_form.htt (1 hit)
    Line 16:     <h3 id="header-add-user" class="fg12">Benutzer hinzufügen</h3>

I fixed it for myself, but thought it should be addressed in future versions.

Hope this helps.

Online

Liked by:

stefanek

#2 13.04.2019 11:15:37

stefanek
Developer

Re: Language hard coded in Access Users and Groups

Hello @losttrip,
thank you for reporting the issue and thus helping to make this CMS better.

I have created a PullRequest handling it for the upcoming WBCE release:
https://github.com/WBCE/WBCE_CMS/commit … ff93b62e5b

Kind regards,
Christian

Last edited by stefanek (13.04.2019 11:16:34)


"All the knowledge I possess everyone else can acquire, but my heart is all my own."
Johann Wolfgang von Goethe

Online

#3 13.04.2019 11:25:12

florian
Administrator

Re: Language hard coded in Access Users and Groups

Has been commited to master

Offline

Liked by:

stefanek

#4 13.04.2019 15:21:12

losttrip
Member

Re: Language hard coded in Access Users and Groups

Glad to help.

I realized that there is more hard coded language present (Benutzerverwaltung and cancel):
group hard coded language

and in users (Benutzerverwaltung):
users hard coded language

Online

#5 13.04.2019 15:37:34

stefanek
Developer

Re: Language hard coded in Access Users and Groups

Have you applied the changes from the files I updated?
I think I catched them all, but not sure...
If you'd like to check, that'd be cool.

Regards,
Christian


"All the knowledge I possess everyone else can acquire, but my heart is all my own."
Johann Wolfgang von Goethe

Online

#6 13.04.2019 16:59:44

losttrip
Member

Re: Language hard coded in Access Users and Groups

I don't have experience with github, but I am more than happy to check.
I assume I just manually open each of those files and remove anything that is highlighted in red and add anything in green.
Is that the process?

Online

#7 13.04.2019 18:10:49

florian
Administrator

Re: Language hard coded in Access Users and Groups

There were indeed some other hard coded headlines (they are replaced by JS for showing either "add" or "modify"). I've changed them too.

To answer your question, you can either apply the changes manually (right as you wrote, replace the red highlighted lines with the green ones, without the + / - in front of them of course). Maybe it works too, if you download the whole package, unzip it locally and replace the single affected files manually, but take care, there might be issues because they are for the upcoming version of WBCE.

Offline

#8 13.04.2019 18:13:16

losttrip
Member

Re: Language hard coded in Access Users and Groups

I am making the changes.  I have found differences in my file from version 1.3.3

admin/users/index.php looks like this

// Setup template object, parse vars to it, then parse it
// Create new template object
$template = new Template(dirname($admin->correct_theme_source('users_form.htt')));
// $template->debug = true;
$template->set_file('page', 'users_form.htt');
$template->set_block('page', 'main_block', 'main');
$template->set_var('DISPLAY_EXTRA', 'display:none;');
$template->set_var('ACTIVE_CHECKED', ' checked="checked"');
$template->set_var('ACTION_URL', ADMIN_URL.'/users/add.php');

so, I did this:

// Setup template object, parse vars to it, then parse it
// Create new template object
$template = new Template(dirname($admin->correct_theme_source('users_form.htt')));
// $template->debug = true;
$template->set_file('page', 'users_form.htt');
$template->set_block('page', 'main_block', 'main');
$template->set_var('HEADING_ADD_USER', $HEADING['ADD_USER']);
$template->set_var('TEXT_CANCEL', $TEXT['CANCEL']);
$template->set_var('DISPLAY_EXTRA', 'display:none;');
$template->set_var('ACTIVE_CHECKED', ' checked="checked"');
$template->set_var('ACTION_URL', ADMIN_URL.'/users/add.php');

I'm wondering, should there be something added here in wbce/admin/users/index.php  as well:

// Insert language text and messages
$template->set_var(array(
            'TEXT_CANCEL' => $TEXT['CANCEL'],
            'TEXT_RESET' => $TEXT['RESET'],
            'TEXT_ACTIVE' => $TEXT['ACTIVE'],
            'TEXT_DISABLED' => $TEXT['DISABLED'],
            'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'],
            'TEXT_USERNAME' => $TEXT['USERNAME'],
            'TEXT_PASSWORD' => $TEXT['PASSWORD'],
            'TEXT_RETYPE_PASSWORD' => $TEXT['RETYPE_PASSWORD'],
            'TEXT_DISPLAY_NAME' => $TEXT['DISPLAY_NAME'],
            'TEXT_EMAIL' => $TEXT['EMAIL'],
            'TEXT_GROUP' => $TEXT['GROUP'],
            'TEXT_NONE' => $TEXT['NONE'],
            'TEXT_HOME_FOLDER' => $TEXT['HOME_FOLDER'],
            'USERNAME_FIELDNAME' => $username_fieldname,
            'CHANGING_PASSWORD' => $MESSAGE['USERS_CHANGING_PASSWORD']
            )
    );

as I am still seeing hard coded language and missing Cancel.

Online

#9 13.04.2019 18:20:22

losttrip
Member

Re: Language hard coded in Access Users and Groups

Here is what modify groups looks like now:
https://www.mysite.com/admin/groups/groups.php
modify groups
hard coded - Gruppe ändern
missing - Cancel

Modify user
https://www.mysite.com/admin/users/users.php
midify user

hard coded - Benutzer ändern

Online

#10 13.04.2019 18:24:38

florian
Administrator

Re: Language hard coded in Access Users and Groups

Will be fixed in 1.4

Offline

#11 13.04.2019 20:32:23

losttrip
Member

Re: Language hard coded in Access Users and Groups

florian wrote:

Will be fixed in 1.4

Glad to hear.

I am going to assume that by saying that, you are letting me know that it is a more involved fix to go through and patch everything manually... and that you suggest I wait until the release of 1.4?  If that is the case, I am cool with that.  I just want to know if that is what you are saying.

I am sure I followed all the steps (I've checked my changes a few times now), but if you are saying I must have missed something, I am happy to go through it all again.

I understand this is a very busy time for the developers.

Last edited by losttrip (13.04.2019 20:33:18)

Online

#12 13.04.2019 21:01:11

florian
Administrator

Re: Language hard coded in Access Users and Groups

Did you also modify the users_form.htt and groups_form files in the backend theme directory?
Right before the end of file the headline is replaced with jquery. Did you replace the hard coded german string there?
Should look like this:

<script>
	$(document).ready(function(){
		if ($('#header-modify-user').css('display') != 'none') {
			$('#header-add-user').html('{HEADING_MODIFY_USER}');
		}
	});
</script>

The missing "cancel" was forgotten in our first approach to correct the issue, this has indeed to be fixed (added) in the /admin/groups/groups.php file.

If there are further issues, I would indeed propose you wait until the release of 1.4 and update your site(s) then. It won't take very long any more, I hope.

Offline

Liked by:

stefanek

#13 13.04.2019 21:09:43

losttrip
Member

Re: Language hard coded in Access Users and Groups

I did not see those particular changes in the github.  But, I did search around and found those and was literally just working on that script section.  Both are corrected now.  Thank you for following up.

I will try to fix the missing cancel for myself and let you get back to work.

Edit:
Got the "Cancel" added in.  thank you both so much for taking the time to help,  Looking forward to the future of WBCE.

Last edited by losttrip (13.04.2019 21:13:44)

Online

Liked by:

stefanek, florian

Board footer

Powered by FluxBB

up