mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-21 21:17:37 -08:00
chromium-2.eclass: Handle non-standard _ suffixes in locale .pak files
These were recently added by Chromium for gender-based translations. _ is not a valid language tag character, so we strip this suffix when checking the USE flag, thereby grouping such files with their non-suffixed counterparts. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
parent
0dd83a54a2
commit
2572fa3e3c
@ -78,7 +78,7 @@ fi
|
|||||||
# not selected via the L10N variable.
|
# not selected via the L10N variable.
|
||||||
# Also performs QA checks to ensure CHROMIUM_LANGS has been set correctly.
|
# Also performs QA checks to ensure CHROMIUM_LANGS has been set correctly.
|
||||||
chromium_remove_language_paks() {
|
chromium_remove_language_paks() {
|
||||||
local lang pak
|
local lang pak suffixed
|
||||||
|
|
||||||
# Look for missing pak files.
|
# Look for missing pak files.
|
||||||
for lang in ${CHROMIUM_LANGS}; do
|
for lang in ${CHROMIUM_LANGS}; do
|
||||||
@ -93,8 +93,12 @@ chromium_remove_language_paks() {
|
|||||||
|
|
||||||
# Look for extra pak files.
|
# Look for extra pak files.
|
||||||
# Remove pak files that the user does not want.
|
# Remove pak files that the user does not want.
|
||||||
|
# Chromium includes pak files with non-standard _ suffixes. _ is not a valid
|
||||||
|
# language tag character, so we strip this suffix when checking the USE
|
||||||
|
# flag, thereby grouping such files with their non-suffixed counterparts.
|
||||||
for pak in *.pak; do
|
for pak in *.pak; do
|
||||||
lang=${pak%.pak}
|
suffixed=${pak%.pak}
|
||||||
|
lang=${suffixed%%_*}
|
||||||
|
|
||||||
if [[ ${lang} == en-US ]]; then
|
if [[ ${lang} == en-US ]]; then
|
||||||
continue
|
continue
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user