[SOLVED]Changing lock/unlock text

Moderator: crythias

Post Reply
Eggllo
Znuny newbie
Posts: 79
Joined: 09 Jun 2016, 14:27
Znuny Version: 5.0.10

[SOLVED]Changing lock/unlock text

Post by Eggllo »

Hi all,

Is there any way to change the system text from "lock" to "locked" and from "unlock" to "unlocked" when you are looking at ticket information or a ticket overview? It may seem like a silly thing to want to change but it's been confusing some users of our system.

I tried changing to a different language and translating lock to locked (we use en, so changing to en_CA wouldn't have really had much of an effect other than this) but that didn't seem to do anything. Is there anywhere this could be customized?

Thanks
Last edited by Eggllo on 27 Jun 2016, 16:52, edited 1 time in total.
OTRS v5.0.10 with ITSM extension.
MySQL database
Ubuntu 16.04 LTS
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Changing lock/unlock text

Post by reneeb »

Did you try to add those changed values in a custom translation file?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Eggllo
Znuny newbie
Posts: 79
Joined: 09 Jun 2016, 14:27
Znuny Version: 5.0.10

Re: Changing lock/unlock text

Post by Eggllo »

I did, but it doesn't seem to have changed anything. Would it be correct that I made an en_Custom.pm with my custom translations inside of it?

Code: Select all

package Kernel::Language::xx_Custom;

use strict;
use warnings;

use vars qw(@ISA $VERSION);
$VERSION = qw($Revision: 1.4 $) [1];

sub Data {
    my $Self = shift;

    # $$START$$

    # own translations
    $Self->{Translation}->{'Lock'} = 'Locked';
    $Self->{Translation}->{'Unlock'} = 'Unlocked';

    # $$STOP$$
    return 1;
}

1;
     
Last edited by Eggllo on 27 Jun 2016, 16:57, edited 1 time in total.
OTRS v5.0.10 with ITSM extension.
MySQL database
Ubuntu 16.04 LTS
Eggllo
Znuny newbie
Posts: 79
Joined: 09 Jun 2016, 14:27
Znuny Version: 5.0.10

Re: Changing lock/unlock text

Post by Eggllo »

Update:

I just realized my stupid mistake when I posted my last reply. I somehow managed to forget to change the package name for my custom translation. After changing that everything works perfectly. I also removed

Code: Select all

use vars qw(@ISA $VERSION);
$VERSION = qw($Revision: 1.4 $) [1];
and added

Code: Select all

use utf8;
Thanks for the help reneeb.
OTRS v5.0.10 with ITSM extension.
MySQL database
Ubuntu 16.04 LTS
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: [SOLVED]Changing lock/unlock text

Post by crythias »

Just wanted to point out that the logic behind the scenes may want the verb to be "Do this" versus "is done", unless you want to say "Make it be this".
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Eggllo
Znuny newbie
Posts: 79
Joined: 09 Jun 2016, 14:27
Znuny Version: 5.0.10

Re: [SOLVED]Changing lock/unlock text

Post by Eggllo »

Hi cynthias,

I actually realized this afterwards myself, but OTRS seems to have kept the two separate by using Lock vs lock and Unlock vs unlock, so I was able to get the result that I wanted by changing the translations a bit and only modifying the lowercase versions.

Code: Select all

$Self->{Translation}->{'lock}   = 'Locked';
$Self->{Translation}->{'unlock}   = 'Unlocked';
OTRS v5.0.10 with ITSM extension.
MySQL database
Ubuntu 16.04 LTS
Post Reply