View | Details | Raw Unified | Return to bug 25517
Collapse All | Expand All

(-)a/Koha/I18N.pm (-2 / +15 lines)
Lines 24-29 use C4::Languages; Link Here
24
use C4::Context;
24
use C4::Context;
25
25
26
use Encode;
26
use Encode;
27
use List::Util qw( first );
27
use Locale::Messages qw(:locale_h LC_MESSAGES);
28
use Locale::Messages qw(:locale_h LC_MESSAGES);
28
use POSIX qw( setlocale );
29
use POSIX qw( setlocale );
29
use Koha::Cache::Memory::Lite;
30
use Koha::Cache::Memory::Lite;
Lines 176-182 sub N__np { Link Here
176
}
177
}
177
178
178
sub _base_directory {
179
sub _base_directory {
179
    return C4::Context->config('intranetdir') . '/misc/translator/po';
180
    # Directory structure is not the same for dev and standard installs
181
    # Here we test the existence of several directories and use the first that exist
182
    # FIXME There has to be a better solution
183
    my @dirs = (
184
        C4::Context->config('intranetdir') . '/misc/translator/po',
185
        C4::Context->config('intranetdir') . '/../../misc/translator/po',
186
    );
187
    my $dir = first { -d } @dirs;
188
189
    unless ($dir) {
190
        die "The PO directory has not been found. There is a problem in your Koha installation.";
191
    }
192
193
    return $dir;
180
}
194
}
181
195
182
sub _gettext {
196
sub _gettext {
183
- 

Return to bug 25517