Line 7
Link Here
|
|
|
7 |
PLOCALES="af ca cs da de eo es et eu fr hr id it ja kn ko nb nl pl pt_BR pt ru sl sv uk vi zh_CN zh_HK" |
8 |
PLOCALES_BACKUP="en" |
9 |
|
Line 9
Link Here
|
9 |
inherit perl-app |
12 |
inherit perl-app perl-module l10n |
10 |
-- |
|
|
Line 36
Link Here
|
|
|
39 |
|
40 |
src_prepare() { |
41 |
# Check against locale files in ${S}/pod/bin for mismatches |
42 |
# with languages listed in PLOCALES |
43 |
local locales_path="$S/po/bin" |
44 |
l10n_find_plocales_changes "$locales_path" "" ".po" |
45 |
|
46 |
# Array containing locale files to remove |
47 |
local locales_to_remove=( ) |
48 |
|
49 |
# Get rid of disabled locales |
50 |
my_get_disabled_locales() { |
51 |
local locale=$1 |
52 |
local locale_abs_path="$locales_path/$locale.po" |
53 |
locales_to_remove+=$locale_abs_path |
54 |
} |
55 |
|
56 |
l10n_for_each_disabled_locale_do my_get_disabled_locales |
57 |
|
58 |
einfo "Your LINGUAS contains the following locales: $LINGUAS" |
59 |
einfo "Removing locale files not listed in it ..." |
60 |
|
61 |
# perl_rm_files also updates the Manifest file |
62 |
# and therefore silences Perl as to .po files we're about to clean |
63 |
perl_rm_files "${locales_to_remove[@]}" |
64 |
} |