Last active
January 24, 2024 20:39
-
-
Save salif/15c7a29c01ffd3de2551bab92b5e4ccd to your computer and use it in GitHub Desktop.
Linux grep locales
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LANG=$(printf "$LC_MESSAGES" | cut -d '_' -f 1) | |
mkdir -p /tmp/${LANG}_locale | |
find /usr/share/locale/${LANG}/LC_MESSAGES/ -name '*.mo' | xargs -I "{}" sh -c "msgunfmt {} >> /tmp/${LANG}_locale/\$(basename {})" | |
grep -i -A 1 "" /tmp/${LANG}_locale/*.mo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment